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

Commit d4151ebc authored by Jordan Liu's avatar Jordan Liu
Browse files

getTelephonyProperty returns defaultVal

getTelephonyProperty needs to return defaultVal, which it currently
doesn't because SystemProperties.get doesn't return null, it returns
empty-string.

Change-Id: Ida06d3c4ce46a9e988ca7a2b0677293fb6a932eb
Fixes: 113796156
Test: atest FrameworksTelephonyTests
parent 7fe46504
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ import android.telephony.ims.aidl.IImsMmTelFeature;
import android.telephony.ims.aidl.IImsRcsFeature;
import android.telephony.ims.aidl.IImsRegistration;
import android.telephony.ims.stub.ImsRegistrationImplBase;
import android.text.TextUtils;
import android.util.Log;

import com.android.ims.internal.IImsServiceFeatureCallback;
@@ -5301,7 +5302,7 @@ public class TelephonyManager {
    @UnsupportedAppUsage
    public static String getTelephonyProperty(String property, String defaultVal) {
        String propVal = SystemProperties.get(property);
        return propVal == null ? defaultVal : propVal;
        return TextUtils.isEmpty(propVal) ? defaultVal : propVal;
    }

    /** @hide */