Fix the NullPointException am: 5a4df243f0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18921546 Change-Id: Icb8aae31d833d27bb64040af296f096471838785 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -22,6 +22,7 @@ import android.telephony.CarrierConfigManager;
|
||||
import android.telephony.SubscriptionInfo;
|
||||
import android.telephony.SubscriptionManager;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
@@ -129,8 +130,8 @@ public class Enable2gPreferenceController extends TelephonyTogglePreferenceContr
|
||||
if (subInfo == null) {
|
||||
return "";
|
||||
}
|
||||
final String carrierName = subInfo.getCarrierName().toString();
|
||||
return carrierName;
|
||||
CharSequence carrierName = subInfo.getCarrierName();
|
||||
return TextUtils.isEmpty(carrierName) ? "" : carrierName.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user