Skip to content

add setting to clear recent apps on reboot - #478

Open
cameronaaron wants to merge 1 commit into
GrapheneOS:17from
cameronaaron:clear-recents-on-reboot
Open

cameronaaron wants to merge 1 commit into
GrapheneOS:17from
cameronaaron:clear-recents-on-reboot

Conversation

@cameronaaron

Copy link
Copy Markdown

For GrapheneOS/os-issue-tracker#8112

Recent tasks along with their snapshots and task images are restored from credential encrypted storage when the user is unlocked after a reboot. This adds an opt-in per-user setting (CLEAR_RECENTS_ON_REBOOT, off by default) to discard them instead.

When it's enabled, the task files are listed without being loaded, so restoreTasksForUserLocked treats all of them as obsolete and deletes them. A TaskPersister cleanup pass is then triggered (after the user is marked as loaded, since the pass only covers loaded users) to remove the leftover snapshots and task images.

Settings toggle is in a separate PR.

Recent tasks, their snapshots and task images are persisted in credential
encrypted storage and restored when the user is unlocked after a reboot.
Add an opt-in per-user setting to discard them instead, so that the
recent apps screen starts empty after a reboot.

When the setting is enabled, the persisted task files are listed without
being loaded, which makes restoring treat all of them as obsolete and
delete them. A TaskPersister cleanup pass is then triggered to delete the
snapshots and task images of the tasks that weren't restored.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant