Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b638022 authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Check permissions on getDeviceId.

This needs the package name passed in, so the aidl changes.

bug:25778215
Change-Id: I804e6613ce0de5f2c7ab832ae62aecf269a6d213
parent 0a887bcd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {
+1 −1
Original line number Diff line number Diff line
@@ -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.