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

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

Make ReviewPermissions a MD full screen dialog

Change-Id: I5a800cc80d436a1ece35a326deeb80c7c302b1f6
parent 4b362e58
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -99,7 +99,8 @@

        <activity android:name=".permission.ui.ReviewPermissionsActivity"
                  android:excludeFromRecents="true"
                  android:theme="@style/Settings.NoActionBar"
                  android:label="@string/permission_review_title"
                  android:theme="@style/ReviewPermissions"
                  android:permission="android.permission.GRANT_RUNTIME_PERMISSIONS">
            <intent-filter>
                <action android:name="android.intent.action.REVIEW_PERMISSIONS" />
+26 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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="24dp"
        android:height="24dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
    <path
            android:fillColor="#FFFFFFFF"
            android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
</vector>
+26 −67
Original line number Diff line number Diff line
@@ -14,38 +14,28 @@
     limitations under the License.
-->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_marginTop="32dip"
    android:layout_marginBottom="8dip"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true"
        android:orientation="vertical">

    <LinearLayout
        android:layout_width="wrap_content"
    <android.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
        android:layout_marginStart="16dip"
        android:layout_marginEnd="16dip"
        android:orientation="horizontal">

        <ImageView
            android:id="@+id/app_icon"
            android:layout_width="36dip"
            android:layout_height="36dip"
            android:tint="?android:attr/colorAccent"
            android:scaleType="fitCenter">
        </ImageView>
            android:background="?android:attr/colorPrimary"
            android:paddingEnd="8dp"
            android:elevation="4dp"
            android:theme="@android:style/ThemeOverlay.Material.Dark.ActionBar" />

    <TextView
            android:id="@+id/permissions_message"
            android:layout_width="wrap_content"
            android:id="@+id/message"
            style="?android:attr/textAppearanceMedium"
            android:textColor="?android:attr/textColorPrimary"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dip"
            style="?android:attr/textAppearanceMedium">
        </TextView>

    </LinearLayout>
            android:layout_margin="16dp" />

    <FrameLayout
            android:id="@+id/preferences_frame"
@@ -56,35 +46,4 @@
            android:layout_weight="1">
    </FrameLayout>

    <com.android.packageinstaller.permission.ui.ButtonBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:paddingStart="2dip"
        android:paddingTop="16dip">

        <Space
            android:id="@+id/spacer"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:visibility="invisible" />

        <Button
            android:id="@+id/cancel_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            style="?android:attr/buttonBarButtonStyle"
            android:text="@string/review_button_cancel" />

        <Button
            android:id="@+id/continue_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            style="?android:attr/buttonBarButtonStyle"
            android:layout_marginStart="8dip"
            android:text="@string/review_button_continue" />

    </com.android.packageinstaller.permission.ui.ButtonBarLayout>

</LinearLayout>
+6 −4
Original line number Diff line number Diff line
@@ -278,12 +278,14 @@
        Allow <xliff:g id="app_name" example="Gmail">%1$s</xliff:g> to
        access the following?</string>

    <!-- Template for the screen title when app permissions are reviewed on install. -->
    <string name="permission_review_title_template_install">Choose what to allow
    <string name="permission_review_title">Permissions</string>

    <!-- Template for the message when app permissions are reviewed on install. -->
    <string name="permission_review_message_template_install">Choose what to allow
        <xliff:g id="app_name" example="Gmail">%1$s</xliff:g> to access</string>

    <!-- Template for the screen title when app permissions are reviewed on update. -->
    <string name="permission_review_title_template_update">
    <!-- Template for the message when app permissions are reviewed on update. -->
    <string name="permission_review_message_template_update">
        <xliff:g id="app_name" example="Gmail">%1$s</xliff:g> has been updated.
        Choose what to allow this app to access.</string>

+6 −0
Original line number Diff line number Diff line
@@ -33,4 +33,10 @@
        <item name="android:windowBackground">@android:color/transparent</item>
    </style>

    <style name="ReviewPermissions"
            parent="@android:style/Theme.DeviceDefault.Light.DarkActionBar">
        <item name="android:windowActionBar">false</item>
        <item name="android:windowNoTitle">true</item>
    </style>

</resources>
Loading