summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/notification/AppNotificationSettings.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/settings/notification/AppNotificationSettings.java')
-rw-r--r--src/com/android/settings/notification/AppNotificationSettings.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/settings/notification/AppNotificationSettings.java b/src/com/android/settings/notification/AppNotificationSettings.java
index 2ed6d85..d54aced 100644
--- a/src/com/android/settings/notification/AppNotificationSettings.java
+++ b/src/com/android/settings/notification/AppNotificationSettings.java
@@ -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);
}