summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorSvet Ganov <svetoslavganov@google.com>2015-03-22 18:49:22 -0700
committerSvetoslav <svetoslavganov@google.com>2015-03-24 20:18:16 -0700
commit72b68774632f03289dc02d0e3dada06e9c984fd3 (patch)
treec427d0d5841da4391216b22728223508c0b49dd6 /res
parent3c99a2b334eb00b6cfa078a9e9ed2d6a151bde46 (diff)
downloadandroid_packages_apps_PackageInstaller-72b68774632f03289dc02d0e3dada06e9c984fd3.tar.gz
android_packages_apps_PackageInstaller-72b68774632f03289dc02d0e3dada06e9c984fd3.tar.bz2
android_packages_apps_PackageInstaller-72b68774632f03289dc02d0e3dada06e9c984fd3.zip
Initial version of the grant permission UI.
Change-Id: Ieb311d29d122cfce130ae1a26889dd7794548833
Diffstat (limited to 'res')
-rw-r--r--res/layout/grant_permissions.xml82
-rw-r--r--res/values/strings.xml27
2 files changed, 109 insertions, 0 deletions
diff --git a/res/layout/grant_permissions.xml b/res/layout/grant_permissions.xml
new file mode 100644
index 00000000..7c6bfb7a
--- /dev/null
+++ b/res/layout/grant_permissions.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 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.
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:paddingTop="16dip"
+ android:paddingBottom="12dip"
+ android:paddingStart="16dip"
+ android:paddingEnd="16dip"
+ android:minHeight="108dip">
+
+ <ImageView
+ android:id="@+id/permission_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingTop="6dip"
+ android:paddingEnd="10dip">
+ </ImageView>
+
+ <TextView
+ android:id="@+id/permission_message"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toRightOf="@id/permission_icon"
+ style="?android:attr/textAppearanceMedium">
+ </TextView>
+
+ <CheckBox
+ android:id="@+id/do_not_ask_checkbox"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:visibility="gone">
+ </CheckBox>
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/permission_message"
+ android:orientation="horizontal"
+ android:paddingTop="4dip">
+
+ <TextView
+ android:id="@+id/current_page_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:visibility="invisible">
+ </TextView>
+
+ <Button
+ android:id="@+id/permission_deny_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ style="?android:attr/buttonBarButtonStyle"
+ android:text="@string/grant_dialog_button_deny">
+ </Button>
+
+ <Button
+ android:id="@+id/permission_allow_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ style="?android:attr/buttonBarButtonStyle"
+ android:text="@string/grant_dialog_button_allow">
+ </Button>
+
+ </LinearLayout>
+
+</RelativeLayout>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index c4327fbe..e807392f 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -170,4 +170,31 @@
<string name="grant_confirm_question">Do you want to grant the following permissions?
It will get access to:</string>
+
+ <!-- Title for the dialog button to allow a permission grant. -->
+ <string name="grant_dialog_button_allow">Allow</string>
+
+ <!-- Title for the dialog button to deny a permission grant. -->
+ <string name="grant_dialog_button_deny">Deny</string>
+
+ <!-- Template for the current permission from the total number of permissions. -->
+ <string name="current_permission_template">
+ <xliff:g id="current_permission_index" example="1">%1$s</xliff:g> of
+ <xliff:g id="permission_count" example="2">%2$s</xliff:g></string>
+
+ <!-- Template for the warning message when an app requests a permission. -->
+ <string name="permission_warning_template">Allow
+ <xliff:g id="app_name" example="Gmail">%1$s</xliff:g> to
+ <xliff:g id="action" example="do something">%2$s</xliff:g>?</string>
+
+ <!-- Permissions -->
+
+ <!-- Title of an application permission, listed so the user can choose whether they want
+ to allow the application to do this. -->
+ <string name="permlab_togglePermissions" translatable="false">toggle permissions</string>
+ <!-- Description of an application permission, listed so the user can choose whether
+ they want to allow the application to do this. -->
+ <string name="permdesc_togglePermissions" translatable="false">Allows the holder to launch
+ the UI for toggling app permissions. Should never be needed for normal apps.</string>
+
</resources>