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

Commit c1cd30d1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Updated recents oriented state on split screen" into ub-launcher3-rvc-dev am: 27ed32ac

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/11873445

Change-Id: Ieea6c21321b7dbf76913aacf0bdd75eda36ea0ee
parents 6c2ac9e7 27ed32ac
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -120,9 +120,7 @@ public final class LauncherActivityInterface extends
    @Override
    public AnimationFactory prepareRecentsUI(RecentsAnimationDeviceState deviceState,
            boolean activityVisible, Consumer<AnimatorPlaybackController> callback) {
        ((RecentsView) getCreatedActivity().getOverviewPanel())
                .setLayoutRotation(deviceState.getCurrentActiveRotation(),
                        deviceState.getDisplayRotation());
        notifyRecentsOfOrientation(deviceState);
        DefaultAnimationFactory factory = new DefaultAnimationFactory(callback) {
            @Override
            public void setShelfState(ShelfAnimState shelfState, Interpolator interpolator,
+13 −8
Original line number Diff line number Diff line
@@ -208,7 +208,7 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
                }
            };

    protected final RecentsOrientedState mOrientationState;
    protected RecentsOrientedState mOrientationState;
    protected final BaseActivityInterface mSizeStrategy;
    protected RecentsAnimationController mRecentsAnimationController;
    protected RecentsAnimationTargets mRecentsAnimationTargets;
@@ -371,6 +371,12 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl

    private BaseActivity.MultiWindowModeChangedListener mMultiWindowModeChangedListener =
            (inMultiWindowMode) -> {
                if (mOrientationState != null) {
                    mOrientationState.setMultiWindowMode(inMultiWindowMode);
                    setLayoutRotation(mOrientationState.getTouchRotation(),
                            mOrientationState.getDisplayRotation());
                    rotateAllChildTasks();
                }
                if (!inMultiWindowMode && mOverviewStateEnabled) {
                    // TODO: Re-enable layout transitions for addition of the unpinned task
                    reloadIfNeeded();
@@ -841,7 +847,6 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl

    private void resetPaddingFromTaskSize() {
        DeviceProfile dp = mActivity.getDeviceProfile();
        mOrientationState.setMultiWindowMode(dp.isMultiWindowMode);
        getTaskSize(mTempRect);
        mTaskWidth = mTempRect.width();
        mTaskHeight = mTempRect.height();
@@ -1640,7 +1645,7 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
                    : View.LAYOUT_DIRECTION_RTL);
            mClearAllButton.setRotation(mOrientationHandler.getDegreesRotated());
            mActivity.getDragLayer().recreateControllers();
            boolean isInLandscape = touchRotation != 0
            boolean isInLandscape = mOrientationState.getTouchRotation() != 0
                    || mOrientationState.getLauncherRotation() != ROTATION_0;
            mActionsView.updateHiddenFlags(HIDDEN_NON_ZERO_ROTATION,
                    !mOrientationState.canLauncherRotate() && isInLandscape);
+0 −2
Original line number Diff line number Diff line
@@ -123,7 +123,6 @@ public final class RecentsOrientedState implements SharedPreferences.OnSharedPre
    private final ContentResolver mContentResolver;
    private final SharedPreferences mSharedPrefs;
    private final OrientationEventListener mOrientationListener;
    private final BaseActivityInterface mSizeStrategy;

    private final Matrix mTmpMatrix = new Matrix();

@@ -140,7 +139,6 @@ public final class RecentsOrientedState implements SharedPreferences.OnSharedPre
        mContext = context;
        mContentResolver = context.getContentResolver();
        mSharedPrefs = Utilities.getPrefs(context);
        mSizeStrategy = sizeStrategy;
        mOrientationListener = new OrientationEventListener(context) {
            @Override
            public void onOrientationChanged(int degrees) {