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

Skip to content
Commit 87380366 authored by Winson's avatar Winson
Browse files

Defer post-install resource clean up for 5 seconds

There is an inherent problem with deleting files on disk while an
app is running, since it might still try to access code/resources
in the deleted files.

We cannot instantaneously update all application threads to the
new paths without blocking the world, so keep the old ones around
for an arbitrary amount of time.

As mentioned in the linked bug, if PackageManager boots with
duplicated app directories, it will automatically clean itself up,
so we are not concerned with the case where the deferred delete
message doesn't get executed in the current device boot cycle.

5 seconds was chosen with no reasoning beyond it feels safe.

Bug: 129291162

Test: manual reboot device with invalid dirs on disk
Test: manual dynamic feature delivery app with --dont-kill split

Change-Id: Id249a185a8556ebf133be3c36b1fec3f14b588ac
parent c91b915b
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