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

Commit 8077622e authored by Nick James's avatar Nick James Committed by Android (Google) Code Review
Browse files

Merge "Disable DND status change notification on watches."

parents d2af61a1 a485ec65
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1182,11 +1182,19 @@ public class ZenModeHelper {
    }

    private void showZenUpgradeNotification(int zen) {
        final boolean isWatch = mContext.getPackageManager().hasSystemFeature(
            PackageManager.FEATURE_WATCH);
        final boolean showNotification = mIsBootComplete
                && zen != Global.ZEN_MODE_OFF
                && !isWatch
                && Settings.Global.getInt(mContext.getContentResolver(),
                Settings.Global.SHOW_ZEN_UPGRADE_NOTIFICATION, 0) != 0;

        if (isWatch) {
            Settings.Global.putInt(mContext.getContentResolver(),
                    Global.SHOW_ZEN_UPGRADE_NOTIFICATION, 0);
        }

        if (showNotification) {
            mNotificationManager.notify(TAG, SystemMessage.NOTE_ZEN_UPGRADE,
                    createZenUpgradeNotification());