Fix crash that occurred when scheme of the URI in a QR code is missing

pull/56/head
Alexander Bakker 6 years ago
parent b41e328d22
commit 2a0daae155

@ -57,7 +57,8 @@ public class GoogleAuthInfo {
}
public static GoogleAuthInfo parseUri(Uri uri) throws GoogleAuthInfoException {
if (!uri.getScheme().equals("otpauth")) {
String scheme = uri.getScheme();
if (scheme == null || scheme.equals("otpauth")) {
throw new GoogleAuthInfoException("unsupported protocol");
}

Loading…
Cancel
Save