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

Commit 0210fa0a authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Show location indicator for only FINE" into main

parents 854a9986 6ba4694f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -121,7 +121,6 @@ public class PermissionUsageHelper implements AppOpsManager.OnOpActiveChangedLis
    }

    private static final List<String> LOCATION_OPS = List.of(
            OPSTR_COARSE_LOCATION,
            OPSTR_FINE_LOCATION
    );

+1 −2
Original line number Diff line number Diff line
@@ -75,8 +75,7 @@ constructor(
                AppOpsManager.OP_RECEIVE_EXPLICIT_USER_INTERACTION_AUDIO,
                AppOpsManager.OP_RECEIVE_SANDBOX_TRIGGER_AUDIO,
            )
        val OPS_LOCATION =
            intArrayOf(AppOpsManager.OP_COARSE_LOCATION, AppOpsManager.OP_FINE_LOCATION)
        val OPS_LOCATION = intArrayOf(AppOpsManager.OP_FINE_LOCATION)
        val OPS = OPS_MIC_CAMERA + OPS_LOCATION
        val USER_INDEPENDENT_OPS =
            intArrayOf(AppOpsManager.OP_PHONE_CALL_CAMERA, AppOpsManager.OP_PHONE_CALL_MICROPHONE)
+11 −16
Original line number Diff line number Diff line
@@ -251,7 +251,7 @@ class AppOpsPrivacyItemMonitorTest : SysuiTestCase() {
        doReturn(
                listOf(
                    AppOpItem(AppOpsManager.OP_ACTIVATE_VPN, TEST_UID, TEST_PACKAGE_NAME, 0),
                    AppOpItem(AppOpsManager.OP_COARSE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, 0),
                    AppOpItem(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, 0),
                )
            )
            .`when`(appOpsController)
@@ -278,7 +278,7 @@ class AppOpsPrivacyItemMonitorTest : SysuiTestCase() {
        doReturn(
                listOf(
                    AppOpItem(AppOpsManager.OP_CAMERA, TEST_UID, TEST_PACKAGE_NAME, 0),
                    AppOpItem(AppOpsManager.OP_COARSE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, 0),
                    AppOpItem(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, 0),
                )
            )
            .`when`(appOpsController)
@@ -295,7 +295,7 @@ class AppOpsPrivacyItemMonitorTest : SysuiTestCase() {
        doReturn(512)
            .`when`(packageManager)
            .getPermissionFlags(
                "android.permission.ACCESS_COARSE_LOCATION",
                "android.permission.ACCESS_FINE_LOCATION",
                "com.google.android.apps.maps",
                UserHandle.getUserHandleForUid(TEST_UID),
            )
@@ -308,7 +308,7 @@ class AppOpsPrivacyItemMonitorTest : SysuiTestCase() {
                listOf(
                    // Regular item which should not be filtered
                    AppOpItem(
                        AppOpsManager.OP_COARSE_LOCATION,
                        AppOpsManager.OP_FINE_LOCATION,
                        TEST_UID,
                        "com.google.android.apps.maps",
                        0,
@@ -380,7 +380,7 @@ class AppOpsPrivacyItemMonitorTest : SysuiTestCase() {
                listOf(
                    // Regular item which should not be filtered
                    AppOpItem(
                        AppOpsManager.OP_COARSE_LOCATION,
                        AppOpsManager.OP_FINE_LOCATION,
                        TEST_UID,
                        "com.google.android.apps.maps",
                        0,
@@ -410,12 +410,7 @@ class AppOpsPrivacyItemMonitorTest : SysuiTestCase() {
        doReturn(
                listOf(
                    // Regular item which should not be filtered
                    AppOpItem(
                        AppOpsManager.OP_COARSE_LOCATION,
                        TEST_UID,
                        "com.google.android.gms",
                        0,
                    )
                    AppOpItem(AppOpsManager.OP_FINE_LOCATION, TEST_UID, "com.google.android.gms", 0)
                )
            )
            .`when`(appOpsController)
@@ -448,7 +443,7 @@ class AppOpsPrivacyItemMonitorTest : SysuiTestCase() {
        doReturn(512)
            .`when`(packageManager)
            .getPermissionFlags(
                "android.permission.ACCESS_COARSE_LOCATION",
                "android.permission.ACCESS_FINE_LOCATION",
                "com.google.android.apps.maps",
                UserHandle.getUserHandleForUid(TEST_UID),
            )
@@ -463,7 +458,7 @@ class AppOpsPrivacyItemMonitorTest : SysuiTestCase() {
                listOf(
                    // Regular item which should not be filtered
                    AppOpItem(
                        AppOpsManager.OP_COARSE_LOCATION,
                        AppOpsManager.OP_FINE_LOCATION,
                        TEST_UID,
                        "com.google.android.apps.maps",
                        0,
@@ -531,7 +526,7 @@ class AppOpsPrivacyItemMonitorTest : SysuiTestCase() {

        doReturn(
                listOf(
                    AppOpItem(AppOpsManager.OP_COARSE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, 0),
                    AppOpItem(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, 0),
                    AppOpItem(AppOpsManager.OP_CAMERA, otherUserUid, TEST_PACKAGE_NAME, 0),
                )
            )
@@ -559,7 +554,7 @@ class AppOpsPrivacyItemMonitorTest : SysuiTestCase() {

        doReturn(
                listOf(
                    AppOpItem(AppOpsManager.OP_COARSE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, 0),
                    AppOpItem(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, 0),
                    AppOpItem(AppOpsManager.OP_RECORD_AUDIO, TEST_UID, TEST_PACKAGE_NAME, 0),
                    AppOpItem(AppOpsManager.OP_PHONE_CALL_CAMERA, TEST_UID, TEST_PACKAGE_NAME, 0),
                )
@@ -587,7 +582,7 @@ class AppOpsPrivacyItemMonitorTest : SysuiTestCase() {

        doReturn(
                listOf(
                    AppOpItem(AppOpsManager.OP_COARSE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, 0),
                    AppOpItem(AppOpsManager.OP_FINE_LOCATION, TEST_UID, TEST_PACKAGE_NAME, 0),
                    AppOpItem(AppOpsManager.OP_CAMERA, TEST_UID, TEST_PACKAGE_NAME, 0),
                    AppOpItem(
                        AppOpsManager.OP_PHONE_CALL_MICROPHONE,