Loading core/java/android/provider/Settings.java +11 −10 Original line number Diff line number Diff line Loading @@ -3468,16 +3468,8 @@ public final class Settings { "lock_screen_owner_info_enabled"; /** * This preference enables expanding the notification panel even over a securely * locked screen, showing only "public" notifications in this case. * @hide */ public static final String LOCK_SCREEN_ALLOW_NOTIFICATIONS = "lock_screen_allow_notifications"; /** * When set in conjunction with {@link #LOCK_SCREEN_ALLOW_NOTIFICATIONS}, shows * notifications in their "private" form (same as when the device is unlocked). * When set by a user, allows notifications to be shown atop a securely locked screen * in their full "private" form (same as when the device is unlocked). * @hide */ public static final String LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS = Loading Loading @@ -6074,6 +6066,15 @@ public final class Settings { */ public static final String POLICY_CONTROL = "policy_control"; /** * This preference enables notification display even over a securely * locked screen. * @hide */ public static final String LOCK_SCREEN_SHOW_NOTIFICATIONS = "lock_screen_show_notifications"; /** * Settings to backup. This is here so that it's in the same place as the settings * keys and easy to update. Loading packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -330,7 +330,7 @@ public class KeyguardViewManager { private boolean allowNotificationsOnSecureKeyguard() { ContentResolver cr = mContext.getContentResolver(); return Settings.Secure.getInt(cr, Settings.Secure.LOCK_SCREEN_ALLOW_NOTIFICATIONS, 0) == 1; return Settings.Global.getInt(cr, Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS, 0) == 1; } private KeyguardViewBase inflateKeyguardView(Bundle options, int layoutId) { Loading packages/Keyguard/src/com/android/keyguard/KeyguardViewMediator.java +5 −5 Original line number Diff line number Diff line Loading @@ -151,13 +151,13 @@ public class KeyguardViewMediator { /** * Allow the user to expand the status bar when a SECURE keyguard is engaged * and {@link Settings.Secure#LOCK_SCREEN_ALLOW_NOTIFICATIONS} is set * and {@link Settings.Global#LOCK_SCREEN_SHOW_NOTIFICATIONS} is set * (private notifications will be masked). */ private static final boolean ENABLE_SECURE_STATUS_BAR_EXPAND = true; /** * Default value of {@link Settings.Secure#LOCK_SCREEN_ALLOW_NOTIFICATIONS}. * Default value of {@link Settings.Global#LOCK_SCREEN_SHOW_NOTIFICATIONS}. */ private static final boolean ALLOW_NOTIFICATIONS_DEFAULT = false; Loading Loading @@ -258,7 +258,7 @@ public class KeyguardViewMediator { private int mLockSoundStreamId; /** * Tracks value of {@link Settings.Secure#LOCK_SCREEN_ALLOW_NOTIFICATIONS}. * Tracks value of {@link Settings.Global#LOCK_SCREEN_SHOW_NOTIFICATIONS}. */ private boolean mAllowNotificationsWhenSecure; Loading Loading @@ -913,9 +913,9 @@ public class KeyguardViewMediator { // note whether notification access should be allowed mAllowNotificationsWhenSecure = ENABLE_SECURE_STATUS_BAR_EXPAND && 0 != Settings.Secure.getInt( && 0 != Settings.Global.getInt( mContext.getContentResolver(), Settings.Secure.LOCK_SCREEN_ALLOW_NOTIFICATIONS, Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS, ALLOW_NOTIFICATIONS_DEFAULT ? 1 : 0); // if the keyguard is already showing, don't bother Loading Loading
core/java/android/provider/Settings.java +11 −10 Original line number Diff line number Diff line Loading @@ -3468,16 +3468,8 @@ public final class Settings { "lock_screen_owner_info_enabled"; /** * This preference enables expanding the notification panel even over a securely * locked screen, showing only "public" notifications in this case. * @hide */ public static final String LOCK_SCREEN_ALLOW_NOTIFICATIONS = "lock_screen_allow_notifications"; /** * When set in conjunction with {@link #LOCK_SCREEN_ALLOW_NOTIFICATIONS}, shows * notifications in their "private" form (same as when the device is unlocked). * When set by a user, allows notifications to be shown atop a securely locked screen * in their full "private" form (same as when the device is unlocked). * @hide */ public static final String LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS = Loading Loading @@ -6074,6 +6066,15 @@ public final class Settings { */ public static final String POLICY_CONTROL = "policy_control"; /** * This preference enables notification display even over a securely * locked screen. * @hide */ public static final String LOCK_SCREEN_SHOW_NOTIFICATIONS = "lock_screen_show_notifications"; /** * Settings to backup. This is here so that it's in the same place as the settings * keys and easy to update. Loading
packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -330,7 +330,7 @@ public class KeyguardViewManager { private boolean allowNotificationsOnSecureKeyguard() { ContentResolver cr = mContext.getContentResolver(); return Settings.Secure.getInt(cr, Settings.Secure.LOCK_SCREEN_ALLOW_NOTIFICATIONS, 0) == 1; return Settings.Global.getInt(cr, Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS, 0) == 1; } private KeyguardViewBase inflateKeyguardView(Bundle options, int layoutId) { Loading
packages/Keyguard/src/com/android/keyguard/KeyguardViewMediator.java +5 −5 Original line number Diff line number Diff line Loading @@ -151,13 +151,13 @@ public class KeyguardViewMediator { /** * Allow the user to expand the status bar when a SECURE keyguard is engaged * and {@link Settings.Secure#LOCK_SCREEN_ALLOW_NOTIFICATIONS} is set * and {@link Settings.Global#LOCK_SCREEN_SHOW_NOTIFICATIONS} is set * (private notifications will be masked). */ private static final boolean ENABLE_SECURE_STATUS_BAR_EXPAND = true; /** * Default value of {@link Settings.Secure#LOCK_SCREEN_ALLOW_NOTIFICATIONS}. * Default value of {@link Settings.Global#LOCK_SCREEN_SHOW_NOTIFICATIONS}. */ private static final boolean ALLOW_NOTIFICATIONS_DEFAULT = false; Loading Loading @@ -258,7 +258,7 @@ public class KeyguardViewMediator { private int mLockSoundStreamId; /** * Tracks value of {@link Settings.Secure#LOCK_SCREEN_ALLOW_NOTIFICATIONS}. * Tracks value of {@link Settings.Global#LOCK_SCREEN_SHOW_NOTIFICATIONS}. */ private boolean mAllowNotificationsWhenSecure; Loading Loading @@ -913,9 +913,9 @@ public class KeyguardViewMediator { // note whether notification access should be allowed mAllowNotificationsWhenSecure = ENABLE_SECURE_STATUS_BAR_EXPAND && 0 != Settings.Secure.getInt( && 0 != Settings.Global.getInt( mContext.getContentResolver(), Settings.Secure.LOCK_SCREEN_ALLOW_NOTIFICATIONS, Settings.Global.LOCK_SCREEN_SHOW_NOTIFICATIONS, ALLOW_NOTIFICATIONS_DEFAULT ? 1 : 0); // if the keyguard is already showing, don't bother Loading