summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Monk <jmonk@google.com>2015-04-07 14:16:28 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-04-07 14:16:28 +0000
commit30eaf3dc523d6199d13ff6c24b2e67635cc394fb (patch)
tree01ba8dfe1866c39fa86e296fa47fc168918a1c44
parentf41c83b5ac89ab913751f6b94fd7ce94c1306c28 (diff)
parente8c6eb9e85ef9d635f2f2f94d89f4b8abe461784 (diff)
downloadandroid_packages_apps_PackageInstaller-30eaf3dc523d6199d13ff6c24b2e67635cc394fb.tar.gz
android_packages_apps_PackageInstaller-30eaf3dc523d6199d13ff6c24b2e67635cc394fb.tar.bz2
android_packages_apps_PackageInstaller-30eaf3dc523d6199d13ff6c24b2e67635cc394fb.zip
Merge "Update permissions dialog from redlines"
-rw-r--r--res/layout/grant_permissions.xml30
-rwxr-xr-xres/values/colors.xml2
-rw-r--r--src/com/android/packageinstaller/permission/GrantPermissionsActivity.java5
3 files changed, 22 insertions, 15 deletions
diff --git a/res/layout/grant_permissions.xml b/res/layout/grant_permissions.xml
index 2004447f..64abe473 100644
--- a/res/layout/grant_permissions.xml
+++ b/res/layout/grant_permissions.xml
@@ -17,19 +17,17 @@
<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">
+ android:paddingTop="24dip"
+ android:paddingBottom="8dip"
+ android:paddingStart="22dip"
+ android:paddingEnd="16dip">
<ImageView
android:id="@+id/permission_icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="36dip"
+ android:layout_height="36dip"
android:tint="?android:attr/colorAccent"
- android:paddingTop="6dip"
- android:paddingEnd="10dip">
+ android:scaleType="fitCenter">
</ImageView>
<TextView
@@ -37,6 +35,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/permission_icon"
+ android:lineSpacingMultiplier="1.024"
+ android:fontFamily="@*android:string/font_family_body_2_material"
+ android:paddingStart="16dip"
+ android:paddingEnd="8dip"
style="?android:attr/textAppearanceMedium">
</TextView>
@@ -45,7 +47,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/permission_message"
- android:layout_marginTop="12dp"
+ android:layout_marginTop="16dip"
android:text="@string/never_ask_again"
style="?android:attr/textAppearanceSmall"
android:visibility="gone">
@@ -56,13 +58,16 @@
android:layout_height="wrap_content"
android:layout_below="@id/do_not_ask_checkbox"
android:orientation="horizontal"
- android:paddingTop="4dip">
+ android:paddingStart="2dip"
+ android:paddingTop="16dip">
<TextView
android:id="@+id/current_page_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
+ style="@android:style/TextAppearance.Material.Body2"
+ android:textColor="@color/grant_permissions_progress_color"
android:visibility="invisible">
</TextView>
@@ -71,7 +76,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?android:attr/buttonBarButtonStyle"
- android:text="@string/grant_dialog_button_deny">
+ android:text="@string/grant_dialog_button_deny"
+ android:layout_marginEnd="8dip">
</Button>
<Button
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 5d92d6fc..ae10cb28 100755
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -18,5 +18,7 @@
<color name="shadow">#cc222222</color>
<color name="transparent">#00000000</color>
<color name="header_background_color">#ff37474f</color>
+ <color name="grant_permissions_app_color">@*android:color/primary_text_default_material_light</color>
+ <color name="grant_permissions_progress_color">#60000000</color>
</resources>
diff --git a/src/com/android/packageinstaller/permission/GrantPermissionsActivity.java b/src/com/android/packageinstaller/permission/GrantPermissionsActivity.java
index 4f6486cb..287d324d 100644
--- a/src/com/android/packageinstaller/permission/GrantPermissionsActivity.java
+++ b/src/com/android/packageinstaller/permission/GrantPermissionsActivity.java
@@ -125,9 +125,8 @@ public class GrantPermissionsActivity extends Activity implements
// Bold/color the app name.
int appLabelStart = message.toString().indexOf(appLabel.toString(), 0);
int appLabelLength = appLabel.length();
- message.setSpan(new ForegroundColorSpan(Color.BLACK), appLabelStart,
- appLabelStart + appLabelLength, 0);
- message.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), appLabelStart,
+ int color = getResources().getColor(R.color.grant_permissions_app_color, null);
+ message.setSpan(new ForegroundColorSpan(color), appLabelStart,
appLabelStart + appLabelLength, 0);
// Add the new grant fragment.