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

Commit ef2f0dfb authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android Git Automerger
Browse files

am dff62196: Merge "Keeping the screen on during gesture detection." into jb-dev

* commit 'dff62196':
  Keeping the screen on during gesture detection.
parents 6e547abd dff62196
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import com.android.server.accessibility.TouchExplorer.GestureListener;
import com.android.server.input.InputFilter;

import android.content.Context;
import android.os.PowerManager;
import android.util.Slog;
import android.view.InputDevice;
import android.view.InputEvent;
@@ -37,6 +38,8 @@ public class AccessibilityInputFilter extends InputFilter {

    private final Context mContext;

    private final PowerManager mPm;

    private final GestureListener mGestureListener;

    /**
@@ -74,6 +77,7 @@ public class AccessibilityInputFilter extends InputFilter {
        super(context.getMainLooper());
        mContext = context;
        mGestureListener = gestureListener;
        mPm = (PowerManager)context.getSystemService(Context.POWER_SERVICE);
    }

    @Override
@@ -108,6 +112,7 @@ public class AccessibilityInputFilter extends InputFilter {
                mTouchExplorer.clear(motionEvent, policyFlags);
            }
            if ((policyFlags & WindowManagerPolicy.FLAG_PASS_TO_USER) != 0) {
                mPm.userActivity(event.getEventTime(), false);
                mTouchExplorer.onMotionEvent(motionEvent, policyFlags);
            } else {
                mTouchExplorer.clear(motionEvent, policyFlags);