summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--telephony/java/android/telephony/ServiceState.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index ea87fa353169..fe333002fcf4 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -20,6 +20,7 @@ import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.Rlog;
+import android.text.TextUtils;
/**
* Contains phone state and service related information.
@@ -579,6 +580,24 @@ public class ServiceState implements Parcelable {
}
/**
+ * Get current registered operator name in long alphanumeric format if
+ * available or short otherwise.
+ *
+ * @see #getOperatorAlphaLong
+ * @see #getOperatorAlphaShort
+ *
+ * @return name of operator, null if unregistered or unknown
+ * @hide
+ */
+ public String getOperatorAlpha() {
+ if (TextUtils.isEmpty(mVoiceOperatorAlphaLong)) {
+ return mVoiceOperatorAlphaShort;
+ }
+
+ return mVoiceOperatorAlphaLong;
+ }
+
+ /**
* Get current registered operator numeric id.
*
* In GSM/UMTS, numeric format is 3 digit country code plus 2 or 3 digit