Adds modes settings page for bypassing apps
Adds the settings page that a user will reach from a mode settings page when they tap on "App," to allow them to select whether all, none, or priority modes can break through and send notifications. Bug: 308819928 Bug: 331267485 Flag: android.app.modes_ui DEVELOPMENT Test: build and test, controller unit tests Change-Id: I5bcebfca0fc2882f839afdced8d2b817dad14e6c
This commit is contained in:
@@ -395,4 +395,19 @@ class ZenModeSummaryHelper {
|
||||
return mContext.getResources().getString(R.string.zen_mode_people_some);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a summary to display under the top level "Apps" preference for a mode.
|
||||
*/
|
||||
public String getAppsSummary(ZenMode zenMode) {
|
||||
// TODO: b/308819928 - Set summary using priority app list if Selected Apps Chosen.
|
||||
if (zenMode.getPolicy().getAllowedChannels() == ZenPolicy.CHANNEL_POLICY_PRIORITY) {
|
||||
return mContext.getResources().getString(R.string.zen_mode_apps_priority_apps);
|
||||
} else if (zenMode.getPolicy().getAllowedChannels() == ZenPolicy.CHANNEL_POLICY_NONE) {
|
||||
return mContext.getResources().getString(R.string.zen_mode_apps_none_apps);
|
||||
} else if (zenMode.getPolicy().getAllowedChannels() == ZenMode.CHANNEL_POLICY_ALL) {
|
||||
return mContext.getResources().getString(R.string.zen_mode_apps_all_apps);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user