DO NOT MERGE - Multi-sim device would show 2 PLMN in status bar even if they are same.
Bug: 19710990 Change-Id: Iee3841b0abf31937787c01da3685bc76b5c86f03
This commit is contained in:
committed by
Robert Greenwalt
parent
17455a3d39
commit
536f7c56e3
@@ -18,6 +18,7 @@ package com.android.keyguard;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -140,7 +141,11 @@ public class CarrierText extends TextView {
|
||||
plmn = i.getStringExtra(TelephonyIntents.EXTRA_PLMN);
|
||||
}
|
||||
if (DEBUG) Log.d(TAG, "Getting plmn/spn sticky brdcst " + plmn + "/" + spn);
|
||||
text = concatenate(plmn, spn);
|
||||
if (Objects.equals(plmn, spn)) {
|
||||
text = plmn;
|
||||
} else {
|
||||
text = concatenate(plmn, spn);
|
||||
}
|
||||
}
|
||||
displayText = makeCarrierStringOnEmergencyCapable(
|
||||
getContext().getText(R.string.keyguard_missing_sim_message_short), text);
|
||||
@@ -289,11 +294,7 @@ public class CarrierText extends TextView {
|
||||
final boolean plmnValid = !TextUtils.isEmpty(plmn);
|
||||
final boolean spnValid = !TextUtils.isEmpty(spn);
|
||||
if (plmnValid && spnValid) {
|
||||
if (plmn.equals(spn)) {
|
||||
return plmn;
|
||||
} else {
|
||||
return new StringBuilder().append(plmn).append(mSeparator).append(spn).toString();
|
||||
}
|
||||
return new StringBuilder().append(plmn).append(mSeparator).append(spn).toString();
|
||||
} else if (plmnValid) {
|
||||
return plmn;
|
||||
} else if (spnValid) {
|
||||
|
||||
Reference in New Issue
Block a user