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

Commit 164308c4 authored by The Android Automerger's avatar The Android Automerger
Browse files

Merge branch 'master' into honeycomb-release

parents 52eff919 5be378c4
Loading
Loading
Loading
Loading
+8 −1
Original line number Original line Diff line number Diff line
@@ -78,6 +78,11 @@ public:
        eOrientationSwapMask    = 0x01
        eOrientationSwapMask    = 0x01
    };
    };
    
    
    enum {
        eElectronBeamAnimationOn  = 0x01,
        eElectronBeamAnimationOff = 0x10
    };

    // flags for setOrientation
    // flags for setOrientation
    enum {
    enum {
        eOrientationAnimationDisable = 0x00000001
        eOrientationAnimationDisable = 0x00000001
@@ -120,6 +125,7 @@ public:
            uint32_t reqWidth, uint32_t reqHeight) = 0;
            uint32_t reqWidth, uint32_t reqHeight) = 0;


    virtual status_t turnElectronBeamOff(int32_t mode) = 0;
    virtual status_t turnElectronBeamOff(int32_t mode) = 0;
    virtual status_t turnElectronBeamOn(int32_t mode) = 0;


    /* Signal surfaceflinger that there might be some work to do
    /* Signal surfaceflinger that there might be some work to do
     * This is an ASYNCHRONOUS call.
     * This is an ASYNCHRONOUS call.
@@ -146,7 +152,8 @@ public:
        UNFREEZE_DISPLAY,
        UNFREEZE_DISPLAY,
        SIGNAL,
        SIGNAL,
        CAPTURE_SCREEN,
        CAPTURE_SCREEN,
        TURN_ELECTRON_BEAM_OFF
        TURN_ELECTRON_BEAM_OFF,
        TURN_ELECTRON_BEAM_ON
    };
    };


    virtual status_t    onTransact( uint32_t code,
    virtual status_t    onTransact( uint32_t code,
+19 −4
Original line number Original line Diff line number Diff line
@@ -187,6 +187,9 @@ public:
    virtual bool markSupportedKeyCodes(int32_t deviceId, size_t numCodes, const int32_t* keyCodes,
    virtual bool markSupportedKeyCodes(int32_t deviceId, size_t numCodes, const int32_t* keyCodes,
            uint8_t* outFlags) const = 0;
            uint8_t* outFlags) const = 0;


    virtual bool hasLed(int32_t deviceId, int32_t led) const = 0;
    virtual void setLedState(int32_t deviceId, int32_t led, bool on) = 0;

    virtual void dump(String8& dump) = 0;
    virtual void dump(String8& dump) = 0;
};
};


@@ -218,6 +221,9 @@ public:


    virtual bool getEvent(RawEvent* outEvent);
    virtual bool getEvent(RawEvent* outEvent);


    virtual bool hasLed(int32_t deviceId, int32_t led) const;
    virtual void setLedState(int32_t deviceId, int32_t led, bool on);

    virtual void dump(String8& dump);
    virtual void dump(String8& dump);


protected:
protected:
@@ -240,7 +246,10 @@ private:
        uint32_t        classes;
        uint32_t        classes;
        uint8_t*        keyBitmask;
        uint8_t*        keyBitmask;
        KeyLayoutMap*   layoutMap;
        KeyLayoutMap*   layoutMap;
        String8         keylayoutFilename;
        String8         keyMapName;
        bool            defaultKeyMap;
        String8         keyLayoutFilename;
        String8         keyCharacterMapFilename;
        int             fd;
        int             fd;
        device_t*       next;
        device_t*       next;
        
        
@@ -257,6 +266,12 @@ private:
    bool markSupportedKeyCodesLocked(device_t* device, size_t numCodes,
    bool markSupportedKeyCodesLocked(device_t* device, size_t numCodes,
            const int32_t* keyCodes, uint8_t* outFlags) const;
            const int32_t* keyCodes, uint8_t* outFlags) const;


    void configureKeyMap(device_t* device);
    bool probeKeyMap(device_t* device, const String8& keyMapName, bool defaultKeyMap);
    void selectKeyMap(device_t* device, const String8& keyMapName, bool defaultKeyMap);
    void setKeyboardProperties(device_t* device, bool firstKeyboard);
    void clearKeyboardProperties(device_t* device, bool firstKeyboard);

    // Protect all internal state.
    // Protect all internal state.
    mutable Mutex   mLock;
    mutable Mutex   mLock;
    
    
+2 −1
Original line number Original line Diff line number Diff line
@@ -76,7 +76,7 @@ namespace android {
 */
 */
enum {
enum {
    /* These flags originate in RawEvents and are generally set in the key map.
    /* These flags originate in RawEvents and are generally set in the key map.
     * See also labels for policy flags in KeycodeLabels.h. */
     * NOTE: If you edit these flags, also edit labels in KeycodeLabels.h. */


    POLICY_FLAG_WAKE = 0x00000001,
    POLICY_FLAG_WAKE = 0x00000001,
    POLICY_FLAG_WAKE_DROPPED = 0x00000002,
    POLICY_FLAG_WAKE_DROPPED = 0x00000002,
@@ -87,6 +87,7 @@ enum {
    POLICY_FLAG_MENU = 0x00000040,
    POLICY_FLAG_MENU = 0x00000040,
    POLICY_FLAG_LAUNCHER = 0x00000080,
    POLICY_FLAG_LAUNCHER = 0x00000080,
    POLICY_FLAG_VIRTUAL = 0x00000100,
    POLICY_FLAG_VIRTUAL = 0x00000100,
    POLICY_FLAG_FUNCTION = 0x00000200,


    POLICY_FLAG_RAW_MASK = 0x0000ffff,
    POLICY_FLAG_RAW_MASK = 0x0000ffff,


+1 −0
Original line number Original line Diff line number Diff line
@@ -183,6 +183,7 @@ struct InputWindow {
        TYPE_INPUT_METHOD_DIALOG= FIRST_SYSTEM_WINDOW+12,
        TYPE_INPUT_METHOD_DIALOG= FIRST_SYSTEM_WINDOW+12,
        TYPE_WALLPAPER          = FIRST_SYSTEM_WINDOW+13,
        TYPE_WALLPAPER          = FIRST_SYSTEM_WINDOW+13,
        TYPE_STATUS_BAR_PANEL   = FIRST_SYSTEM_WINDOW+14,
        TYPE_STATUS_BAR_PANEL   = FIRST_SYSTEM_WINDOW+14,
        TYPE_SECURE_SYSTEM_OVERLAY = FIRST_SYSTEM_WINDOW+15,
        LAST_SYSTEM_WINDOW      = 2999,
        LAST_SYSTEM_WINDOW      = 2999,
    };
    };


+44 −24
Original line number Original line Diff line number Diff line
@@ -419,9 +419,18 @@ private:
        Vector<KeyDown> keyDowns; // keys that are down
        Vector<KeyDown> keyDowns; // keys that are down
        int32_t metaState;
        int32_t metaState;
        nsecs_t downTime; // time of most recent key down
        nsecs_t downTime; // time of most recent key down

        struct LedState {
            bool avail; // led is available
            bool on;    // we think the led is currently on
        };
        LedState capsLockLedState;
        LedState numLockLedState;
        LedState scrollLockLedState;
    } mLocked;
    } mLocked;


    void initializeLocked();
    void initializeLocked();
    void initializeLedStateLocked(LockedState::LedState& ledState, int32_t led);


    bool isKeyboardOrGamepadKey(int32_t scanCode);
    bool isKeyboardOrGamepadKey(int32_t scanCode);


@@ -429,6 +438,10 @@ private:
            uint32_t policyFlags);
            uint32_t policyFlags);


    ssize_t findKeyDownLocked(int32_t scanCode);
    ssize_t findKeyDownLocked(int32_t scanCode);

    void updateLedStateLocked(bool reset);
    void updateLedStateForModifierLocked(LockedState::LedState& ledState, int32_t led,
            int32_t modifier, bool reset);
};
};




@@ -571,31 +584,36 @@ protected:


    // Immutable calibration parameters in parsed form.
    // Immutable calibration parameters in parsed form.
    struct Calibration {
    struct Calibration {
        // Touch Area
        // Touch Size
        enum TouchAreaCalibration {
        enum TouchSizeCalibration {
            TOUCH_AREA_CALIBRATION_DEFAULT,
            TOUCH_SIZE_CALIBRATION_DEFAULT,
            TOUCH_AREA_CALIBRATION_NONE,
            TOUCH_SIZE_CALIBRATION_NONE,
            TOUCH_AREA_CALIBRATION_GEOMETRIC,
            TOUCH_SIZE_CALIBRATION_GEOMETRIC,
            TOUCH_AREA_CALIBRATION_PRESSURE,
            TOUCH_SIZE_CALIBRATION_PRESSURE,
        };
        };


        TouchAreaCalibration touchAreaCalibration;
        TouchSizeCalibration touchSizeCalibration;


        // Tool Area
        // Tool Size
        enum ToolAreaCalibration {
        enum ToolSizeCalibration {
            TOOL_AREA_CALIBRATION_DEFAULT,
            TOOL_SIZE_CALIBRATION_DEFAULT,
            TOOL_AREA_CALIBRATION_NONE,
            TOOL_SIZE_CALIBRATION_NONE,
            TOOL_AREA_CALIBRATION_GEOMETRIC,
            TOOL_SIZE_CALIBRATION_GEOMETRIC,
            TOOL_AREA_CALIBRATION_LINEAR,
            TOOL_SIZE_CALIBRATION_LINEAR,
            TOOL_SIZE_CALIBRATION_AREA,
        };
        };


        ToolAreaCalibration toolAreaCalibration;
        ToolSizeCalibration toolSizeCalibration;
        bool haveToolAreaLinearScale;
        bool haveToolSizeLinearScale;
        float toolAreaLinearScale;
        float toolSizeLinearScale;
        bool haveToolAreaLinearBias;
        bool haveToolSizeLinearBias;
        float toolAreaLinearBias;
        float toolSizeLinearBias;
        bool haveToolAreaIsSummed;
        bool haveToolSizeAreaScale;
        int32_t toolAreaIsSummed;
        float toolSizeAreaScale;
        bool haveToolSizeAreaBias;
        float toolSizeAreaBias;
        bool haveToolSizeIsSummed;
        int32_t toolSizeIsSummed;


        // Pressure
        // Pressure
        enum PressureCalibration {
        enum PressureCalibration {
@@ -671,8 +689,10 @@ protected:


        float geometricScale;
        float geometricScale;


        float toolAreaLinearScale;
        float toolSizeLinearScale;
        float toolAreaLinearBias;
        float toolSizeLinearBias;
        float toolSizeAreaScale;
        float toolSizeAreaBias;


        float pressureScale;
        float pressureScale;


@@ -691,11 +711,11 @@ protected:
            bool haveSize;
            bool haveSize;
            InputDeviceInfo::MotionRange size;
            InputDeviceInfo::MotionRange size;


            bool haveTouchArea;
            bool haveTouchSize;
            InputDeviceInfo::MotionRange touchMajor;
            InputDeviceInfo::MotionRange touchMajor;
            InputDeviceInfo::MotionRange touchMinor;
            InputDeviceInfo::MotionRange touchMinor;


            bool haveToolArea;
            bool haveToolSize;
            InputDeviceInfo::MotionRange toolMajor;
            InputDeviceInfo::MotionRange toolMajor;
            InputDeviceInfo::MotionRange toolMinor;
            InputDeviceInfo::MotionRange toolMinor;


Loading