diff options
author | Steve Kondik <steve@cyngn.com> | 2015-11-16 15:01:23 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-11-16 15:01:23 -0800 |
commit | 3ada4b5a85fa907989855065179c4661653cd9ad (patch) | |
tree | 6f461e770d8a22dfc0d26c8917086df4c31d5905 /telephony | |
parent | 5ceb8731615dbbd54e027e09e46e724037e3a809 (diff) | |
parent | 5ccaaff4818af8d48e072cbd2b8b784e5cd0c593 (diff) | |
download | frameworks_base-3ada4b5a85fa907989855065179c4661653cd9ad.zip frameworks_base-3ada4b5a85fa907989855065179c4661653cd9ad.tar.gz frameworks_base-3ada4b5a85fa907989855065179c4661653cd9ad.tar.bz2 |
Merge branch 'LA.BF64.1.2.2_rb4.7' of git://codeaurora.org/platform/frameworks/base into cm-13.0
Change-Id: I008f052e4e27b44457c8343d20f6e1ba943c8e1f
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 dd86830..3dd6793 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -1658,6 +1658,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 |