summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Aran Ink <nesciosquid@google.com> 2020-04-28 16:57:58 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-04-28 16:57:58 +0000
commitd41bdc07ca01e82a63e189fce3d08c3fda021cd4 (patch)
tree4cc5fa66dda66a53dfeef52ed34d1e26cb02624f
parent6952230a8dda194e5a82b9948dfda88263d42f99 (diff)
parent6b5e16130280286394a4f422a3309bf4159abd9b (diff)
Merge "Set max items to 4 on lock screen, re-disable overflow." into rvc-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
index 9bd32ff7b344..76bd6aa5ec01 100644
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
@@ -485,7 +485,15 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
@VisibleForTesting
protected int getMaxShownPowerItems() {
if (shouldUseControlsLayout()) {
- return mResources.getInteger(com.android.systemui.R.integer.power_menu_max_columns);
+ int maxColumns =
+ mResources.getInteger(com.android.systemui.R.integer.power_menu_max_columns);
+ // TODO: Overflow temporarily disabled on keyguard to prevent touch issues.
+ // Show an extra item on the keyguard because the overflow button currently disabled.
+ if (mKeyguardShowing) {
+ return maxColumns + 1;
+ } else {
+ return maxColumns;
+ }
} else {
return Integer.MAX_VALUE;
}
@@ -2059,7 +2067,8 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
View overflowButton = findViewById(
com.android.systemui.R.id.global_actions_overflow_button);
if (overflowButton != null) {
- if (mOverflowAdapter.getCount() > 0) {
+ // TODO: Overflow button hidden on keyguard to temporarily prevent touch issues.
+ if (mOverflowAdapter.getCount() > 0 && !mKeyguardShowing) {
overflowButton.setOnClickListener((view) -> showPowerOverflowMenu());
LinearLayout.LayoutParams params =
(LinearLayout.LayoutParams) mGlobalActionsLayout.getLayoutParams();