BatteryController is now bound in AOSPPolicyModule.

Bug: 229228871
Test: manual
Change-Id: I1c78bf7d41584963103fce5802925bf6e20c7116
This commit is contained in:
Dave Mankoff 2022-04-15 00:58:57 +00:00 committed by Jake Weinstein
parent 0f787ef3af
commit a63b5adb29
1 changed files with 2 additions and 32 deletions

View File

@ -22,26 +22,20 @@ import static com.android.systemui.Dependency.LEAK_REPORT_EMAIL_NAME;
import android.content.Context; import android.content.Context;
import android.hardware.SensorPrivacyManager; import android.hardware.SensorPrivacyManager;
import android.os.Handler; import android.os.Handler;
import android.os.PowerManager;
import com.android.internal.logging.UiEventLogger; import com.android.internal.logging.UiEventLogger;
import com.android.keyguard.KeyguardViewController; import com.android.keyguard.KeyguardViewController;
import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.controls.controller.ControlsTileResourceConfiguration; import com.android.systemui.controls.controller.ControlsTileResourceConfiguration;
import com.android.systemui.dagger.ReferenceSystemUIModule; import com.android.systemui.dagger.ReferenceSystemUIModule;
import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.demomode.DemoModeController;
import com.android.systemui.dock.DockManager; import com.android.systemui.dock.DockManager;
import com.android.systemui.dock.DockManagerImpl; import com.android.systemui.dock.DockManagerImpl;
import com.android.systemui.doze.DozeHost; import com.android.systemui.doze.DozeHost;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.media.dagger.MediaModule; import com.android.systemui.media.dagger.MediaModule;
import com.android.systemui.navigationbar.gestural.GestureModule; import com.android.systemui.navigationbar.gestural.GestureModule;
import com.android.systemui.plugins.qs.QSFactory; import com.android.systemui.plugins.qs.QSFactory;
import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.power.EnhancedEstimates;
import com.android.systemui.power.dagger.PowerModule; import com.android.systemui.power.dagger.PowerModule;
import com.android.systemui.qs.dagger.QSModule; import com.android.systemui.qs.dagger.QSModule;
import com.android.systemui.recents.Recents; import com.android.systemui.recents.Recents;
@ -62,8 +56,7 @@ import com.android.systemui.statusbar.phone.HeadsUpManagerPhone;
import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.KeyguardBypassController;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper; import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper;
import com.android.systemui.statusbar.policy.BatteryController; import com.android.systemui.statusbar.policy.AospPolicyModule;
import com.android.systemui.statusbar.policy.BatteryControllerImpl;
import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.statusbar.policy.DeviceProvisionedController;
import com.android.systemui.statusbar.policy.DeviceProvisionedControllerImpl; import com.android.systemui.statusbar.policy.DeviceProvisionedControllerImpl;
@ -87,6 +80,7 @@ import dagger.Provides;
* Fork of {@link ReferenceSystemUIModule} * Fork of {@link ReferenceSystemUIModule}
*/ */
@Module(includes = { @Module(includes = {
AospPolicyModule.class,
GestureModule.class, GestureModule.class,
MediaModule.class, MediaModule.class,
PowerModule.class, PowerModule.class,
@ -108,30 +102,6 @@ public abstract class ParanoidSystemUIModule {
abstract NotificationLockscreenUserManager bindNotificationLockscreenUserManager( abstract NotificationLockscreenUserManager bindNotificationLockscreenUserManager(
NotificationLockscreenUserManagerImpl notificationLockscreenUserManager); NotificationLockscreenUserManagerImpl notificationLockscreenUserManager);
@Provides
@SysUISingleton
static BatteryController provideBatteryController(
Context context,
EnhancedEstimates enhancedEstimates,
PowerManager powerManager,
BroadcastDispatcher broadcastDispatcher,
DemoModeController demoModeController,
DumpManager dumpManager,
@Main Handler mainHandler,
@Background Handler bgHandler) {
BatteryController bC = new BatteryControllerImpl(
context,
enhancedEstimates,
powerManager,
broadcastDispatcher,
demoModeController,
dumpManager,
mainHandler,
bgHandler);
bC.init();
return bC;
}
@Provides @Provides
@SysUISingleton @SysUISingleton
static SensorPrivacyController provideSensorPrivacyController( static SensorPrivacyController provideSensorPrivacyController(