diff options
author | Zachary Heidepriem <zachh@google.com> | 2017-11-06 19:10:44 -0800 |
---|---|---|
committer | Zachary Heidepriem <zachh@google.com> | 2017-11-06 19:10:44 -0800 |
commit | 7547d3e963dab2b1ef467ad27c3f0d25e150b50c (patch) | |
tree | 642c7b180b33d1371c1f474be03fbb8de2110f6d /java/com/android/voicemail/impl/imap | |
parent | b519cd522d472b5d7980cc015aa37c101be99386 (diff) |
Move voicemail settings to dialer UI
The voicemail module should not contain any UI code.
Bug: 37258159
Test: DialerSettingsActivityTest,VoicemailSettingsFragmentTest. A future CL is refactoring VoicemailChangePinActivity into a fragment.
PiperOrigin-RevId: 174125949
Change-Id: I89cf6a083b0a0952332440d76e7ae0cb1c801931
Diffstat (limited to 'java/com/android/voicemail/impl/imap')
-rw-r--r-- | java/com/android/voicemail/impl/imap/ImapHelper.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/java/com/android/voicemail/impl/imap/ImapHelper.java b/java/com/android/voicemail/impl/imap/ImapHelper.java index 94abe9bad..a0e86dcae 100644 --- a/java/com/android/voicemail/impl/imap/ImapHelper.java +++ b/java/com/android/voicemail/impl/imap/ImapHelper.java @@ -22,8 +22,9 @@ import android.net.NetworkInfo; import android.support.annotation.Nullable; import android.telecom.PhoneAccountHandle; import android.util.Base64; +import com.android.voicemail.PinChanger; +import com.android.voicemail.PinChanger.ChangePinResult; import com.android.voicemail.impl.OmtpConstants; -import com.android.voicemail.impl.OmtpConstants.ChangePinResult; import com.android.voicemail.impl.OmtpEvents; import com.android.voicemail.impl.OmtpVvmCarrierConfigHelper; import com.android.voicemail.impl.VisualVoicemailPreferences; @@ -393,7 +394,7 @@ public class ImapHelper implements Closeable { return getChangePinResultFromImapResponse(connection.readResponse()); } catch (IOException ioe) { VvmLog.e(TAG, "changePin: ", ioe); - return OmtpConstants.CHANGE_PIN_SYSTEM_ERROR; + return PinChanger.CHANGE_PIN_SYSTEM_ERROR; } finally { connection.destroyResponses(); } @@ -434,24 +435,24 @@ public class ImapHelper implements Closeable { String message = response.getStringOrEmpty(1).getString(); LogUtils.d(TAG, "change PIN failed: " + message); if (OmtpConstants.RESPONSE_CHANGE_PIN_TOO_SHORT.equals(message)) { - return OmtpConstants.CHANGE_PIN_TOO_SHORT; + return PinChanger.CHANGE_PIN_TOO_SHORT; } if (OmtpConstants.RESPONSE_CHANGE_PIN_TOO_LONG.equals(message)) { - return OmtpConstants.CHANGE_PIN_TOO_LONG; + return PinChanger.CHANGE_PIN_TOO_LONG; } if (OmtpConstants.RESPONSE_CHANGE_PIN_TOO_WEAK.equals(message)) { - return OmtpConstants.CHANGE_PIN_TOO_WEAK; + return PinChanger.CHANGE_PIN_TOO_WEAK; } if (OmtpConstants.RESPONSE_CHANGE_PIN_MISMATCH.equals(message)) { - return OmtpConstants.CHANGE_PIN_MISMATCH; + return PinChanger.CHANGE_PIN_MISMATCH; } if (OmtpConstants.RESPONSE_CHANGE_PIN_INVALID_CHARACTER.equals(message)) { - return OmtpConstants.CHANGE_PIN_INVALID_CHARACTER; + return PinChanger.CHANGE_PIN_INVALID_CHARACTER; } - return OmtpConstants.CHANGE_PIN_SYSTEM_ERROR; + return PinChanger.CHANGE_PIN_SYSTEM_ERROR; } LogUtils.d(TAG, "change PIN succeeded"); - return OmtpConstants.CHANGE_PIN_SUCCESS; + return PinChanger.CHANGE_PIN_SUCCESS; } public void updateQuota() { |