OSDN Git Service

Check permissions on getDeviceId. DO NOT MERGE
authorRobert Greenwalt <rgreenwalt@google.com>
Fri, 4 Dec 2015 19:51:49 +0000 (11:51 -0800)
committerRobert Greenwalt <rgreenwalt@google.com>
Tue, 22 Dec 2015 23:29:42 +0000 (15:29 -0800)
This needs the package name passed in, so the aidl changes.

bug:25778215
Change-Id: I69ee88f1d2db614bad51e6de908d3f16881a0231

telephony/java/android/telephony/TelephonyManager.java
telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl

index 3b281e2..0b5aaa3 100644 (file)
@@ -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
+}
index ed85392..dc2b297 100644 (file)
@@ -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.