diff options
| author | twyen <twyen@google.com> | 2018-03-26 11:05:29 -0700 |
|---|---|---|
| committer | Copybara-Service <copybara-piper@google.com> | 2018-03-26 22:23:04 -0700 |
| commit | e652cbf3991aad4a46ad811f370a54c1051089e0 (patch) | |
| tree | 1a84176c631cccc87c584fa41e54ada1e3af36d6 /java/com/android/voicemail/impl/scheduling/TaskSchedulerJobService.java | |
| parent | 07d6d00a5cc6c1aeb1befaccc1e832b3d5b398d8 (diff) | |
Catch BadParcelableException
This happens when an old dialer submitted a job and the newer dialer is trying to handle it. The class fingerprint changed so it can no longer be unparceled.
In this CL, such tasks will be dropped.
Bug: 64225192
Test: N/A
PiperOrigin-RevId: 190491751
Change-Id: I90fe2d24a435201cfae09970387e9b1c3a58b094
Diffstat (limited to 'java/com/android/voicemail/impl/scheduling/TaskSchedulerJobService.java')
| -rw-r--r-- | java/com/android/voicemail/impl/scheduling/TaskSchedulerJobService.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/java/com/android/voicemail/impl/scheduling/TaskSchedulerJobService.java b/java/com/android/voicemail/impl/scheduling/TaskSchedulerJobService.java index 0e3f27cd8..77a0d25cd 100644 --- a/java/com/android/voicemail/impl/scheduling/TaskSchedulerJobService.java +++ b/java/com/android/voicemail/impl/scheduling/TaskSchedulerJobService.java @@ -33,6 +33,7 @@ import com.android.dialer.constants.ScheduledJobIds; import com.android.dialer.strictmode.StrictModeUtils; import com.android.voicemail.impl.Assert; import com.android.voicemail.impl.VvmLog; +import com.android.voicemail.impl.scheduling.Tasks.TaskCreationException; import java.util.ArrayList; import java.util.List; @@ -110,7 +111,11 @@ public class TaskSchedulerJobService extends JobService implements TaskExecutor. TaskQueue queue = new TaskQueue(); queue.fromBundles(context, existingTasks); for (Bundle pendingTask : pendingTasks) { - queue.add(Tasks.createTask(context, pendingTask)); + try { + queue.add(Tasks.createTask(context, pendingTask)); + } catch (TaskCreationException e) { + VvmLog.e(TAG, "cannot create task", e); + } } pendingTasks = queue.toBundles(); } |
