diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl b/packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl index 80fd826f28c62..35ad422c56b89 100644 --- a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl +++ b/packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl @@ -26,7 +26,7 @@ import com.android.systemui.shared.recents.IPinnedStackAnimationListener; /** * Temporary callbacks into SystemUI. - * Next id = 25 + * Next id = 26 */ interface ISystemUiProxy { @@ -140,4 +140,10 @@ interface ISystemUiProxy { * Sets listener to get pinned stack animation callbacks. */ void setPinnedStackAnimationListener(IPinnedStackAnimationListener listener) = 24; + + /** + * Notifies that quickstep will switch to a new task + * @param rotation indicates which Surface.Rotation the gesture was started in + */ + void onQuickSwitchToNewTask(int rotation) = 25; } diff --git a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java index df85ed524536b..66bc177da81dc 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +++ b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java @@ -55,6 +55,7 @@ import android.os.UserHandle; import android.util.Log; import android.view.InputMonitor; import android.view.MotionEvent; +import android.view.Surface; import android.view.accessibility.AccessibilityManager; import com.android.internal.policy.ScreenDecorationsUtils; @@ -416,6 +417,19 @@ public class OverviewProxyService implements CallbackController notifyQuickSwitchToNewTask(rotation)); + } finally { + Binder.restoreCallingIdentity(token); + } + } + private boolean verifyCaller(String reason) { final int callerId = Binder.getCallingUserHandle().getIdentifier(); if (callerId != mCurrentBoundedUserId) { @@ -785,6 +799,12 @@ public class OverviewProxyService implements CallbackController= 0; --i) { + mConnectionCallbacks.get(i).onQuickSwitchToNewTask(rotation); + } + } + public void notifyQuickScrubStarted() { for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) { mConnectionCallbacks.get(i).onQuickScrubStarted(); @@ -850,6 +870,7 @@ public class OverviewProxyService implements CallbackController -1) { + updateDisabledForQuickstep(); + } + if (displayId == mDisplayId) { updateDisplaySize(); } @@ -502,6 +577,17 @@ public class EdgeBackGestureHandler implements DisplayListener, InputManager.getInstance().injectInputEvent(ev, InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); } + private void updatedFixedRotation() { + boolean oldFlag = mFixedRotationFlagEnabled; + mFixedRotationFlagEnabled = Settings.Global.getInt(mContext.getContentResolver(), + FIXED_ROTATION_TRANSFORM_SETTING_NAME, 0) != 0; + if (oldFlag == mFixedRotationFlagEnabled) { + return; + } + + setRotationCallbacks(mFixedRotationFlagEnabled); + } + public void setInsets(int leftInset, int rightInset) { mLeftInset = leftInset; mRightInset = rightInset; @@ -514,6 +600,7 @@ public class EdgeBackGestureHandler implements DisplayListener, pw.println("EdgeBackGestureHandler:"); pw.println(" mIsEnabled=" + mIsEnabled); pw.println(" mAllowGesture=" + mAllowGesture); + pw.println(" mDisabledForQuickstep=" + mDisabledForQuickstep); pw.println(" mInRejectedExclusion" + mInRejectedExclusion); pw.println(" mExcludeRegion=" + mExcludeRegion); pw.println(" mUnrestrictedExcludeRegion=" + mUnrestrictedExcludeRegion);