Merge "Fix crash when operator name contains %" into tm-dev am: 39eb991aa7
am: 82e1dbfbe4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18556455 Change-Id: I3ca14d45daa9d3af34d2fe05ed1d2edae2645eb7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -37,7 +37,6 @@ import androidx.preference.PreferenceScreen;
|
|||||||
|
|
||||||
import com.android.internal.annotations.VisibleForTesting;
|
import com.android.internal.annotations.VisibleForTesting;
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
import com.android.settings.Utils;
|
|
||||||
import com.android.settings.network.SubscriptionUtil;
|
import com.android.settings.network.SubscriptionUtil;
|
||||||
import com.android.settings.network.SubscriptionsChangeListener;
|
import com.android.settings.network.SubscriptionsChangeListener;
|
||||||
|
|
||||||
@@ -115,6 +114,16 @@ public abstract class DefaultSubscriptionController extends TelephonyBasePrefere
|
|||||||
updateEntries();
|
updateEntries();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void refreshSummary(Preference preference) {
|
||||||
|
// Currently, cannot use ListPreference.setSummary() when the summary contains user
|
||||||
|
// generated string, because ListPreference.getSummary() is using String.format() to format
|
||||||
|
// the summary when the summary is set by ListPreference.setSummary().
|
||||||
|
if (preference != null) {
|
||||||
|
preference.setSummaryProvider(pref -> getSummary());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CharSequence getSummary() {
|
public CharSequence getSummary() {
|
||||||
final PhoneAccountHandle handle = getDefaultCallingAccountHandle();
|
final PhoneAccountHandle handle = getDefaultCallingAccountHandle();
|
||||||
|
Reference in New Issue
Block a user