Create Screenshot Detection APIs
This is a followup on ag/19854404
The APIs are used on a per Activity granularity, a client can register
their callback via: `registerScreenCaptureCallback(mExecutor, mCallback);` on Activity
The activity token is used to communiate from the client side to the
ActivityTaskManager and ActivityRecord on the server side. The WMS will receieve a notification when the hardware chord for screenshots is triggered by the user, it would then find all activites that have visible windows and trigger the callbacks registered on all of them.
for more details, see go/screenshot-detection-dd
Bug: 245115438
Test: CTS tests && Manual
Change-Id: I27bf708ac86187f066971b1b01c5b308f78a01b3
diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml
index b4598bf..04c6ff9 100644
--- a/packages/Shell/AndroidManifest.xml
+++ b/packages/Shell/AndroidManifest.xml
@@ -802,6 +802,9 @@
<!-- Permissions required for CTS test - CtsBroadcastRadioTestCases -->
<uses-permission android:name="android.permission.ACCESS_BROADCAST_RADIO" />
+ <!-- Permission required for CTS test - ActivityCaptureCallbackTests -->
+ <uses-permission android:name="android.permission.DETECT_SCREEN_CAPTURE" />
+
<application android:label="@string/app_label"
android:theme="@android:style/Theme.DeviceDefault.DayNight"
android:defaultToDeviceProtectedStorage="true"