Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24aeafae authored by Hongwei Wang's avatar Hongwei Wang
Browse files

Call setCanAffectSystemUiFlags(false) only for PiP

It was too aggressive to call that in all cases including swipe
split-screen to home.

Video: http://recall/-/b1EZhgUkQcpML5OwZekLBN/dlG6qSf9pT2f4YlIe2Klb3
Video: http://recall/-/b1EZhgUkQcpML5OwZekLBN/cfXwlpol5vi2AER32rKu2x
Bug: 213598210
Test: 1. follow the reproduce steps in the bug. \
      2. make sure PiP from split-screen has no regressions. \
      see also the videos.
Change-Id: I33d71294595729f8cdf72258c4d45c29a77935c2
parent 68e0f43e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1799,6 +1799,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
                    new PictureInPictureSurfaceTransaction.Builder()
                            .setAlpha(0f)
                            .build();
            tx.setShouldDisableCanAffectSystemUiFlags(false);
            int[] taskIds = TopTaskTracker.INSTANCE.get(mContext).getRunningSplitTaskIds();
            for (int taskId : taskIds) {
                mRecentsAnimationController.setFinishTaskTransaction(taskId,
+4 −1
Original line number Diff line number Diff line
@@ -279,7 +279,10 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim {
        // get the final leash operations but do not apply to the leash.
        final SurfaceControl.Transaction tx =
                PipSurfaceTransactionHelper.newSurfaceControlTransaction();
        return onAnimationUpdate(tx, new RectF(mDestinationBounds), END_PROGRESS);
        final PictureInPictureSurfaceTransaction pipTx =
                onAnimationUpdate(tx, new RectF(mDestinationBounds), END_PROGRESS);
        pipTx.setShouldDisableCanAffectSystemUiFlags(true);
        return pipTx;
    }

    private RotatedPosition getRotatedPosition(float progress) {
+2 −1
Original line number Diff line number Diff line
@@ -141,8 +141,8 @@ import com.android.launcher3.util.IntSet;
import com.android.launcher3.util.MultiValueAlpha;
import com.android.launcher3.util.ResourceBasedOverride.Overrides;
import com.android.launcher3.util.RunnableList;
import com.android.launcher3.util.SplitConfigurationOptions.StagePosition;
import com.android.launcher3.util.SplitConfigurationOptions.SplitBounds;
import com.android.launcher3.util.SplitConfigurationOptions.StagePosition;
import com.android.launcher3.util.Themes;
import com.android.launcher3.util.TranslateEdgeEffect;
import com.android.launcher3.util.ViewPool;
@@ -4562,6 +4562,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
                    new PictureInPictureSurfaceTransaction.Builder()
                            .setAlpha(0f)
                            .build();
            tx.setShouldDisableCanAffectSystemUiFlags(false);
            int[] taskIds = TopTaskTracker.INSTANCE.get(getContext()).getRunningSplitTaskIds();
            for (int taskId : taskIds) {
                mRecentsAnimationController.setFinishTaskTransaction(taskId,