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

Commit 063f41a4 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6473661 from 42649171 to rvc-release

Change-Id: I00bd2d35419e8755cd3a51c22355f4b3ce79d6bc
parents 6cd452a2 42649171
Loading
Loading
Loading
Loading
+39 −38
Original line number Diff line number Diff line
@@ -107,6 +107,7 @@ struct InputWindowInfo {
        TYPE_MAGNIFICATION_OVERLAY = FIRST_SYSTEM_WINDOW + 27,
        TYPE_ACCESSIBILITY_OVERLAY = FIRST_SYSTEM_WINDOW + 32,
        TYPE_DOCK_DIVIDER = FIRST_SYSTEM_WINDOW + 34,
        TYPE_NOTIFICATION_SHADE = FIRST_SYSTEM_WINDOW + 40,
        LAST_SYSTEM_WINDOW = 2999,
    };

+2 −2
Original line number Diff line number Diff line
@@ -178,7 +178,7 @@ private:
        mInputInfo.name = "Test info";
        mInputInfo.layoutParamsFlags = InputWindowInfo::FLAG_NOT_TOUCH_MODAL;
        mInputInfo.layoutParamsType = InputWindowInfo::TYPE_BASE_APPLICATION;
        mInputInfo.dispatchingTimeout = 100000;
        mInputInfo.dispatchingTimeout = seconds_to_nanoseconds(5);
        mInputInfo.globalScaleFactor = 1.0;
        mInputInfo.canReceiveKeys = true;
        mInputInfo.hasFocus = true;
@@ -196,7 +196,7 @@ private:
        InputApplicationInfo aInfo;
        aInfo.token = new BBinder();
        aInfo.name = "Test app info";
        aInfo.dispatchingTimeout = 100000;
        aInfo.dispatchingTimeout = seconds_to_nanoseconds(5);

        mInputInfo.applicationInfo = aInfo;
    }
+9 −10
Original line number Diff line number Diff line
@@ -43,16 +43,15 @@ bool InputWindowInfo::frameContainsPoint(int32_t x, int32_t y) const {
}

bool InputWindowInfo::isTrustedOverlay() const {
    return layoutParamsType == TYPE_INPUT_METHOD
            || layoutParamsType == TYPE_INPUT_METHOD_DIALOG
            || layoutParamsType == TYPE_MAGNIFICATION_OVERLAY
            || layoutParamsType == TYPE_STATUS_BAR
            || layoutParamsType == TYPE_NAVIGATION_BAR
            || layoutParamsType == TYPE_NAVIGATION_BAR_PANEL
            || layoutParamsType == TYPE_SECURE_SYSTEM_OVERLAY
            || layoutParamsType == TYPE_DOCK_DIVIDER
            || layoutParamsType == TYPE_ACCESSIBILITY_OVERLAY
            || layoutParamsType == TYPE_INPUT_CONSUMER;
    return layoutParamsType == TYPE_INPUT_METHOD || layoutParamsType == TYPE_INPUT_METHOD_DIALOG ||
            layoutParamsType == TYPE_MAGNIFICATION_OVERLAY || layoutParamsType == TYPE_STATUS_BAR ||
            layoutParamsType == TYPE_NOTIFICATION_SHADE ||
            layoutParamsType == TYPE_NAVIGATION_BAR ||
            layoutParamsType == TYPE_NAVIGATION_BAR_PANEL ||
            layoutParamsType == TYPE_SECURE_SYSTEM_OVERLAY ||
            layoutParamsType == TYPE_DOCK_DIVIDER ||
            layoutParamsType == TYPE_ACCESSIBILITY_OVERLAY ||
            layoutParamsType == TYPE_INPUT_CONSUMER;
}

bool InputWindowInfo::supportsSplitTouch() const {
+5 −0
Original line number Diff line number Diff line
@@ -224,6 +224,11 @@ Region& Region::operator = (const Region& rhs)
    validate(*this, "this->operator=");
    validate(rhs, "rhs.operator=");
#endif
    if (this == &rhs) {
        // Already equal to itself
        return *this;
    }

    mStorage.clear();
    mStorage.insert(mStorage.begin(), rhs.mStorage.begin(), rhs.mStorage.end());
    return *this;
+15 −0
Original line number Diff line number Diff line
@@ -152,5 +152,20 @@ TEST_F(RegionTest, Random_TJunction) {
    }
}

TEST_F(RegionTest, EqualsToSelf) {
    Region touchableRegion;
    touchableRegion.orSelf(Rect(0, 0, 100, 100));

    ASSERT_TRUE(touchableRegion.contains(50, 50));

    // Compiler prevents us from directly calling 'touchableRegion = touchableRegion'
    Region& referenceTouchableRegion = touchableRegion;
    touchableRegion = referenceTouchableRegion;

    ASSERT_FALSE(touchableRegion.isEmpty());

    ASSERT_TRUE(touchableRegion.contains(50, 50));
}

}; // namespace android
Loading