am 63b59666: Merge "Only use CDMA rssi for config_alwaysUseCdmaRssi." into ics-mr1
* commit '63b596664c3fdb70ad32c8f641f477ec9140d6ec': Only use CDMA rssi for config_alwaysUseCdmaRssi.
This commit is contained in:
@@ -88,6 +88,7 @@ public class NetworkController extends BroadcastReceiver {
|
|||||||
int mLastSignalLevel;
|
int mLastSignalLevel;
|
||||||
boolean mShowPhoneRSSIForData = false;
|
boolean mShowPhoneRSSIForData = false;
|
||||||
boolean mShowAtLeastThreeGees = false;
|
boolean mShowAtLeastThreeGees = false;
|
||||||
|
boolean mAlwaysShowCdmaRssi = false;
|
||||||
|
|
||||||
String mContentDescriptionPhoneSignal;
|
String mContentDescriptionPhoneSignal;
|
||||||
String mContentDescriptionWifi;
|
String mContentDescriptionWifi;
|
||||||
@@ -156,7 +157,7 @@ public class NetworkController extends BroadcastReceiver {
|
|||||||
IBatteryStats mBatteryStats;
|
IBatteryStats mBatteryStats;
|
||||||
|
|
||||||
public interface SignalCluster {
|
public interface SignalCluster {
|
||||||
void setWifiIndicators(boolean visible, int strengthIcon, int activityIcon,
|
void setWifiIndicators(boolean visible, int strengthIcon, int activityIcon,
|
||||||
String contentDescription);
|
String contentDescription);
|
||||||
void setMobileDataIndicators(boolean visible, int strengthIcon, int activityIcon,
|
void setMobileDataIndicators(boolean visible, int strengthIcon, int activityIcon,
|
||||||
int typeIcon, String contentDescription, String typeContentDescription);
|
int typeIcon, String contentDescription, String typeContentDescription);
|
||||||
@@ -176,6 +177,8 @@ public class NetworkController extends BroadcastReceiver {
|
|||||||
|
|
||||||
mShowPhoneRSSIForData = res.getBoolean(R.bool.config_showPhoneRSSIForData);
|
mShowPhoneRSSIForData = res.getBoolean(R.bool.config_showPhoneRSSIForData);
|
||||||
mShowAtLeastThreeGees = res.getBoolean(R.bool.config_showMin3G);
|
mShowAtLeastThreeGees = res.getBoolean(R.bool.config_showMin3G);
|
||||||
|
mAlwaysShowCdmaRssi = res.getBoolean(
|
||||||
|
com.android.internal.R.bool.config_alwaysUseCdmaRssi);
|
||||||
|
|
||||||
// set up the default wifi icon, used when no radios have ever appeared
|
// set up the default wifi icon, used when no radios have ever appeared
|
||||||
updateWifiIcons();
|
updateWifiIcons();
|
||||||
@@ -287,7 +290,7 @@ public class NetworkController extends BroadcastReceiver {
|
|||||||
// wimax is special
|
// wimax is special
|
||||||
cluster.setMobileDataIndicators(
|
cluster.setMobileDataIndicators(
|
||||||
true,
|
true,
|
||||||
mWimaxIconId,
|
mAlwaysShowCdmaRssi ? mPhoneSignalIconId : mWimaxIconId,
|
||||||
mMobileActivityIconId,
|
mMobileActivityIconId,
|
||||||
mDataTypeIconId,
|
mDataTypeIconId,
|
||||||
mContentDescriptionWimax,
|
mContentDescriptionWimax,
|
||||||
@@ -351,7 +354,7 @@ public class NetworkController extends BroadcastReceiver {
|
|||||||
@Override
|
@Override
|
||||||
public void onSignalStrengthsChanged(SignalStrength signalStrength) {
|
public void onSignalStrengthsChanged(SignalStrength signalStrength) {
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Slog.d(TAG, "onSignalStrengthsChanged signalStrength=" + signalStrength +
|
Slog.d(TAG, "onSignalStrengthsChanged signalStrength=" + signalStrength +
|
||||||
((signalStrength == null) ? "" : (" level=" + signalStrength.getLevel())));
|
((signalStrength == null) ? "" : (" level=" + signalStrength.getLevel())));
|
||||||
}
|
}
|
||||||
mSignalStrength = signalStrength;
|
mSignalStrength = signalStrength;
|
||||||
@@ -469,7 +472,15 @@ public class NetworkController extends BroadcastReceiver {
|
|||||||
} else {
|
} else {
|
||||||
int iconLevel;
|
int iconLevel;
|
||||||
int[] iconList;
|
int[] iconList;
|
||||||
mLastSignalLevel = iconLevel = mSignalStrength.getLevel();
|
if (isCdma() && mAlwaysShowCdmaRssi) {
|
||||||
|
mLastSignalLevel = iconLevel = mSignalStrength.getCdmaLevel();
|
||||||
|
if(DEBUG) Slog.d(TAG, "mAlwaysShowCdmaRssi=" + mAlwaysShowCdmaRssi
|
||||||
|
+ " set to cdmaLevel=" + mSignalStrength.getCdmaLevel()
|
||||||
|
+ " instead of level=" + mSignalStrength.getLevel());
|
||||||
|
} else {
|
||||||
|
mLastSignalLevel = iconLevel = mSignalStrength.getLevel();
|
||||||
|
}
|
||||||
|
|
||||||
if (isCdma()) {
|
if (isCdma()) {
|
||||||
if (isCdmaEri()) {
|
if (isCdmaEri()) {
|
||||||
iconList = TelephonyIcons.TELEPHONY_SIGNAL_STRENGTH_ROAMING[mInetCondition];
|
iconList = TelephonyIcons.TELEPHONY_SIGNAL_STRENGTH_ROAMING[mInetCondition];
|
||||||
@@ -487,7 +498,6 @@ public class NetworkController extends BroadcastReceiver {
|
|||||||
mPhoneSignalIconId = iconList[iconLevel];
|
mPhoneSignalIconId = iconList[iconLevel];
|
||||||
mContentDescriptionPhoneSignal = mContext.getString(
|
mContentDescriptionPhoneSignal = mContext.getString(
|
||||||
AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[iconLevel]);
|
AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[iconLevel]);
|
||||||
|
|
||||||
mDataSignalIconId = TelephonyIcons.DATA_SIGNAL_STRENGTH[mInetCondition][iconLevel];
|
mDataSignalIconId = TelephonyIcons.DATA_SIGNAL_STRENGTH[mInetCondition][iconLevel];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -908,7 +918,7 @@ public class NetworkController extends BroadcastReceiver {
|
|||||||
mobileLabel = "";
|
mobileLabel = "";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mobileLabel
|
mobileLabel
|
||||||
= context.getString(R.string.status_bar_settings_signal_meter_disconnected);
|
= context.getString(R.string.status_bar_settings_signal_meter_disconnected);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1181,7 +1191,7 @@ public class NetworkController extends BroadcastReceiver {
|
|||||||
v.setText(wifiLabel);
|
v.setText(wifiLabel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// mobile label
|
// mobile label
|
||||||
N = mMobileLabelViews.size();
|
N = mMobileLabelViews.size();
|
||||||
for (int i=0; i<N; i++) {
|
for (int i=0; i<N; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user