token-import: handle empty urls better
This commit is contained in:
@@ -589,7 +589,7 @@ public class SecurityTokenHelper {
|
||||
|
||||
public String getUrl() throws IOException {
|
||||
byte[] data = getData(0x5F, 0x50);
|
||||
return new String(data);
|
||||
return new String(data).trim();
|
||||
}
|
||||
|
||||
public String getUserId() throws IOException {
|
||||
|
||||
@@ -29,6 +29,7 @@ import android.net.Uri;
|
||||
import android.os.SystemClock;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.content.AsyncTaskLoader;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.auto.value.AutoValue;
|
||||
@@ -159,7 +160,7 @@ public abstract class PublicKeyRetrievalLoader extends AsyncTaskLoader<KeyRetrie
|
||||
|
||||
try {
|
||||
log.add(LogType.MSG_RET_URI_START, 0);
|
||||
if (tokenUri == null) {
|
||||
if (TextUtils.isEmpty(tokenUri)) {
|
||||
log.add(LogType.MSG_RET_URI_NULL, 1);
|
||||
return KeyRetrievalResult.createWithError(log);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user