Files
Flexera-Launcher/tests/multivalentTests/src/com/android/launcher3/util/DaggerGraphs.kt
T
Sunny Goyal d7bfa76bcc Migrating RecentsAnimationDeviceState and dependent objects to Dagger
Bug: 361850561
Flag: EXEMPT dagger
Test: Presubmit

Change-Id: I2c45ec49a913abb0532e83b09e797012e06eb8c4
2025-01-21 23:53:02 -08:00

54 lines
1.7 KiB
Kotlin

/*
* Copyright (C) 2025 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.launcher3.util
import com.android.launcher3.FakeLauncherPrefs
import com.android.launcher3.LauncherPrefs
import com.android.launcher3.dagger.ApiWrapperModule
import com.android.launcher3.dagger.AppModule
import com.android.launcher3.dagger.StaticObjectModule
import com.android.launcher3.dagger.WindowManagerProxyModule
import dagger.Binds
import dagger.Module
private class DaggerGraphs {}
@Module
abstract class FakePrefsModule {
@Binds abstract fun bindLauncherPrefs(prefs: FakeLauncherPrefs): LauncherPrefs
}
/** All modules. We also exclude the plugin module from tests */
@Module(
includes =
[
ApiWrapperModule::class,
WindowManagerProxyModule::class,
StaticObjectModule::class,
AppModule::class,
]
)
class AllModulesForTest
/** All modules except the WMProxy */
@Module(includes = [ApiWrapperModule::class, StaticObjectModule::class, AppModule::class])
class AllModulesMinusWMProxy
/** All modules except the ApiWrapper */
@Module(includes = [WindowManagerProxyModule::class, StaticObjectModule::class, AppModule::class])
class AllModulesMinusApiWrapper