Force update all suggestions but app restriction

When there is configuration change(icicle is not null), still
force update all suggestion except app restriction.

App restriction is not stateless: state HANDLED only happens when
there is anomaly and it disappear in next cycle. So we should only
update it when necessary.

Change-Id: Ifb7a1c477962a0c78b5455a5fbc078590fd408f2
Fixes: 77973093
Test: RunSettingsRoboTests
This commit is contained in:
Lei Yu
2018-04-17 11:07:47 -07:00
parent 70bd0c6d00
commit 710d5fc886
6 changed files with 57 additions and 15 deletions

View File

@@ -42,12 +42,14 @@ public class RestrictAppTip extends BatteryTip {
public RestrictAppTip(@StateType int state, List<AppInfo> restrictApps) {
super(TipType.APP_RESTRICTION, state, state == StateType.NEW /* showDialog */);
mRestrictAppList = restrictApps;
mNeedUpdate = false;
}
public RestrictAppTip(@StateType int state, AppInfo appInfo) {
super(TipType.APP_RESTRICTION, state, state == StateType.NEW /* showDialog */);
mRestrictAppList = new ArrayList<>();
mRestrictAppList.add(appInfo);
mNeedUpdate = false;
}
@VisibleForTesting