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