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

Commit 77680bd4 authored by Seongho Kim's avatar Seongho Kim
Browse files

Need to check empty not null for String



getWcdmaLevel needs to check empty string, which is currently doesn't
because mWcdmaDefaultSignalMeasurement could be not null but empty string.

Test: TelephonybaseTest

Change-Id: If00a5953eef972250266ceef234cce213d45bc6a
Signed-off-by: default avatarSeongho Kim <sh_tiger.kim@samsung.com>
parent 2417859f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -21,8 +21,8 @@ import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.telephony.CarrierConfigManager;
import android.text.TextUtils;
import android.util.Log;
import android.content.res.Resources;

import java.util.ArrayList;
import java.util.Arrays;
@@ -1116,7 +1116,7 @@ public class SignalStrength implements Parcelable {
    public int getWcdmaLevel() {
        int level = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;

        if (mWcdmaDefaultSignalMeasurement == null) {
        if (TextUtils.isEmpty(mWcdmaDefaultSignalMeasurement)) {
            Log.wtf(LOG_TAG, "getWcdmaLevel - WCDMA default signal measurement is invalid.");
            return level;
        }