summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--go/quickstep/src/com/android/quickstep/views/IconRecentsView.java13
-rw-r--r--tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java22
2 files changed, 24 insertions, 11 deletions
diff --git a/go/quickstep/src/com/android/quickstep/views/IconRecentsView.java b/go/quickstep/src/com/android/quickstep/views/IconRecentsView.java
index a53a06e86..771c7d7fa 100644
--- a/go/quickstep/src/com/android/quickstep/views/IconRecentsView.java
+++ b/go/quickstep/src/com/android/quickstep/views/IconRecentsView.java
@@ -154,6 +154,7 @@ public final class IconRecentsView extends FrameLayout implements Insettable {
private boolean mTransitionedFromApp;
private boolean mUsingRemoteAnimation;
private boolean mStartedEnterAnimation;
+ private boolean mShowStatusBarForegroundScrim;
private AnimatorSet mLayoutAnimation;
private final ArraySet<View> mLayingOutViews = new ArraySet<>();
private Rect mInsets;
@@ -409,7 +410,14 @@ public final class IconRecentsView extends FrameLayout implements Insettable {
* @param showStatusBarForegroundScrim true to show the scrim, false to hide
*/
public void setShowStatusBarForegroundScrim(boolean showStatusBarForegroundScrim) {
- boolean shouldShow = mInsets.top != 0 && showStatusBarForegroundScrim;
+ mShowStatusBarForegroundScrim = showStatusBarForegroundScrim;
+ if (mShowStatusBarForegroundScrim != showStatusBarForegroundScrim) {
+ updateStatusBarScrim();
+ }
+ }
+
+ private void updateStatusBarScrim() {
+ boolean shouldShow = mInsets.top != 0 && mShowStatusBarForegroundScrim;
mActivity.getDragLayer().setForeground(shouldShow ? mStatusBarForegroundScrim : null);
}
@@ -838,6 +846,9 @@ public final class IconRecentsView extends FrameLayout implements Insettable {
mInsets = insets;
mTaskRecyclerView.setPadding(insets.left, insets.top, insets.right, insets.bottom);
mTaskRecyclerView.invalidateItemDecorations();
+ if (mInsets.top != 0) {
+ updateStatusBarScrim();
+ }
}
/**
diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
index 4d8ff1bb2..0d8d92c88 100644
--- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
+++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
@@ -176,17 +176,19 @@ public final class LauncherInstrumentation {
// Workaround, use constructed context because both the instrumentation context and the
// app context are not constructed with resources that take overlays into account
final Context ctx = baseContext.createPackageContext("android", 0);
- log("Interaction mode = " + getCurrentInteractionMode(ctx));
- if (isGesturalMode(ctx)) {
- return NavigationModel.ZERO_BUTTON;
- } else if (isSwipeUpMode(ctx)) {
- return NavigationModel.TWO_BUTTON;
- } else if (isLegacyMode(ctx)) {
- return NavigationModel.THREE_BUTTON;
- } else {
- fail("Can't detect navigation mode");
+ for (int i = 0; i < 100; ++i) {
+ log("Interaction mode = " + getCurrentInteractionMode(ctx));
+ if (isGesturalMode(ctx)) {
+ return NavigationModel.ZERO_BUTTON;
+ } else if (isSwipeUpMode(ctx)) {
+ return NavigationModel.TWO_BUTTON;
+ } else if (isLegacyMode(ctx)) {
+ return NavigationModel.THREE_BUTTON;
+ }
+ Thread.sleep(100);
}
- } catch (PackageManager.NameNotFoundException e) {
+ fail("Can't detect navigation mode");
+ } catch (Exception e) {
fail(e.toString());
}
return NavigationModel.THREE_BUTTON;