Clean/destroy app shared storage via installd.
In P we moved destroying per-user shared storage into installd,
where it can iterate quickly over large sets of files. This change
now moves cleaning/destroying of per-app shared storage data down into
installd, letting us greatly simplify the logic in PMS to no longer
require spinning up DefaultContainerService. This also fixes an
obscure bug where DCS (which always runs as USER_SYSTEM) wasn't able
to clear shared storage for secondary users.
This also gives us the ability to target specific storage devices
by UUID, such as when the user has migrated their primary shared
storage to an adopted device.
We no longer distinguish between keeping or deleting OBB files
during various operations, since upcoming changes in the Q release
will mean OBB files are no longer shared between users, and they'll
now live inside a sandbox that will be fully cleared when the user
clears data. (Going forward, apps should be using splits instead
of OBBs, so they're effectively deprecated.)
Uses newer "const" feature of AIDL to ensure constant values remain
consistent between native and Java code.
Bug: 111854851, 111838160
Test: atest android.appsecurity.cts.StorageHostTest#testCache
Change-Id: Ia913587343edf47c37b4e72cc298e16cf90a9a23
2 files changed