Move SDK Check for getNeighboringCellInfo
Move the SDK check for getNeighboringCellInfo() to inside the phone process for security. Bug: 117520186 Test: atest CtsPermissionTestCasesSdk28 Change-Id: I9ca059dad0ed5d2107af154e0a63c282133aba3d
This commit is contained in:
@@ -1591,8 +1591,7 @@ public class TelephonyManager {
|
|||||||
ITelephony telephony = getITelephony();
|
ITelephony telephony = getITelephony();
|
||||||
if (telephony == null)
|
if (telephony == null)
|
||||||
return null;
|
return null;
|
||||||
return telephony.getNeighboringCellInfo(mContext.getOpPackageName(),
|
return telephony.getNeighboringCellInfo(mContext.getOpPackageName());
|
||||||
mContext.getApplicationInfo().targetSdkVersion);
|
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
return null;
|
return null;
|
||||||
} catch (NullPointerException ex) {
|
} catch (NullPointerException ex) {
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ interface ITelephony {
|
|||||||
/**
|
/**
|
||||||
* Returns the neighboring cell information of the device.
|
* Returns the neighboring cell information of the device.
|
||||||
*/
|
*/
|
||||||
List<NeighboringCellInfo> getNeighboringCellInfo(String callingPkg, int targetSdk);
|
List<NeighboringCellInfo> getNeighboringCellInfo(String callingPkg);
|
||||||
|
|
||||||
int getCallState();
|
int getCallState();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user