Skip to content
Snippets Groups Projects
Commit e5136e95 authored by Aran Ink's avatar Aran Ink Committed by Automerger Merge Worker
Browse files

Merge "Set max items to 4 on lock screen, re-disable overflow." into rvc-dev am: d41bdc07

Change-Id: Ic1f86ba3f69d6db5221003cc161680f7b9ee6570
parents 92c24ea8 d41bdc07
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment