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

Commit 5e74b985 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Merge remote-tracking branch 'origin/lineage-23.2' into a16.2

parents 9ab06bd8 3ca5f931
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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
}
+12 −0
Original line number Diff line number Diff line
@@ -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;
@@ -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;