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

Commit 925f0fd8 authored by Nagesh Pachorkar's avatar Nagesh Pachorkar
Browse files

Revert "Introduced granular skin temperature permissions"

Revert submission 20678628-Granular_Body_Sensor_Permissions_In_U

Reason for revert: According to the WHS product decision, this permission is no more required.

Bug: 274938077

Reverted changes: /q/submissionid:20678628-Granular_Body_Sensor_Permissions_In_U

Change-Id: I9ae639fd9617e2dc145a710d07693e2030b6c1a4
parent 9c33bdb3
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -8,8 +8,6 @@ package android {
    field public static final String APPROVE_INCIDENT_REPORTS = "android.permission.APPROVE_INCIDENT_REPORTS";
    field public static final String BACKGROUND_CAMERA = "android.permission.BACKGROUND_CAMERA";
    field public static final String BIND_CELL_BROADCAST_SERVICE = "android.permission.BIND_CELL_BROADCAST_SERVICE";
    field public static final String BODY_SENSORS_WRIST_TEMPERATURE = "android.permission.BODY_SENSORS_WRIST_TEMPERATURE";
    field public static final String BODY_SENSORS_WRIST_TEMPERATURE_BACKGROUND = "android.permission.BODY_SENSORS_WRIST_TEMPERATURE_BACKGROUND";
    field public static final String BRIGHTNESS_SLIDER_USAGE = "android.permission.BRIGHTNESS_SLIDER_USAGE";
    field public static final String BROADCAST_CLOSE_SYSTEM_DIALOGS = "android.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS";
    field public static final String CHANGE_APP_IDLE_STATE = "android.permission.CHANGE_APP_IDLE_STATE";
+6 −13
Original line number Diff line number Diff line
@@ -1450,9 +1450,8 @@ public class AppOpsManager {
    public static final int OP_CAPTURE_CONSENTLESS_BUGREPORT_ON_USERDEBUG_BUILD =
            AppProtoEnums.APP_OP_CAPTURE_CONSENTLESS_BUGREPORT_ON_USERDEBUG_BUILD;

    /** @hide Access to wrist temperature sensors. */
    public static final int OP_BODY_SENSORS_WRIST_TEMPERATURE =
            AppProtoEnums.APP_OP_BODY_SENSORS_WRIST_TEMPERATURE;
    // App op deprecated/removed.
    private static final int OP_DEPRECATED_2 = AppProtoEnums.APP_OP_BODY_SENSORS_WRIST_TEMPERATURE;

    /**
     * Send an intent to launch instead of posting the notification to the status bar.
@@ -1603,7 +1602,6 @@ public class AppOpsManager {
            OPSTR_SYSTEM_EXEMPT_FROM_HIBERNATION,
            OPSTR_SYSTEM_EXEMPT_FROM_ACTIVITY_BG_START_RESTRICTION,
            OPSTR_CAPTURE_CONSENTLESS_BUGREPORT_ON_USERDEBUG_BUILD,
            OPSTR_BODY_SENSORS_WRIST_TEMPERATURE,
            OPSTR_USE_FULL_SCREEN_INTENT,
    })
    public @interface AppOpString {}
@@ -2189,11 +2187,10 @@ public class AppOpsManager {
            "android:capture_consentless_bugreport_on_userdebug_build";

    /**
     * Access to wrist temperature body sensors.
     * App op deprecated/removed.
     * @hide
     */
    public static final String OPSTR_BODY_SENSORS_WRIST_TEMPERATURE =
            "android:body_sensors_wrist_temperature";
    public static final String OPSTR_DEPRECATED_2 = "android:deprecated_2";

    /**
     * Send an intent to launch instead of posting the notification to the status bar.
@@ -2311,7 +2308,6 @@ public class AppOpsManager {
            OP_READ_MEDIA_VISUAL_USER_SELECTED,
            OP_FOREGROUND_SERVICE_SPECIAL_USE,
            OP_CAPTURE_CONSENTLESS_BUGREPORT_ON_USERDEBUG_BUILD,
            OP_BODY_SENSORS_WRIST_TEMPERATURE,
            OP_USE_FULL_SCREEN_INTENT
    };

@@ -2731,11 +2727,8 @@ public class AppOpsManager {
                "CAPTURE_CONSENTLESS_BUGREPORT_ON_USERDEBUG_BUILD")
                .setPermission(Manifest.permission.CAPTURE_CONSENTLESS_BUGREPORT_ON_USERDEBUG_BUILD)
                .build(),
        new AppOpInfo.Builder(OP_BODY_SENSORS_WRIST_TEMPERATURE,
                OPSTR_BODY_SENSORS_WRIST_TEMPERATURE,
                "BODY_SENSORS_WRIST_TEMPERATURE")
                .setPermission(Manifest.permission.BODY_SENSORS_WRIST_TEMPERATURE)
                .setDefaultMode(AppOpsManager.MODE_ALLOWED).build(),
        new AppOpInfo.Builder(OP_DEPRECATED_2, OPSTR_DEPRECATED_2, "DEPRECATED_2")
                .setDefaultMode(AppOpsManager.MODE_IGNORED).build(),
        new AppOpInfo.Builder(OP_USE_FULL_SCREEN_INTENT, OPSTR_USE_FULL_SCREEN_INTENT,
                "USE_FULL_SCREEN_INTENT").setPermission(Manifest.permission.USE_FULL_SCREEN_INTENT)
                .build()
+0 −1
Original line number Diff line number Diff line
@@ -473,7 +473,6 @@ public abstract class ForegroundServiceTypePolicy {
            new ForegroundServiceTypePermissions(new ForegroundServiceTypePermission[] {
                new RegularPermission(Manifest.permission.ACTIVITY_RECOGNITION),
                new RegularPermission(Manifest.permission.BODY_SENSORS),
                new RegularPermission(Manifest.permission.BODY_SENSORS_WRIST_TEMPERATURE),
                new RegularPermission(Manifest.permission.HIGH_SAMPLING_RATE_SENSORS),
            }, false),
            FGS_TYPE_PERM_ENFORCEMENT_FLAG_HEALTH /* permissionEnforcementFlag */,
+0 −31
Original line number Diff line number Diff line
@@ -1746,37 +1746,6 @@
        android:protectionLevel="dangerous"
        android:permissionFlags="hardRestricted" />

    <!-- @TestApi Allows an application to access wrist temperature data from the watch sensors.
        <p class="note"><strong>Note: </strong> This permission is for Wear OS only.
        <p>Protection level: dangerous
        @hide
        -->
    <permission android:name="android.permission.BODY_SENSORS_WRIST_TEMPERATURE"
                android:permissionGroup="android.permission-group.UNDEFINED"
                android:label="@string/permlab_bodySensorsWristTemperature"
                android:description="@string/permdesc_bodySensorsWristTemperature"
                android:backgroundPermission="android.permission.BODY_SENSORS_WRIST_TEMPERATURE_BACKGROUND"
                android:protectionLevel="dangerous" />

    <!-- @TestApi Allows an application to access wrist temperature data from the watch sensors.
         If you're requesting this permission, you must also request
         {@link #BODY_SENSORS_WRIST_TEMPERATURE}. Requesting this permission by itself doesn't
         give you wrist temperature body sensors access.
         <p class="note"><strong>Note: </strong> This permission is for Wear OS only.
         <p>Protection level: dangerous

         <p> This is a hard restricted permission which cannot be held by an app until
         the installer on record allowlists the permission. For more details see
         {@link android.content.pm.PackageInstaller.SessionParams#setWhitelistedRestrictedPermissions(Set)}.
         @hide
    -->
    <permission android:name="android.permission.BODY_SENSORS_WRIST_TEMPERATURE_BACKGROUND"
                android:permissionGroup="android.permission-group.UNDEFINED"
                android:label="@string/permlab_bodySensors_wristTemperature_background"
                android:description="@string/permdesc_bodySensors_wristTemperature_background"
                android:protectionLevel="dangerous"
                android:permissionFlags="hardRestricted" />

    <!-- Allows an app to use fingerprint hardware.
         <p>Protection level: normal
         @deprecated Applications should request {@link
+0 −10
Original line number Diff line number Diff line
@@ -1347,16 +1347,6 @@
    <!-- Description of the background body sensors permission, listed so the user can decide whether to allow the application to access data from body sensors in the background. [CHAR LIMIT=NONE] -->
    <string name="permdesc_bodySensors_background" product="default">Allows the app to access body sensor data, such as heart rate, temperature, and blood oxygen percentage, while the app is in the background.</string>

    <!-- Title of the body sensors wrist temperature permission, listed so the user can decide whether to allow the application to access body sensor wrist temperature data. [CHAR LIMIT=NONE] -->
    <string name="permlab_bodySensorsWristTemperature">Access body sensor wrist temperature data while the app is in use.</string>
    <!-- Description of the body sensors wrist temperature permission, listed so the user can decide whether to allow the application to access data from body sensors. [CHAR LIMIT=NONE] -->
    <string name="permdesc_bodySensorsWristTemperature" product="default">Allows the app to access body sensor wrist temperature data, while the app is in use.</string>

    <!-- Title of the body sensors wrist temperature permission, listed so the user can decide whether to allow the application to access body sensor wrist temperature data. [CHAR LIMIT=NONE] -->
    <string name="permlab_bodySensors_wristTemperature_background">Access body sensor wrist temperature data while the app is in the background.</string>
    <!-- Description of the body sensors wrist temperature permission, listed so the user can decide whether to allow the application to access data from body sensors. [CHAR LIMIT=NONE] -->
    <string name="permdesc_bodySensors_wristTemperature_background" product="default">Allows the app to access body sensor wrist temperature data, while the app is in the background.</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_readCalendar">Read calendar events and details</string>
    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
Loading