Loading packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl +6 −1 Original line number Diff line number Diff line Loading @@ -195,5 +195,10 @@ interface ISystemUiProxy { */ oneway void onKeyEvent(int keycode, int displayId) = 60; // Next id = 61 /** * Notifies SystemUI of a double tap to sleep event. */ oneway void onSleepEvent(in MotionEvent event) = 61; // Next id = 62 } packages/SystemUI/src/com/android/systemui/LauncherProxyService.java +12 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ import android.os.IBinder; import android.os.IRemoteCallback; import android.os.Looper; import android.os.PatternMatcher; import android.os.PowerManager; import android.os.RemoteException; import android.os.SystemClock; import android.os.Trace; Loading Loading @@ -524,6 +525,17 @@ public class LauncherProxyService implements CallbackController<LauncherProxyLis mCommandQueue.toggleQuickSettingsPanel()); } @Override public void onSleepEvent(MotionEvent event) { verifyCallerAndClearCallingIdentity("onSleepEvent", () -> { mHandler.post(() -> { mContext.getSystemService(PowerManager.class) .goToSleep(event.getEventTime()); event.recycle(); }); }); } private void onShadeExpansionGesture(MotionEvent event, String reason) { if (!SceneContainerFlag.isEnabled()) { return; Loading Loading
packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl +6 −1 Original line number Diff line number Diff line Loading @@ -195,5 +195,10 @@ interface ISystemUiProxy { */ oneway void onKeyEvent(int keycode, int displayId) = 60; // Next id = 61 /** * Notifies SystemUI of a double tap to sleep event. */ oneway void onSleepEvent(in MotionEvent event) = 61; // Next id = 62 }
packages/SystemUI/src/com/android/systemui/LauncherProxyService.java +12 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ import android.os.IBinder; import android.os.IRemoteCallback; import android.os.Looper; import android.os.PatternMatcher; import android.os.PowerManager; import android.os.RemoteException; import android.os.SystemClock; import android.os.Trace; Loading Loading @@ -524,6 +525,17 @@ public class LauncherProxyService implements CallbackController<LauncherProxyLis mCommandQueue.toggleQuickSettingsPanel()); } @Override public void onSleepEvent(MotionEvent event) { verifyCallerAndClearCallingIdentity("onSleepEvent", () -> { mHandler.post(() -> { mContext.getSystemService(PowerManager.class) .goToSleep(event.getEventTime()); event.recycle(); }); }); } private void onShadeExpansionGesture(MotionEvent event, String reason) { if (!SceneContainerFlag.isEnabled()) { return; Loading