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

Commit cd317f42 authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Post channel error toasts as android"

parents 8cab9258 bba26b18
Loading
Loading
Loading
Loading
+10 −8
Original line number Original line Diff line number Diff line
@@ -4282,6 +4282,7 @@ public class NotificationManagerService extends SystemService {
    }
    }


    private void doChannelWarningToast(CharSequence toastText) {
    private void doChannelWarningToast(CharSequence toastText) {
        Binder.withCleanCallingIdentity(() -> {
            final int defaultWarningEnabled = Build.IS_DEBUGGABLE ? 1 : 0;
            final int defaultWarningEnabled = Build.IS_DEBUGGABLE ? 1 : 0;
            final boolean warningEnabled = Settings.Global.getInt(getContext().getContentResolver(),
            final boolean warningEnabled = Settings.Global.getInt(getContext().getContentResolver(),
                    Settings.Global.SHOW_NOTIFICATION_CHANNEL_WARNINGS, defaultWarningEnabled) != 0;
                    Settings.Global.SHOW_NOTIFICATION_CHANNEL_WARNINGS, defaultWarningEnabled) != 0;
@@ -4290,6 +4291,7 @@ public class NotificationManagerService extends SystemService {
                        Toast.LENGTH_SHORT);
                        Toast.LENGTH_SHORT);
                toast.show();
                toast.show();
            }
            }
        });
    }
    }


    @VisibleForTesting
    @VisibleForTesting