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

Commit 24af31ea authored by Vaibhav Devmurari's avatar Vaibhav Devmurari
Browse files

Add new permission for "Keyboard capture" APIs

DD: go/key_capture
Test: atest PermissionPolicyTests
Bug: 416681006
Flag: com.android.hardware.input.request_key_capture_api
Change-Id: Ic1fd48a21b41c0f929da638024385ed534e34749
parent e456a4ff
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ package android {
    field public static final String CALL_PRIVILEGED = "android.permission.CALL_PRIVILEGED";
    field public static final String CAMERA = "android.permission.CAMERA";
    field public static final String CAPTURE_AUDIO_OUTPUT = "android.permission.CAPTURE_AUDIO_OUTPUT";
    field @FlaggedApi("com.android.hardware.input.request_key_capture_api") public static final String CAPTURE_KEYBOARD = "android.permission.CAPTURE_KEYBOARD";
    field public static final String CHANGE_COMPONENT_ENABLED_STATE = "android.permission.CHANGE_COMPONENT_ENABLED_STATE";
    field public static final String CHANGE_CONFIGURATION = "android.permission.CHANGE_CONFIGURATION";
    field public static final String CHANGE_NETWORK_STATE = "android.permission.CHANGE_NETWORK_STATE";
+12 −0
Original line number Diff line number Diff line
@@ -8740,6 +8740,18 @@
    <permission android:name="android.permission.MONITOR_STICKY_MODIFIER_STATE"
                android:protectionLevel="signature" />
    <!--
        @FlaggedApi(com.android.hardware.input.Flags.FLAG_REQUEST_KEY_CAPTURE_API)
        Allows an application to be able to capture keys before Android system get chance to
        process system keys and shortcuts.
        <p> Protection level: normal
    -->
    <permission android:name="android.permission.CAPTURE_KEYBOARD"
        android:protectionLevel="normal"
        android:label="@string/permlab_capture_keyboard"
        android:description="@string/permdesc_capture_keyboard"
        android:featureFlag="com.android.hardware.input.request_key_capture_api"/>
    <!-- Allows low-level access to manage key gestures.
         <p>Not for use by third-party applications.
         @hide -->
+5 −0
Original line number Diff line number Diff line
@@ -1932,6 +1932,11 @@
    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
    <string name="permdesc_xr_tracking_in_background">Allows the app to access XR data while not in the foreground.</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_capture_keyboard">capture keys</string>
    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
    <string name="permdesc_capture_keyboard">Allows the app to capture keys before system can process system shortcuts and actions.</string>
    <!-- Name for an app setting that lets the user authenticate for that app using biometrics (e.g. fingerprint or face). [CHAR LIMIT=30] -->
    <string name="biometric_app_setting_name">Use biometrics</string>
    <!-- Name for an app setting that lets the user authenticate for that app using biometrics (e.g. fingerprint or face) or their screen lock credential (i.e. PIN, pattern, or password). [CHAR LIMIT=70] -->