Add action to open the anomaly detail page
This action is used to go to the anomaly detail page. This cl also refactored the RestrictedAppDetails to take AppInfo as the input, not AppOpsManager.PackageOps. Bug: 72385333 Test: RunSettingsRoboTests Change-Id: I5b4481091635e1250629ea21c2b650db929c18ed
This commit is contained in:
@@ -35,12 +35,12 @@ public class RestrictAppTip extends BatteryTip {
|
||||
private List<AppInfo> mRestrictAppList;
|
||||
|
||||
public RestrictAppTip(@StateType int state, List<AppInfo> restrictApps) {
|
||||
super(TipType.APP_RESTRICTION, state, true /* showDialog */);
|
||||
super(TipType.APP_RESTRICTION, state, state == StateType.NEW /* showDialog */);
|
||||
mRestrictAppList = restrictApps;
|
||||
}
|
||||
|
||||
public RestrictAppTip(@StateType int state, AppInfo appInfo) {
|
||||
super(TipType.APP_RESTRICTION, state, true /* showDialog */);
|
||||
super(TipType.APP_RESTRICTION, state, state == StateType.NEW /* showDialog */);
|
||||
mRestrictAppList = new ArrayList<>();
|
||||
mRestrictAppList.add(appInfo);
|
||||
}
|
||||
@@ -85,9 +85,11 @@ public class RestrictAppTip extends BatteryTip {
|
||||
// Display it if new anomaly comes
|
||||
mState = StateType.NEW;
|
||||
mRestrictAppList = ((RestrictAppTip) tip).mRestrictAppList;
|
||||
mShowDialog = true;
|
||||
} else if (mState == StateType.NEW && tip.mState == StateType.INVISIBLE) {
|
||||
// If anomaly becomes invisible, show it as handled
|
||||
mState = StateType.HANDLED;
|
||||
mShowDialog = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user