Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ced7db46 authored by Paul Lawrence's avatar Paul Lawrence
Browse files

Hide controls once password is known good

Bug: 17551103
Change-Id: I4fd182b7ac7a9ad7c1483979d4510b50b52e520f
parent 4241b0a9
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -155,6 +155,13 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
    }

    private class DecryptTask extends AsyncTask<String, Void, Integer> {
        private void hide(int id) {
            View view = findViewById(id);
            if (view != null) {
                view.setVisibility(View.GONE);
            }
        }

        @Override
        protected Integer doInBackground(String... params) {
            final IMountService service = getMountService();
@@ -175,6 +182,12 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
                    mLockPatternView.removeCallbacks(mClearPatternRunnable);
                    mLockPatternView.postDelayed(mClearPatternRunnable, RIGHT_PATTERN_CLEAR_TIMEOUT_MS);
                }
                hide(R.id.passwordEntry);
                hide(R.id.switch_ime_button);
                hide(R.id.lockPattern);
                hide(R.id.status);
                hide(R.id.owner_info);
                hide(R.id.emergencyCallButton);
            } else if (failedAttempts == MAX_FAILED_ATTEMPTS) {
                // Factory reset the device.
                sendBroadcast(new Intent("android.intent.action.MASTER_CLEAR"));