Loading policy/com/android/internal/policy/impl/AccountUnlockScreen.java +32 −32 Original line number Original line Diff line number Diff line Loading @@ -174,7 +174,10 @@ public class AccountUnlockScreen extends RelativeLayout implements KeyguardScree } } } } private void onCheckPasswordResult(boolean success) { private void postOnCheckPasswordResult(final boolean success) { // ensure this runs on UI thread mLogin.post(new Runnable() { public void run() { if (success) { if (success) { // clear out forgotten password // clear out forgotten password mLockPatternUtils.setPermanentlyLocked(false); mLockPatternUtils.setPermanentlyLocked(false); Loading @@ -197,6 +200,8 @@ public class AccountUnlockScreen extends RelativeLayout implements KeyguardScree mCallback.reportFailedUnlockAttempt(); mCallback.reportFailedUnlockAttempt(); } } } } }); } @Override @Override public boolean dispatchKeyEvent(KeyEvent event) { public boolean dispatchKeyEvent(KeyEvent event) { Loading Loading @@ -270,7 +275,7 @@ public class AccountUnlockScreen extends RelativeLayout implements KeyguardScree final String password = mPassword.getText().toString(); final String password = mPassword.getText().toString(); Account account = findIntendedAccount(login); Account account = findIntendedAccount(login); if (account == null) { if (account == null) { onCheckPasswordResult(false); postOnCheckPasswordResult(false); return; return; } } getProgressDialog().show(); getProgressDialog().show(); Loading @@ -283,18 +288,13 @@ public class AccountUnlockScreen extends RelativeLayout implements KeyguardScree mCallback.pokeWakelock(AWAKE_POKE_MILLIS); mCallback.pokeWakelock(AWAKE_POKE_MILLIS); final Bundle result = future.getResult(); final Bundle result = future.getResult(); final boolean verified = result.getBoolean(AccountManager.KEY_BOOLEAN_RESULT); final boolean verified = result.getBoolean(AccountManager.KEY_BOOLEAN_RESULT); // ensure on UI thread postOnCheckPasswordResult(verified); mLogin.post(new Runnable() { public void run() { onCheckPasswordResult(verified); } }); } catch (OperationCanceledException e) { } catch (OperationCanceledException e) { onCheckPasswordResult(false); postOnCheckPasswordResult(false); } catch (IOException e) { } catch (IOException e) { onCheckPasswordResult(false); postOnCheckPasswordResult(false); } catch (AuthenticatorException e) { } catch (AuthenticatorException e) { onCheckPasswordResult(false); postOnCheckPasswordResult(false); } finally { } finally { mLogin.post(new Runnable() { mLogin.post(new Runnable() { public void run() { public void run() { Loading Loading
policy/com/android/internal/policy/impl/AccountUnlockScreen.java +32 −32 Original line number Original line Diff line number Diff line Loading @@ -174,7 +174,10 @@ public class AccountUnlockScreen extends RelativeLayout implements KeyguardScree } } } } private void onCheckPasswordResult(boolean success) { private void postOnCheckPasswordResult(final boolean success) { // ensure this runs on UI thread mLogin.post(new Runnable() { public void run() { if (success) { if (success) { // clear out forgotten password // clear out forgotten password mLockPatternUtils.setPermanentlyLocked(false); mLockPatternUtils.setPermanentlyLocked(false); Loading @@ -197,6 +200,8 @@ public class AccountUnlockScreen extends RelativeLayout implements KeyguardScree mCallback.reportFailedUnlockAttempt(); mCallback.reportFailedUnlockAttempt(); } } } } }); } @Override @Override public boolean dispatchKeyEvent(KeyEvent event) { public boolean dispatchKeyEvent(KeyEvent event) { Loading Loading @@ -270,7 +275,7 @@ public class AccountUnlockScreen extends RelativeLayout implements KeyguardScree final String password = mPassword.getText().toString(); final String password = mPassword.getText().toString(); Account account = findIntendedAccount(login); Account account = findIntendedAccount(login); if (account == null) { if (account == null) { onCheckPasswordResult(false); postOnCheckPasswordResult(false); return; return; } } getProgressDialog().show(); getProgressDialog().show(); Loading @@ -283,18 +288,13 @@ public class AccountUnlockScreen extends RelativeLayout implements KeyguardScree mCallback.pokeWakelock(AWAKE_POKE_MILLIS); mCallback.pokeWakelock(AWAKE_POKE_MILLIS); final Bundle result = future.getResult(); final Bundle result = future.getResult(); final boolean verified = result.getBoolean(AccountManager.KEY_BOOLEAN_RESULT); final boolean verified = result.getBoolean(AccountManager.KEY_BOOLEAN_RESULT); // ensure on UI thread postOnCheckPasswordResult(verified); mLogin.post(new Runnable() { public void run() { onCheckPasswordResult(verified); } }); } catch (OperationCanceledException e) { } catch (OperationCanceledException e) { onCheckPasswordResult(false); postOnCheckPasswordResult(false); } catch (IOException e) { } catch (IOException e) { onCheckPasswordResult(false); postOnCheckPasswordResult(false); } catch (AuthenticatorException e) { } catch (AuthenticatorException e) { onCheckPasswordResult(false); postOnCheckPasswordResult(false); } finally { } finally { mLogin.post(new Runnable() { mLogin.post(new Runnable() { public void run() { public void run() { Loading