From a2590b5e7fb8a4a26ea530e59b2b630acc112bd9 Mon Sep 17 00:00:00 2001 From: Robert Greenwalt Date: Fri, 4 Dec 2015 11:51:49 -0800 Subject: Check permissions on getDeviceId. DO NOT MERGE This needs the package name passed in, so the aidl changes. bug:25778215 Change-Id: I69ee88f1d2db614bad51e6de908d3f16881a0231 --- telephony/java/android/telephony/TelephonyManager.java | 4 ++-- telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 3b281e222bd8..0b5aaa3b273b 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -766,7 +766,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) { @@ -4865,4 +4865,4 @@ public class TelephonyManager { } return null; } -} \ No newline at end of file +} 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. -- cgit v1.2.3-59-g8ed1b