For Cdma a blank plmn is valid to show in some cases.

When roaming the plmn might be blank but we want to have
showPlmn true otherwise "No Service" is displayed.

bug: 3265611
Change-Id: Iaed8997ab0bb336c79cef1fc848526ca7a73f9a1
This commit is contained in:
Wink Saville
2011-01-07 08:35:59 -08:00
parent b3b98d9b70
commit f4871b686f

View File

@@ -605,7 +605,11 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
// mOperatorAlphaLong contains the ERI text
String plmn = ss.getOperatorAlphaLong();
if (!TextUtils.equals(plmn, curPlmn)) {
boolean showPlmn = !TextUtils.isEmpty(plmn);
// Allow A blank plmn, "" to set showPlmn to true. Previously, we
// would set showPlmn to true only if plmn was not empty, i.e. was not
// null and not blank. But this would cause us to incorrectly display
// "No Service". Now showPlmn is set to true for any non null string.
boolean showPlmn = plmn != null;
Log.d(LOG_TAG,
String.format("updateSpnDisplay: changed sending intent" +
" showPlmn='%b' plmn='%s'", showPlmn, plmn));