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
diff --git a/services/inputflinger/dispatcher/trace/InputTracer.cpp b/services/inputflinger/dispatcher/trace/InputTracer.cpp
index 4931a5f..a1a87af 100644
--- a/services/inputflinger/dispatcher/trace/InputTracer.cpp
+++ b/services/inputflinger/dispatcher/trace/InputTracer.cpp
@@ -88,7 +88,7 @@
     }
     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 26c2b4b..6cd76b2 100644
--- a/services/inputflinger/tests/FakeWindows.h
+++ b/services/inputflinger/tests/FakeWindows.h
@@ -164,7 +164,7 @@
             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 a2b5329..2ff0fac 100644
--- a/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp
+++ b/services/surfaceflinger/FrontEnd/LayerSnapshotBuilder.cpp
@@ -1061,8 +1061,8 @@
     }
 
     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 7c6cff0..82adadc 100644
--- a/services/surfaceflinger/tests/unittests/LayerSnapshotTest.cpp
+++ b/services/surfaceflinger/tests/unittests/LayerSnapshotTest.cpp
@@ -1204,34 +1204,34 @@
     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