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

Commit a12c0979 authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Implement dual storage permission model

... and remove old special handling of storage permissions.

Test: - Looked at UI with apps in different quadrats of the storage
        permission model
      - Tried to revoke permssion of grandfathered Q app
Bug: 126785920
Change-Id: I1ed80a4d1f681820711796cf2265615261491892
parent ef3f0eda
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2019 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="36dp"
        android:height="36dp"
        android:viewportWidth="36.0"
        android:viewportHeight="36.0"
        android:tint="?android:attr/colorControlNormal">
    <path android:pathData="M1,32h34L18,3 1,32zM19,27h-2v-2h2v2zM19,22h-2v-7h2v7z"
          android:fillColor="#000000" />
</vector>
 No newline at end of file
+27 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2019 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              style="@style/GrandfatheredModernStorageGroupWarningDialogHeader" >

    <ImageView android:id="@+id/icon"
               style="@style/GrandfatheredModernStorageGroupWarningDialogTitleIcon" />

    <TextView
        android:id="@+id/title"
        style="@style/GrandfatheredModernStorageGroupWarningDialogTitleMessage"  />

</LinearLayout>
+8 −0
Original line number Diff line number Diff line
@@ -91,6 +91,14 @@
            <item type="style" name="PermissionFilterDialogItemTitle" />
            <item type="style" name="PermissionFilterDialogItemSummary" />
            <!-- END PERMISSION FILTER SCREEN -->

            <!-- START GRANDFATHERED MODERN STORAGE GROUP WARNING DIALOG -->
            <item type="style" name="GrandfatheredModernStorageGroupWarningDialogHeader" />

            <item type="style" name="GrandfatheredModernStorageGroupWarningDialogTitleIcon" />
            <item type="style" name="GrandfatheredModernStorageGroupWarningDialogTitleMessage" />
            <!-- END GRANDFATHERED MODERN STORAGE GROUP WARNING DIALOG -->

        </policy>

    </overlayable>
+10 −0
Original line number Diff line number Diff line
@@ -626,4 +626,14 @@ Allow <xliff:g id="app_name" example="Gmail">%4$s</xliff:g> to upload a bug repo

    <!-- Label for the button to NOT allow sharing of the report. [CHAR LIMIT=20] -->
    <string name="incident_report_dialog_deny_label">Deny</string>

    <!-- Title for the warning dialog shown when user tried to revoke a grandfathered modern storage permission.
    [CHAR LIMIT=100] -->
    <string name="grandfathered_modern_storage_permission_deny_warning_title">Uninstall the app as permission can\u2019t be denied</string>

    <!-- Content for the warning dialog shown when user tried to revoke a grandfathered modern storage permission [CHAR LIMIT=none] -->
    <string name="grandfathered_modern_storage_permission_deny_warning_content"><xliff:g id="app_name" example="Gmail">%1$s</xliff:g> has legacy storage permission to keep your previous data accessible.\n\nYou need to uninstall this app and reinstall it, as the app can stop working if this permission is denied.</string>

    <!-- Dismiss with acknowledgment [CHAR LIMIT=30] -->
    <string name="dismiss_with_acknowledgment">Got it</string>
</resources>
+28 −0
Original line number Diff line number Diff line
@@ -382,4 +382,32 @@

    <!-- END PERMISSION FILTER SCREEN -->

    <!-- START GRANDFATHERED MODERN STORAGE GROUP WARNING DIALOG -->

    <style name="GrandfatheredModernStorageGroupWarningDialogHeader">
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:orientation">vertical</item>
        <item name="android:gravity">center</item>
        <item name="android:paddingTop">16dp</item>
        <item name="android:paddingStart">24dp</item>
        <item name="android:paddingEnd">24dp</item>
    </style>

    <style name="GrandfatheredModernStorageGroupWarningDialogTitleIcon">
        <item name="android:layout_width">24dp</item>
        <item name="android:layout_height">24dp</item>
        <item name="android:layout_marginBottom">12dp</item>
        <item name="android:scaleType">fitCenter</item>
    </style>

    <style name="GrandfatheredModernStorageGroupWarningDialogTitleMessage"
           parent="@android:style/TextAppearance.DeviceDefault.DialogWindowTitle">
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:gravity">center</item>
    </style>

    <!-- END GRANDFATHERED MODERN STORAGE GROUP WARNING DIALOG -->

</resources>
Loading