Disable anomaly app detection for battery
This feature is introducing some false positive cases, so we're going to disable this feature now. Battery team will make it more precise in the next release. Test: Run robotest. See there's no related card in battery page. Fix: 156369998 Change-Id: I2dfe2f772e561b768af6af45ac92fdc65c1fafee
This commit is contained in:
@@ -26,7 +26,6 @@ import com.android.settings.fuelgauge.BatteryUtils;
|
||||
import com.android.settings.fuelgauge.batterytip.detectors.EarlyWarningDetector;
|
||||
import com.android.settings.fuelgauge.batterytip.detectors.HighUsageDetector;
|
||||
import com.android.settings.fuelgauge.batterytip.detectors.LowBatteryDetector;
|
||||
import com.android.settings.fuelgauge.batterytip.detectors.RestrictAppDetector;
|
||||
import com.android.settings.fuelgauge.batterytip.detectors.SmartBatteryDetector;
|
||||
import com.android.settings.fuelgauge.batterytip.detectors.SummaryDetector;
|
||||
import com.android.settings.fuelgauge.batterytip.tips.BatteryTip;
|
||||
@@ -74,7 +73,9 @@ public class BatteryTipLoader extends AsyncLoaderCompat<List<BatteryTip>> {
|
||||
tips.add(new SmartBatteryDetector(policy, context.getContentResolver()).detect());
|
||||
tips.add(new EarlyWarningDetector(policy, context).detect());
|
||||
tips.add(new SummaryDetector(policy, batteryInfo.averageTimeToDischarge).detect());
|
||||
tips.add(new RestrictAppDetector(context, policy).detect());
|
||||
// Disable this feature now since it introduces false positive cases. We will try to improve
|
||||
// it in the future.
|
||||
// tips.add(new RestrictAppDetector(context, policy).detect());
|
||||
|
||||
Collections.sort(tips);
|
||||
return tips;
|
||||
|
@@ -32,7 +32,6 @@ import com.android.settings.fuelgauge.BatteryUtils;
|
||||
import com.android.settings.fuelgauge.batterytip.tips.AppLabelPredicate;
|
||||
import com.android.settings.fuelgauge.batterytip.tips.AppRestrictionPredicate;
|
||||
import com.android.settings.fuelgauge.batterytip.tips.BatteryTip;
|
||||
import com.android.settings.testutils.BatteryTestUtils;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
@@ -43,15 +42,14 @@ import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.RuntimeEnvironment;
|
||||
import org.robolectric.util.ReflectionHelpers;
|
||||
|
||||
import java.util.List;
|
||||
import org.robolectric.util.ReflectionHelpers;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
public class BatteryTipLoaderTest {
|
||||
|
||||
private static final int[] TIP_ORDER = {
|
||||
BatteryTip.TipType.APP_RESTRICTION,
|
||||
BatteryTip.TipType.BATTERY_SAVER,
|
||||
BatteryTip.TipType.HIGH_DEVICE_USAGE,
|
||||
BatteryTip.TipType.LOW_BATTERY,
|
||||
|
Reference in New Issue
Block a user