Loading policy/src/com/android/internal/policy/impl/LockScreen.java +3 −1 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import android.util.Slog; import android.media.AudioManager; import android.os.RemoteException; import android.provider.MediaStore; import android.provider.Settings; import java.io.File; Loading Loading @@ -427,7 +428,8 @@ class LockScreen extends LinearLayout implements KeyguardScreen { final boolean configDisabled = res.getBoolean(R.bool.config_disableMenuKeyInLockScreen); final boolean isTestHarness = ActivityManager.isRunningInTestHarness(); final boolean fileOverride = (new File(ENABLE_MENU_KEY_FILE)).exists(); return !configDisabled || isTestHarness || fileOverride; final boolean menuOverride = Settings.System.getInt(getContext().getContentResolver(), Settings.System.MENU_UNLOCK_SCREEN, 0) == 1; return !configDisabled || isTestHarness || fileOverride || menuOverride; } /** Loading policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java +13 −3 Original line number Diff line number Diff line Loading @@ -35,18 +35,15 @@ import android.text.InputType; import android.text.TextWatcher; import android.text.method.DigitsKeyListener; import android.text.method.TextKeyListener; import android.view.Gravity; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup.LayoutParams; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodSubtype; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.Space; import android.widget.TextView; import android.widget.TextView.OnEditorActionListener; Loading Loading @@ -76,6 +73,7 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen private final KeyguardStatusViewManager mStatusViewManager; private final boolean mUseSystemIME = true; // TODO: Make configurable private boolean mQuickUnlock; private boolean mResuming; // used to prevent poking the wakelock during onResume() // To avoid accidental lockout due to events while the device in in the pocket, ignore Loading Loading @@ -163,6 +161,10 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen mCallback.pokeWakelock(); } }); mQuickUnlock = (Settings.System.getInt(mContext.getContentResolver(), Settings.System.LOCKSCREEN_QUICK_UNLOCK_CONTROL, 0) == 1); mPasswordEntry.addTextChangedListener(new TextWatcher() { public void onTextChanged(CharSequence s, int start, int before, int count) { } Loading @@ -174,6 +176,14 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen if (!mResuming) { mCallback.pokeWakelock(); } if (mQuickUnlock) { String entry = mPasswordEntry.getText().toString(); if (entry.length() > MINIMUM_PASSWORD_LENGTH_BEFORE_REPORT && mLockPatternUtils.checkPassword(entry)) { mCallback.keyguardDone(true); mCallback.reportSuccessfulUnlockAttempt(); } } } }); Loading Loading
policy/src/com/android/internal/policy/impl/LockScreen.java +3 −1 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import android.util.Slog; import android.media.AudioManager; import android.os.RemoteException; import android.provider.MediaStore; import android.provider.Settings; import java.io.File; Loading Loading @@ -427,7 +428,8 @@ class LockScreen extends LinearLayout implements KeyguardScreen { final boolean configDisabled = res.getBoolean(R.bool.config_disableMenuKeyInLockScreen); final boolean isTestHarness = ActivityManager.isRunningInTestHarness(); final boolean fileOverride = (new File(ENABLE_MENU_KEY_FILE)).exists(); return !configDisabled || isTestHarness || fileOverride; final boolean menuOverride = Settings.System.getInt(getContext().getContentResolver(), Settings.System.MENU_UNLOCK_SCREEN, 0) == 1; return !configDisabled || isTestHarness || fileOverride || menuOverride; } /** Loading
policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java +13 −3 Original line number Diff line number Diff line Loading @@ -35,18 +35,15 @@ import android.text.InputType; import android.text.TextWatcher; import android.text.method.DigitsKeyListener; import android.text.method.TextKeyListener; import android.view.Gravity; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup.LayoutParams; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodSubtype; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.Space; import android.widget.TextView; import android.widget.TextView.OnEditorActionListener; Loading Loading @@ -76,6 +73,7 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen private final KeyguardStatusViewManager mStatusViewManager; private final boolean mUseSystemIME = true; // TODO: Make configurable private boolean mQuickUnlock; private boolean mResuming; // used to prevent poking the wakelock during onResume() // To avoid accidental lockout due to events while the device in in the pocket, ignore Loading Loading @@ -163,6 +161,10 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen mCallback.pokeWakelock(); } }); mQuickUnlock = (Settings.System.getInt(mContext.getContentResolver(), Settings.System.LOCKSCREEN_QUICK_UNLOCK_CONTROL, 0) == 1); mPasswordEntry.addTextChangedListener(new TextWatcher() { public void onTextChanged(CharSequence s, int start, int before, int count) { } Loading @@ -174,6 +176,14 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen if (!mResuming) { mCallback.pokeWakelock(); } if (mQuickUnlock) { String entry = mPasswordEntry.getText().toString(); if (entry.length() > MINIMUM_PASSWORD_LENGTH_BEFORE_REPORT && mLockPatternUtils.checkPassword(entry)) { mCallback.keyguardDone(true); mCallback.reportSuccessfulUnlockAttempt(); } } } }); Loading