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
Loading
Please register or sign in to comment