Merge "Force update all suggestions but app restriction" into pi-dev am: 68ef601059
am: 5f3bacea9c
Change-Id: I1b68483b257b81f723e46badb18a94b1b7335f8c
This commit is contained in:
@@ -109,7 +109,8 @@ public class PowerUsageSummary extends PowerUsageBase implements OnLongClickList
|
||||
BatteryHeaderPreferenceController mBatteryHeaderPreferenceController;
|
||||
@VisibleForTesting
|
||||
boolean mNeedUpdateBatteryTip;
|
||||
private BatteryTipPreferenceController mBatteryTipPreferenceController;
|
||||
@VisibleForTesting
|
||||
BatteryTipPreferenceController mBatteryTipPreferenceController;
|
||||
private int mStatsType = BatteryStats.STATS_SINCE_CHARGED;
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -215,8 +216,8 @@ public class PowerUsageSummary extends PowerUsageBase implements OnLongClickList
|
||||
mAnomalySparseArray = new SparseArray<>();
|
||||
|
||||
restartBatteryInfoLoader();
|
||||
mNeedUpdateBatteryTip = icicle == null;
|
||||
mBatteryTipPreferenceController.restoreInstanceState(icicle);
|
||||
updateBatteryTipFlag(icicle);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -384,6 +385,11 @@ public class PowerUsageSummary extends PowerUsageBase implements OnLongClickList
|
||||
}
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
void updateBatteryTipFlag(Bundle icicle) {
|
||||
mNeedUpdateBatteryTip = icicle == null || mBatteryTipPreferenceController.needUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onLongClick(View view) {
|
||||
showBothEstimates();
|
||||
|
Reference in New Issue
Block a user