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

Unverified Commit 601c49c6 authored by Michael Bestas's avatar Michael Bestas
Browse files

Merge tag 'android-13.0.0_r63' into staging/lineage-20.0_merge-android-13.0.0_r63

Android 13.0.0 release 63

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCZKXJNwAKCRDorT+BmrEO
# eIkYAJ9CM5PJlK/UeMzOfsymivsa6qbWKwCeKtydjVnsYTtvqrr5PqmV8g+BYzM=
# =U+p4
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed Jul  5 22:49:11 2023 EEST
# gpg:                using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78
# gpg: Good signature from "The Android Open Source Project <initial-contribution@android.com>" [marginal]
# gpg: initial-contribution@android.com: Verified 1791 signatures in the past
#      20 months.  Encrypted 4 messages in the past 18 months.
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 4340 D135 70EF 945E 8381  0964 E8AD 3F81 9AB1 0E78

# By Louis Chang (2) and others
# Via Android Build Coastguard Worker
* tag 'android-13.0.0_r63' of https://android.googlesource.com/platform/frameworks/base:
  USB: update logic for reporting playback and capture capability of USB devices.
  Remove ControlsProviderSelectorActivity finish on ControlsFavoritingActivity start
  DO NOT MERGE Hide EmptyShadeView when on bouncer
  DO NOT MERGE Adding tests for updated EmptyShadeView logic
  Prevent force showing system bars for TaskView
  Improve first opaque activity candidate detection
  Invalidate buffers on transform change
  Skip letterboxing if the activity below is embedded
  Unfreeze the surface when the transition is done
  [RESTRICT AUTOMERGE] Always set last report configuration for starting window.
  Fix split cannot active if app trampoline launch new task
  Update the timing of clearing SplitRequest
  Gates RotationResolverService with a config flag

Change-Id: Ib05e39319d34b4b4be178848c847070411ca047e
parents 01648902 1d56c581
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -572,6 +572,9 @@
         docked if the dock is configured to enable the accelerometer. -->
    <bool name="config_supportAutoRotation">true</bool>

    <!-- If true, allows rotation resolver service to help resolve screen rotation. -->
    <bool name="config_allowRotationResolver">true</bool>

    <!-- If true, the screen can be rotated via the accelerometer in all 4
         rotations as the default behavior. -->
    <bool name="config_allowAllRotations">false</bool>
+1 −0
Original line number Diff line number Diff line
@@ -1755,6 +1755,7 @@
  <java-symbol type="bool" name="config_perDisplayFocusEnabled" />
  <java-symbol type="bool" name="config_showNavigationBar" />
  <java-symbol type="bool" name="config_supportAutoRotation" />
  <java-symbol type="bool" name="config_allowRotationResolver" />
  <java-symbol type="bool" name="config_dockedStackDividerFreeSnapMode" />
  <java-symbol type="dimen" name="docked_stack_divider_thickness" />
  <java-symbol type="dimen" name="docked_stack_divider_insets" />
