No auto soft keyboard when fp is in use
Bug:20861013 Change-Id: Ia788e4c5dbabef374d08c7cb063ef2c07bbdb078
This commit is contained in:
@@ -88,6 +88,7 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
|
|||||||
private CountDownTimer mCountdownTimer;
|
private CountDownTimer mCountdownTimer;
|
||||||
private boolean mIsAlpha;
|
private boolean mIsAlpha;
|
||||||
private InputMethodManager mImm;
|
private InputMethodManager mImm;
|
||||||
|
private boolean mUsingFingerprint = false;
|
||||||
|
|
||||||
// required constructor for fragments
|
// required constructor for fragments
|
||||||
public ConfirmLockPasswordFragment() {
|
public ConfirmLockPasswordFragment() {
|
||||||
@@ -203,11 +204,22 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
|
|||||||
getActivity().finish();
|
getActivity().finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFingerprintIconVisibilityChanged(boolean visible) {
|
||||||
|
mUsingFingerprint = visible;
|
||||||
|
}
|
||||||
|
|
||||||
private void resetState() {
|
private void resetState() {
|
||||||
mPasswordEntry.setEnabled(true);
|
mPasswordEntry.setEnabled(true);
|
||||||
mPasswordEntryInputDisabler.setInputEnabled(true);
|
mPasswordEntryInputDisabler.setInputEnabled(true);
|
||||||
|
if (shouldAutoShowSoftKeyboard()) {
|
||||||
mImm.showSoftInput(mPasswordEntry, InputMethodManager.SHOW_IMPLICIT);
|
mImm.showSoftInput(mPasswordEntry, InputMethodManager.SHOW_IMPLICIT);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean shouldAutoShowSoftKeyboard() {
|
||||||
|
return mPasswordEntry.isEnabled() && !mUsingFingerprint;
|
||||||
|
}
|
||||||
|
|
||||||
public void onWindowFocusChanged(boolean hasFocus) {
|
public void onWindowFocusChanged(boolean hasFocus) {
|
||||||
if (!hasFocus) {
|
if (!hasFocus) {
|
||||||
@@ -217,7 +229,7 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
|
|||||||
mPasswordEntry.post(new Runnable() {
|
mPasswordEntry.post(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (mPasswordEntry.isEnabled()) {
|
if (shouldAutoShowSoftKeyboard()) {
|
||||||
resetState();
|
resetState();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user