Skip to content

Commit

Permalink
SystemUI: Allow privileged system apps to access screenshot service
Browse files Browse the repository at this point in the history
This is necessary in order to take a screenshot from other apps using
platform APIs as if the user used the screenshot keychord, which we need
for implementing gestures in a modular way. The service is still
protected by the INTERACT_ACROSS_USERS_FULL permission, which is already
necessary to get far enough to attempt binding to this service.

Note that existing screenshot APIs are not sufficient because they only
allow apps to get an image of the screen; we want the full user
experience of the animations, actions, preview, sound, etc. that
normally come with a user-initiated screenshot.

Change-Id: Ieb559d5dc921393f68aa1d6142f7834d89d4e22b
  • Loading branch information
kdrag0n committed Nov 8, 2020
1 parent 2b950e1 commit 013c590
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/SystemUI/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,8 @@
TODO: Should have an android:permission attribute -->
<service android:name=".screenshot.TakeScreenshotService"
android:process=":screenshot"
android:exported="false" />
android:exported="true"
android:permission="android.permission.INTERACT_ACROSS_USERS_FULL" />

<!-- Called from PhoneWindowManager -->
<receiver android:name=".screenshot.ScreenshotServiceErrorReceiver"
Expand Down

0 comments on commit 013c590

Please sign in to comment.