Merge "Revert^2 "Add configuration for defaulting notification behavior"" into tm-qpr-dev am: fece948623

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20530303

Change-Id: I9cd33ea6d02cf1243034a399162dfffcd0fd8f65
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Steve Elliott
2022-11-22 23:05:49 +00:00
committed by Automerger Merge Worker
3 changed files with 36 additions and 1 deletions

View File

@@ -189,13 +189,16 @@ public class RedactionInterstitial extends SettingsActivity {
}
private void loadFromSettings() {
final boolean showUnRedactedDefault = getContext().getResources().getBoolean(
R.bool.default_allow_sensitive_lockscreen_content);
final boolean managedProfile = UserManager.get(getContext()).isManagedProfile(mUserId);
// Hiding all notifications is device-wide setting, managed profiles can only set
// whether their notifications are show in full or redacted.
final boolean showNotifications = managedProfile || Settings.Secure.getIntForUser(
getContentResolver(), LOCK_SCREEN_SHOW_NOTIFICATIONS, 0, mUserId) != 0;
final boolean showUnredacted = Settings.Secure.getIntForUser(
getContentResolver(), LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, 1, mUserId) != 0;
getContentResolver(), LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS,
showUnRedactedDefault ? 1 : 0, mUserId) != 0;
int checkedButtonId = R.id.hide_all;
if (showNotifications) {