From 3be52dbfa6976bdcf551966beb9fc5591116735f Mon Sep 17 00:00:00 2001 From: Alison Cichowlas Date: Tue, 6 Mar 2018 19:48:06 -0500 Subject: [PATCH] Global actions visuals - color and ordering changes. Test: Manual, with light & dark themes Bug: 72404596 Change-Id: I739035d8a2824af801e2a5a1bbb8541594d43267 --- core/res/res/values/config.xml | 3 +-- packages/SystemUI/res/drawable/rounded_bg_full.xml | 2 +- packages/SystemUI/res/layout/global_actions_item.xml | 4 +++- packages/SystemUI/res/layout/global_actions_wrapped.xml | 4 ++-- packages/SystemUI/res/values/dimens.xml | 2 +- .../src/com/android/systemui/HardwareBgDrawable.java | 2 +- .../android/systemui/globalactions/GlobalActionsDialog.java | 5 ++--- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index fa9cab59135fd..f1c9f676fd573 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -2513,9 +2513,8 @@ restart lockdown logout - screenshot bugreport - users + screenshot 50dp - 16dp + 8dp 0dp 48dp 16dp diff --git a/packages/SystemUI/src/com/android/systemui/HardwareBgDrawable.java b/packages/SystemUI/src/com/android/systemui/HardwareBgDrawable.java index 467ec2e50b488..fb2eb4cbe36d1 100644 --- a/packages/SystemUI/src/com/android/systemui/HardwareBgDrawable.java +++ b/packages/SystemUI/src/com/android/systemui/HardwareBgDrawable.java @@ -61,7 +61,7 @@ public class HardwareBgDrawable extends LayerDrawable { : R.drawable.rounded_bg_bottom).mutate(), }; } - layers[1].setTint(Utils.getColorAttr(context, android.R.attr.colorPrimaryDark)); + layers[1].setTint(Utils.getColorAttr(context, android.R.attr.colorPrimary)); return layers; } diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java index c4c1ba703a995..6f43a18b010e0 100644 --- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java +++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java @@ -877,9 +877,8 @@ class GlobalActionsDialog implements DialogInterface.OnDismissListener, public View getView(int position, View convertView, ViewGroup parent) { Action action = getItem(position); View view = action.create(mContext, convertView, parent, LayoutInflater.from(mContext)); - // Power off, restart, logout (if present) and lockdown (if present) should be in white - // background. Set the division based on which buttons are currently being displayed. - if (position == 2 + (mHasLogoutButton ? 1 : 0) + (mHasLockdownButton ? 1 : 0)) { + // Everything but screenshot, the last item, gets white background. + if (position == getCount() - 1) { HardwareUiLayout.get(parent).setDivisionView(view); } return view;