Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4cb941e1 authored by Daichi Hirono's avatar Daichi Hirono
Browse files

Stop restoring tasks added before recent is loaded

Previously we can have duplicated tasks sharing the same taskId in
RecentTasks due to race condition.

1. A task is created before RecentTasks#loadUserRecentsLocked
   (e.g. through adb)
2. RecentTasks#notifyTaskPersisterLocked eventually writes the task file
   to storage (e.g. XX_task.xml)
3. RecentTasks#loadUserRecentsLocked tries to recover XX_task.xml while
   the task has already been added to RecentTasks.

To fix the issue, the CL stops restoring tasks added before recent is
loaded.

Bug: 36796576
Test: Build and boot Android, check the recent is correctly loaded
Change-Id: Ib57977f2a0a63f7bf7db4d3fd70bdcc359e76f7d
(cherry picked from commit b8aeb6f1)
parent 57ed0ba6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment