Merge "Only disallow QS expansion while keyboard is visible" into tm-qpr-dev am: 49a00c3195
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22462914 Change-Id: I51b25c65a015078d63e495b6650e1296abbf48fd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
package com.android.systemui.shade;
|
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.internal.jank.InteractionJankMonitor.CUJ_NOTIFICATION_SHADE_QS_EXPAND_COLLAPSE;
|
||||||
import static com.android.systemui.classifier.Classifier.QS_COLLAPSE;
|
import static com.android.systemui.classifier.Classifier.QS_COLLAPSE;
|
||||||
import static com.android.systemui.shade.NotificationPanelViewController.COUNTER_PANEL_OPEN_QS;
|
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;
|
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() {
|
public boolean isExpansionEnabled() {
|
||||||
return mExpansionEnabledPolicy && mExpansionEnabledAmbient
|
return mExpansionEnabledPolicy && mExpansionEnabledAmbient
|
||||||
&& !mRemoteInputManager.isRemoteInputActive();
|
&& !isRemoteInputActiveWithKeyboardUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getTransitioningToFullShadeProgress() {
|
public float getTransitioningToFullShadeProgress() {
|
||||||
|
|||||||
Reference in New Issue
Block a user