Loading packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl +5 −2 Original line number Original line Diff line number Diff line Loading @@ -116,7 +116,7 @@ interface ISystemUiProxy { * Notifies that quickstep will switch to a new task * Notifies that quickstep will switch to a new task * @param rotation indicates which Surface.Rotation the gesture was started in * @param rotation indicates which Surface.Rotation the gesture was started in */ */ void onQuickSwitchToNewTask(int rotation) = 25; void notifyPrioritizedRotation(int rotation) = 25; /** /** * Handle the provided image as if it was a screenshot. * Handle the provided image as if it was a screenshot. Loading @@ -137,5 +137,8 @@ interface ISystemUiProxy { /** Sets home rotation enabled. */ /** Sets home rotation enabled. */ void setHomeRotationEnabled(boolean enabled) = 45; void setHomeRotationEnabled(boolean enabled) = 45; // Next id = 46 /** Notifies that a swipe-up gesture has started */ oneway void notifySwipeUpGestureStarted() = 46; // Next id = 47 } } packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -246,7 +246,7 @@ public class NavigationBar implements View.OnAttachStateChangeListener, * gesture to indicate to them that they can continue in that orientation without having to * gesture to indicate to them that they can continue in that orientation without having to * rotate the phone * rotate the phone * The secondary handle will show when we get * The secondary handle will show when we get * {@link OverviewProxyListener#onQuickSwitchToNewTask(int)} callback with the * {@link OverviewProxyListener#notifyPrioritizedRotation(int)} callback with the * original handle hidden and we'll flip the visibilities once the * original handle hidden and we'll flip the visibilities once the * {@link #mTasksFrozenListener} fires * {@link #mTasksFrozenListener} fires */ */ Loading Loading @@ -319,7 +319,7 @@ public class NavigationBar implements View.OnAttachStateChangeListener, } } @Override @Override public void onQuickSwitchToNewTask(@Surface.Rotation int rotation) { public void onPrioritizedRotation(@Surface.Rotation int rotation) { mStartingQuickSwitchRotation = rotation; mStartingQuickSwitchRotation = rotation; if (rotation == -1) { if (rotation == -1) { mShowOrientedHandleForImmersiveMode = false; mShowOrientedHandleForImmersiveMode = false; Loading packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -128,7 +128,7 @@ public class EdgeBackGestureHandler extends CurrentUserTracker private OverviewProxyService.OverviewProxyListener mQuickSwitchListener = private OverviewProxyService.OverviewProxyListener mQuickSwitchListener = new OverviewProxyService.OverviewProxyListener() { new OverviewProxyService.OverviewProxyListener() { @Override @Override public void onQuickSwitchToNewTask(@Surface.Rotation int rotation) { public void onPrioritizedRotation(@Surface.Rotation int rotation) { mStartingQuickstepRotation = rotation; mStartingQuickstepRotation = rotation; updateDisabledForQuickstep(mContext.getResources().getConfiguration()); updateDisabledForQuickstep(mContext.getResources().getConfiguration()); } } Loading packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +22 −10 Original line number Original line Diff line number Diff line Loading @@ -425,20 +425,32 @@ public class OverviewProxyService extends CurrentUserTracker implements mPipOptional.ifPresent( mPipOptional.ifPresent( pip -> pip.setPinnedStackAnimationType( pip -> pip.setPinnedStackAnimationType( PipAnimationController.ANIM_TYPE_ALPHA)); PipAnimationController.ANIM_TYPE_ALPHA)); mHandler.post(() -> notifySwipeToHomeFinishedInternal()); } finally { } finally { Binder.restoreCallingIdentity(token); Binder.restoreCallingIdentity(token); } } } } @Override @Override public void onQuickSwitchToNewTask(@Surface.Rotation int rotation) { public void notifySwipeUpGestureStarted() { if (!verifyCaller("onQuickSwitchToNewTask")) { if (!verifyCaller("notifySwipeUpGestureStarted")) { return; return; } } final long token = Binder.clearCallingIdentity(); final long token = Binder.clearCallingIdentity(); try { try { mHandler.post(() -> notifyQuickSwitchToNewTask(rotation)); mHandler.post(() -> notifySwipeUpGestureStartedInternal()); } finally { Binder.restoreCallingIdentity(token); } } @Override public void notifyPrioritizedRotation(@Surface.Rotation int rotation) { if (!verifyCaller("notifyPrioritizedRotation")) { return; } final long token = Binder.clearCallingIdentity(); try { mHandler.post(() -> notifyPrioritizedRotationInternal(rotation)); } finally { } finally { Binder.restoreCallingIdentity(token); Binder.restoreCallingIdentity(token); } } Loading Loading @@ -880,9 +892,9 @@ public class OverviewProxyService extends CurrentUserTracker implements } } } } private void notifyQuickSwitchToNewTask(@Surface.Rotation int rotation) { private void notifyPrioritizedRotationInternal(@Surface.Rotation int rotation) { for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) { for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) { mConnectionCallbacks.get(i).onQuickSwitchToNewTask(rotation); mConnectionCallbacks.get(i).onPrioritizedRotation(rotation); } } } } Loading Loading @@ -910,9 +922,9 @@ public class OverviewProxyService extends CurrentUserTracker implements } } } } public void notifySwipeToHomeFinishedInternal() { private void notifySwipeUpGestureStartedInternal() { for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) { for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) { mConnectionCallbacks.get(i).onSwipeToHomeFinished(); mConnectionCallbacks.get(i).onSwipeUpGestureStarted(); } } } } Loading Loading @@ -1007,8 +1019,8 @@ public class OverviewProxyService extends CurrentUserTracker implements public interface OverviewProxyListener { public interface OverviewProxyListener { default void onConnectionChanged(boolean isConnected) {} default void onConnectionChanged(boolean isConnected) {} default void onQuickStepStarted() {} default void onQuickStepStarted() {} default void onSwipeToHomeFinished() {} default void onSwipeUpGestureStarted() {} default void onQuickSwitchToNewTask(@Surface.Rotation int rotation) {} default void onPrioritizedRotation(@Surface.Rotation int rotation) {} default void onOverviewShown(boolean fromHome) {} default void onOverviewShown(boolean fromHome) {} default void onQuickScrubStarted() {} default void onQuickScrubStarted() {} /** Notify the recents app (overview) is started by 3-button navigation. */ /** Notify the recents app (overview) is started by 3-button navigation. */ Loading Loading
packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl +5 −2 Original line number Original line Diff line number Diff line Loading @@ -116,7 +116,7 @@ interface ISystemUiProxy { * Notifies that quickstep will switch to a new task * Notifies that quickstep will switch to a new task * @param rotation indicates which Surface.Rotation the gesture was started in * @param rotation indicates which Surface.Rotation the gesture was started in */ */ void onQuickSwitchToNewTask(int rotation) = 25; void notifyPrioritizedRotation(int rotation) = 25; /** /** * Handle the provided image as if it was a screenshot. * Handle the provided image as if it was a screenshot. Loading @@ -137,5 +137,8 @@ interface ISystemUiProxy { /** Sets home rotation enabled. */ /** Sets home rotation enabled. */ void setHomeRotationEnabled(boolean enabled) = 45; void setHomeRotationEnabled(boolean enabled) = 45; // Next id = 46 /** Notifies that a swipe-up gesture has started */ oneway void notifySwipeUpGestureStarted() = 46; // Next id = 47 } }
packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -246,7 +246,7 @@ public class NavigationBar implements View.OnAttachStateChangeListener, * gesture to indicate to them that they can continue in that orientation without having to * gesture to indicate to them that they can continue in that orientation without having to * rotate the phone * rotate the phone * The secondary handle will show when we get * The secondary handle will show when we get * {@link OverviewProxyListener#onQuickSwitchToNewTask(int)} callback with the * {@link OverviewProxyListener#notifyPrioritizedRotation(int)} callback with the * original handle hidden and we'll flip the visibilities once the * original handle hidden and we'll flip the visibilities once the * {@link #mTasksFrozenListener} fires * {@link #mTasksFrozenListener} fires */ */ Loading Loading @@ -319,7 +319,7 @@ public class NavigationBar implements View.OnAttachStateChangeListener, } } @Override @Override public void onQuickSwitchToNewTask(@Surface.Rotation int rotation) { public void onPrioritizedRotation(@Surface.Rotation int rotation) { mStartingQuickSwitchRotation = rotation; mStartingQuickSwitchRotation = rotation; if (rotation == -1) { if (rotation == -1) { mShowOrientedHandleForImmersiveMode = false; mShowOrientedHandleForImmersiveMode = false; Loading
packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -128,7 +128,7 @@ public class EdgeBackGestureHandler extends CurrentUserTracker private OverviewProxyService.OverviewProxyListener mQuickSwitchListener = private OverviewProxyService.OverviewProxyListener mQuickSwitchListener = new OverviewProxyService.OverviewProxyListener() { new OverviewProxyService.OverviewProxyListener() { @Override @Override public void onQuickSwitchToNewTask(@Surface.Rotation int rotation) { public void onPrioritizedRotation(@Surface.Rotation int rotation) { mStartingQuickstepRotation = rotation; mStartingQuickstepRotation = rotation; updateDisabledForQuickstep(mContext.getResources().getConfiguration()); updateDisabledForQuickstep(mContext.getResources().getConfiguration()); } } Loading
packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +22 −10 Original line number Original line Diff line number Diff line Loading @@ -425,20 +425,32 @@ public class OverviewProxyService extends CurrentUserTracker implements mPipOptional.ifPresent( mPipOptional.ifPresent( pip -> pip.setPinnedStackAnimationType( pip -> pip.setPinnedStackAnimationType( PipAnimationController.ANIM_TYPE_ALPHA)); PipAnimationController.ANIM_TYPE_ALPHA)); mHandler.post(() -> notifySwipeToHomeFinishedInternal()); } finally { } finally { Binder.restoreCallingIdentity(token); Binder.restoreCallingIdentity(token); } } } } @Override @Override public void onQuickSwitchToNewTask(@Surface.Rotation int rotation) { public void notifySwipeUpGestureStarted() { if (!verifyCaller("onQuickSwitchToNewTask")) { if (!verifyCaller("notifySwipeUpGestureStarted")) { return; return; } } final long token = Binder.clearCallingIdentity(); final long token = Binder.clearCallingIdentity(); try { try { mHandler.post(() -> notifyQuickSwitchToNewTask(rotation)); mHandler.post(() -> notifySwipeUpGestureStartedInternal()); } finally { Binder.restoreCallingIdentity(token); } } @Override public void notifyPrioritizedRotation(@Surface.Rotation int rotation) { if (!verifyCaller("notifyPrioritizedRotation")) { return; } final long token = Binder.clearCallingIdentity(); try { mHandler.post(() -> notifyPrioritizedRotationInternal(rotation)); } finally { } finally { Binder.restoreCallingIdentity(token); Binder.restoreCallingIdentity(token); } } Loading Loading @@ -880,9 +892,9 @@ public class OverviewProxyService extends CurrentUserTracker implements } } } } private void notifyQuickSwitchToNewTask(@Surface.Rotation int rotation) { private void notifyPrioritizedRotationInternal(@Surface.Rotation int rotation) { for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) { for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) { mConnectionCallbacks.get(i).onQuickSwitchToNewTask(rotation); mConnectionCallbacks.get(i).onPrioritizedRotation(rotation); } } } } Loading Loading @@ -910,9 +922,9 @@ public class OverviewProxyService extends CurrentUserTracker implements } } } } public void notifySwipeToHomeFinishedInternal() { private void notifySwipeUpGestureStartedInternal() { for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) { for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) { mConnectionCallbacks.get(i).onSwipeToHomeFinished(); mConnectionCallbacks.get(i).onSwipeUpGestureStarted(); } } } } Loading Loading @@ -1007,8 +1019,8 @@ public class OverviewProxyService extends CurrentUserTracker implements public interface OverviewProxyListener { public interface OverviewProxyListener { default void onConnectionChanged(boolean isConnected) {} default void onConnectionChanged(boolean isConnected) {} default void onQuickStepStarted() {} default void onQuickStepStarted() {} default void onSwipeToHomeFinished() {} default void onSwipeUpGestureStarted() {} default void onQuickSwitchToNewTask(@Surface.Rotation int rotation) {} default void onPrioritizedRotation(@Surface.Rotation int rotation) {} default void onOverviewShown(boolean fromHome) {} default void onOverviewShown(boolean fromHome) {} default void onQuickScrubStarted() {} default void onQuickScrubStarted() {} /** Notify the recents app (overview) is started by 3-button navigation. */ /** Notify the recents app (overview) is started by 3-button navigation. */ Loading