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

Commit dcfb206d authored by Robert Greenwalt's avatar Robert Greenwalt Committed by Android Git Automerger
Browse files

am a51a6381: am 279e22bd: Merge "make new API to retrieve group identifier level1" into jb-mr2-dev

* commit 'a51a6381':
  make new API to retrieve group identifier level1
parents 435d1120 a51a6381
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -21451,6 +21451,7 @@ package android.telephony {
    method public int getDataState();
    method public int getDataState();
    method public java.lang.String getDeviceId();
    method public java.lang.String getDeviceId();
    method public java.lang.String getDeviceSoftwareVersion();
    method public java.lang.String getDeviceSoftwareVersion();
    method public java.lang.String getGroupIdLevel1();
    method public java.lang.String getLine1Number();
    method public java.lang.String getLine1Number();
    method public java.util.List<android.telephony.NeighboringCellInfo> getNeighboringCellInfo();
    method public java.util.List<android.telephony.NeighboringCellInfo> getNeighboringCellInfo();
    method public java.lang.String getNetworkCountryIso();
    method public java.lang.String getNetworkCountryIso();
+18 −0
Original line number Original line Diff line number Diff line
@@ -906,6 +906,24 @@ public class TelephonyManager {
        }
        }
    }
    }


    /**
     * Returns the Group Identifier Level1 for a GSM phone.
     * Return null if it is unavailable.
     * <p>
     * Requires Permission:
     *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
     */
    public String getGroupIdLevel1() {
        try {
            return getSubscriberInfo().getGroupIdLevel1();
        } catch (RemoteException ex) {
            return null;
        } catch (NullPointerException ex) {
            // This could happen before phone restarts due to crashing
            return null;
        }
    }

    /**
    /**
     * Returns the phone number string for line 1, for example, the MSISDN
     * Returns the phone number string for line 1, for example, the MSISDN
     * for a GSM phone. Return null if it is unavailable.
     * for a GSM phone. Return null if it is unavailable.
+5 −0
Original line number Original line Diff line number Diff line
@@ -38,6 +38,11 @@ interface IPhoneSubInfo {
     */
     */
    String getSubscriberId();
    String getSubscriberId();


    /**
     * Retrieves the Group Identifier Level1 for GSM phones.
     */
    String getGroupIdLevel1();

    /**
    /**
     * Retrieves the serial number of the ICC, if applicable.
     * Retrieves the serial number of the ICC, if applicable.
     */
     */