Enforce ACCESS_COARSE_LOCATION on getCellLocation
A implementation bug in Q meant that we weren't checking
ACCESS_COARSE_LOCATION on apps targeting API 28 or earlier on
getCellLocation. This change patches this issue.
Bug: 147402629
Test: atest TelephonyManagerTest:#testSdk28CellLocation
Change-Id: Ie1f622307dec66500b83e960a44f49c37068007e
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 67bbfef..472ecc5 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -2098,6 +2098,7 @@
.setCallingPid(Binder.getCallingPid())
.setCallingUid(Binder.getCallingUid())
.setMethod("getCellLocation")
+ .setMinSdkVersionForCoarse(Build.VERSION_CODES.BASE)
.setMinSdkVersionForFine(Build.VERSION_CODES.Q)
.build());
switch (locationResult) {