Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea5a53e8 authored by Dave Mankoff's avatar Dave Mankoff Committed by Automerger Merge Worker
Browse files

Merge "Move EnhancedEstimates to PowerModule" into tm-dev am: 7ee5bcf8 am:...

Merge "Move EnhancedEstimates to PowerModule" into tm-dev am: 7ee5bcf8 am: 0d878c5f am: c1104226

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17765614



Change-Id: I0a6288b9730fd034882ade6cccb360c1c001d02d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 21433b02 c1104226
Loading
Loading
Loading
Loading
+15 −7
Original line number Original line Diff line number Diff line
@@ -38,7 +38,6 @@ import com.android.systemui.media.dagger.MediaModule;
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.EnhancedEstimates;
import com.android.systemui.power.EnhancedEstimatesImpl;
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.qs.tileimpl.QSFactoryImpl;
import com.android.systemui.qs.tileimpl.QSFactoryImpl;
@@ -80,8 +79,19 @@ import dagger.Module;
import dagger.Provides;
import dagger.Provides;


/**
/**
 * A dagger module for injecting default implementations of components of System UI that may be
 * A dagger module for injecting default implementations of components of System UI.
 * overridden by the System UI implementation.
 *
 * Variants of SystemUI should make a copy of this, include it in their component, and customize it
 * as needed.
 *
 * This module might alternatively be named `AospSystemUIModule`, `PhoneSystemUIModule`,
 * or `BasicSystemUIModule`.
 *
 * Nothing in the module should be strictly required. Each piece should either be swappable with
 * a different implementation or entirely removable.
 *
 * This is different from {@link SystemUIModule} which should be used for pieces of required
 * SystemUI code that variants of SystemUI _must_ include to function correctly.
 */
 */
@Module(includes = {
@Module(includes = {
        MediaModule.class,
        MediaModule.class,
@@ -90,7 +100,7 @@ import dagger.Provides;
        StartCentralSurfacesModule.class,
        StartCentralSurfacesModule.class,
        VolumeModule.class
        VolumeModule.class
})
})
public abstract class SystemUIDefaultModule {
public abstract class ReferenceSystemUIModule {


    @SysUISingleton
    @SysUISingleton
    @Provides
    @Provides
@@ -100,9 +110,6 @@ public abstract class SystemUIDefaultModule {
        return null;
        return null;
    }
    }


    @Binds
    abstract EnhancedEstimates bindEnhancedEstimates(EnhancedEstimatesImpl enhancedEstimates);

    @Binds
    @Binds
    abstract NotificationLockscreenUserManager bindNotificationLockscreenUserManager(
    abstract NotificationLockscreenUserManager bindNotificationLockscreenUserManager(
            NotificationLockscreenUserManagerImpl notificationLockscreenUserManager);
            NotificationLockscreenUserManagerImpl notificationLockscreenUserManager);
@@ -148,6 +155,7 @@ public abstract class SystemUIDefaultModule {
        return spC;
        return spC;
    }
    }


    /** */
    @Binds
    @Binds
    @SysUISingleton
    @SysUISingleton
    public abstract QSFactory bindQSFactory(QSFactoryImpl qsFactoryImpl);
    public abstract QSFactory bindQSFactory(QSFactoryImpl qsFactoryImpl);
+1 −1
Original line number Original line Diff line number Diff line
@@ -73,7 +73,7 @@ import dagger.Subcomponent;
        SystemUIBinder.class,
        SystemUIBinder.class,
        SystemUIModule.class,
        SystemUIModule.class,
        SystemUICoreStartableModule.class,
        SystemUICoreStartableModule.class,
        SystemUIDefaultModule.class})
        ReferenceSystemUIModule.class})
public interface SysUIComponent {
public interface SysUIComponent {


    /**
    /**
+8 −2
Original line number Original line Diff line number Diff line
@@ -100,8 +100,14 @@ import dagger.Module;
import dagger.Provides;
import dagger.Provides;


/**
/**
 * A dagger module for injecting components of System UI that are not overridden by the System UI
 * A dagger module for injecting components of System UI that are required by System UI.
 * implementation.
 *
 * If your feature can be excluded, subclassed, or re-implemented by a variant of SystemUI, put
 * your Dagger Module in {@link ReferenceSystemUIModule} and/or any variant modules that
 * rely on the feature.
 *
 * Adding an entry in this file means that _all_ variants of SystemUI will receive that code. They
 * may not appreciate that.
 */
 */
@Module(includes = {
@Module(includes = {
            AppOpsModule.class,
            AppOpsModule.class,
+6 −0
Original line number Original line Diff line number Diff line
@@ -16,6 +16,8 @@


package com.android.systemui.power.dagger;
package com.android.systemui.power.dagger;


import com.android.systemui.power.EnhancedEstimates;
import com.android.systemui.power.EnhancedEstimatesImpl;
import com.android.systemui.power.PowerNotificationWarnings;
import com.android.systemui.power.PowerNotificationWarnings;
import com.android.systemui.power.PowerUI;
import com.android.systemui.power.PowerUI;


@@ -26,6 +28,10 @@ import dagger.Module;
/** Dagger Module for code in the power package. */
/** Dagger Module for code in the power package. */
@Module
@Module
public interface PowerModule {
public interface PowerModule {
    /** */
    @Binds
    EnhancedEstimates bindEnhancedEstimates(EnhancedEstimatesImpl enhancedEstimates);

    /** */
    /** */
    @Binds
    @Binds
    PowerUI.WarningsUI provideWarningsUi(PowerNotificationWarnings controllerImpl);
    PowerUI.WarningsUI provideWarningsUi(PowerNotificationWarnings controllerImpl);
+0 −4
Original line number Original line Diff line number Diff line
@@ -38,7 +38,6 @@ import com.android.systemui.doze.DozeHost;
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.EnhancedEstimates;
import com.android.systemui.power.EnhancedEstimatesImpl;
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.qs.tileimpl.QSFactoryImpl;
import com.android.systemui.qs.tileimpl.QSFactoryImpl;
@@ -101,9 +100,6 @@ public abstract class TvSystemUIModule {
        return null;
        return null;
    }
    }


    @Binds
    abstract EnhancedEstimates bindEnhancedEstimates(EnhancedEstimatesImpl enhancedEstimates);

    @Binds
    @Binds
    abstract NotificationLockscreenUserManager bindNotificationLockscreenUserManager(
    abstract NotificationLockscreenUserManager bindNotificationLockscreenUserManager(
            NotificationLockscreenUserManagerImpl notificationLockscreenUserManager);
            NotificationLockscreenUserManagerImpl notificationLockscreenUserManager);