1<?xml version="1.0" encoding="utf-8"?><!-- 2 ~ Copyright (C) 2024 The Android Open Source Project 3 ~ 4 ~ Licensed under the Apache License, Version 2.0 (the "License"); 5 ~ you may not use this file except in compliance with the License. 6 ~ You may obtain a copy of the License at 7 ~ 8 ~ http://www.apache.org/licenses/LICENSE-2.0 9 ~ 10 ~ Unless required by applicable law or agreed to in writing, software 11 ~ distributed under the License is distributed on an "AS IS" BASIS, 12 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 ~ See the License for the specific language governing permissions and 14 ~ limitations under the License. 15 --> 16 17<!-- 18 ~ A lot of content in this file is identical to grant_permissions.xml 19 ~ Be sure to update both files when making changes. 20 --> 21 22<!-- In (hopefully very rare) case dialog is too high: allow scrolling --> 23<!-- The following layout file is a fork of the phone layout version, customized for auto --> 24<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 25 style="@style/AutoPermissionGrantScrollView" 26 android:layout_width="wrap_content" 27 android:layout_height="match_parent"> 28 29 <LinearLayout 30 android:id="@+id/grant_singleton" 31 style="@style/AutoPermissionGrantSingleton" 32 android:focusable="false" 33 android:importantForAccessibility="no"> 34 35 <!-- The dialog --> 36 <LinearLayout 37 android:id="@+id/grant_dialog" 38 style="@style/AutoPermissionGrantDialogMaterial3" 39 android:focusable="false" 40 android:importantForAccessibility="no" 41 android:theme="@style/Theme.PermissionGrantDialog"> 42 43 <LinearLayout 44 android:id="@+id/content_container" 45 style="@style/AutoPermissionGrantContent"> 46 47 <LinearLayout style="@style/AutoPermissionGrantDescription"> 48 49 <TextView 50 android:id="@+id/permission_message" 51 style="@style/AutoPermissionGrantTitleMessage" 52 android:accessibilityHeading="true" /> 53 54 </LinearLayout> 55 56 <TextView 57 android:id="@+id/detail_message" 58 style="@style/AutoPermissionGrantDetailMessage" /> 59 60 </LinearLayout> 61 62 <!-- location (precise/approximate) animations --> 63 <LinearLayout 64 android:id="@+id/permission_location_accuracy" 65 android:layout_width="match_parent" 66 android:layout_height="wrap_content"> 67 68 <ImageView 69 android:id="@+id/permission_location_accuracy_fine_only" 70 style="@style/AutoPermissionLocationAccuracyImageViewMaterial13" 71 android:contentDescription="@string/precise_image_description" /> 72 73 <ImageView 74 android:id="@+id/permission_location_accuracy_coarse_only" 75 style="@style/AutoPermissionLocationAccuracyImageViewMaterial13" 76 android:contentDescription="@string/approximate_image_description" /> 77 78 <RadioGroup 79 android:id="@+id/permission_location_accuracy_radio_group" 80 style="@style/AutoPermissionLocationAccuracyRadioGroupMaterial3"> 81 82 <RadioButton 83 android:id="@+id/permission_location_accuracy_radio_fine" 84 style="@style/AutoPermissionLocationAccuracyRadioFine" 85 android:text="@string/permgrouprequest_finelocation_imagetext" /> 86 87 <RadioButton 88 android:id="@+id/permission_location_accuracy_radio_coarse" 89 style="@style/AutoPermissionLocationAccuracyRadioCoarse" 90 android:text="@string/permgrouprequest_coarselocation_imagetext" /> 91 </RadioGroup> 92 93 </LinearLayout> 94 95 <!-- Buttons on bottom of dialog --> 96 <LinearLayout style="@style/AutoPermissionGrantButtonListMaterial3"> 97 98 <com.android.permissioncontroller.permission.ui.widget.SecureButton 99 android:id="@+id/permission_dont_allow_more_selected_button" 100 style="@style/AutoPermissionGrantButton" 101 android:text="@string/grant_dialog_button_dont_select_more" /> 102 103 <com.android.permissioncontroller.permission.ui.widget.SecureButton 104 android:id="@+id/permission_no_upgrade_one_time_and_dont_ask_again_button" 105 style="@style/AutoPermissionGrantButton" 106 android:text="@string/grant_dialog_button_no_upgrade_one_time" /> 107 108 <com.android.permissioncontroller.permission.ui.widget.SecureButton 109 android:id="@+id/permission_no_upgrade_one_time_button" 110 style="@style/AutoPermissionGrantButton" 111 android:text="@string/grant_dialog_button_no_upgrade_one_time" /> 112 113 <com.android.permissioncontroller.permission.ui.widget.SecureButton 114 android:id="@+id/permission_no_upgrade_and_dont_ask_again_button" 115 style="@style/AutoPermissionGrantButton" 116 android:text="@string/grant_dialog_button_no_upgrade" /> 117 118 <com.android.permissioncontroller.permission.ui.widget.SecureButton 119 android:id="@+id/permission_no_upgrade_button" 120 style="@style/AutoPermissionGrantButton" 121 android:text="@string/grant_dialog_button_no_upgrade" /> 122 123 <com.android.permissioncontroller.permission.ui.widget.SecureButton 124 android:id="@+id/permission_deny_and_dont_ask_again_button" 125 style="@style/AutoPermissionGrantButton" 126 android:text="@string/grant_dialog_button_deny" /> 127 128 <com.android.permissioncontroller.permission.ui.widget.SecureButton 129 android:id="@+id/permission_deny_button" 130 style="@style/AutoPermissionGrantButton" 131 android:text="@string/grant_dialog_button_deny" /> 132 133 <com.android.permissioncontroller.permission.ui.widget.SecureButton 134 android:id="@+id/permission_allow_selected_button" 135 style="@style/AutoPermissionGrantButton" 136 android:text="@string/grant_dialog_button_allow_limited_access" /> 137 138 <com.android.permissioncontroller.permission.ui.widget.SecureButton 139 android:id="@+id/permission_allow_one_time_button" 140 style="@style/AutoPermissionGrantButton" 141 android:text="@string/grant_dialog_button_allow_one_time" /> 142 143 <com.android.permissioncontroller.permission.ui.widget.SecureButton 144 android:id="@+id/permission_allow_foreground_only_button" 145 style="@style/AutoPermissionGrantButton" 146 android:text="@string/grant_dialog_button_allow_foreground" /> 147 148 <com.android.permissioncontroller.permission.ui.widget.SecureButton 149 android:id="@+id/permission_allow_button" 150 style="@style/AutoPermissionGrantButton" 151 android:text="@string/grant_dialog_button_allow" /> 152 153 <com.android.permissioncontroller.permission.ui.widget.SecureButton 154 android:id="@+id/permission_allow_all_button" 155 style="@style/AutoPermissionGrantButton" 156 android:text="@string/grant_dialog_button_allow_all" /> 157 158 </LinearLayout> 159 160 <com.android.permissioncontroller.permission.ui.v33.widget.SafetyProtectionSectionView 161 android:layout_width="wrap_content" 162 android:layout_height="wrap_content" 163 android:layout_gravity="center" 164 android:layout_marginBottom="20dp" 165 android:layout_marginTop="0dp" /> 166 </LinearLayout> 167 </LinearLayout> 168</ScrollView> 169