Fix launcher KCA updates when entering -1 screen
Fix an issue where launcher incorrectly sets KCA as visible when
entering the -1 screen. This adds a check for whether we are on the
-1 screen.
Note that there is still a another callback that happens when
interacting or exiting the -1 screen, could be worth investigating
further.
Flag: EXEMPT bugfix
Test: enter -1 screen > verify pip moves down and KCA visible=false
Test: exit -1 screen > verify pip moves up and KCA visible=true
Bug: b/354080363
Change-Id: I1b8c05af21eca5a2accc8e94ab016f6c50c74c7c
diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
index 5176d74..b0b1140 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
@@ -258,6 +258,8 @@
private boolean mCanShowAllAppsEducationView;
+ private boolean mIsOverlayVisible;
+
public static QuickstepLauncher getLauncher(Context context) {
return fromContext(context);
}
@@ -495,7 +497,8 @@
(getActivityFlags() & ACTIVITY_STATE_USER_WILL_BE_ACTIVE) != 0;
boolean visible = (state == NORMAL || state == OVERVIEW)
&& (willUserBeActive || isUserActive())
- && !profile.isVerticalBarLayout();
+ && !profile.isVerticalBarLayout()
+ && !mIsOverlayVisible;
SystemUiProxy.INSTANCE.get(this)
.setLauncherKeepClearAreaHeight(visible, profile.hotseatBarSizePx);
}
@@ -505,6 +508,12 @@
}
@Override
+ public void onOverlayVisibilityChanged(boolean visible) {
+ super.onOverlayVisibilityChanged(visible);
+ mIsOverlayVisible = visible;
+ }
+
+ @Override
public void bindExtraContainerItems(FixedContainerItems item) {
if (item.containerId == Favorites.CONTAINER_PREDICTION) {
mAllAppsPredictions = item;