diff options
| author | 2019-02-21 15:42:21 -0800 | |
|---|---|---|
| committer | 2019-02-22 23:18:50 +0800 | |
| commit | d98422ea43ccd34d88de052298905aafd77a8a3f (patch) | |
| tree | 9b5036fea0b0016b350198f8526b4f6612415974 | |
| parent | 272ed7536eca9e6247b434258d1d7e9ae5a8f1ad (diff) | |
Remove HardwarePropertiesManager usage
Bug: 116866524
Bug: 77790357
Test: Build
Test: atest PowerUITest
Change-Id: I5b5c9c56c9123872a3626fdb55508d1594bf3878
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/power/PowerUI.java | 4 | ||||
| -rw-r--r-- | packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java | 4 |
2 files changed, 0 insertions, 8 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java index 7312cbc452bd..e27c25efd88f 100644 --- a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java +++ b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java @@ -27,7 +27,6 @@ import android.content.res.Resources; import android.database.ContentObserver; import android.os.BatteryManager; import android.os.Handler; -import android.os.HardwarePropertiesManager; import android.os.IBinder; import android.os.IThermalEventListener; import android.os.IThermalService; @@ -70,7 +69,6 @@ public class PowerUI extends SystemUI { final Receiver mReceiver = new Receiver(); private PowerManager mPowerManager; - private HardwarePropertiesManager mHardwarePropertiesManager; private WarningsUI mWarnings; private final Configuration mLastConfiguration = new Configuration(); private long mTimeRemaining = Long.MAX_VALUE; @@ -96,8 +94,6 @@ public class PowerUI extends SystemUI { public void start() { mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); - mHardwarePropertiesManager = (HardwarePropertiesManager) - mContext.getSystemService(Context.HARDWARE_PROPERTIES_SERVICE); mScreenOffTime = mPowerManager.isScreenOn() ? -1 : SystemClock.elapsedRealtime(); mWarnings = Dependency.get(WarningsUI.class); mEnhancedEstimates = Dependency.get(EnhancedEstimates.class); diff --git a/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java b/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java index 4a4e2473e772..0aed63d25112 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java @@ -31,7 +31,6 @@ import static org.mockito.Mockito.when; import android.content.Context; import android.content.Intent; import android.os.BatteryManager; -import android.os.HardwarePropertiesManager; import android.os.IThermalEventListener; import android.os.IThermalService; import android.os.PowerManager; @@ -76,7 +75,6 @@ public class PowerUITest extends SysuiTestCase { private static final int OLD_BATTERY_LEVEL_NINE = 9; private static final int OLD_BATTERY_LEVEL_10 = 10; private static final long VERY_BELOW_SEVERE_HYBRID_THRESHOLD = TimeUnit.MINUTES.toMillis(15); - private HardwarePropertiesManager mHardProps; private WarningsUI mMockWarnings; private PowerUI mPowerUI; private EnhancedEstimates mEnhancedEstimates; @@ -90,10 +88,8 @@ public class PowerUITest extends SysuiTestCase { MockitoAnnotations.initMocks(this); mMockWarnings = mDependency.injectMockDependency(WarningsUI.class); mEnhancedEstimates = mDependency.injectMockDependency(EnhancedEstimates.class); - mHardProps = mock(HardwarePropertiesManager.class); mContext.putComponent(StatusBar.class, mock(StatusBar.class)); - mContext.addMockSystemService(Context.HARDWARE_PROPERTIES_SERVICE, mHardProps); mContext.addMockSystemService(Context.POWER_SERVICE, mPowerManager); createPowerUi(); |