Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 05c5a6c9 authored by Omar Eissa's avatar Omar Eissa
Browse files

Add DETECT_SCREEN_CAPTURE permission.

This permission allows an application to be notified when a screen capture of its windows is attempted.
This permission will be checked when an app is trying to register a screen capture callback. This was introduced for auditing purposes.
for more details, see go/screenshot-detection-dd

Test: Build
Bug: 245117067
Change-Id: Ia8337ec0ac1a7c1333aa585b54c555b78e99e5e7
parent 94cc9d60
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ package android {
    field public static final String DELETE_CACHE_FILES = "android.permission.DELETE_CACHE_FILES";
    field public static final String DELETE_PACKAGES = "android.permission.DELETE_PACKAGES";
    field public static final String DELIVER_COMPANION_MESSAGES = "android.permission.DELIVER_COMPANION_MESSAGES";
    field public static final String DETECT_SCREEN_CAPTURE = "android.permission.DETECT_SCREEN_CAPTURE";
    field public static final String DIAGNOSTIC = "android.permission.DIAGNOSTIC";
    field public static final String DISABLE_KEYGUARD = "android.permission.DISABLE_KEYGUARD";
    field public static final String DUMP = "android.permission.DUMP";
+13 −0
Original line number Diff line number Diff line
@@ -2494,6 +2494,19 @@
        android:description="@string/permdesc_modifyAudioSettings"
        android:protectionLevel="normal" />

    <!-- ==================================================== -->
    <!-- Permissions related to screen capture   -->
    <!-- ==================================================== -->
    <eat-comment />

    <!-- Allows an application to get notified when a screen capture of its windows is attempted.
         <p>Protection level: normal
    -->
    <permission android:name="android.permission.DETECT_SCREEN_CAPTURE"
                android:label="@string/permlab_detectScreenCapture"
                android:description="@string/permdesc_detectScreenCapture"
                android:protectionLevel="normal" />

    <!-- ======================================== -->
    <!-- Permissions for factory reset protection -->
    <!-- ======================================== -->
+5 −0
Original line number Diff line number Diff line
@@ -1300,6 +1300,11 @@
    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=NONE] -->
    <string name="permdesc_recordBackgroundAudio">This app can record audio using the microphone at any time.</string>

    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR_LIMIT=NONE] -->
    <string name="permlab_detectScreenCapture">detect screen captures of app windows</string>
    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this.[CHAR_LIMIT=NONE] -->
    <string name="permdesc_detectScreenCapture">This app will get notified when a screenshot is taken while the app is in use.</string>

    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
    <string name="permlab_sim_communication">send commands to the SIM</string>
    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->