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

Change-Id: I8c65c2a23cf5067125019aa1affc730eb3eaf234
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;