Skip to content

Commit

Permalink
[Android] Only load http/https URLs when scanning a QR code from the …
Browse files Browse the repository at this point in the history
…URL bar (uplift to 1.49.x) (#17350)

Uplift of #17344 (squashed) to beta
  • Loading branch information
brave-builds authored Feb 28, 2023
1 parent 3ba6b4e commit f9fff70
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public void onDetectedQrCode(Barcode barcode) {
if (getActivity() != null) {
final String barcodeValue = barcode.displayValue;
getActivity().runOnUiThread(() -> {
if (URLUtil.isValidUrl(barcodeValue)) {
if (URLUtil.isNetworkUrl(barcodeValue)) {
mLocationBarMediator.loadUrl(barcodeValue, PageTransition.GENERATED, 0);
mLocationBarMediator.clearOmniboxFocus();
} else {
Expand Down

0 comments on commit f9fff70

Please # to comment.