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

Commit 4bd98c57 authored by Soonil Nagarkar's avatar Soonil Nagarkar Committed by Android (Google) Code Review
Browse files

Merge "Update EMERGENCY_LOCATION op to default to ALLOWED" into main

parents ea863596 a25c7565
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -1581,6 +1581,10 @@ public class AppOpsManager {
     * Allows an app to access location without the traditional location permissions and while the
     * user location setting is off, but only during pre-defined emergency sessions.
     *
     * <p>This op is only used for tracking, not for permissions, so it is still the client's
     * responsibility to check the {@link Manifest.permission.LOCATION_BYPASS} permission
     * appropriately.
     *
     * @hide
     */
    public static final int OP_EMERGENCY_LOCATION = AppProtoEnums.APP_OP_EMERGENCY_LOCATION;
@@ -2459,6 +2463,10 @@ public class AppOpsManager {
     * Allows an app to access location without the traditional location permissions and while the
     * user location setting is off, but only during pre-defined emergency sessions.
     *
     * <p>This op is only used for tracking, not for permissions, so it is still the client's
     * responsibility to check the {@link Manifest.permission.LOCATION_BYPASS} permission
     * appropriately.
     *
     * @hide
     */
    @SystemApi
@@ -3047,8 +3055,10 @@ public class AppOpsManager {
        new AppOpInfo.Builder(OP_UNARCHIVAL_CONFIRMATION, OPSTR_UNARCHIVAL_CONFIRMATION,
                "UNARCHIVAL_CONFIRMATION")
                .setDefaultMode(MODE_ALLOWED).build(),
        // TODO(b/301150056): STOPSHIP determine how this appop should work with the permission
        new AppOpInfo.Builder(OP_EMERGENCY_LOCATION, OPSTR_EMERGENCY_LOCATION, "EMERGENCY_LOCATION")
                .setDefaultMode(MODE_ALLOWED)
                // even though this has a permission associated, this op is only used for tracking,
                // and the client is responsible for checking the LOCATION_BYPASS permission.
                .setPermission(Manifest.permission.LOCATION_BYPASS).build(),
    };