Loading core/java/android/provider/Settings.java +6 −0 Original line number Diff line number Diff line Loading @@ -2237,6 +2237,12 @@ public final class Settings { */ public static final String LOCKSCREEN_VIBRATE_ENABLED = "lockscreen.vibrate_enabled"; /** * Whether the screen will be locked if a call ends and the screen is off. * @hide */ public static final String LOCKSCREEN_IF_CALL_ENDS_WITH_SCREENOFF = "lockscreen_if_call_ends_with_screenoff"; /** * Stores values for custom lockscreen targets * @hide Loading policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java +4 −1 Original line number Diff line number Diff line Loading @@ -872,11 +872,14 @@ public class KeyguardViewMediator implements KeyguardViewCallback, } } else if (TelephonyManager.ACTION_PHONE_STATE_CHANGED.equals(action)) { mPhoneState = intent.getStringExtra(TelephonyManager.EXTRA_STATE); final ContentResolver cr = mContext.getContentResolver(); synchronized (KeyguardViewMediator.this) { if (TelephonyManager.EXTRA_STATE_IDLE.equals(mPhoneState) // call ending && !mScreenOn // screen off && mExternallyEnabled) { // not disabled by any app && mExternallyEnabled // not disabled by any app && Settings.System.getInt(cr, Settings.System.LOCKSCREEN_IF_CALL_ENDS_WITH_SCREENOFF, 1) == 1) { // note: this is a way to gracefully reenable the keyguard when the call // ends and the screen is off without always reenabling the keyguard Loading Loading
core/java/android/provider/Settings.java +6 −0 Original line number Diff line number Diff line Loading @@ -2237,6 +2237,12 @@ public final class Settings { */ public static final String LOCKSCREEN_VIBRATE_ENABLED = "lockscreen.vibrate_enabled"; /** * Whether the screen will be locked if a call ends and the screen is off. * @hide */ public static final String LOCKSCREEN_IF_CALL_ENDS_WITH_SCREENOFF = "lockscreen_if_call_ends_with_screenoff"; /** * Stores values for custom lockscreen targets * @hide Loading
policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java +4 −1 Original line number Diff line number Diff line Loading @@ -872,11 +872,14 @@ public class KeyguardViewMediator implements KeyguardViewCallback, } } else if (TelephonyManager.ACTION_PHONE_STATE_CHANGED.equals(action)) { mPhoneState = intent.getStringExtra(TelephonyManager.EXTRA_STATE); final ContentResolver cr = mContext.getContentResolver(); synchronized (KeyguardViewMediator.this) { if (TelephonyManager.EXTRA_STATE_IDLE.equals(mPhoneState) // call ending && !mScreenOn // screen off && mExternallyEnabled) { // not disabled by any app && mExternallyEnabled // not disabled by any app && Settings.System.getInt(cr, Settings.System.LOCKSCREEN_IF_CALL_ENDS_WITH_SCREENOFF, 1) == 1) { // note: this is a way to gracefully reenable the keyguard when the call // ends and the screen is off without always reenabling the keyguard Loading