diff options
author | Eric Erfanian <erfanian@google.com> | 2017-05-03 23:18:35 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-05-03 23:18:35 +0000 |
commit | 2034759538273aed8a0b412d8fb90994eba1f7ea (patch) | |
tree | 1a45d60921e293c6088efeaf4d9c408456f3e0e2 /java/com/android/voicemail/impl/sync/SyncOneTask.java | |
parent | 86baedee44a4902097310c689ee3ae7f0cdb1c8d (diff) | |
parent | d67f1627521b174f12e0c247f154c7c93c5e408e (diff) |
This change reflects the Dialer V10 RC00 branch. am: 8369df095a
am: d67f162752
Change-Id: I94f923a6a8af0a580723017002922e299bd335f3
Diffstat (limited to 'java/com/android/voicemail/impl/sync/SyncOneTask.java')
-rw-r--r-- | java/com/android/voicemail/impl/sync/SyncOneTask.java | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/java/com/android/voicemail/impl/sync/SyncOneTask.java b/java/com/android/voicemail/impl/sync/SyncOneTask.java index e57235e4b..19419ec8a 100644 --- a/java/com/android/voicemail/impl/sync/SyncOneTask.java +++ b/java/com/android/voicemail/impl/sync/SyncOneTask.java @@ -18,18 +18,21 @@ package com.android.voicemail.impl.sync; import android.content.Context; import android.content.Intent; +import android.os.Bundle; import android.telecom.PhoneAccountHandle; -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.Voicemail; import com.android.voicemail.impl.VoicemailStatus; import com.android.voicemail.impl.scheduling.BaseTask; import com.android.voicemail.impl.scheduling.RetryPolicy; +import com.android.voicemail.impl.utils.LoggerUtils; /** * Task to download a single voicemail from the server. This task is initiated by a SMS notifying * the new voicemail arrival, and ignores the duplicated tasks constraint. */ +@UsedByReflection(value = "Tasks.java") public class SyncOneTask extends BaseTask { private static final int RETRY_TIMES = 2; @@ -56,11 +59,12 @@ public class SyncOneTask extends BaseTask { addPolicy(new RetryPolicy(RETRY_TIMES, RETRY_INTERVAL_MILLIS)); } - public void onCreate(Context context, Intent intent, int flags, int startId) { - super.onCreate(context, intent, flags, startId); - mPhone = intent.getParcelableExtra(EXTRA_PHONE_ACCOUNT_HANDLE); - mSyncType = intent.getStringExtra(EXTRA_SYNC_TYPE); - mVoicemail = intent.getParcelableExtra(EXTRA_VOICEMAIL); + @Override + public void onCreate(Context context, Bundle extras) { + super.onCreate(context, extras); + mPhone = extras.getParcelable(EXTRA_PHONE_ACCOUNT_HANDLE); + mSyncType = extras.getString(EXTRA_SYNC_TYPE); + mVoicemail = extras.getParcelable(EXTRA_VOICEMAIL); } @Override @@ -71,7 +75,7 @@ public class SyncOneTask extends BaseTask { @Override public Intent createRestartIntent() { - Logger.get(getContext()).logImpression(DialerImpression.Type.VVM_AUTO_RETRY_SYNC); + LoggerUtils.logImpressionOnMainThread(getContext(), DialerImpression.Type.VVM_AUTO_RETRY_SYNC); Intent intent = super.createRestartIntent(); intent.putExtra(EXTRA_PHONE_ACCOUNT_HANDLE, mPhone); intent.putExtra(EXTRA_SYNC_TYPE, mSyncType); |