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

Commit 490ccc99 authored by Arpit Singh's avatar Arpit Singh
Browse files

Rename InputConfig field SENSITIVE_FOR_TRACING to SENSITIVE_FOR_PRIVACY

Making this field more generic to cater for wider use cases. In
addition to input tracing this field will also be used to hide privacy
sensitive input interactions from mirrored displays.

Test: presubmit
Bug: 325252005
Change-Id: I12c34ed5bfc320976033d2bd040b447654d906c0
parent 91ea16cb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -178,8 +178,8 @@ struct WindowInfo : public Parcelable {
                static_cast<uint32_t>(os::InputConfig::CLONE),
        GLOBAL_STYLUS_BLOCKS_TOUCH =
                static_cast<uint32_t>(os::InputConfig::GLOBAL_STYLUS_BLOCKS_TOUCH),
        SENSITIVE_FOR_TRACING =
                static_cast<uint32_t>(os::InputConfig::SENSITIVE_FOR_TRACING),
        SENSITIVE_FOR_PRIVACY =
                static_cast<uint32_t>(os::InputConfig::SENSITIVE_FOR_PRIVACY),
        // clang-format on
    };

+4 −2
Original line number Diff line number Diff line
@@ -159,10 +159,12 @@ enum InputConfig {
    GLOBAL_STYLUS_BLOCKS_TOUCH   = 1 << 17,

    /**
     * InputConfig used to indicate that this window is sensitive for tracing.
     * InputConfig used to indicate that this window is privacy sensitive. This may be used to
     * redact input interactions from tracing or screen mirroring.
     *
     * This must be set on windows that use {@link WindowManager.LayoutParams#FLAG_SECURE},
     * but it may also be set without setting FLAG_SECURE. The tracing configuration will
     * determine how these sensitive events are eventually traced.
     */
     SENSITIVE_FOR_TRACING       = 1 << 18,
     SENSITIVE_FOR_PRIVACY       = 1 << 18,
}
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ InputTargetInfo getTargetInfo(const InputTarget& target) {
    }
    const auto& info = *target.windowHandle->getInfo();
    const bool isSensitiveTarget =
            info.inputConfig.test(gui::WindowInfo::InputConfig::SENSITIVE_FOR_TRACING);
            info.inputConfig.test(gui::WindowInfo::InputConfig::SENSITIVE_FOR_PRIVACY);
    return {target.windowHandle->getInfo()->ownerUid, isSensitiveTarget};
}

+1 −1
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@ public:
            using namespace ftl::flag_operators;
            mInfo.layoutParamsFlags &= ~gui::WindowInfo::Flag::SECURE;
        }
        mInfo.setInputConfig(InputConfig::SENSITIVE_FOR_TRACING, secure);
        mInfo.setInputConfig(InputConfig::SENSITIVE_FOR_PRIVACY, secure);
    }

    inline void setInterceptsStylus(bool interceptsStylus) {
+2 −2
Original line number Diff line number Diff line
@@ -1061,8 +1061,8 @@ void LayerSnapshotBuilder::updateInput(LayerSnapshot& snapshot,
    }

    if (snapshot.isSecure ||
        parentSnapshot.inputInfo.inputConfig.test(InputConfig::SENSITIVE_FOR_TRACING)) {
        snapshot.inputInfo.inputConfig |= InputConfig::SENSITIVE_FOR_TRACING;
        parentSnapshot.inputInfo.inputConfig.test(InputConfig::SENSITIVE_FOR_PRIVACY)) {
        snapshot.inputInfo.inputConfig |= InputConfig::SENSITIVE_FOR_PRIVACY;
    }

    updateVisibility(snapshot, snapshot.isVisible);
Loading