diff options
author | Shufeng Hou <shou@codeaurora.org> | 2015-11-03 10:29:52 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-11-02 18:34:31 -0800 |
commit | 598421095aacb599d4bc8e8fcea20734d7847d0c (patch) | |
tree | 7656aa57a749948f91e34d694a78bcc4d79fa3c2 /telephony | |
parent | d473d0b22ac8704c39d5eedd0d7b12f60a2fa215 (diff) | |
download | frameworks_base-598421095aacb599d4bc8e8fcea20734d7847d0c.zip frameworks_base-598421095aacb599d4bc8e8fcea20734d7847d0c.tar.gz frameworks_base-598421095aacb599d4bc8e8fcea20734d7847d0c.tar.bz2 |
SystemUI: Support display for radio tech
Support monitor locale change and display for radio tech.
CRs-Fixed: 653747
Change-Id: I66d0bb29d0121a19ada0c1ad03ceeec9a03243df
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 4799753..8ea496b 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -1642,6 +1642,37 @@ public class TelephonyManager { } } + /** + * convert network class to string base on network type + * @param type for which network type is returned + * @return the network class type string + * @hide + */ + public String networkClassToString(int type) { + String ratClassName = ""; + int networkClass = getNetworkClass(type); + Rlog.d(TAG, "networkType = " + type + " networkClass = " + networkClass); + if (mContext == null) return null; + switch (networkClass) { + case TelephonyManager.NETWORK_CLASS_2_G: + ratClassName = mContext.getResources().getString( + com.android.internal.R.string.config_rat_2g); + break; + case TelephonyManager.NETWORK_CLASS_3_G: + ratClassName = mContext.getResources().getString( + com.android.internal.R.string.config_rat_3g); + break; + case TelephonyManager.NETWORK_CLASS_4_G: + ratClassName = mContext.getResources().getString( + com.android.internal.R.string.config_rat_4g); + break; + default: + ratClassName = ""; + break; + } + return ratClassName; + } + // // // SIM Card |