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/sync/SyncTask.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/sync/SyncTask.java')
-rw-r--r-- | java/com/android/voicemail/impl/sync/SyncTask.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/java/com/android/voicemail/impl/sync/SyncTask.java b/java/com/android/voicemail/impl/sync/SyncTask.java index a9e592068..27f803401 100644 --- a/java/com/android/voicemail/impl/sync/SyncTask.java +++ b/java/com/android/voicemail/impl/sync/SyncTask.java @@ -18,14 +18,17 @@ 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.scheduling.BaseTask; import com.android.voicemail.impl.scheduling.MinimalIntervalPolicy; import com.android.voicemail.impl.scheduling.RetryPolicy; +import com.android.voicemail.impl.utils.LoggerUtils; /** System initiated sync request. */ +@UsedByReflection(value = "Tasks.java") public class SyncTask extends BaseTask { // Try sync for a total of 5 times, should take around 5 minutes before finally giving up. @@ -55,10 +58,11 @@ public class SyncTask extends BaseTask { addPolicy(new MinimalIntervalPolicy(MINIMAL_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); + @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); } @Override @@ -69,7 +73,7 @@ public class SyncTask 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); |