diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2015-12-04 11:51:49 -0800 |
---|---|---|
committer | David Riley <davidriley@google.com> | 2016-01-22 14:18:14 -0800 |
commit | d46bce4973db63206227b8ca5afc4ef67ffde55a (patch) | |
tree | 525cff7054c53142a954a2dc44cb1499a6c8c218 | |
parent | b431f4b5feb7e82a256c8c9b35435ad8b7fc0165 (diff) | |
download | base-d46bce4973db63206227b8ca5afc4ef67ffde55a.tar.gz |
DO NOT MERGE Check permissions on getDeviceId.
This needs the package name passed in, so the aidl changes.
bug:25778215
Change-Id: I72f3456a2774a7ad5104424daea9e046ee9c6360
(cherry picked from commit d8231b9f37b8a4b9eb160c7e8aae0105c978fc11)
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 2 | ||||
-rw-r--r-- | telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 65caf56e8e7d..2e25ec72b7bc 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -726,7 +726,7 @@ public class TelephonyManager { 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 ed85392dd4d7..dc2b297f6dbe 100644 --- a/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl +++ b/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl @@ -36,7 +36,7 @@ interface IPhoneSubInfo { * 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. |