diff options
author | Stuart Scott <stuartscott@google.com> | 2014-12-08 19:17:22 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-12-08 19:17:22 +0000 |
commit | 6b0025ea7ca0e7343ee95bc622261b2f3e86012a (patch) | |
tree | 3509825902f4b4298fbcb9fb7eb0718efb1ca78b /telephony | |
parent | 8d50d0fb27c1958dbd047bb8a46d7183d873f131 (diff) | |
parent | eb29c7332c40aacfae3dfb77588b262a043c94ee (diff) | |
download | frameworks_base-6b0025ea7ca0e7343ee95bc622261b2f3e86012a.zip frameworks_base-6b0025ea7ca0e7343ee95bc622261b2f3e86012a.tar.gz frameworks_base-6b0025ea7ca0e7343ee95bc622261b2f3e86012a.tar.bz2 |
am eb29c733: am d2028d90: Merge "Add mapping between RAT and Network Mode" into lmp-mr1-dev
* commit 'eb29c7332c40aacfae3dfb77588b262a043c94ee':
Add mapping between RAT and Network Mode
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/android/telephony/RadioAccessFamily.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/RadioAccessFamily.java b/telephony/java/android/telephony/RadioAccessFamily.java index dd4c45d..734fc68 100644 --- a/telephony/java/android/telephony/RadioAccessFamily.java +++ b/telephony/java/android/telephony/RadioAccessFamily.java @@ -19,6 +19,8 @@ package android.telephony; import android.os.Parcel; import android.os.Parcelable; +import com.android.internal.telephony.RILConstants; + /** * Object to indicate the phone radio type and access technology. * @@ -107,6 +109,7 @@ public class RadioAccessFamily implements Parcelable { * @param outParcel The Parcel in which the object should be written. * @param flags Additional flags about how the object should be written. */ + @Override public void writeToParcel(Parcel outParcel, int flags) { outParcel.writeInt(mPhoneId); outParcel.writeInt(mRadioAccessFamily); @@ -131,5 +134,18 @@ public class RadioAccessFamily implements Parcelable { return new RadioAccessFamily[size]; } }; + + public static int getRafFromNetworkType(int type) { + // TODO map from RILConstants.NETWORK_TYPE_* to RAF_* + switch (type) { + case RILConstants.NETWORK_MODE_WCDMA_PREF: + case RILConstants.NETWORK_MODE_GSM_UMTS: + return RAF_UMTS | RAF_GSM; + case RILConstants.NETWORK_MODE_GSM_ONLY: + return RAF_GSM; + default: + return RAF_UNKNOWN; + } + } } |