+0 −4
Original line number Diff line number Diff line
@@ -727,10 +727,6 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
        getRefBounds2(mTempRect);
        t.setPosition(leash2, mTempRect.left, mTempRect.top)
                .setWindowCrop(leash2, mTempRect.width(), mTempRect.height());
        // Make right or bottom side surface always higher than left or top side to avoid weird
        // animation when dismiss split. e.g. App surface fling above on decor surface.
        t.setLayer(leash1, 1);
        t.setLayer(leash2, 2);

        if (mImePositionProcessor.adjustSurfaceLayoutForIme(
                t, dividerLeash, leash1, leash2, dimLayer1, dimLayer2)) {
+19 −41
Original line number Diff line number Diff line
@@ -468,26 +468,10 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
                    RemoteAnimationTarget[] wallpapers,
                    RemoteAnimationTarget[] nonApps,
                    final IRemoteAnimationFinishedCallback finishedCallback) {
                boolean openingToSide = false;
                if (apps != null) {
                    for (int i = 0; i < apps.length; ++i) {
                        if (apps[i].mode == MODE_OPENING
                                && mSideStage.containsTask(apps[i].taskId)) {
                            openingToSide = true;
                            break;
                        }
                    }
                } else if (mSideStage.getChildCount() != 0) {
                    // There are chances the entering app transition got canceled by performing
                    // rotation transition. Checks if there is any child task existed in split
                    // screen before fallback to cancel entering flow.
                    openingToSide = true;
                }

                if (isEnteringSplit && !openingToSide) {
                if (isEnteringSplit && mSideStage.getChildCount() == 0) {
                    mMainExecutor.execute(() -> exitSplitScreen(
                            mSideStage.getChildCount() == 0 ? mMainStage : mSideStage,
                            EXIT_REASON_UNKNOWN));
                            null /* childrenToTop */, EXIT_REASON_UNKNOWN));
                    mSplitUnsupportedToast.show();
                }

                if (finishedCallback != null) {
@@ -572,26 +556,10 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
                    RemoteAnimationTarget[] wallpapers, RemoteAnimationTarget[] nonApps,
                    IRemoteAnimationFinishedCallback finishedCallback,
                    SurfaceControl.Transaction t) {
                boolean openingToSide = false;
                if (apps != null) {
                    for (int i = 0; i < apps.length; ++i) {
                        if (apps[i].mode == MODE_OPENING
                                && mSideStage.containsTask(apps[i].taskId)) {
                            openingToSide = true;
                            break;
                        }
                    }
                } else if (mSideStage.getChildCount() != 0) {
                    // There are chances the entering app transition got canceled by performing
                    // rotation transition. Checks if there is any child task existed in split
                    // screen before fallback to cancel entering flow.
                    openingToSide = true;
                }

                if (isEnteringSplit && !openingToSide && apps != null) {
                if (isEnteringSplit && mSideStage.getChildCount() == 0) {
                    mMainExecutor.execute(() -> exitSplitScreen(
                            mSideStage.getChildCount() == 0 ? mMainStage : mSideStage,
                            EXIT_REASON_UNKNOWN));
                            null /* childrenToTop */, EXIT_REASON_UNKNOWN));
                    mSplitUnsupportedToast.show();
                }

                if (apps != null) {
@@ -1034,7 +1002,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
    private void onRemoteAnimationFinishedOrCancelled(WindowContainerTransaction evictWct) {
        mIsDividerRemoteAnimating = false;
        mShouldUpdateRecents = true;
        mSplitRequest = null;
        clearRequestIfPresented();
        // If any stage has no child after animation finished, it means that split will display
        // nothing, such status will happen if task and intent is same app but not support
        // multi-instance, we should exit split and expand that app as full screen.
@@ -1054,7 +1022,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
    private void onRemoteAnimationFinished(RemoteAnimationTarget[] apps) {
        mIsDividerRemoteAnimating = false;
        mShouldUpdateRecents = true;
        mSplitRequest = null;
        clearRequestIfPresented();
        // If any stage has no child after finished animation, that side of the split will display
        // nothing. This might happen if starting the same app on the both sides while not
        // supporting multi-instance. Exit the split screen and expand that app to full screen.
@@ -1320,6 +1288,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
        });
        mShouldUpdateRecents = false;
        mIsDividerRemoteAnimating = false;
        mSplitRequest = null;

        mSplitLayout.getInvisibleBounds(mTempRect1);
        if (childrenToTop == null || childrenToTop.getTopVisibleChildTaskId() == INVALID_TASK_ID) {
@@ -1412,6 +1381,13 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
        }
    }

    private void clearRequestIfPresented() {
        if (mSideStageListener.mVisible && mSideStageListener.mHasChildren
                && mMainStageListener.mVisible && mSideStageListener.mHasChildren) {
            mSplitRequest = null;
        }
    }

    /**
     * Returns whether the split pair in the recent tasks list should be broken.
     */
@@ -1776,6 +1752,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
                    true /* setReparentLeafTaskIfRelaunch */);
            setRootForceTranslucent(true, wct);
        } else {
            clearRequestIfPresented();
            wct.setReparentLeafTaskIfRelaunch(mRootTaskInfo.token,
                    false /* setReparentLeafTaskIfRelaunch */);
            setRootForceTranslucent(false, wct);
@@ -1926,7 +1903,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
        }
        if (mMainStageListener.mHasChildren && mSideStageListener.mHasChildren) {
            mShouldUpdateRecents = true;
            mSplitRequest = null;
            clearRequestIfPresented();
            updateRecentTasksSplitPair();

            if (!mLogger.hasStartedSession()) {
@@ -2565,6 +2542,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
            }
        });
        mShouldUpdateRecents = false;
        mSplitRequest = null;

        // Update local states.
        setSplitsVisible(false);
+7 −12
Original line number Diff line number Diff line
@@ -220,20 +220,12 @@ class StageTaskListener implements ShellTaskOrganizer.TaskListener {
                mCallbacks.onNoLongerSupportMultiWindow();
                return;
            }
            if (taskInfo.topActivity == null && mChildrenTaskInfo.contains(taskInfo.taskId)
                    && mChildrenTaskInfo.get(taskInfo.taskId).topActivity != null) {
                // If top activity become null, it means the task is about to vanish, we use this
                // signal to remove it from children list earlier for smooth dismiss transition.
                mChildrenTaskInfo.remove(taskInfo.taskId);
                mChildrenLeashes.remove(taskInfo.taskId);
            } else {
            mChildrenTaskInfo.put(taskInfo.taskId, taskInfo);
            }
            mCallbacks.onChildTaskStatusChanged(taskInfo.taskId, true /* present */,
                    taskInfo.isVisible);
            if (!ENABLE_SHELL_TRANSITIONS && mChildrenLeashes.contains(taskInfo.taskId)) {
                updateChildTaskSurface(taskInfo, mChildrenLeashes.get(taskInfo.taskId),
                        false /* firstAppeared */);
            if (!ENABLE_SHELL_TRANSITIONS) {
                updateChildTaskSurface(
                        taskInfo, mChildrenLeashes.get(taskInfo.taskId), false /* firstAppeared */);
            }
        } else {
            throw new IllegalArgumentException(this + "\n Unknown task: " + taskInfo
@@ -267,6 +259,9 @@ class StageTaskListener implements ShellTaskOrganizer.TaskListener {
                return;
            }
            sendStatusChanged();
        } else {
            throw new IllegalArgumentException(this + "\n Unknown task: " + taskInfo
                    + "\n mRootTaskInfo: " + mRootTaskInfo);
        }
    }

Loading