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

Skip to content
Commit a8bc22f0 authored by Nikita Ioffe's avatar Nikita Ioffe
Browse files

Don't create app data dirs if app requests not to

App can set a android.internal.PROPERTY_NO_APP_DATA_STORAGE  property in it's
AndroidManifest.xml which will tell platform to avoid creating data
directories for it.

This property is intentionally not exposed as public API because not
having private app storage is a very niche requirement.

This change also logic to prevent app updates from changing value of the
property, i.e.: if an installed app doesn't specify value of the
PROPERTY_NO_APP_DATA_STORAGE property (or has it set to false), then any
update to this app shouldn't have this property specified (or explicitly
set it to false). If an app has PROPERTY_NO_APP_DATA_STORAGE set to
true, then all updates should keep that property set to true.

Note: this change only takes into account internal storage. Removing
app's external storage will be done in the follow up cl.

Bug: 211761016
Test: atest PackageManagerShellTest
Change-Id: I3e541d947a77f5c050bf706f64009f21c24dcbc9
parent fb42cf7e
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