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

Commit 35a24aed authored by Altaf-Mahdi's avatar Altaf-Mahdi Committed by Steve Kondik
Browse files

App Notifications: remove peek option when headsup is disabled

Change-Id: I45605f3524fdc5bd84dce7bcf63875a6201d2c79
parent fd00d2d9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -218,10 +218,12 @@ public class AppNotificationSettings extends SettingsPreferenceFragment {
                UserHandle.myUserId());
        final boolean lockscreenNotificationsEnabled = getLockscreenNotificationsEnabled();
        final boolean allowPrivate = getLockscreenAllowPrivateNotifications();
        final boolean headsUpEnabled  = Settings.Global.getInt(mContext.getContentResolver(),
                Settings.Global.HEADS_UP_NOTIFICATIONS_ENABLED, 0) != 0;

        setVisible(mBlock, !mIsSystemPackage);
        setVisible(mPriority, mIsSystemPackage || !banned);
        setVisible(mPeekable, mIsSystemPackage || !banned);
        setVisible(mPeekable, mIsSystemPackage || !banned && headsUpEnabled);
        setVisible(mSensitive, mIsSystemPackage || !banned && lockscreenSecure
                && lockscreenNotificationsEnabled && allowPrivate);
    }