summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Justin Weir <justinweir@google.com> 2023-04-07 21:04:22 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-04-07 21:04:22 +0000
commit49a00c3195813551fb55dc12a6706e4042c3c766 (patch)
tree2f2513f4f40e9ff838c60d3b1f9fe6c0d69deb10
parentc53fa6bad11deac47ac0f1b64b70268201d3ae81 (diff)
parent7ceae6d54ba21d8e7177c19642c3fac6e7abc873 (diff)
Merge "Only disallow QS expansion while keyboard is visible" into tm-qpr-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
index 2efc23b87da4..19d83340dc28 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java
@@ -17,6 +17,8 @@
package com.android.systemui.shade;
+import static android.view.WindowInsets.Type.ime;
+
import static com.android.internal.jank.InteractionJankMonitor.CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE;
import static com.android.systemui.classifier.Classifier.QS_COLLAPSE;
import static com.android.systemui.shade.NotificationPanelViewController.COUNTER_PANEL_OPEN_QS;
@@ -450,9 +452,17 @@ public class QuickSettingsController {
return (mQs != null ? mQs.getHeader().getHeight() : 0) + mPeekHeight;
}
+ private boolean isRemoteInputActiveWithKeyboardUp() {
+ //TODO(b/227115380) remove the isVisible(ime()) check once isRemoteInputActive is fixed.
+ // The check for keyboard visibility is a temporary workaround that allows QS to expand
+ // even when isRemoteInputActive is mistakenly returning true.
+ return mRemoteInputManager.isRemoteInputActive()
+ && mPanelView.getRootWindowInsets().isVisible(ime());
+ }
+
public boolean isExpansionEnabled() {
return mExpansionEnabledPolicy && mExpansionEnabledAmbient
- && !mRemoteInputManager.isRemoteInputActive();
+ && !isRemoteInputActiveWithKeyboardUp();
}
public float getTransitioningToFullShadeProgress() {