Use P SDK Constant To Check NeighboringCell
Convert the version check for getNeighboringCellInfo
to use the P SDK Constant.
Bug: 62490173
Test: compilation
Change-Id: I364badced7a891c0733e1bfc15d3b490fea3bcf9
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 90d7924..2df3bbe 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -1919,8 +1919,7 @@
@SuppressWarnings("unchecked")
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 (targetSdk > android.os.Build.VERSION_CODES.P) return null;
if (mAppOps.noteOp(AppOpsManager.OP_NEIGHBORING_CELLS, Binder.getCallingUid(),
callingPackage) != AppOpsManager.MODE_ALLOWED) {