Merge "Check SDK Version For NeighborCellInfo" am: 954a5e399a
am: 4d3f457d1f

Change-Id: Iff41d58ab0fb0492197ce34f29d51c4ae7eb2417
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index b7d062f..79fd5ab 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -1944,9 +1944,11 @@
 
     @Override
     @SuppressWarnings("unchecked")
-    public List<NeighboringCellInfo> getNeighboringCellInfo(String callingPackage) {
-        mPhone.getContext().getSystemService(AppOpsManager.class)
-                .checkPackage(Binder.getCallingUid(), callingPackage);
+    public List<NeighboringCellInfo>
+            getNeighboringCellInfo(String callingPackage, int targetSdk) {
+        // FIXME: use the P constant when available
+        if (targetSdk > android.os.Build.VERSION_CODES.O_MR1 + 1) return null;
+
         if (!LocationAccessPolicy.canAccessCellLocation(mPhone.getContext(),
                 callingPackage, Binder.getCallingUid(), Binder.getCallingPid(), true)) {
             return null;