commit | d8231b9f37b8a4b9eb160c7e8aae0105c978fc11 | [log] [tgz] |
---|---|---|
author | Robert Greenwalt <rgreenwalt@google.com> | Fri Dec 04 11:51:49 2015 -0800 |
committer | Robert Greenwalt <rgreenwalt@google.com> | Mon Dec 07 12:38:48 2015 -0800 |
tree | 3267331444bb898fa20472efaa9f53e02ade379c | |
parent | add4b91d41d3ba810b6b25c14d7c13050394f201 [diff] |
Check permissions on getDeviceId. This needs the package name passed in, so the aidl changes. bug:25778215 Change-Id: I72f3456a2774a7ad5104424daea9e046ee9c6360
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 65caf56..2e25ec7 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -726,7 +726,7 @@ IPhoneSubInfo info = getSubscriberInfo(); if (info == null) return null; - return info.getDeviceIdForPhone(slotId); + return info.getDeviceIdForPhone(slotId, mContext.getOpPackageName()); } catch (RemoteException ex) { return null; } catch (NullPointerException ex) {
diff --git a/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl b/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl index ed85392..dc2b297 100644 --- a/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl +++ b/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl
@@ -36,7 +36,7 @@ * Retrieves the unique device ID of a phone for the device, e.g., IMEI * for GSM phones. */ - String getDeviceIdForPhone(int phoneId); + String getDeviceIdForPhone(int phoneId, String callingPackage); /** * Retrieves the IMEI.