diff options
Diffstat (limited to 'java/com/android/voicemail')
-rw-r--r-- | java/com/android/voicemail/impl/ActivationTask.java | 5 | ||||
-rw-r--r-- | java/com/android/voicemail/impl/PreOMigrationHandler.java | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/java/com/android/voicemail/impl/ActivationTask.java b/java/com/android/voicemail/impl/ActivationTask.java index 29c91e01e..83f2fd836 100644 --- a/java/com/android/voicemail/impl/ActivationTask.java +++ b/java/com/android/voicemail/impl/ActivationTask.java @@ -61,7 +61,7 @@ public class ActivationTask extends BaseTask { private static final int RETRY_TIMES = 4; private static final int RETRY_INTERVAL_MILLIS = 5_000; - private static final String EXTRA_MESSAGE_DATA_BUNDLE = "extra_message_data_bundle"; + @VisibleForTesting static final String EXTRA_MESSAGE_DATA_BUNDLE = "extra_message_data_bundle"; private final RetryPolicy mRetryPolicy; @@ -168,7 +168,8 @@ public class ActivationTask extends BaseTask { } VvmLog.i(TAG, "VVM content provider configured - " + helper.getVvmType()); - if (VvmAccountManager.isAccountActivated(getContext(), phoneAccountHandle)) { + if (mMessageData == null + && VvmAccountManager.isAccountActivated(getContext(), phoneAccountHandle)) { VvmLog.i(TAG, "Account is already activated"); // The activated state might come from restored data, the filter still needs to be set up. helper.activateSmsFilter(); diff --git a/java/com/android/voicemail/impl/PreOMigrationHandler.java b/java/com/android/voicemail/impl/PreOMigrationHandler.java index 3ec5e0826..2c454715c 100644 --- a/java/com/android/voicemail/impl/PreOMigrationHandler.java +++ b/java/com/android/voicemail/impl/PreOMigrationHandler.java @@ -18,6 +18,7 @@ package com.android.voicemail.impl; import android.content.Context; import android.os.Bundle; +import android.support.annotation.VisibleForTesting; import android.support.annotation.WorkerThread; import android.telecom.PhoneAccountHandle; import android.telephony.TelephonyManager; @@ -49,7 +50,7 @@ public final class PreOMigrationHandler { private static final String EXTRA_VOICEMAIL_SCRAMBLED_PIN_STRING = "android.telephony.extra.VOICEMAIL_SCRAMBLED_PIN_STRING"; - private static final String PRE_O_MIGRATION_FINISHED = "pre_o_migration_finished"; + @VisibleForTesting static final String PRE_O_MIGRATION_FINISHED = "pre_o_migration_finished"; @WorkerThread public static void migrate(Context context, PhoneAccountHandle phoneAccountHandle) { |