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

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

Snap for 9475114 from 118cd603 to udc-release

Change-Id: I4b3d3cac01409d2571462df9190f5760de493b07
parents 338740db 118cd603
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -786,6 +786,19 @@ enum {
     * The same as {@link AMOTION_EVENT_AXIS_GESTURE_X_OFFSET}, but for the Y axis.
     */
    AMOTION_EVENT_AXIS_GESTURE_Y_OFFSET = 49,
    /**
     * Axis constant: X scroll distance axis of a motion event.
     *
     * - For a touch pad, reports the distance that should be scrolled in the X axis as a result of
     *   the user's two-finger scroll gesture, in display pixels.
     */
    AMOTION_EVENT_AXIS_GESTURE_SCROLL_X_DISTANCE = 50,
    /**
     * Axis constant: Y scroll distance axis of a motion event.
     *
     * The same as {@link AMOTION_EVENT_AXIS_GESTURE_SCROLL_X_DISTANCE}, but for the Y axis.
     */
    AMOTION_EVENT_AXIS_GESTURE_SCROLL_Y_DISTANCE = 51,

    /**
     * Note: This is not an "Axis constant". It does not represent any axis, nor should it be used
@@ -793,7 +806,7 @@ enum {
     * to make some computations (like iterating through all possible axes) cleaner.
     * Please update the value accordingly if you add a new axis.
     */
    AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE = AMOTION_EVENT_AXIS_GESTURE_Y_OFFSET,
    AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE = AMOTION_EVENT_AXIS_GESTURE_SCROLL_Y_DISTANCE,

    // NOTE: If you add a new axis here you must also add it to several other files.
    //       Refer to frameworks/base/core/java/android/view/MotionEvent.java for the full list.
+12 −1
Original line number Diff line number Diff line
@@ -374,7 +374,7 @@ constexpr float AMOTION_EVENT_INVALID_CURSOR_POSITION = std::numeric_limits<floa
 * Pointer coordinate data.
 */
struct PointerCoords {
    enum { MAX_AXES = 30 }; // 30 so that sizeof(PointerCoords) == 128
    enum { MAX_AXES = 30 }; // 30 so that sizeof(PointerCoords) == 136

    // Bitfield of axes that are present in this structure.
    uint64_t bits __attribute__((aligned(8)));
@@ -383,8 +383,15 @@ struct PointerCoords {
    // for each axis that is present in the structure according to 'bits'.
    std::array<float, MAX_AXES> values;

    // Whether these coordinate data were generated by resampling.
    bool isResampled;

    static_assert(sizeof(bool) == 1); // Ensure padding is correctly sized.
    uint8_t empty[7];

    inline void clear() {
        BitSet64::clear(bits);
        isResampled = false;
    }

    bool isEmpty() const {
@@ -775,6 +782,10 @@ public:
                AMOTION_EVENT_AXIS_ORIENTATION, pointerIndex, historicalIndex);
    }

    inline bool isResampled(size_t pointerIndex, size_t historicalIndex) const {
        return getHistoricalRawPointerCoords(pointerIndex, historicalIndex)->isResampled;
    }

    ssize_t findPointerIndex(int32_t pointerId) const;

    void initialize(int32_t id, int32_t deviceId, uint32_t source, int32_t displayId,
+1 −0
Original line number Diff line number Diff line
@@ -511,6 +511,7 @@ cc_library {
    visibility: [
        ":__subpackages__",
        "//packages/modules/Virtualization:__subpackages__",
        "//device/google/cuttlefish/shared/minidroid:__subpackages__",
    ],
}

+7 −0
Original line number Diff line number Diff line
@@ -413,6 +413,8 @@ status_t PointerCoords::readFromParcel(Parcel* parcel) {
    for (uint32_t i = 0; i < count; i++) {
        values[i] = parcel->readFloat();
    }

    isResampled = parcel->readBool();
    return OK;
}

@@ -423,6 +425,8 @@ status_t PointerCoords::writeToParcel(Parcel* parcel) const {
    for (uint32_t i = 0; i < count; i++) {
        parcel->writeFloat(values[i]);
    }

    parcel->writeBool(isResampled);
    return OK;
}
#endif
@@ -442,6 +446,9 @@ bool PointerCoords::operator==(const PointerCoords& other) const {
            return false;
        }
    }
    if (isResampled != other.isResampled) {
        return false;
    }
    return true;
}

+3 −1
Original line number Diff line number Diff line
@@ -394,7 +394,9 @@ namespace android {
    DEFINE_AXIS(GENERIC_15), \
    DEFINE_AXIS(GENERIC_16), \
    DEFINE_AXIS(GESTURE_X_OFFSET), \
    DEFINE_AXIS(GESTURE_Y_OFFSET)
    DEFINE_AXIS(GESTURE_Y_OFFSET), \
    DEFINE_AXIS(GESTURE_SCROLL_X_DISTANCE), \
    DEFINE_AXIS(GESTURE_SCROLL_Y_DISTANCE)

// NOTE: If you add new LEDs here, you must also add them to Input.h
#define LEDS_SEQUENCE \
Loading