Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eac98cf6 authored by Geoffrey Pitsch's avatar Geoffrey Pitsch Committed by android-build-merger
Browse files

Use channel warning development setting. am: 507822de

am: fb84cb94

Change-Id: If69549f00636f53a2d4ec59a462c967c70e44da9
parents 0cc3a323 fb84cb94
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -684,6 +684,12 @@
    <string name="show_all_anrs_summary">Show App Not Responding dialog
        for background apps</string>

    <!-- UI debug setting: show all ANRs? [CHAR LIMIT=25] -->
    <string name="show_notification_channel_warnings">Show notification channel warnings</string>
    <!-- UI debug setting: show all ANRs summary [CHAR LIMIT=50] -->
    <string name="show_notification_channel_warnings_summary">Displays on-screen warning when an app posts a notification without a valid channel</string>


    <!-- UI debug setting: force allow apps on external storage [CHAR LIMIT=50] -->
    <string name="force_allow_on_external">Force allow apps on external</string>
    <!-- UI debug setting: force allow on external summary [CHAR LIMIT=150] -->
+3 −2
Original line number Diff line number Diff line
@@ -3282,9 +3282,10 @@ public class NotificationManagerService extends SystemService {
    }

    private void doChannelWarningToast(CharSequence toastText) {
        final int defaultWarningEnabled = Build.IS_DEBUGGABLE ? 1 : 0;
        final boolean warningEnabled = Settings.Global.getInt(getContext().getContentResolver(),
                Settings.Global.SHOW_NOTIFICATION_CHANNEL_WARNINGS, 0) != 0;
        if (warningEnabled || Build.IS_DEBUGGABLE) {
                Settings.Global.SHOW_NOTIFICATION_CHANNEL_WARNINGS, defaultWarningEnabled) != 0;
        if (warningEnabled) {
            Toast toast = Toast.makeText(getContext(), mHandler.getLooper(), toastText,
                    Toast.LENGTH_LONG);
            toast.show();