Add method to mark displays secure to hide pointer indicators
In this CL adds a method to mark some displays secure, it will be used
to allow pointer controller to hide touch indicators from the mirrored
displays.
Test: atest PointerChoreographerTest
Bug: 325252005
Change-Id: Iafe7fbc62de39f9fc40119238d7404b97068516a
diff --git a/services/inputflinger/tests/FakePointerController.h b/services/inputflinger/tests/FakePointerController.h
index 536b447..b5b982e 100644
--- a/services/inputflinger/tests/FakePointerController.h
+++ b/services/inputflinger/tests/FakePointerController.h
@@ -21,6 +21,7 @@
#include <input/DisplayViewport.h>
#include <input/Input.h>
#include <utils/BitSet.h>
+#include <unordered_set>
namespace android {
@@ -45,6 +46,7 @@
void setDisplayViewport(const DisplayViewport& viewport) override;
void updatePointerIcon(PointerIconStyle iconId) override;
void setCustomPointerIcon(const SpriteIcon& icon) override;
+ void setSkipScreenshot(int32_t displayId, bool skip) override;
void fade(Transition) override;
void assertViewportSet(int32_t displayId);
@@ -55,6 +57,7 @@
void assertPointerIconNotSet();
void assertCustomPointerIconSet(PointerIconStyle iconId);
void assertCustomPointerIconNotSet();
+ void assertIsHiddenOnMirroredDisplays(int32_t displayId, bool isHidden);
bool isPointerShown();
private:
@@ -77,6 +80,7 @@
std::optional<PointerIconStyle> mCustomIconStyle;
std::map<int32_t, std::vector<int32_t>> mSpotsByDisplay;
+ std::unordered_set<int32_t> mDisplaysToSkipScreenshot;
};
} // namespace android