Loading quickstep/src/com/android/launcher3/statehandlers/DepthController.java +12 −4 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ import com.android.launcher3.states.StateAnimationConfig; import com.android.systemui.shared.system.BlurUtils; import com.android.systemui.shared.system.WallpaperManagerCompat; import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.function.Consumer; Loading Loading @@ -156,6 +155,10 @@ public class DepthController implements StateHandler<LauncherState>, // Workaround for animating the depth when multiwindow mode changes. private boolean mIgnoreStateChangesDuringMultiWindowAnimation = false; // Hints that there is potentially content behind Launcher and that we shouldn't optimize by // marking the launcher surface as opaque. Only used in certain Launcher states. private boolean mHasContentBehindLauncher; private View.OnAttachStateChangeListener mOnAttachListener; public DepthController(Launcher l) { Loading Loading @@ -199,6 +202,10 @@ public class DepthController implements StateHandler<LauncherState>, mLauncher.getScrimView().addOpaquenessListener(mOpaquenessListener); } public void setHasContentBehindLauncher(boolean hasContentBehindLauncher) { mHasContentBehindLauncher = hasContentBehindLauncher; } /** * Sets if the underlying activity is started or not */ Loading Loading @@ -311,13 +318,14 @@ public class DepthController implements StateHandler<LauncherState>, } if (supportsBlur) { boolean opaque = mLauncher.getScrimView().isFullyOpaque(); boolean hasOpaqueBg = mLauncher.getScrimView().isFullyOpaque(); boolean isSurfaceOpaque = !mHasContentBehindLauncher && hasOpaqueBg; mCurrentBlur = !mCrossWindowBlursEnabled || mBlurDisabledForAppLaunch mCurrentBlur = !mCrossWindowBlursEnabled || mBlurDisabledForAppLaunch || hasOpaqueBg ? 0 : (int) (depth * mMaxBlurRadius); SurfaceControl.Transaction transaction = new SurfaceControl.Transaction() .setBackgroundBlurRadius(mSurface, mCurrentBlur) .setOpaque(mSurface, opaque); .setOpaque(mSurface, isSurfaceOpaque); // Set early wake-up flags when we know we're executing an expensive operation, this way // SurfaceFlinger will adjust its internal offsets to avoid jank. Loading quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java +7 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,9 @@ public final class RecentsViewStateController extends } setAlphas(PropertySetter.NO_ANIM_PROPERTY_SETTER, new StateAnimationConfig(), state); mRecentsView.setFullscreenProgress(state.getOverviewFullscreenProgress()); // In Overview, we may be layering app surfaces behind Launcher, so we need to notify // DepthController to prevent optimizations which might occlude the layers behind mLauncher.getDepthController().setHasContentBehindLauncher(state.overviewUi); } @Override Loading @@ -78,6 +81,10 @@ public final class RecentsViewStateController extends builder.addListener( AnimatorListeners.forSuccessCallback(mRecentsView::resetTaskVisuals)); } // In Overview, we may be layering app surfaces behind Launcher, so we need to notify // DepthController to prevent optimizations which might occlude the layers behind builder.addListener(AnimatorListeners.forSuccessCallback(() -> mLauncher.getDepthController().setHasContentBehindLauncher(toState.overviewUi))); // Create or dismiss split screen select animations LauncherState currentState = mLauncher.getStateManager().getState(); Loading quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java +2 −3 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.quickstep.fallback; import static com.android.quickstep.GestureState.GestureEndTarget.RECENTS; import static com.android.quickstep.ViewUtils.postFrameDrawn; import static com.android.quickstep.fallback.RecentsState.DEFAULT; import static com.android.quickstep.fallback.RecentsState.HOME; import static com.android.quickstep.fallback.RecentsState.MODAL_TASK; Loading Loading @@ -224,8 +223,8 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta setFreezeViewVisibility(false); if (isOverlayEnabled) { postFrameDrawn(this, () -> runActionOnRemoteHandles(remoteTargetHandle -> remoteTargetHandle.getTaskViewSimulator().setDrawsBelowRecents(true))); runActionOnRemoteHandles(remoteTargetHandle -> remoteTargetHandle.getTaskViewSimulator().setDrawsBelowRecents(true)); } } Loading quickstep/src/com/android/quickstep/views/LauncherRecentsView.java +2 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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)); } } Loading Loading
quickstep/src/com/android/launcher3/statehandlers/DepthController.java +12 −4 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ import com.android.launcher3.states.StateAnimationConfig; import com.android.systemui.shared.system.BlurUtils; import com.android.systemui.shared.system.WallpaperManagerCompat; import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.function.Consumer; Loading Loading @@ -156,6 +155,10 @@ public class DepthController implements StateHandler<LauncherState>, // Workaround for animating the depth when multiwindow mode changes. private boolean mIgnoreStateChangesDuringMultiWindowAnimation = false; // Hints that there is potentially content behind Launcher and that we shouldn't optimize by // marking the launcher surface as opaque. Only used in certain Launcher states. private boolean mHasContentBehindLauncher; private View.OnAttachStateChangeListener mOnAttachListener; public DepthController(Launcher l) { Loading Loading @@ -199,6 +202,10 @@ public class DepthController implements StateHandler<LauncherState>, mLauncher.getScrimView().addOpaquenessListener(mOpaquenessListener); } public void setHasContentBehindLauncher(boolean hasContentBehindLauncher) { mHasContentBehindLauncher = hasContentBehindLauncher; } /** * Sets if the underlying activity is started or not */ Loading Loading @@ -311,13 +318,14 @@ public class DepthController implements StateHandler<LauncherState>, } if (supportsBlur) { boolean opaque = mLauncher.getScrimView().isFullyOpaque(); boolean hasOpaqueBg = mLauncher.getScrimView().isFullyOpaque(); boolean isSurfaceOpaque = !mHasContentBehindLauncher && hasOpaqueBg; mCurrentBlur = !mCrossWindowBlursEnabled || mBlurDisabledForAppLaunch mCurrentBlur = !mCrossWindowBlursEnabled || mBlurDisabledForAppLaunch || hasOpaqueBg ? 0 : (int) (depth * mMaxBlurRadius); SurfaceControl.Transaction transaction = new SurfaceControl.Transaction() .setBackgroundBlurRadius(mSurface, mCurrentBlur) .setOpaque(mSurface, opaque); .setOpaque(mSurface, isSurfaceOpaque); // Set early wake-up flags when we know we're executing an expensive operation, this way // SurfaceFlinger will adjust its internal offsets to avoid jank. Loading
quickstep/src/com/android/launcher3/uioverrides/RecentsViewStateController.java +7 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,9 @@ public final class RecentsViewStateController extends } setAlphas(PropertySetter.NO_ANIM_PROPERTY_SETTER, new StateAnimationConfig(), state); mRecentsView.setFullscreenProgress(state.getOverviewFullscreenProgress()); // In Overview, we may be layering app surfaces behind Launcher, so we need to notify // DepthController to prevent optimizations which might occlude the layers behind mLauncher.getDepthController().setHasContentBehindLauncher(state.overviewUi); } @Override Loading @@ -78,6 +81,10 @@ public final class RecentsViewStateController extends builder.addListener( AnimatorListeners.forSuccessCallback(mRecentsView::resetTaskVisuals)); } // In Overview, we may be layering app surfaces behind Launcher, so we need to notify // DepthController to prevent optimizations which might occlude the layers behind builder.addListener(AnimatorListeners.forSuccessCallback(() -> mLauncher.getDepthController().setHasContentBehindLauncher(toState.overviewUi))); // Create or dismiss split screen select animations LauncherState currentState = mLauncher.getStateManager().getState(); Loading
quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java +2 −3 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.quickstep.fallback; import static com.android.quickstep.GestureState.GestureEndTarget.RECENTS; import static com.android.quickstep.ViewUtils.postFrameDrawn; import static com.android.quickstep.fallback.RecentsState.DEFAULT; import static com.android.quickstep.fallback.RecentsState.HOME; import static com.android.quickstep.fallback.RecentsState.MODAL_TASK; Loading Loading @@ -224,8 +223,8 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta setFreezeViewVisibility(false); if (isOverlayEnabled) { postFrameDrawn(this, () -> runActionOnRemoteHandles(remoteTargetHandle -> remoteTargetHandle.getTaskViewSimulator().setDrawsBelowRecents(true))); runActionOnRemoteHandles(remoteTargetHandle -> remoteTargetHandle.getTaskViewSimulator().setDrawsBelowRecents(true)); } } Loading
quickstep/src/com/android/quickstep/views/LauncherRecentsView.java +2 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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)); } } Loading