Revise strings as per string UX review
Fixes: 154148793 Fixes: 155098265 Test: m RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.network.telephony Merged-In: Ia510ce5262fbe576718b0785175c0a82acb3c722 Change-Id: Ia510ce5262fbe576718b0785175c0a82acb3c722
This commit is contained in:
@@ -22,6 +22,7 @@ import android.net.Uri;
|
||||
import android.os.PersistableBundle;
|
||||
import android.provider.Telephony;
|
||||
import android.telephony.CarrierConfigManager;
|
||||
import android.telephony.SubscriptionInfo;
|
||||
import android.telephony.ims.ImsManager;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -34,6 +35,8 @@ import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
import androidx.preference.SwitchPreference;
|
||||
|
||||
import com.android.settings.network.SubscriptionUtil;
|
||||
|
||||
|
||||
/**
|
||||
* Controller for the "Contact Discovery" option present in MobileNetworkSettings.
|
||||
@@ -130,7 +133,19 @@ public class ContactDiscoveryPreferenceController extends TelephonyTogglePrefere
|
||||
|
||||
private void showContentDiscoveryDialog() {
|
||||
ContactDiscoveryDialogFragment dialog = ContactDiscoveryDialogFragment.newInstance(
|
||||
mSubId);
|
||||
mSubId, getCarrierDisplayName(preference.getContext()));
|
||||
dialog.show(mFragmentManager, ContactDiscoveryDialogFragment.getFragmentTag(mSubId));
|
||||
}
|
||||
|
||||
private CharSequence getCarrierDisplayName(Context context) {
|
||||
CharSequence result = "";
|
||||
|
||||
for (SubscriptionInfo info : SubscriptionUtil.getAvailableSubscriptions(context)) {
|
||||
if (mSubId == info.getSubscriptionId()) {
|
||||
result = info.getDisplayName();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user