Merge "Throw SecurityException for Q+ getNeighboringCellInfo"
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 02492d1..51ffbd8 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -1922,7 +1922,10 @@
@SuppressWarnings("unchecked")
public List<NeighboringCellInfo>
getNeighboringCellInfo(String callingPackage, int targetSdk) {
- if (targetSdk > android.os.Build.VERSION_CODES.P) return null;
+ if (targetSdk >= android.os.Build.VERSION_CODES.Q) {
+ throw new SecurityException(
+ "getNeighboringCellInfo() is unavailable to callers targeting Q+ SDK levels.");
+ }
if (mAppOps.noteOp(AppOpsManager.OP_NEIGHBORING_CELLS, Binder.getCallingUid(),
callingPackage) != AppOpsManager.MODE_ALLOWED) {