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
Bug: 148414207
Test: atest TelephonyManagerTest:#testSdk28CellLocation
Change-Id: Ie1f622307dec66500b83e960a44f49c37068007e
(cherry picked from commit 773ba0257913f3fa3fc1e28d33826ea6cbdf86cd)
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index d0ed9bd..8b5eac2 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -1913,6 +1913,7 @@
.setCallingPid(Binder.getCallingPid())
.setCallingUid(Binder.getCallingUid())
.setMethod("getCellLocation")
+ .setMinSdkVersionForCoarse(Build.VERSION_CODES.BASE)
.setMinSdkVersionForFine(Build.VERSION_CODES.Q)
.build());
switch (locationResult) {