summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/gui/include/gui/WindowInfo.h4
-rw-r--r--libs/input/android/os/InputConfig.aidl6
-rw-r--r--services/inputflinger/dispatcher/trace/InputTracer.cpp2
-rw-r--r--services/inputflinger/tests/FakeWindows.h2
-rw-r--r--services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp4
-rw-r--r--services/surfaceflinger/tests/unittests/LayerSnapshotTest.cpp22
6 files changed, 21 insertions, 19 deletions
diff --git a/libs/gui/include/gui/WindowInfo.h b/libs/gui/include/gui/WindowInfo.h
index e4f1890c76..b73e497032 100644
--- a/libs/gui/include/gui/WindowInfo.h
+++ b/libs/gui/include/gui/WindowInfo.h
@@ -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
};
diff --git a/libs/input/android/os/InputConfig.aidl b/libs/input/android/os/InputConfig.aidl
index 6b97cbbc59..da62e03821 100644
--- a/libs/input/android/os/InputConfig.aidl
+++ b/libs/input/android/os/InputConfig.aidl
@@ -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,
}
diff --git a/services/inputflinger/dispatcher/trace/InputTracer.cpp b/services/inputflinger/dispatcher/trace/InputTracer.cpp
index 4931a5f5dd..a1a87afd04 100644
--- a/services/inputflinger/dispatcher/trace/InputTracer.cpp
+++ b/services/inputflinger/dispatcher/trace/InputTracer.cpp
@@ -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};
}
diff --git a/services/inputflinger/tests/FakeWindows.h b/services/inputflinger/tests/FakeWindows.h
index 26c2b4b1e7..6cd76b229d 100644
--- a/services/inputflinger/tests/FakeWindows.h
+++ b/services/inputflinger/tests/FakeWindows.h
@@ -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) {
diff --git a/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp b/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp
index a2b53297ab..2ff0facdba 100644
--- a/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp
+++ b/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp
@@ -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);
diff --git a/services/surfaceflinger/tests/unittests/LayerSnapshotTest.cpp b/services/surfaceflinger/tests/unittests/LayerSnapshotTest.cpp
index 7c6cff0576..82adadc368 100644
--- a/services/surfaceflinger/tests/unittests/LayerSnapshotTest.cpp
+++ b/services/surfaceflinger/tests/unittests/LayerSnapshotTest.cpp
@@ -1204,34 +1204,34 @@ TEST_F(LayerSnapshotTest, setSensitiveForTracingConfigForSecureLayers) {
UPDATE_AND_VERIFY(mSnapshotBuilder, STARTING_ZORDER);
EXPECT_TRUE(getSnapshot(11)->inputInfo.inputConfig.test(
- gui::WindowInfo::InputConfig::SENSITIVE_FOR_TRACING));
+ gui::WindowInfo::InputConfig::SENSITIVE_FOR_PRIVACY));
EXPECT_TRUE(getSnapshot(111)->inputInfo.inputConfig.test(
- gui::WindowInfo::InputConfig::SENSITIVE_FOR_TRACING));
+ gui::WindowInfo::InputConfig::SENSITIVE_FOR_PRIVACY));
EXPECT_FALSE(getSnapshot(1)->inputInfo.inputConfig.test(
- gui::WindowInfo::InputConfig::SENSITIVE_FOR_TRACING));
+ gui::WindowInfo::InputConfig::SENSITIVE_FOR_PRIVACY));
EXPECT_FALSE(getSnapshot(12)->inputInfo.inputConfig.test(
- gui::WindowInfo::InputConfig::SENSITIVE_FOR_TRACING));
+ gui::WindowInfo::InputConfig::SENSITIVE_FOR_PRIVACY));
EXPECT_FALSE(getSnapshot(2)->inputInfo.inputConfig.test(
- gui::WindowInfo::InputConfig::SENSITIVE_FOR_TRACING));
+ gui::WindowInfo::InputConfig::SENSITIVE_FOR_PRIVACY));
}
TEST_F(LayerSnapshotTest, setSensitiveForTracingFromInputWindowHandle) {
setInputInfo(11, [](auto& inputInfo) {
- inputInfo.inputConfig |= gui::WindowInfo::InputConfig::SENSITIVE_FOR_TRACING;
+ inputInfo.inputConfig |= gui::WindowInfo::InputConfig::SENSITIVE_FOR_PRIVACY;
});
UPDATE_AND_VERIFY(mSnapshotBuilder, STARTING_ZORDER);
EXPECT_TRUE(getSnapshot(11)->inputInfo.inputConfig.test(
- gui::WindowInfo::InputConfig::SENSITIVE_FOR_TRACING));
+ gui::WindowInfo::InputConfig::SENSITIVE_FOR_PRIVACY));
EXPECT_TRUE(getSnapshot(111)->inputInfo.inputConfig.test(
- gui::WindowInfo::InputConfig::SENSITIVE_FOR_TRACING));
+ gui::WindowInfo::InputConfig::SENSITIVE_FOR_PRIVACY));
EXPECT_FALSE(getSnapshot(1)->inputInfo.inputConfig.test(
- gui::WindowInfo::InputConfig::SENSITIVE_FOR_TRACING));
+ gui::WindowInfo::InputConfig::SENSITIVE_FOR_PRIVACY));
EXPECT_FALSE(getSnapshot(12)->inputInfo.inputConfig.test(
- gui::WindowInfo::InputConfig::SENSITIVE_FOR_TRACING));
+ gui::WindowInfo::InputConfig::SENSITIVE_FOR_PRIVACY));
EXPECT_FALSE(getSnapshot(2)->inputInfo.inputConfig.test(
- gui::WindowInfo::InputConfig::SENSITIVE_FOR_TRACING));
+ gui::WindowInfo::InputConfig::SENSITIVE_FOR_PRIVACY));
}
// b/314350323