Prevent setting launcher layer has opaque when there is content behind

- This can prevent the layered content behind to not be visible (and
  since launcher draws a cutout and the wallpaper isn't shown, may
  result in a black rect.  We only specialize for this case while
  Launcher is in Overview.
- Also don't need to defer updating drawsBelowRecents, this can result
  in the state not being reflected since it runs after the last update
  of the transform params

Bug: 205789573
Test: Swipe up from app and ensure behind layers are visible (also
      ensure this doesn't affect blur during the swipe or optimizations
      after you leave overview)
Change-Id: I07689b3d9b65708797576e5fbefe12fb1f544119
This commit is contained in:
Winson Chung
2021-11-23 05:20:56 +00:00
parent 550dc8dc69
commit 6526973952
4 changed files with 23 additions and 10 deletions
@@ -21,7 +21,6 @@ import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.LauncherState.OVERVIEW_MODAL_TASK;
import static com.android.launcher3.LauncherState.OVERVIEW_SPLIT_SELECT;
import static com.android.launcher3.LauncherState.SPRING_LOADED;
import static com.android.quickstep.ViewUtils.postFrameDrawn;
import android.annotation.TargetApi;
import android.content.Context;
@@ -110,8 +109,8 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher, Laun
setFreezeViewVisibility(false);
if (isOverlayEnabled) {
postFrameDrawn(this, () -> runActionOnRemoteHandles(remoteTargetHandle ->
remoteTargetHandle.getTaskViewSimulator().setDrawsBelowRecents(true)));
runActionOnRemoteHandles(remoteTargetHandle ->
remoteTargetHandle.getTaskViewSimulator().setDrawsBelowRecents(true));
}
}