From 7ef551e512ea6cc80a393f52902f1450e3a1d9d4 Mon Sep 17 00:00:00 2001 From: twyen Date: Mon, 20 Nov 2017 16:13:33 -0800 Subject: 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 --- .../voicemail/settings/VoicemailChangePinActivity.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'java') 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. */ -- cgit v1.2.3