private boolean isCdmaDataOnlyMode() { if (mStyle != STATUS_BAR_STYLE_CDMA_1X_COMBINED) { return false; } if (mNC == null) { return false; } int dataType = mNC.getDataNetworkType(); int voiceType = mNC.getVoiceNetworkType(); return ((dataType == TelephonyManager.NETWORK_TYPE_LTE) || (dataType == TelephonyManager.NETWORK_TYPE_EVDO_0) || (dataType == TelephonyManager.NETWORK_TYPE_EVDO_A)) && voiceType == TelephonyManager.NETWORK_TYPE_UNKNOWN; }
private int getCdma2gId(int icon) { if (mNC == null) { return 0; } int retValue = 0; int level = mNC.getGsmSignalLevel(); switch (level) { case SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN: retValue = R.drawable.stat_sys_signal_0_2g; break; case SignalStrength.SIGNAL_STRENGTH_POOR: retValue = R.drawable.stat_sys_signal_1_2g; break; case SignalStrength.SIGNAL_STRENGTH_MODERATE: retValue = R.drawable.stat_sys_signal_2_2g; break; case SignalStrength.SIGNAL_STRENGTH_GOOD: retValue = R.drawable.stat_sys_signal_3_2g; break; case SignalStrength.SIGNAL_STRENGTH_GREAT: retValue = R.drawable.stat_sys_signal_4_2g; break; default: break; } return retValue; }
private boolean show1xOnly() { if (mStyle != STATUS_BAR_STYLE_CDMA_1X_COMBINED) { return false; } if (mNC == null) { return false; } int dataType = mNC.getDataNetworkType(); int voiceType = mNC.getVoiceNetworkType(); boolean ret = false; if (dataType == TelephonyManager.NETWORK_TYPE_1xRTT || dataType == TelephonyManager.NETWORK_TYPE_CDMA) { ret = true; } return ret; }
private boolean showDataAndVoice() { if (mStyle != STATUS_BAR_STYLE_CDMA_1X_COMBINED) { return false; } if (mNC == null) { return false; } int dataType = mNC.getDataNetworkType(); int voiceType = mNC.getVoiceNetworkType(); boolean ret = false; if ((dataType == TelephonyManager.NETWORK_TYPE_EVDO_0 || dataType == TelephonyManager.NETWORK_TYPE_EVDO_0 || dataType == TelephonyManager.NETWORK_TYPE_EVDO_A || dataType == TelephonyManager.NETWORK_TYPE_EVDO_B || dataType == TelephonyManager.NETWORK_TYPE_EHRPD || dataType == TelephonyManager.NETWORK_TYPE_LTE) && (voiceType == TelephonyManager.NETWORK_TYPE_GSM || voiceType == TelephonyManager.NETWORK_TYPE_1xRTT)) { ret = true; } return ret; }
private boolean showBothDataAndVoice() { if (mStyle != STATUS_BAR_STYLE_DATA_VOICE) { return false; } if (mShowTwoBars[0] == 0) { return false; } if (mNC == null) { return false; } boolean ret = false; int dataType = mNC.getDataNetworkType(); int voiceType = mNC.getVoiceNetworkType(); if ((dataType == TelephonyManager.NETWORK_TYPE_TD_SCDMA || dataType == TelephonyManager.NETWORK_TYPE_LTE) && voiceType == TelephonyManager.NETWORK_TYPE_GSM) { ret = true; } return ret; }