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

Commit 9cd3b7b3 authored by Jack Yu's avatar Jack Yu
Browse files

Exposed CDMA SID/NID get APIs

Made two existing hidden APIs getSystemId() and getNetworkId()
into public APIs.

Test: Telephony sanity tests
bug: 32718590
Change-Id: I436bd2699f8f805def753878d93e7dbf524e5f44
parent 73200d9a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -40465,11 +40465,13 @@ package android.telephony {
    method protected void copyFrom(android.telephony.ServiceState);
    method public int describeContents();
    method public boolean getIsManualSelection();
    method public int getNetworkId();
    method public java.lang.String getOperatorAlphaLong();
    method public java.lang.String getOperatorAlphaShort();
    method public java.lang.String getOperatorNumeric();
    method public boolean getRoaming();
    method public int getState();
    method public int getSystemId();
    method public void setIsManualSelection(boolean);
    method public void setOperatorName(java.lang.String, java.lang.String, java.lang.String);
    method public void setRoaming(boolean);
@@ -40482,6 +40484,7 @@ package android.telephony {
    field public static final int STATE_IN_SERVICE = 0; // 0x0
    field public static final int STATE_OUT_OF_SERVICE = 1; // 0x1
    field public static final int STATE_POWER_OFF = 3; // 0x3
    field public static final int UNKNOWN_ID = -1; // 0xffffffff
  }
  public class SignalStrength implements android.os.Parcelable {
+15 −3
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ package android.telephony;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.Rlog;
import android.text.TextUtils;

/**
@@ -216,6 +215,11 @@ public class ServiceState implements Parcelable {
     */
    public static final int ROAMING_TYPE_INTERNATIONAL = 3;

    /**
     * Unknown ID. Could be returned by {@link #getNetworkId()} or {@link #getSystemId()}
     */
    public static final int UNKNOWN_ID = -1;

    private int mVoiceRoamingType;
    private int mDataRoamingType;
    private String mVoiceOperatorAlphaLong;
@@ -1212,12 +1216,20 @@ public class ServiceState implements Parcelable {
        return this.mCssIndicator ? 1 : 0;
    }

    /** @hide */
    /**
     * Get the CDMA NID (Network Identification Number), a number uniquely identifying a network
     * within a wireless system. (Defined in 3GPP2 C.S0023 3.4.8)
     * @return The CDMA NID or {@link #UNKNOWN_ID} if not available.
     */
    public int getNetworkId() {
        return this.mNetworkId;
    }

    /** @hide */
    /**
     * Get the CDMA SID (System Identification Number), a number uniquely identifying a wireless
     * system. (Defined in 3GPP2 C.S0023 3.4.8)
     * @return The CDMA SID or {@link #UNKNOWN_ID} if not available.
     */
    public int getSystemId() {
        return this.mSystemId;
    }