From 275b5635ad98a411d511894e98f80e8b8bc41799 Mon Sep 17 00:00:00 2001 From: Svetoslav Date: Tue, 14 Apr 2015 14:32:25 -0700 Subject: Teach telephony about location app ops Change-Id: I2bd8f0cb90d161994045d403f5d0c129ea951c3f --- telephony/java/android/telephony/TelephonyManager.java | 4 ++-- telephony/java/com/android/internal/telephony/ITelephony.aidl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index cd3f6363f2d2..81f329c2ce82 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -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) { diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 4fe88c48bc3f..0b77c26a8b1d 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -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 getAllCellInfo(); + List getAllCellInfo(String callingPkg); /** * Sets minimum time in milli-seconds between onCellInfoChanged -- cgit v1.2.3-59-g8ed1b