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

Commit ba57e13c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topics "invert-some-inputconfig", "rm-touch-modal"

* changes:
  Remove the concept of TOUCH_MODAL from input
  Invert some InputConfig flags to simplify default behavior
parents 3ce2b48d 06349040
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ bool WindowInfo::frameContainsPoint(int32_t x, int32_t y) const {
}

bool WindowInfo::supportsSplitTouch() const {
    return inputConfig.test(InputConfig::SPLIT_TOUCH);
    return !inputConfig.test(InputConfig::PREVENT_SPLITTING);
}

bool WindowInfo::isSpy() const {
+7 −8
Original line number Diff line number Diff line
@@ -164,18 +164,17 @@ struct WindowInfo : public Parcelable {
        NOT_VISIBLE                  = 1 << 0,
        NOT_FOCUSABLE                = 1 << 1,
        NOT_TOUCHABLE                = 1 << 2,
        NOT_TOUCH_MODAL              = 1 << 3,
        SPLIT_TOUCH                  = 1 << 4,
        DUPLICATE_TOUCH_TO_WALLPAPER = 1 << 5,
        IS_WALLPAPER                 = 1 << 6,
        PAUSE_DISPATCHING            = 1 << 7,
        PREVENT_SPLITTING            = 1 << 3,
        DUPLICATE_TOUCH_TO_WALLPAPER = 1 << 4,
        IS_WALLPAPER                 = 1 << 5,
        PAUSE_DISPATCHING            = 1 << 6,
        // This flag is set when the window is of a trusted type that is allowed to silently
        // overlay other windows for the purpose of implementing the secure views feature.
        // Trusted overlays, such as IME windows, can partly obscure other windows without causing
        // motion events to be delivered to them with AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED.
        TRUSTED_OVERLAY              = 1 << 8,
        WATCH_OUTSIDE_TOUCH          = 1 << 9,
        SLIPPERY                     = 1 << 10,
        TRUSTED_OVERLAY              = 1 << 7,
        WATCH_OUTSIDE_TOUCH          = 1 << 8,
        SLIPPERY                     = 1 << 9,
        // clang-format on
    };

+0 −3
Original line number Diff line number Diff line
@@ -268,9 +268,6 @@ private:
        mInputInfo.name = "Test info";
        mInputInfo.dispatchingTimeout = 5s;
        mInputInfo.globalScaleFactor = 1.0;
        mInputInfo.setInputConfig(WindowInfo::InputConfig::NOT_TOUCH_MODAL, true);
        mInputInfo.setInputConfig(WindowInfo::InputConfig::NOT_VISIBLE, false);

        mInputInfo.touchableRegion.orSelf(Rect(0, 0, width, height));

        InputApplicationInfo aInfo;
+1 −3
Original line number Diff line number Diff line
@@ -509,9 +509,7 @@ bool windowAcceptsTouchAt(const WindowInfo& windowInfo, int32_t displayId, int32
    if (inputConfig.test(WindowInfo::InputConfig::NOT_TOUCHABLE) && !windowCanInterceptTouch) {
        return false;
    }
    const bool isModalWindow = !inputConfig.test(WindowInfo::InputConfig::NOT_FOCUSABLE) &&
            !inputConfig.test(WindowInfo::InputConfig::NOT_TOUCH_MODAL);
    if (!isModalWindow && !windowInfo.touchableRegionContainsPoint(x, y)) {
    if (!windowInfo.touchableRegionContainsPoint(x, y)) {
        return false;
    }
    return true;
+11 −117

File changed.

Preview size limit exceeded, changes collapsed.

Loading