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

Commit c35c1422 authored by Yuting's avatar Yuting
Browse files

Add OP_EMERGENCY_LOCATION appop to allowed appops in the Privacy

Dashboard

Add OP_EMERGENCY_LOCATION appop to the list of appops whose access
entries should be displayed in the Privacy Dashboard.

Export location flag library to be used by Permission Controller

Flag: NONE no change should be behind a flag

Bug: 325536053
Test: atest PermissionHistoryTest#openLocationTimeline_whenEmergencyLocationIsNoted_showAccess
Change-Id: Ia7bde9a272e04488f4add8b44a443ab1d44ed499
parent 2b6e889b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -213,3 +213,11 @@ flag {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    name: "location_bypass_privacy_dashboard_enabled"
    is_exported: true
    namespace: "permissions"
    description: "Show access entry of location bypass permission in the Privacy Dashboard"
    bug: "325536053"
}
+5 −3
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import static android.app.AppOpsManager.FILTER_BY_PACKAGE_NAME;
import static android.app.AppOpsManager.FILTER_BY_UID;
import static android.app.AppOpsManager.OP_CAMERA;
import static android.app.AppOpsManager.OP_COARSE_LOCATION;
import static android.app.AppOpsManager.OP_EMERGENCY_LOCATION;
import static android.app.AppOpsManager.OP_FINE_LOCATION;
import static android.app.AppOpsManager.OP_FLAGS_ALL;
import static android.app.AppOpsManager.OP_FLAG_SELF;
@@ -135,9 +136,10 @@ final class DiscreteRegistry {
    private static final String PROPERTY_DISCRETE_FLAGS = "discrete_history_op_flags";
    private static final String PROPERTY_DISCRETE_OPS_LIST = "discrete_history_ops_cslist";
    private static final String DEFAULT_DISCRETE_OPS = OP_FINE_LOCATION + "," + OP_COARSE_LOCATION
            + "," + OP_CAMERA + "," + OP_RECORD_AUDIO + "," + OP_PHONE_CALL_MICROPHONE + ","
            + OP_PHONE_CALL_CAMERA + "," + OP_RECEIVE_AMBIENT_TRIGGER_AUDIO + ","
            + OP_RECEIVE_SANDBOX_TRIGGER_AUDIO + "," + OP_RESERVED_FOR_TESTING;
            + "," + OP_EMERGENCY_LOCATION + "," + OP_CAMERA + "," + OP_RECORD_AUDIO + ","
            + OP_PHONE_CALL_MICROPHONE + "," + OP_PHONE_CALL_CAMERA + ","
            + OP_RECEIVE_AMBIENT_TRIGGER_AUDIO + "," + OP_RECEIVE_SANDBOX_TRIGGER_AUDIO
            + "," + OP_RESERVED_FOR_TESTING;
    private static final long DEFAULT_DISCRETE_HISTORY_CUTOFF = Duration.ofDays(7).toMillis();
    private static final long MAXIMUM_DISCRETE_HISTORY_CUTOFF = Duration.ofDays(30).toMillis();
    private static final long DEFAULT_DISCRETE_HISTORY_QUANTIZATION =