Teach telephony about location app ops

Change-Id: I2bd8f0cb90d161994045d403f5d0c129ea951c3f
This commit is contained in:
Svetoslav
2015-04-14 14:32:25 -07:00
committed by Svetoslav Ganov
parent 14e317a33c
commit 275b5635ad
2 changed files with 4 additions and 4 deletions

View File

@@ -782,7 +782,7 @@ public class TelephonyManager {
ITelephony telephony = getITelephony();
if (telephony == null)
return null;
Bundle bundle = telephony.getCellLocation();
Bundle bundle = telephony.getCellLocation(mContext.getOpPackageName());
if (bundle.isEmpty()) return null;
CellLocation cl = CellLocation.newFromBundle(bundle);
if (cl.isEmpty())
@@ -2729,7 +2729,7 @@ public class TelephonyManager {
ITelephony telephony = getITelephony();
if (telephony == null)
return null;
return telephony.getAllCellInfo();
return telephony.getAllCellInfo(mContext.getOpPackageName());
} catch (RemoteException ex) {
return null;
} catch (NullPointerException ex) {

View File

@@ -343,7 +343,7 @@ interface ITelephony {
*/
boolean isDataConnectivityPossible();
Bundle getCellLocation();
Bundle getCellLocation(String callingPkg);
/**
* Returns the neighboring cell information of the device.
@@ -507,7 +507,7 @@ interface ITelephony {
/**
* Returns the all observed cell information of the device.
*/
List<CellInfo> getAllCellInfo();
List<CellInfo> getAllCellInfo(String callingPkg);
/**
* Sets minimum time in milli-seconds between onCellInfoChanged