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

Commit 150407d3 authored by Arpit Singh's avatar Arpit Singh Committed by Android (Google) Code Review
Browse files

Merge "Rename InputConfig field SENSITIVE_FOR_TRACING to SENSITIVE_FOR_PRIVACY" into main

parents 1de5c6a5 490ccc99
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