Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0bc76db authored by pengzhicai's avatar pengzhicai Committed by android-build-merger
Browse files

Merge "Fix String is empty issue" am: 80af1ba4 am: 38c585cb am: d7df704d

am: f85e7930

Change-Id: I9e85d16bd3edc529a97e4df3b8f90e9fdb2ee486
parents 5f667270 f85e7930
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1193,7 +1193,7 @@ public class TelephonyManager {
    private int getPhoneTypeFromProperty(int phoneId) {
        String type = getTelephonyProperty(phoneId,
                TelephonyProperties.CURRENT_ACTIVE_PHONE, null);
        if (type == null || type.equals("")) {
        if (type == null || type.isEmpty()) {
            return getPhoneTypeFromNetworkType(phoneId);
        }
        return Integer.parseInt(type);
@@ -1209,7 +1209,7 @@ public class TelephonyManager {
        // use the system property for default network type.
        // This is a fail safe, and can only happen at first boot.
        String mode = getTelephonyProperty(phoneId, "ro.telephony.default_network", null);
        if (mode != null) {
        if (mode != null && !mode.isEmpty()) {
            return TelephonyManager.getPhoneType(Integer.parseInt(mode));
        }
        return TelephonyManager.PHONE_TYPE_NONE;