From 2f42eb20f335ef4c470cab2b6bddb0e0cceda7e3 Mon Sep 17 00:00:00 2001 From: ykhung Date: Wed, 10 May 2023 17:29:38 +0800 Subject: [PATCH] Remove the legacy smart battery tip from Settings Remove the legacy smart battery tip from the battery settings, which will remind users to eanble the "adaptive battery" if users disable it. Reasons: 1) 98% users will always keep the AB is enabled, and 2) we move the AB into the battery saver page, there is no individual page anymore Fix: 281798483 Test: make test RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.batterytip.* Change-Id: I85739b88ee9373b95a62271d2eb0137cf411d8cb --- .../settings/fuelgauge/batterytip/BatteryTipLoader.java | 3 --- .../settings/fuelgauge/batterytip/BatteryTipLoaderTest.java | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/com/android/settings/fuelgauge/batterytip/BatteryTipLoader.java b/src/com/android/settings/fuelgauge/batterytip/BatteryTipLoader.java index 8e9d4852b1b..34c431a846c 100644 --- a/src/com/android/settings/fuelgauge/batterytip/BatteryTipLoader.java +++ b/src/com/android/settings/fuelgauge/batterytip/BatteryTipLoader.java @@ -67,9 +67,6 @@ public class BatteryTipLoader extends AsyncLoaderCompat> { tips.add(new LowBatteryDetector(context, policy, batteryInfo, isPowerSaveMode).detect()); tips.add(new HighUsageDetector(context, policy, mBatteryUsageStats, batteryInfo).detect()); - tips.add(new SmartBatteryDetector( - context, policy, batteryInfo, context.getContentResolver(), isPowerSaveMode) - .detect()); tips.add(new BatteryDefenderDetector(batteryInfo, context).detect()); tips.add(new DockDefenderDetector(batteryInfo, context).detect()); tips.add(new IncompatibleChargerDetector(context).detect()); diff --git a/tests/robotests/src/com/android/settings/fuelgauge/batterytip/BatteryTipLoaderTest.java b/tests/robotests/src/com/android/settings/fuelgauge/batterytip/BatteryTipLoaderTest.java index 5b0ae046c5b..e13dcc03161 100644 --- a/tests/robotests/src/com/android/settings/fuelgauge/batterytip/BatteryTipLoaderTest.java +++ b/tests/robotests/src/com/android/settings/fuelgauge/batterytip/BatteryTipLoaderTest.java @@ -54,8 +54,7 @@ public class BatteryTipLoaderTest { BatteryTip.TipType.BATTERY_DEFENDER, BatteryTip.TipType.DOCK_DEFENDER, BatteryTip.TipType.INCOMPATIBLE_CHARGER, - BatteryTip.TipType.HIGH_DEVICE_USAGE, - BatteryTip.TipType.SMART_BATTERY_MANAGER}; + BatteryTip.TipType.HIGH_DEVICE_USAGE}; @Mock(answer = Answers.RETURNS_DEEP_STUBS) private BatteryUsageStats mBatteryUsageStats; @Mock