Loading api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -26599,7 +26599,7 @@ package android.provider { field public static final deprecated java.lang.String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed"; field public static final deprecated java.lang.String LOCK_PATTERN_ENABLED = "lock_pattern_autolock"; field public static final deprecated java.lang.String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled"; field public static final java.lang.String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; field public static final deprecated java.lang.String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; field public static final deprecated java.lang.String LOGGING_ID = "logging_id"; field public static final deprecated java.lang.String NETWORK_PREFERENCE = "network_preference"; field public static final java.lang.String PARENTAL_CONTROL_ENABLED = "parental_control_enabled"; api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -28676,7 +28676,7 @@ package android.provider { field public static final deprecated java.lang.String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed"; field public static final deprecated java.lang.String LOCK_PATTERN_ENABLED = "lock_pattern_autolock"; field public static final deprecated java.lang.String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled"; field public static final java.lang.String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; field public static final deprecated java.lang.String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; field public static final deprecated java.lang.String LOGGING_ID = "logging_id"; field public static final deprecated java.lang.String NETWORK_PREFERENCE = "network_preference"; field public static final java.lang.String PARENTAL_CONTROL_ENABLED = "parental_control_enabled"; core/java/android/provider/Settings.java +28 −5 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ package android.provider; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SystemApi; import android.app.ActivityThread; import android.app.Application; import android.app.SearchManager; import android.app.WallpaperManager; import android.content.ComponentName; Loading Loading @@ -3839,11 +3841,25 @@ public final class Settings { } } if (sLockSettings != null && !sIsSystemProcess) { // No context; use the ActivityThread's context as an approximation for // determining the target API level. Application application = ActivityThread.currentApplication(); boolean isPreMnc = application != null && application.getApplicationInfo() != null && application.getApplicationInfo().targetSdkVersion <= VERSION_CODES.LOLLIPOP_MR1; if (isPreMnc) { try { return sLockSettings.getString(name, "0", userHandle); } catch (RemoteException re) { // Fall through } } else { throw new SecurityException("Settings.Secure." + name + " is deprecated and no longer accessible." + " See API documentation for potential replacements."); } } } Loading Loading @@ -4378,14 +4394,19 @@ public final class Settings { * Whether autolock is enabled (0 = false, 1 = true) * * @deprecated Use {@link android.app.KeyguardManager} to determine the state and security * level of the keyguard. * level of the keyguard. Accessing this setting from an app that is targeting * {@link VERSION_CODES#MNC} or later throws a {@code SecurityException}. */ @Deprecated public static final String LOCK_PATTERN_ENABLED = "lock_pattern_autolock"; /** * Whether lock pattern is visible as user enters (0 = false, 1 = true) * * @deprecated Accessing this setting from an app that is targeting * {@link VERSION_CODES#MNC} or later throws a {@code SecurityException}. */ @Deprecated public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; /** Loading @@ -4395,6 +4416,8 @@ public final class Settings { * @deprecated Starting in {@link VERSION_CODES#JELLY_BEAN_MR1} the * lockscreen uses * {@link Settings.System#HAPTIC_FEEDBACK_ENABLED}. * Accessing this setting from an app that is targeting * {@link VERSION_CODES#MNC} or later throws a {@code SecurityException}. */ @Deprecated public static final String Loading services/core/java/com/android/server/LockSettingsService.java +6 −1 Original line number Diff line number Diff line Loading @@ -335,7 +335,12 @@ public class LockSettingsService extends ILockSettings.Stub { public String getStringUnchecked(String key, String defaultValue, int userId) { if (Settings.Secure.LOCK_PATTERN_ENABLED.equals(key)) { long ident = Binder.clearCallingIdentity(); try { return mLockPatternUtils.isLockPatternEnabled(userId) ? "1" : "0"; } finally { Binder.restoreCallingIdentity(ident); } } return mStorage.readKeyValue(key, defaultValue, userId); Loading Loading
api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -26599,7 +26599,7 @@ package android.provider { field public static final deprecated java.lang.String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed"; field public static final deprecated java.lang.String LOCK_PATTERN_ENABLED = "lock_pattern_autolock"; field public static final deprecated java.lang.String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled"; field public static final java.lang.String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; field public static final deprecated java.lang.String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; field public static final deprecated java.lang.String LOGGING_ID = "logging_id"; field public static final deprecated java.lang.String NETWORK_PREFERENCE = "network_preference"; field public static final java.lang.String PARENTAL_CONTROL_ENABLED = "parental_control_enabled";
api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -28676,7 +28676,7 @@ package android.provider { field public static final deprecated java.lang.String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed"; field public static final deprecated java.lang.String LOCK_PATTERN_ENABLED = "lock_pattern_autolock"; field public static final deprecated java.lang.String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled"; field public static final java.lang.String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; field public static final deprecated java.lang.String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; field public static final deprecated java.lang.String LOGGING_ID = "logging_id"; field public static final deprecated java.lang.String NETWORK_PREFERENCE = "network_preference"; field public static final java.lang.String PARENTAL_CONTROL_ENABLED = "parental_control_enabled";
core/java/android/provider/Settings.java +28 −5 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ package android.provider; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SystemApi; import android.app.ActivityThread; import android.app.Application; import android.app.SearchManager; import android.app.WallpaperManager; import android.content.ComponentName; Loading Loading @@ -3839,11 +3841,25 @@ public final class Settings { } } if (sLockSettings != null && !sIsSystemProcess) { // No context; use the ActivityThread's context as an approximation for // determining the target API level. Application application = ActivityThread.currentApplication(); boolean isPreMnc = application != null && application.getApplicationInfo() != null && application.getApplicationInfo().targetSdkVersion <= VERSION_CODES.LOLLIPOP_MR1; if (isPreMnc) { try { return sLockSettings.getString(name, "0", userHandle); } catch (RemoteException re) { // Fall through } } else { throw new SecurityException("Settings.Secure." + name + " is deprecated and no longer accessible." + " See API documentation for potential replacements."); } } } Loading Loading @@ -4378,14 +4394,19 @@ public final class Settings { * Whether autolock is enabled (0 = false, 1 = true) * * @deprecated Use {@link android.app.KeyguardManager} to determine the state and security * level of the keyguard. * level of the keyguard. Accessing this setting from an app that is targeting * {@link VERSION_CODES#MNC} or later throws a {@code SecurityException}. */ @Deprecated public static final String LOCK_PATTERN_ENABLED = "lock_pattern_autolock"; /** * Whether lock pattern is visible as user enters (0 = false, 1 = true) * * @deprecated Accessing this setting from an app that is targeting * {@link VERSION_CODES#MNC} or later throws a {@code SecurityException}. */ @Deprecated public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; /** Loading @@ -4395,6 +4416,8 @@ public final class Settings { * @deprecated Starting in {@link VERSION_CODES#JELLY_BEAN_MR1} the * lockscreen uses * {@link Settings.System#HAPTIC_FEEDBACK_ENABLED}. * Accessing this setting from an app that is targeting * {@link VERSION_CODES#MNC} or later throws a {@code SecurityException}. */ @Deprecated public static final String Loading
services/core/java/com/android/server/LockSettingsService.java +6 −1 Original line number Diff line number Diff line Loading @@ -335,7 +335,12 @@ public class LockSettingsService extends ILockSettings.Stub { public String getStringUnchecked(String key, String defaultValue, int userId) { if (Settings.Secure.LOCK_PATTERN_ENABLED.equals(key)) { long ident = Binder.clearCallingIdentity(); try { return mLockPatternUtils.isLockPatternEnabled(userId) ? "1" : "0"; } finally { Binder.restoreCallingIdentity(ident); } } return mStorage.readKeyValue(key, defaultValue, userId); Loading