diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-08-31 16:17:04 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-08-31 16:17:04 +0000 |
commit | c39ea3c55fac807c0b98aabdf56c70dc8a49036c (patch) | |
tree | e282668a9587cf6c1ec7b604dea860400c75c6c7 /java/com/android/voicemail/impl/scheduling/TaskExecutor.java | |
parent | 68038172793ee0e2ab3e2e56ddfbeb82879d1f58 (diff) | |
parent | 2ca4318cc1ee57dda907ba2069bd61d162b1baef (diff) |
Merge "Update Dialer source to latest internal Google revision."
Diffstat (limited to 'java/com/android/voicemail/impl/scheduling/TaskExecutor.java')
-rw-r--r-- | java/com/android/voicemail/impl/scheduling/TaskExecutor.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/java/com/android/voicemail/impl/scheduling/TaskExecutor.java b/java/com/android/voicemail/impl/scheduling/TaskExecutor.java index e3b718e50..afa77c58c 100644 --- a/java/com/android/voicemail/impl/scheduling/TaskExecutor.java +++ b/java/com/android/voicemail/impl/scheduling/TaskExecutor.java @@ -129,7 +129,7 @@ final class TaskExecutor { private final MainThreadHandler mainThreadHandler; - private final Context context; + private final Context appContext; /** Main thread only, access through {@link #getTasks()} */ private final TaskQueue tasks = new TaskQueue(); @@ -179,7 +179,7 @@ final class TaskExecutor { VvmLog.i("JobFinishedPoller.run", "Job finished"); if (!getTasks().isEmpty()) { TaskSchedulerJobService.scheduleJob( - context, serializePendingTasks(), delayMillis, isNewJob); + appContext, serializePendingTasks(), delayMillis, isNewJob); tasks.clear(); } terminate(); @@ -259,7 +259,7 @@ final class TaskExecutor { } private TaskExecutor(Context context) { - this.context = context; + this.appContext = context.getApplicationContext(); HandlerThread thread = new HandlerThread("VvmTaskExecutor"); thread.start(); @@ -274,7 +274,7 @@ final class TaskExecutor { job = null; workerThreadHandler.getLooper().quit(); instance = null; - TaskReceiver.resendDeferredBroadcasts(context); + TaskReceiver.resendDeferredBroadcasts(appContext); } @MainThread @@ -391,7 +391,7 @@ final class TaskExecutor { public void onStartJob(Job job, List<Bundle> pendingTasks) { VvmLog.i(TAG, "onStartJob"); this.job = job; - tasks.fromBundles(context, pendingTasks); + tasks.fromBundles(appContext, pendingTasks); maybeRunNextTask(); } |