Fix order of uid/pid in LocationAccessPolicy
Fix the order in which uid and pid are passed into the permission check.
Test: atest LocationAccessPolicyTest
Fixes: 151330809
Change-Id: I479c8fc123d5a994e8cbe6489aa00bea4abca1c7
Merged-In: I479c8fc123d5a994e8cbe6489aa00bea4abca1c7
diff --git a/telephony/java/android/telephony/LocationAccessPolicy.java b/telephony/java/android/telephony/LocationAccessPolicy.java
index eb744f6..2d7c561 100644
--- a/telephony/java/android/telephony/LocationAccessPolicy.java
+++ b/telephony/java/android/telephony/LocationAccessPolicy.java
@@ -286,7 +286,7 @@
}
// If the user or profile is current, permission is granted.
// Otherwise, uid must have INTERACT_ACROSS_USERS_FULL permission.
- return isCurrentProfile(context, uid) || checkInteractAcrossUsersFull(context, uid, pid);
+ return isCurrentProfile(context, uid) || checkInteractAcrossUsersFull(context, pid, uid);
}
private static boolean isLocationModeEnabled(@NonNull Context context, @UserIdInt int userId) {