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

Commit 91d61510 authored by Sanket Padawe's avatar Sanket Padawe Committed by Natiq Ahmed
Browse files

Modify getDeviceId() to get device id independent of Subscription

+ Add getDeviceId() in ITelephony to find device id independent of
subscription.

Bug: 18780202
Change-Id: I21cc38418eb7f4f1b300c6372e1dc7548385c112
parent 14f11841
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -627,7 +627,11 @@ public class TelephonyManager {
     *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
     */
    public String getDeviceId() {
        return getDeviceId(getDefaultSim());
        try {
            return getITelephony().getDeviceId();
        } catch (RemoteException ex) {
            return null;
        }
    }

    /**
+9 −0
Original line number Diff line number Diff line
@@ -947,4 +947,13 @@ interface ITelephony {
     * Shutdown Mobile Radios
     */
    void shutdownMobileRadios();

    /**
      * Returns the unique device ID of phone, for example, the IMEI for
      * GSM and the MEID for CDMA phones. Return null if device ID is not available.
      *
      * <p>Requires Permission:
      *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
      */
    String getDeviceId();
}