Set max items to 4 on lock screen, re-disable overflow.

Bug: 154669090
Test: Manual -- lock screen power menu has max of 4 item, no overflow button.
Change-Id: I03eb8006664445237245bfd9fd0540afd62772dc
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
index 9bd32ff..76bd6aa 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 @@
     @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 @@
             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();