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

Commit 143c2a7a authored by Jeff Brown's avatar Jeff Brown Committed by Android Git Automerger
Browse files

am c3fc2d03: Fix safe mode and KeyEvent.getMaxKeyCode().

Merge commit 'c3fc2d03d58a258c53c9265a70143d4af076b764' into gingerbread-plus-aosp

* commit 'c3fc2d03d58a258c53c9265a70143d4af076b764':
  Fix safe mode and KeyEvent.getMaxKeyCode().
parents 49c57faa 8d4dfd25
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -454,6 +454,8 @@ public:
    virtual void reset();
    virtual void process(const RawEvent* rawEvent);

    virtual int32_t getScanCodeState(uint32_t sourceMask, int32_t scanCode);

private:
    // Amount that trackball needs to move in order to generate a key event.
    static const int32_t TRACKBALL_MOVEMENT_THRESHOLD = 6;
+8 −0
Original line number Diff line number Diff line
@@ -1080,6 +1080,14 @@ void TrackballInputMapper::applyPolicyAndDispatch(nsecs_t when, int32_t motionEv
            1, & pointerId, pointerCoords, mXPrecision, mYPrecision, downTime);
}

int32_t TrackballInputMapper::getScanCodeState(uint32_t sourceMask, int32_t scanCode) {
    if (scanCode >= BTN_MOUSE && scanCode < BTN_JOYSTICK) {
        return getEventHub()->getScanCodeState(getDeviceId(), scanCode);
    } else {
        return AKEY_STATE_UNKNOWN;
    }
}


// --- TouchInputMapper ---