Permalink
Browse files

New permissions UI.

Change-Id: I5d4691f8a23e90265eaaaea15950affdcb8dc9b6
  • Loading branch information...
Dianne Hackborn
Dianne Hackborn committed May 2, 2012
1 parent 7a39280 commit 9762658939747166e3c40d817971aa5b17231ee7
View
@@ -5,7 +5,11 @@ LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-subdir-java-files)
+LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4
+
LOCAL_PACKAGE_NAME := PackageInstaller
LOCAL_CERTIFICATE := platform
+LOCAL_PROGUARD_FLAG_FILES := proguard.flags
+
include $(BUILD_PACKAGE)
View
@@ -12,7 +12,7 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application android:label="@string/app_name"
android:allowBackup="false"
- android:theme="@android:style/Theme.Holo.DialogWhenLarge.NoActionBar">
+ android:theme="@android:style/Theme.Holo.Light.DialogWhenLarge.NoActionBar">
<activity android:name=".PackageInstallerActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:excludeFromRecents="true">
View
@@ -0,0 +1,5 @@
+# The support library contains references to newer platform versions.
+# Don't warn about those in case this app is linking against an older
+# platform version. We know about them, and they are safe.
+
+-dontwarn android.support.v4.**
@@ -25,9 +25,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingLeft="8dip"
- android:paddingRight="8dip">
+ android:layout_height="match_parent">
<TextView
android:id="@+id/install_confirm_question"
@@ -36,47 +34,54 @@
android:text="@string/install_confirm_question"
android:textAppearance="?android:attr/textAppearanceMedium"
style="@style/padded"
- android:paddingTop="12dip"
- android:paddingBottom="16dip"/>
+ android:paddingTop="12dip" />
- <ScrollView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:fillViewport="true"
- android:layout_weight="1">
+ <TabHost
+ android:id="@android:id/tabhost"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1">
- <!-- Security settings description. -->
<LinearLayout
- android:id="@+id/permissions_section"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginRight="?android:attr/scrollbarSize"
- style="@style/padded"
- android:orientation="vertical">
- <TextView
- android:id="@+id/security_settings_desc"
- android:text="@string/security_settings_desc"
+ android:background="@*android:drawable/tab_unselected_holo">
+ <TabWidget
+ android:id="@android:id/tabs"
+ android:orientation="horizontal"
+ android:measureWithLargestChild="false"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- />
- <LinearLayout
- android:id="@+id/security_settings_list"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1.0"
- android:orientation="vertical"/>
+ android:layout_gravity="center" />
+ </FrameLayout>
+
+ <FrameLayout
+ android:id="@android:id/tabcontent"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:layout_weight="0"/>
+
+ <android.support.v4.view.ViewPager
+ android:id="@+id/pager"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1"/>
+
</LinearLayout>
- </ScrollView>
+ </TabHost>
<!-- OK confirm and cancel buttons. -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:divider="?android:attr/dividerHorizontal"
- android:showDividers="beginning"
- android:paddingTop="16dip">
+ android:showDividers="beginning">
<LinearLayout
style="?android:attr/buttonBarStyle"
View
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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.
+-->
+
+<TextView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:gravity="center" />
View
@@ -24,7 +24,20 @@
<string name="unknown">Unknown</string>
<string name="installing">Installing\u2026</string>
<string name="install_done">App installed.</string>
- <string name="install_confirm_question">Do you want to install this app?</string>
+ <!-- Message for installing a new app that requires some permissions [CHAR LIMIT=NONE] -->
+ <string name="install_confirm_question">Do you want to install this application?
+ It will get access to:</string>
+ <!-- Message for installing a new app that does not require permissions [CHAR LIMIT=NONE] -->
+ <string name="install_confirm_question_no_perms">Do you want to install this application?
+ It does not require any special access.</string>
+ <!-- Message for updating an existing app [CHAR LIMIT=NONE] -->
+ <string name="install_confirm_question_update">Do you want to install an update
+ to this existing application? Your existing data will not
+ be lost. The updated application will get access to:</string>
+ <!-- Message for updating an existing system app [CHAR LIMIT=NONE] -->
+ <string name="install_confirm_question_update_system">Do you want to install an update
+ to this built-in application? Your existing data will not
+ be lost. The updated application will get access to:</string>
<string name="install_failed">App not installed.</string>
<!-- Reason displayed when installation fails because the installation package itself is invalid
in some way (e.g., corrupt) [CHAR LIMIT=100] -->
@@ -106,4 +119,14 @@
<!-- Dialog attributes to indicate parse errors -->
<string name="Parse_error_dlg_title">Parse error</string>
<string name="Parse_error_dlg_text">There was a problem parsing the package.</string>
+
+ <!-- Tab label for new permissions being added to an existing app [CHAR LIMIT=20] -->
+ <string name="newPerms">New</string>
+ <!-- Tab label for permissions related to user privacy [CHAR LIMIT=20] -->
+ <string name="privacyPerms">Privacy</string>
+ <!-- Tab label for permissions related to device behavior [CHAR LIMIT=20] -->
+ <string name="devicePerms">Device Access</string>
+
+ <!-- Body text for new tab when there are no new permissions [CHAR LIMIT=NONE] -->
+ <string name="no_new_perms">This update requires no new permissions.</string>
</resources>
Oops, something went wrong.

0 comments on commit 9762658

Please sign in to comment.