summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/voicemail
diff options
context:
space:
mode:
authortwyen <twyen@google.com>2017-11-20 16:13:33 -0800
committerCopybara-Service <copybara-piper@google.com>2017-11-20 17:44:26 -0800
commit7ef551e512ea6cc80a393f52902f1450e3a1d9d4 (patch)
tree555efdc356848001dcf4d59c66233f200c3717fe /java/com/android/dialer/voicemail
parent1b39ebece6d773567a29884adc78d2c42378cacb (diff)
Initialize executors before updating change PIN state
When the activity is launched it might immediately attempt to verify the stored pin, which happened before the executor is initialized Bug: 69179171 Test: N/A - legacy code, refactoring required PiperOrigin-RevId: 176433263 Change-Id: I8202a760dbfc7759e128ef31d477510526d0bee7
Diffstat (limited to 'java/com/android/dialer/voicemail')
-rw-r--r--java/com/android/dialer/voicemail/settings/VoicemailChangePinActivity.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/java/com/android/dialer/voicemail/settings/VoicemailChangePinActivity.java b/java/com/android/dialer/voicemail/settings/VoicemailChangePinActivity.java
index 4d53d61d2..13ca5b724 100644
--- a/java/com/android/dialer/voicemail/settings/VoicemailChangePinActivity.java
+++ b/java/com/android/dialer/voicemail/settings/VoicemailChangePinActivity.java
@@ -357,13 +357,6 @@ public class VoicemailChangePinActivity extends Activity
mHintText = (TextView) view.findViewById(R.id.hintText);
mErrorText = (TextView) view.findViewById(R.id.errorText);
- if (isPinScrambled(this, mPhoneAccountHandle)) {
- mOldPin = mPinChanger.getScrambledPin();
- updateState(State.VerifyOldPin);
- } else {
- updateState(State.EnterOldPin);
- }
-
mChangePinExecutor =
DialerExecutorComponent.get(this)
.dialerExecutorFactory()
@@ -371,6 +364,13 @@ public class VoicemailChangePinActivity extends Activity
.onSuccess(this::sendResult)
.onFailure((tr) -> sendResult(PinChanger.CHANGE_PIN_SYSTEM_ERROR))
.build();
+
+ if (isPinScrambled(this, mPhoneAccountHandle)) {
+ mOldPin = mPinChanger.getScrambledPin();
+ updateState(State.VerifyOldPin);
+ } else {
+ updateState(State.EnterOldPin);
+ }
}
/** Extracts the pin length requirement sent by the server with a STATUS SMS. */