#635 - Disable the password input layout as well (disables the ability to show/hide the password text while unlocking)
This commit is contained in:
parent
1ab6b21476
commit
a9fe8e1c19
2 changed files with 9 additions and 9 deletions
|
@ -63,6 +63,7 @@ public class AuthenticateActivity extends ThemedActivity
|
||||||
private String existingAuthCredentials;
|
private String existingAuthCredentials;
|
||||||
private boolean isAuthUpgrade = false;
|
private boolean isAuthUpgrade = false;
|
||||||
|
|
||||||
|
private TextInputLayout passwordLayout;
|
||||||
private TextInputEditText passwordInput;
|
private TextInputEditText passwordInput;
|
||||||
private Button unlockButton;
|
private Button unlockButton;
|
||||||
private ProgressBar unlockProgress;
|
private ProgressBar unlockProgress;
|
||||||
|
@ -127,16 +128,15 @@ public class AuthenticateActivity extends ThemedActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initPasswordLayoutView(View v) {
|
private void initPasswordLayoutView(View v) {
|
||||||
TextInputLayout passwordLayout = v.findViewById(R.id.passwordLayout);
|
passwordLayout = v.findViewById(R.id.passwordLayout);
|
||||||
|
|
||||||
int hintResId = (authMethod == AuthMethod.PASSWORD) ? R.string.auth_hint_password : R.string.auth_hint_pin;
|
int hintResId = (authMethod == AuthMethod.PASSWORD) ? R.string.auth_hint_password : R.string.auth_hint_pin;
|
||||||
passwordLayout.setHint(getString(hintResId));
|
passwordLayout.setHint(getString(hintResId));
|
||||||
|
if (settings.getBlockAccessibility()) {
|
||||||
if (settings.getBlockAccessibility())
|
|
||||||
passwordLayout.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
|
passwordLayout.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
|
||||||
|
}
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && settings.getBlockAutofill())
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && settings.getBlockAutofill()) {
|
||||||
passwordLayout.setImportantForAutofill(View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS);
|
passwordLayout.setImportantForAutofill(View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initPasswordInputView(View v) {
|
private void initPasswordInputView(View v) {
|
||||||
|
@ -152,9 +152,7 @@ public class AuthenticateActivity extends ThemedActivity
|
||||||
private void initUnlockViews(View v) {
|
private void initUnlockViews(View v) {
|
||||||
unlockButton = v.findViewById(R.id.buttonUnlock);
|
unlockButton = v.findViewById(R.id.buttonUnlock);
|
||||||
unlockButton.setOnClickListener(this);
|
unlockButton.setOnClickListener(this);
|
||||||
unlockButton.setVisibility(View.VISIBLE);
|
|
||||||
unlockProgress = v.findViewById(R.id.unlockProgress);
|
unlockProgress = v.findViewById(R.id.unlockProgress);
|
||||||
unlockProgress.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -182,6 +180,7 @@ public class AuthenticateActivity extends ThemedActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
private void displayUnlockProgress() {
|
private void displayUnlockProgress() {
|
||||||
|
passwordLayout.setEnabled(false);
|
||||||
passwordInput.setEnabled(false);
|
passwordInput.setEnabled(false);
|
||||||
unlockButton.setEnabled(false);
|
unlockButton.setEnabled(false);
|
||||||
unlockButton.setVisibility(View.INVISIBLE);
|
unlockButton.setVisibility(View.INVISIBLE);
|
||||||
|
|
|
@ -52,7 +52,8 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="?android:attr/progressBarStyle"
|
style="?android:attr/progressBarStyle"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_alignEnd="@id/buttonUnlock"/>
|
android:layout_alignEnd="@id/buttonUnlock"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue