diff options
author | Eric Erfanian <erfanian@google.com> | 2017-05-03 23:10:39 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-05-03 23:10:39 +0000 |
commit | d67f1627521b174f12e0c247f154c7c93c5e408e (patch) | |
tree | 1a45d60921e293c6088efeaf4d9c408456f3e0e2 /java/com/android/voicemail/impl/ActivationTask.java | |
parent | 010981b798fbc6b8e6a00c3ea507f00c3e77c371 (diff) | |
parent | 8369df095a73a77b3715f8ae7ba06089cebca4ce (diff) |
This change reflects the Dialer V10 RC00 branch.
am: 8369df095a
Change-Id: I6820870feb74cba010ac3039e4da41325b3005f9
Diffstat (limited to 'java/com/android/voicemail/impl/ActivationTask.java')
-rw-r--r-- | java/com/android/voicemail/impl/ActivationTask.java | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/java/com/android/voicemail/impl/ActivationTask.java b/java/com/android/voicemail/impl/ActivationTask.java index c53d3c722..b0ad3bafc 100644 --- a/java/com/android/voicemail/impl/ActivationTask.java +++ b/java/com/android/voicemail/impl/ActivationTask.java @@ -29,8 +29,8 @@ import android.support.annotation.WorkerThread; import android.telecom.PhoneAccountHandle; import android.telephony.ServiceState; import android.telephony.TelephonyManager; -import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; +import com.android.dialer.logging.DialerImpression; +import com.android.dialer.proguard.UsedByReflection; import com.android.voicemail.impl.protocol.VisualVoicemailProtocol; import com.android.voicemail.impl.scheduling.BaseTask; import com.android.voicemail.impl.scheduling.RetryPolicy; @@ -40,6 +40,7 @@ import com.android.voicemail.impl.sms.StatusSmsFetcher; import com.android.voicemail.impl.sync.OmtpVvmSyncService; import com.android.voicemail.impl.sync.SyncTask; import com.android.voicemail.impl.sync.VvmAccountManager; +import com.android.voicemail.impl.utils.LoggerUtils; import java.io.IOException; import java.util.HashSet; import java.util.Set; @@ -55,6 +56,7 @@ import java.util.concurrent.TimeoutException; * spontaneously sent a STATUS SMS. */ @TargetApi(VERSION_CODES.O) +@UsedByReflection(value = "Tasks.java") public class ActivationTask extends BaseTask { private static final String TAG = "VvmActivationTask"; @@ -107,14 +109,15 @@ public class ActivationTask extends BaseTask { } @Override - public void onCreate(Context context, Intent intent, int flags, int startId) { - super.onCreate(context, intent, flags, startId); - mMessageData = intent.getParcelableExtra(EXTRA_MESSAGE_DATA_BUNDLE); + public void onCreate(Context context, Bundle extras) { + super.onCreate(context, extras); + mMessageData = extras.getParcelable(EXTRA_MESSAGE_DATA_BUNDLE); } @Override public Intent createRestartIntent() { - Logger.get(getContext()).logImpression(DialerImpression.Type.VVM_AUTO_RETRY_ACTIVATION); + LoggerUtils.logImpressionOnMainThread( + getContext(), DialerImpression.Type.VVM_AUTO_RETRY_ACTIVATION); Intent intent = super.createRestartIntent(); // mMessageData is discarded, request a fresh STATUS SMS for retries. return intent; @@ -124,7 +127,8 @@ public class ActivationTask extends BaseTask { @WorkerThread public void onExecuteInBackgroundThread() { Assert.isNotMainThread(); - Logger.get(getContext()).logImpression(DialerImpression.Type.VVM_ACTIVATION_STARTED); + LoggerUtils.logImpressionOnMainThread( + getContext(), DialerImpression.Type.VVM_ACTIVATION_STARTED); PhoneAccountHandle phoneAccountHandle = getPhoneAccountHandle(); if (phoneAccountHandle == null) { // This should never happen @@ -234,7 +238,8 @@ public class ActivationTask extends BaseTask { helper.handleEvent(status, OmtpEvents.CONFIG_SERVICE_NOT_AVAILABLE); } } - Logger.get(getContext()).logImpression(DialerImpression.Type.VVM_ACTIVATION_COMPLETED); + LoggerUtils.logImpressionOnMainThread( + getContext(), DialerImpression.Type.VVM_ACTIVATION_COMPLETED); } public static void updateSource( |