diff options
Diffstat (limited to 'packages')
5 files changed, 50 insertions, 11 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index 2ed968b..964fe9c 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -17,6 +17,8 @@ package com.android.providers.settings; import com.android.internal.content.PackageHelper; +import com.android.internal.telephony.BaseCommands; +import com.android.internal.telephony.Phone; import com.android.internal.telephony.RILConstants; import com.android.internal.util.XmlUtils; import com.android.internal.widget.LockPatternUtils; @@ -1300,8 +1302,13 @@ public class DatabaseHelper extends SQLiteOpenHelper { } // Set the preferred network mode to 0 = Global, CDMA default - int type = SystemProperties.getInt("ro.telephony.default_network", - RILConstants.PREFERRED_NETWORK_MODE); + int type; + if (BaseCommands.getLteOnCdmaModeStatic() == Phone.LTE_ON_CDMA_TRUE) { + type = Phone.NT_MODE_GLOBAL; + } else { + type = SystemProperties.getInt("ro.telephony.default_network", + RILConstants.PREFERRED_NETWORK_MODE); + } loadSetting(stmt, Settings.Secure.PREFERRED_NETWORK_MODE, type); // Enable or disable Cell Broadcast SMS diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4g.png Binary files differnew file mode 100644 index 0000000..ade3716 --- /dev/null +++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4g.png diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java index 0273a4c..826ac92 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java @@ -246,6 +246,16 @@ public class PhoneStatusBarPolicy { R.drawable.stat_sys_data_fully_out_3g, R.drawable.stat_sys_data_fully_inandout_3g } }; + private static final int[][] sDataNetType_4g = { + { R.drawable.stat_sys_data_connected_4g, + R.drawable.stat_sys_data_in_4g, + R.drawable.stat_sys_data_out_4g, + R.drawable.stat_sys_data_inandout_4g }, + { R.drawable.stat_sys_data_fully_connected_4g, + R.drawable.stat_sys_data_fully_in_4g, + R.drawable.stat_sys_data_fully_out_4g, + R.drawable.stat_sys_data_fully_inandout_4g } + }; private static final int[][] sDataNetType_e = { { R.drawable.stat_sys_data_connected_e, R.drawable.stat_sys_data_in_e, @@ -670,9 +680,12 @@ public class PhoneStatusBarPolicy { case TelephonyManager.NETWORK_TYPE_EVDO_0: //fall through case TelephonyManager.NETWORK_TYPE_EVDO_A: case TelephonyManager.NETWORK_TYPE_EVDO_B: + case TelephonyManager.NETWORK_TYPE_EHRPD: mDataIconList = sDataNetType_3g[mInetCondition]; break; - // TODO - add support for NETWORK_TYPE_LTE and NETWORK_TYPE_EHRPD + case TelephonyManager.NETWORK_TYPE_LTE: + mDataIconList = sDataNetType_4g[mInetCondition]; + break; default: mDataIconList = sDataNetType_g[mInetCondition]; break; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java index a693e60..3175a99 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java @@ -427,10 +427,14 @@ public class NetworkController extends BroadcastReceiver { case TelephonyManager.NETWORK_TYPE_EVDO_0: //fall through case TelephonyManager.NETWORK_TYPE_EVDO_A: case TelephonyManager.NETWORK_TYPE_EVDO_B: + case TelephonyManager.NETWORK_TYPE_EHRPD: mDataIconList = TelephonyIcons.DATA_3G[mInetCondition]; mDataTypeIconId = R.drawable.stat_sys_signal_3g; break; - // TODO - add support for NETWORK_TYPE_LTE and NETWORK_TYPE_EHRPD + case TelephonyManager.NETWORK_TYPE_LTE: + mDataIconList = TelephonyIcons.DATA_4G[mInetCondition]; + mDataTypeIconId = R.drawable.stat_sys_signal_4g; + break; default: mDataIconList = TelephonyIcons.DATA_G[mInetCondition]; mDataTypeIconId = R.drawable.stat_sys_signal_gprs; @@ -442,12 +446,14 @@ public class NetworkController extends BroadcastReceiver { } boolean isCdmaEri() { - final int iconIndex = mServiceState.getCdmaEriIconIndex(); - if (iconIndex != EriInfo.ROAMING_INDICATOR_OFF) { - final int iconMode = mServiceState.getCdmaEriIconMode(); - if (iconMode == EriInfo.ROAMING_ICON_MODE_NORMAL - || iconMode == EriInfo.ROAMING_ICON_MODE_FLASH) { - return true; + if (mServiceState != null) { + final int iconIndex = mServiceState.getCdmaEriIconIndex(); + if (iconIndex != EriInfo.ROAMING_INDICATOR_OFF) { + final int iconMode = mServiceState.getCdmaEriIconMode(); + if (iconMode == EriInfo.ROAMING_ICON_MODE_NORMAL + || iconMode == EriInfo.ROAMING_ICON_MODE_FLASH) { + return true; + } } } return false; @@ -850,7 +856,7 @@ public class NetworkController extends BroadcastReceiver { pw.print(" mDataActivity="); pw.println(mDataActivity); pw.print(" mServiceState="); - pw.println(mServiceState.toString()); + pw.println(mServiceState); pw.print(" mNetworkName="); pw.println(mNetworkName); pw.print(" mNetworkNameDefault="); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java index 29d35e3..9093b3e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java @@ -124,5 +124,18 @@ class TelephonyIcons { R.drawable.stat_sys_data_fully_inandout_1x } }; + // LTE and eHRPD + static final int[][] DATA_4G = { + { R.drawable.stat_sys_data_connected_4g, + R.drawable.stat_sys_data_in_4g, + R.drawable.stat_sys_data_out_4g, + R.drawable.stat_sys_data_inandout_4g }, + { R.drawable.stat_sys_data_fully_connected_4g, + R.drawable.stat_sys_data_fully_in_4g, + R.drawable.stat_sys_data_fully_out_4g, + R.drawable.stat_sys_data_fully_inandout_4g } + }; + + } |