Notify policy of untrusted touch for toast
Notify policy when an untrusted touch happens with the obscuring package
so we can show a toast in topic CL.
Test: Enable feature, draw overlay, verify toast appears
Test: atest WindowUntrustedTouchTest WindowInputTests inputflinger_tests
inputflinger_benchmarks libinput_tests libgui_test
Bug: 158002302
Change-Id: Ief4a048128efc52b505a1a8c60aa2240a196f254
diff --git a/services/inputflinger/dispatcher/InputDispatcher.h b/services/inputflinger/dispatcher/InputDispatcher.h
index 1772ad8..c0b0a7f 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.h
+++ b/services/inputflinger/dispatcher/InputDispatcher.h
@@ -547,6 +547,7 @@
REQUIRES(mLock);
void onAnrLocked(const Connection& connection) REQUIRES(mLock);
void onAnrLocked(const std::shared_ptr<InputApplicationHandle>& application) REQUIRES(mLock);
+ void onUntrustedTouchLocked(const std::string& obscuringPackage) REQUIRES(mLock);
void updateLastAnrStateLocked(const sp<InputWindowHandle>& window, const std::string& reason)
REQUIRES(mLock);
void updateLastAnrStateLocked(const std::shared_ptr<InputApplicationHandle>& application,
@@ -560,6 +561,7 @@
void doNotifyInputChannelBrokenLockedInterruptible(CommandEntry* commandEntry) REQUIRES(mLock);
void doNotifyFocusChangedLockedInterruptible(CommandEntry* commandEntry) REQUIRES(mLock);
void doNotifyAnrLockedInterruptible(CommandEntry* commandEntry) REQUIRES(mLock);
+ void doNotifyUntrustedTouchLockedInterruptible(CommandEntry* commandEntry) REQUIRES(mLock);
void doInterceptKeyBeforeDispatchingLockedInterruptible(CommandEntry* commandEntry)
REQUIRES(mLock);
void doDispatchCycleFinishedLockedInterruptible(CommandEntry* commandEntry) REQUIRES(mLock);