Legacy storage behavior for pre-isolated apps.

If apps have already been running on a device before the new isolated
storage feature is enabled, then they should get a "legacy" view
to continue working with minimal disruption.  End users will be able
to revoke this legacy access through Settings UI.

This offers the best trade-off possible between keeping existing apps
working, and preserving user privacy moving forward.

Note that this legacy behavior only applies to apps that are already
installed and actively using storage before the feature was enabled;
all newly installed/reinstalled apps will always receive a sandbox.

Bug: 120287776
Test: atest android.appsecurity.cts.ExternalStorageHostTest#testExternalStorageIsolatedLegacy
Change-Id: I3711a649d2f372ac812457e43fde7b2d708c2f53
2 files changed