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

Commit 79e00d91 authored by Jared Herdlevar's avatar Jared Herdlevar Committed by Android (Google) Code Review
Browse files

Merge "If the FINE_LOCATION permission is granted to voice search on wear, and...

Merge "If the FINE_LOCATION permission is granted to voice search on wear, and it is not user set, revoke it in the DefaultPermissionGrantPolicy" into main
parents dd1ce567 972848ba
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -884,10 +884,13 @@ final class DefaultPermissionGrantPolicy {
            }

            // Allow voice search on wear
            grantPermissionsToSystemPackage(pm,
                    getDefaultSystemHandlerActivityPackage(pm,
                            SearchManager.INTENT_ACTION_GLOBAL_SEARCH, userId),
                    userId, PHONE_PERMISSIONS, CALENDAR_PERMISSIONS, NEARBY_DEVICES_PERMISSIONS);
            String voiceSearchPackage = getDefaultSystemHandlerActivityPackage(pm,
                    SearchManager.INTENT_ACTION_GLOBAL_SEARCH, userId);
            grantPermissionsToSystemPackage(pm, voiceSearchPackage,
                    userId, PHONE_PERMISSIONS, CALENDAR_PERMISSIONS, NEARBY_DEVICES_PERMISSIONS,
                    COARSE_BACKGROUND_LOCATION_PERMISSIONS);
            revokeRuntimePermissions(pm, voiceSearchPackage,
                FINE_LOCATION_PERMISSIONS, false, userId);
        }

        // Print Spooler