Loading packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl +12 −2 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ interface ISystemUiProxy { * * Normal gesture: DOWN, MOVE/POINTER_DOWN/POINTER_UP)*, UP or CANCLE */ oneway void onStatusBarMotionEvent(in MotionEvent event) = 9; oneway void onStatusBarTouchEvent(in MotionEvent event) = 9; /** * Proxies the assistant gesture's progress started from navigation bar. Loading Loading @@ -125,5 +125,15 @@ interface ISystemUiProxy { */ oneway void takeScreenshot(in ScreenshotRequest request) = 51; // Next id = 52 /** * Dispatches trackpad status bar motion event to the notification shade. Currently these events * are from the input monitor in {@link TouchInteractionService}. This is different from * {@link #onStatusBarTouchEvent} above in that, this directly dispatches motion events to the * notification shade, while {@link #onStatusBarTouchEvent} relies on setting the launcher * window slippery to allow the frameworks to route those events after passing the initial * threshold. */ oneway void onStatusBarTrackpadEvent(in MotionEvent event) = 52; // Next id = 53 } packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +10 −3 Original line number Diff line number Diff line Loading @@ -200,8 +200,8 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis // TODO: change the method signature to use (boolean inputFocusTransferStarted) @Override public void onStatusBarMotionEvent(MotionEvent event) { verifyCallerAndClearCallingIdentity("onStatusBarMotionEvent", () -> { public void onStatusBarTouchEvent(MotionEvent event) { verifyCallerAndClearCallingIdentity("onStatusBarTouchEvent", () -> { // TODO move this logic to message queue mCentralSurfacesOptionalLazy.get().ifPresent(centralSurfaces -> { if (event.getActionMasked() == ACTION_DOWN) { Loading Loading @@ -235,6 +235,13 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis }); } @Override public void onStatusBarTrackpadEvent(MotionEvent event) { verifyCallerAndClearCallingIdentityPostMain("onStatusBarTrackpadEvent", () -> mCentralSurfacesOptionalLazy.get().ifPresent(centralSurfaces -> centralSurfaces.onStatusBarTrackpadEvent(event))); } @Override public void onBackPressed() { verifyCallerAndClearCallingIdentityPostMain("onBackPressed", () -> { Loading Loading @@ -345,7 +352,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis @Override public void expandNotificationPanel() { verifyCallerAndClearCallingIdentity("expandNotificationPanel", verifyCallerAndClearCallingIdentityPostMain("expandNotificationPanel", () -> mCommandQueue.handleSystemKey(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_SYSTEM_NAVIGATION_DOWN))); } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java +14 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.os.PowerManager; import android.os.UserHandle; import android.service.notification.StatusBarNotification; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.RemoteAnimationAdapter; import android.view.View; import android.view.ViewGroup; Loading Loading @@ -266,8 +267,21 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner { boolean isPanelExpanded(); /** * Used to dispatch initial touch events before crossing the threshold to pull down the * notification shade. After that, since the launcher window is set to slippery, input * frameworks take care of routing the events to the notification shade. */ void onInputFocusTransfer(boolean start, boolean cancel, float velocity); /** * Dispatches status bar motion event to the notification shade. This is different from * {@link #onInputFocusTransfer(boolean, boolean, float)} as it doesn't rely on setting the * launcher window slippery to allow the frameworks to route those events after passing the * initial threshold. */ default void onStatusBarTrackpadEvent(MotionEvent event) {} void animateCollapseQuickSettings(); /** */ Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +7 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,7 @@ import android.view.Display; import android.view.IRemoteAnimationRunner; import android.view.IWindowManager; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.ThreadedRenderer; import android.view.View; import android.view.ViewGroup; Loading Loading @@ -428,6 +429,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { public void togglePanel() { mCommandQueueCallbacks.togglePanel(); } /** * The {@link StatusBarState} of the status bar. */ Loading Loading @@ -1991,6 +1993,11 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { } } @Override public void onStatusBarTrackpadEvent(MotionEvent event) { mCentralSurfacesComponent.getNotificationPanelViewController().handleExternalTouch(event); } @Override public void animateCollapseQuickSettings() { if (mState == StatusBarState.SHADE) { Loading Loading
packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl +12 −2 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ interface ISystemUiProxy { * * Normal gesture: DOWN, MOVE/POINTER_DOWN/POINTER_UP)*, UP or CANCLE */ oneway void onStatusBarMotionEvent(in MotionEvent event) = 9; oneway void onStatusBarTouchEvent(in MotionEvent event) = 9; /** * Proxies the assistant gesture's progress started from navigation bar. Loading Loading @@ -125,5 +125,15 @@ interface ISystemUiProxy { */ oneway void takeScreenshot(in ScreenshotRequest request) = 51; // Next id = 52 /** * Dispatches trackpad status bar motion event to the notification shade. Currently these events * are from the input monitor in {@link TouchInteractionService}. This is different from * {@link #onStatusBarTouchEvent} above in that, this directly dispatches motion events to the * notification shade, while {@link #onStatusBarTouchEvent} relies on setting the launcher * window slippery to allow the frameworks to route those events after passing the initial * threshold. */ oneway void onStatusBarTrackpadEvent(in MotionEvent event) = 52; // Next id = 53 }
packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +10 −3 Original line number Diff line number Diff line Loading @@ -200,8 +200,8 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis // TODO: change the method signature to use (boolean inputFocusTransferStarted) @Override public void onStatusBarMotionEvent(MotionEvent event) { verifyCallerAndClearCallingIdentity("onStatusBarMotionEvent", () -> { public void onStatusBarTouchEvent(MotionEvent event) { verifyCallerAndClearCallingIdentity("onStatusBarTouchEvent", () -> { // TODO move this logic to message queue mCentralSurfacesOptionalLazy.get().ifPresent(centralSurfaces -> { if (event.getActionMasked() == ACTION_DOWN) { Loading Loading @@ -235,6 +235,13 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis }); } @Override public void onStatusBarTrackpadEvent(MotionEvent event) { verifyCallerAndClearCallingIdentityPostMain("onStatusBarTrackpadEvent", () -> mCentralSurfacesOptionalLazy.get().ifPresent(centralSurfaces -> centralSurfaces.onStatusBarTrackpadEvent(event))); } @Override public void onBackPressed() { verifyCallerAndClearCallingIdentityPostMain("onBackPressed", () -> { Loading Loading @@ -345,7 +352,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis @Override public void expandNotificationPanel() { verifyCallerAndClearCallingIdentity("expandNotificationPanel", verifyCallerAndClearCallingIdentityPostMain("expandNotificationPanel", () -> mCommandQueue.handleSystemKey(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_SYSTEM_NAVIGATION_DOWN))); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java +14 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.os.PowerManager; import android.os.UserHandle; import android.service.notification.StatusBarNotification; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.RemoteAnimationAdapter; import android.view.View; import android.view.ViewGroup; Loading Loading @@ -266,8 +267,21 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner { boolean isPanelExpanded(); /** * Used to dispatch initial touch events before crossing the threshold to pull down the * notification shade. After that, since the launcher window is set to slippery, input * frameworks take care of routing the events to the notification shade. */ void onInputFocusTransfer(boolean start, boolean cancel, float velocity); /** * Dispatches status bar motion event to the notification shade. This is different from * {@link #onInputFocusTransfer(boolean, boolean, float)} as it doesn't rely on setting the * launcher window slippery to allow the frameworks to route those events after passing the * initial threshold. */ default void onStatusBarTrackpadEvent(MotionEvent event) {} void animateCollapseQuickSettings(); /** */ Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +7 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,7 @@ import android.view.Display; import android.view.IRemoteAnimationRunner; import android.view.IWindowManager; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.ThreadedRenderer; import android.view.View; import android.view.ViewGroup; Loading Loading @@ -428,6 +429,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { public void togglePanel() { mCommandQueueCallbacks.togglePanel(); } /** * The {@link StatusBarState} of the status bar. */ Loading Loading @@ -1991,6 +1993,11 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { } } @Override public void onStatusBarTrackpadEvent(MotionEvent event) { mCentralSurfacesComponent.getNotificationPanelViewController().handleExternalTouch(event); } @Override public void animateCollapseQuickSettings() { if (mState == StatusBarState.SHADE) { Loading