Use allowed default for SP.getString
This commit is contained in:
parent
d78b921b1f
commit
20f9f88d4b
1 changed files with 5 additions and 3 deletions
|
@ -8,6 +8,8 @@ import android.os.IBinder;
|
|||
|
||||
import com.google.gson.Gson;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import info.nightscout.androidaps.R;
|
||||
|
@ -180,10 +182,10 @@ public class RileyLinkOmnipodService extends RileyLinkService {
|
|||
try {
|
||||
omnipodPumpStatus.errorDescription = "-";
|
||||
|
||||
String rileyLinkAddress = sp.getString(RileyLinkConst.Prefs.RileyLinkAddress, null);
|
||||
String rileyLinkAddress = sp.getString(RileyLinkConst.Prefs.RileyLinkAddress, "");
|
||||
|
||||
if (rileyLinkAddress == null) {
|
||||
aapsLogger.debug(LTag.PUMPCOMM, "RileyLink address invalid: null");
|
||||
if (StringUtils.isEmpty(rileyLinkAddress)) {
|
||||
aapsLogger.debug(LTag.PUMPCOMM, "RileyLink address invalid: no address");
|
||||
omnipodPumpStatus.errorDescription = resourceHelper.gs(R.string.medtronic_error_rileylink_address_invalid);
|
||||
return false;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue