diff options
author | Bruno Martins <bgcngm@gmail.com> | 2017-11-10 15:00:17 +0000 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2022-01-27 18:50:18 +0800 |
commit | 2a3b33ca05029646746069dd3143da878fd22972 (patch) | |
tree | 1ec02130fb4f9b965ca880c61825041f70f024ff | |
parent | 3fa7ea3a785784aefdc8e4d91d97b6af4914d1bc (diff) |
Disable notification channel warnings by default
* Since we usually ship "userdebug" builds, it is better to globally
disable the toast because we are not in control of third-party apps
that haven't been properly aligned with new Oreo requirements.
* Leave it enabled by default only for "eng" builds.
Change-Id: If0c74bcd03de2b664794e5855c2aaceb5c633b6c
-rwxr-xr-x | services/core/java/com/android/server/notification/NotificationManagerService.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 7ba0f04a435f..7e8ddd63722c 100755 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -6498,7 +6498,7 @@ public class NotificationManagerService extends SystemService { private void doChannelWarningToast(CharSequence toastText) { Binder.withCleanCallingIdentity(() -> { - final int defaultWarningEnabled = Build.IS_DEBUGGABLE ? 1 : 0; + final int defaultWarningEnabled = Build.TYPE.equals("eng") ? 1 : 0; final boolean warningEnabled = Settings.Global.getInt(getContext().getContentResolver(), Settings.Global.SHOW_NOTIFICATION_CHANNEL_WARNINGS, defaultWarningEnabled) != 0; if (warningEnabled) { |