Throw if location permission not held
Test: cts-tradefed run cts-dev -m CtsPermissionTestCases
-t android.permission.cts.NoLocationPermissionTest
bug:62899976
Change-Id: I5291841af84be63deaf4db806392e1c7ce670be5
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 204afd3..59b7684 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -1641,7 +1641,7 @@
@Override
public Bundle getCellLocation(String callingPackage) {
if (!LocationAccessPolicy.canAccessCellLocation(mPhone.getContext(),
- callingPackage, Binder.getCallingUid())) {
+ callingPackage, Binder.getCallingUid(), "getCellLocation")) {
return null;
}
@@ -1709,7 +1709,7 @@
@SuppressWarnings("unchecked")
public List<NeighboringCellInfo> getNeighboringCellInfo(String callingPackage) {
if (!LocationAccessPolicy.canAccessCellLocation(mPhone.getContext(),
- callingPackage, Binder.getCallingUid())) {
+ callingPackage, Binder.getCallingUid(), "getNeighboringCellInfo")) {
return null;
}
@@ -1737,7 +1737,7 @@
@Override
public List<CellInfo> getAllCellInfo(String callingPackage) {
if (!LocationAccessPolicy.canAccessCellLocation(mPhone.getContext(),
- callingPackage, Binder.getCallingUid())) {
+ callingPackage, Binder.getCallingUid(), "getAllCellInfo")) {
return null;
}