Fix NPE when there's no forgot password button.

Test: manual
Bug: 149887743
Change-Id: If2238aec2e618f617b7459b819303c03f009941a
This commit is contained in:
Pavel Grafov
2020-02-20 12:32:57 +00:00
parent 3c96925aef
commit c4d9980a5d
7 changed files with 30 additions and 14 deletions

View File

@@ -267,7 +267,9 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
mHeaderTextView.setAlpha(0f);
mDetailsTextView.setAlpha(0f);
mCancelButton.setAlpha(0f);
mForgotButton.setAlpha(0f);
if (mForgotButton != null) {
mForgotButton.setAlpha(0f);
}
mPasswordEntry.setAlpha(0f);
mErrorTextView.setAlpha(0f);
}
@@ -279,7 +281,7 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
if (mCancelButton.getVisibility() == View.VISIBLE) {
result.add(mCancelButton);
}
if (mForgotButton.getVisibility() == View.VISIBLE) {
if (mForgotButton != null) {
result.add(mForgotButton);
}
result.add(mPasswordEntry);