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

Commit d455bdf1 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 10147226 from f9820448 to udc-release

Change-Id: Iaf18adb61672d98e5d3b3d5b60acccc1f4d7740b
parents f5cfd635 f9820448
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -17,6 +17,8 @@
#ifndef ANDROID_PRIVATE_NATIVE_PERFORMANCE_HINT_PRIVATE_H
#ifndef ANDROID_PRIVATE_NATIVE_PERFORMANCE_HINT_PRIVATE_H
#define ANDROID_PRIVATE_NATIVE_PERFORMANCE_HINT_PRIVATE_H
#define ANDROID_PRIVATE_NATIVE_PERFORMANCE_HINT_PRIVATE_H


#include <stdint.h>

__BEGIN_DECLS
__BEGIN_DECLS


/**
/**
@@ -27,7 +29,7 @@ void APerformanceHint_setIHintManagerForTesting(void* iManager);
/**
/**
 * Hints for the session used to signal upcoming changes in the mode or workload.
 * Hints for the session used to signal upcoming changes in the mode or workload.
 */
 */
enum SessionHint {
enum SessionHint: int32_t {
    /**
    /**
     * This hint indicates a sudden increase in CPU workload intensity. It means
     * This hint indicates a sudden increase in CPU workload intensity. It means
     * that this hint session needs extra CPU resources immediately to meet the
     * that this hint session needs extra CPU resources immediately to meet the
@@ -61,7 +63,7 @@ enum SessionHint {
 * @return 0 on success
 * @return 0 on success
 *         EPIPE if communication with the system service has failed.
 *         EPIPE if communication with the system service has failed.
 */
 */
int APerformanceHint_sendHint(void* session, int hint);
int APerformanceHint_sendHint(void* session, SessionHint hint);


/**
/**
 * Return the list of thread ids, this API should only be used for testing only.
 * Return the list of thread ids, this API should only be used for testing only.
+2 −2
Original line number Original line Diff line number Diff line
@@ -503,9 +503,9 @@ std::vector<std::unique_ptr<InputMapper>> InputDevice::createMappers(
        classes.test(InputDeviceClass::TOUCH_MT) && !isSonyDualShock4Touchpad) {
        classes.test(InputDeviceClass::TOUCH_MT) && !isSonyDualShock4Touchpad) {
        mappers.push_back(createInputMapper<TouchpadInputMapper>(contextPtr, readerConfig));
        mappers.push_back(createInputMapper<TouchpadInputMapper>(contextPtr, readerConfig));
    } else if (classes.test(InputDeviceClass::TOUCH_MT)) {
    } else if (classes.test(InputDeviceClass::TOUCH_MT)) {
        mappers.push_back(createInputMapper<MultiTouchInputMapper>(contextPtr, readerConfig));
        mappers.push_back(std::make_unique<MultiTouchInputMapper>(contextPtr, readerConfig));
    } else if (classes.test(InputDeviceClass::TOUCH)) {
    } else if (classes.test(InputDeviceClass::TOUCH)) {
        mappers.push_back(createInputMapper<SingleTouchInputMapper>(contextPtr, readerConfig));
        mappers.push_back(std::make_unique<SingleTouchInputMapper>(contextPtr, readerConfig));
    }
    }


    // Joystick-like devices.
    // Joystick-like devices.
+2 −2
Original line number Original line Diff line number Diff line
@@ -27,6 +27,8 @@ public:
    friend std::unique_ptr<T> createInputMapper(InputDeviceContext& deviceContext,
    friend std::unique_ptr<T> createInputMapper(InputDeviceContext& deviceContext,
                                                const InputReaderConfiguration& readerConfig,
                                                const InputReaderConfiguration& readerConfig,
                                                Args... args);
                                                Args... args);
    explicit MultiTouchInputMapper(InputDeviceContext& deviceContext,
                                   const InputReaderConfiguration& readerConfig);


    ~MultiTouchInputMapper() override;
    ~MultiTouchInputMapper() override;


@@ -39,8 +41,6 @@ protected:
    bool hasStylus() const override;
    bool hasStylus() const override;


private:
private:
    explicit MultiTouchInputMapper(InputDeviceContext& deviceContext,
                                   const InputReaderConfiguration& readerConfig);
    // simulate_stylus_with_touch is a debug mode that converts all finger pointers reported by this
    // simulate_stylus_with_touch is a debug mode that converts all finger pointers reported by this
    // mapper's touchscreen into stylus pointers, and adds SOURCE_STYLUS to the input device.
    // mapper's touchscreen into stylus pointers, and adds SOURCE_STYLUS to the input device.
    // It is used to simulate stylus events for debugging and testing on a device that does not
    // It is used to simulate stylus events for debugging and testing on a device that does not
+2 −2
Original line number Original line Diff line number Diff line
@@ -27,6 +27,8 @@ public:
    friend std::unique_ptr<T> createInputMapper(InputDeviceContext& deviceContext,
    friend std::unique_ptr<T> createInputMapper(InputDeviceContext& deviceContext,
                                                const InputReaderConfiguration& readerConfig,
                                                const InputReaderConfiguration& readerConfig,
                                                Args... args);
                                                Args... args);
    explicit SingleTouchInputMapper(InputDeviceContext& deviceContext,
                                    const InputReaderConfiguration& readerConfig);


    ~SingleTouchInputMapper() override;
    ~SingleTouchInputMapper() override;


@@ -40,8 +42,6 @@ protected:


private:
private:
    SingleTouchMotionAccumulator mSingleTouchMotionAccumulator;
    SingleTouchMotionAccumulator mSingleTouchMotionAccumulator;
    explicit SingleTouchInputMapper(InputDeviceContext& deviceContext,
                                    const InputReaderConfiguration& readerConfig);
};
};


} // namespace android
} // namespace android
+2 −4
Original line number Original line Diff line number Diff line
@@ -1564,8 +1564,7 @@ public:


        // Set mouse cursor position for the most common cases to avoid boilerplate.
        // Set mouse cursor position for the most common cases to avoid boilerplate.
        if (mSource == AINPUT_SOURCE_MOUSE &&
        if (mSource == AINPUT_SOURCE_MOUSE &&
            !MotionEvent::isValidCursorPosition(mRawXCursorPosition, mRawYCursorPosition) &&
            !MotionEvent::isValidCursorPosition(mRawXCursorPosition, mRawYCursorPosition)) {
            mPointers.size() == 1) {
            mRawXCursorPosition = pointerCoords[0].getX();
            mRawXCursorPosition = pointerCoords[0].getX();
            mRawYCursorPosition = pointerCoords[0].getY();
            mRawYCursorPosition = pointerCoords[0].getY();
        }
        }
@@ -1677,8 +1676,7 @@ public:


        // Set mouse cursor position for the most common cases to avoid boilerplate.
        // Set mouse cursor position for the most common cases to avoid boilerplate.
        if (mSource == AINPUT_SOURCE_MOUSE &&
        if (mSource == AINPUT_SOURCE_MOUSE &&
            !MotionEvent::isValidCursorPosition(mRawXCursorPosition, mRawYCursorPosition) &&
            !MotionEvent::isValidCursorPosition(mRawXCursorPosition, mRawYCursorPosition)) {
            mPointers.size() == 1) {
            mRawXCursorPosition = pointerCoords[0].getX();
            mRawXCursorPosition = pointerCoords[0].getX();
            mRawYCursorPosition = pointerCoords[0].getY();
            mRawYCursorPosition = pointerCoords[0].getY();
        }
        }