diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-02-24 03:46:25 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-02-24 03:46:25 +0000 |
commit | 3002ad660a95b79a07837d283d1162df727b3221 (patch) | |
tree | cbdc437062f5d60fd191d57f23dfe32995887d1b /java/com/android/dialer/calllog/AnnotatedCallLogMigrator.java | |
parent | 7efc1f032cd7e7271a9cc993f60983d2ed3613c6 (diff) | |
parent | 0d9701531f3e1d68b13e460e8cf6197ad8f6b619 (diff) |
Merge "Track initial call log building metrics separately from incremental building metrics."
Diffstat (limited to 'java/com/android/dialer/calllog/AnnotatedCallLogMigrator.java')
-rw-r--r-- | java/com/android/dialer/calllog/AnnotatedCallLogMigrator.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/java/com/android/dialer/calllog/AnnotatedCallLogMigrator.java b/java/com/android/dialer/calllog/AnnotatedCallLogMigrator.java index f8c6fcef1..e2e112cd0 100644 --- a/java/com/android/dialer/calllog/AnnotatedCallLogMigrator.java +++ b/java/com/android/dialer/calllog/AnnotatedCallLogMigrator.java @@ -18,6 +18,7 @@ package com.android.dialer.calllog; import android.content.Context; import android.content.SharedPreferences; +import com.android.dialer.common.LogUtil; import com.android.dialer.common.concurrent.Annotations.BackgroundExecutor; import com.android.dialer.configprovider.ConfigProviderBindings; import com.android.dialer.inject.ApplicationContext; @@ -39,7 +40,7 @@ public final class AnnotatedCallLogMigrator { private final Context appContext; private final SharedPreferences sharedPreferences; private final RefreshAnnotatedCallLogWorker refreshAnnotatedCallLogWorker; - private final ListeningExecutorService backgorundExecutor; + private final ListeningExecutorService backgroundExecutor; @Inject AnnotatedCallLogMigrator( @@ -49,7 +50,7 @@ public final class AnnotatedCallLogMigrator { RefreshAnnotatedCallLogWorker refreshAnnotatedCallLogWorker) { this.appContext = appContext; this.sharedPreferences = sharedPreferences; - this.backgorundExecutor = backgroundExecutor; + this.backgroundExecutor = backgroundExecutor; this.refreshAnnotatedCallLogWorker = refreshAnnotatedCallLogWorker; } @@ -58,13 +59,13 @@ public final class AnnotatedCallLogMigrator { * the latency the first time call log is shown. */ public ListenableFuture<Void> migrate() { - return Futures.transformAsync( shouldMigrate(), (shouldMigrate) -> { if (!shouldMigrate) { return Futures.immediateFuture(null); } + LogUtil.i("AnnotatedCallLogMigrator.migrate", "migrating annotated call log"); return Futures.transform( refreshAnnotatedCallLogWorker.refreshWithoutDirtyCheck(), (unused) -> { @@ -77,7 +78,7 @@ public final class AnnotatedCallLogMigrator { } private ListenableFuture<Boolean> shouldMigrate() { - return backgorundExecutor.submit( + return backgroundExecutor.submit( () -> { if (!(ConfigProviderBindings.get(appContext) .getBoolean("is_nui_shortcut_enabled", false))) { |