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

Commit 752ff5a1 authored by Zim's avatar Zim Committed by Nandana Dutt
Browse files

Introduce preserveLegacyExternalStorage manifest attribute

This attribute will default to false and does nothing in the false
state.

In the true state, it will allow an updating app preserve any legacy
storage access from the existing installed version on device.

Test: atest RestrictedPermissionsTest
Test: atest RestrictedStoragePermissionSharedUidTest
Bug: 148944140
Change-Id: Id5b6d7aadd9d9844c8bd1164087a9e093481e234
parent f45a4b7d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1082,6 +1082,7 @@ package android {
    field public static final int preferenceScreenStyle = 16842891; // 0x101008b
    field public static final int preferenceStyle = 16842894; // 0x101008e
    field public static final int presentationTheme = 16843712; // 0x10103c0
    field public static final int preserveLegacyExternalStorage = 16844312; // 0x1010618
    field public static final int previewImage = 16843482; // 0x10102da
    field public static final int primaryContentAlpha = 16844114; // 0x1010552
    field public static final int priority = 16842780; // 0x101001c
+15 −0
Original line number Diff line number Diff line
@@ -1770,6 +1770,21 @@
             -->
        <attr name="requestLegacyExternalStorage" format="boolean" />

        <!-- If {@code true} this app would like to preserve the legacy storage
             model from a previously installed version. Note that this may not always be
             respected due to policy or backwards compatibility reasons.

             <p>This has no effect on the first install of an app on a device.
             For an updating app, setting this to {@code true} will preserve the legacy behaviour
             configured by the {@code requestLegacyExternalStorage} flag. If on an update, this
             flag is set to {@code false} then the legacy access is not preserved, such an app can
             only have legacy access with the {@code requestLegacyExternalStorage} flag.
             <p>

             The default value is {@code false}.
             -->
        <attr name="preserveLegacyExternalStorage" format="boolean" />

        <!-- If {@code true} this app declares that it should be visible to all other apps on
             device, regardless of what they declare via the {@code queries} tags in their
             manifest.
+1 −0
Original line number Diff line number Diff line
@@ -3018,6 +3018,7 @@
      <!-- @hide @SystemApi -->
      <public name="isAutofillInlineSuggestionTheme" />
      <public name="allowNativeHeapPointerTagging" />
      <public name="preserveLegacyExternalStorage" />
    </public-group>

    <public-group type="drawable" first-id="0x010800b5">