Make anomaly item refresh in battery
Bug: 63908155 Test: RunSettingsRoboTest Change-Id: I3e220001ca989020447403641360fade4d09e969
This commit is contained in:
@@ -522,7 +522,7 @@ public class PowerUsageSummary extends PowerUsageBase implements
|
||||
return;
|
||||
}
|
||||
|
||||
initAnomalyDetectionIfPossible();
|
||||
restartAnomalyDetectionIfPossible();
|
||||
|
||||
// reload BatteryInfo and updateUI
|
||||
restartBatteryInfoLoader();
|
||||
@@ -647,9 +647,9 @@ public class PowerUsageSummary extends PowerUsageBase implements
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
void initAnomalyDetectionIfPossible() {
|
||||
void restartAnomalyDetectionIfPossible() {
|
||||
if (getAnomalyDetectionPolicy().isAnomalyDetectionEnabled()) {
|
||||
getLoaderManager().initLoader(ANOMALY_LOADER, Bundle.EMPTY, mAnomalyLoaderCallbacks);
|
||||
getLoaderManager().restartLoader(ANOMALY_LOADER, Bundle.EMPTY, mAnomalyLoaderCallbacks);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user