Converting LauncherAppState to Dagger
Bug: 361850561 Test: Presubmit Flag: EXEMPT dagger Change-Id: I336a233d2703c23a7e9065474bde471786886144
This commit is contained in:
1 parent
91547eb4d2
commit
c9f697aeb5
30 files changed
+332
-357
No files matched your search
@@ -18,7 +18,10 @@ package com.android.launcher3.dagger;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.launcher3.InvariantDeviceProfile;
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.LauncherPrefs;
|
||||
import com.android.launcher3.graphics.ThemeManager;
|
||||
import com.android.launcher3.icons.LauncherIcons.IconPool;
|
||||
@@ -43,6 +46,8 @@ import com.android.launcher3.widget.custom.CustomWidgetManager;
|
||||
|
||||
import dagger.BindsInstance;
|
||||
|
||||
import javax.inject.Named;
|
||||
|
||||
/**
|
||||
* Launcher base component for Dagger injection.
|
||||
*
|
||||
@@ -74,10 +79,13 @@ public interface LauncherBaseAppComponent {
|
||||
LockedUserState getLockedUserState();
|
||||
InvariantDeviceProfile getIDP();
|
||||
IconPool getIconPool();
|
||||
LauncherAppState getLauncherAppState();
|
||||
|
||||
/** Builder for LauncherBaseAppComponent. */
|
||||
interface Builder {
|
||||
@BindsInstance Builder appContext(@ApplicationContext Context context);
|
||||
@BindsInstance Builder iconsDbName(@Nullable @Named("ICONS_DB") String dbFileName);
|
||||
@BindsInstance Builder setSafeModeEnabled(@Named("SAFE_MODE") boolean safeModeEnabled);
|
||||
LauncherBaseAppComponent build();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user