diff options
| author | 2022-07-25 10:00:41 -0400 | |
|---|---|---|
| committer | 2022-07-25 10:00:41 -0400 | |
| commit | 4325c61c4be19a013da23914d479f59a802ed93f (patch) | |
| tree | d47a0bf947c576accf8efd4a88ad53ca41089659 | |
| parent | cdae841b0751d6518968ead30e5866cc73fbc49a (diff) | |
Scale back channel toast
Only show the toast if enabled by the user.
Test: Turn off setting and post a notification to an invalid channel
Fixes: 231150048
Change-Id: I83a66c60ff4638392814233dfa15c2e0fd0cf9c8
| -rwxr-xr-x | services/core/java/com/android/server/notification/NotificationManagerService.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index e589080786b5..ddfde33b467b 100755 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -6758,9 +6758,8 @@ public class NotificationManagerService extends SystemService { protected void doChannelWarningToast(int forUid, CharSequence toastText) { Binder.withCleanCallingIdentity(() -> { - final int defaultWarningEnabled = Build.IS_DEBUGGABLE ? 1 : 0; final boolean warningEnabled = Settings.Global.getInt(getContext().getContentResolver(), - Settings.Global.SHOW_NOTIFICATION_CHANNEL_WARNINGS, defaultWarningEnabled) != 0; + Settings.Global.SHOW_NOTIFICATION_CHANNEL_WARNINGS, 0) != 0; if (warningEnabled) { Toast toast = Toast.makeText(getContext(), mHandler.getLooper(), toastText, Toast.LENGTH_SHORT); |