Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
riderx authored Mar 20, 2024
1 parent 13e0ecf commit a182cc4
Showing 1 changed file with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,19 +329,19 @@ public boolean shouldOverrideUrlLoading(
WebView view,
WebResourceRequest request
) {
Context context = view.getContext();
String url = request.getUrl().toString();

if (!url.startsWith("https://") && !url.startsWith("http://")) {
try {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
return true;
} catch (ActivityNotFoundException e) {
// Do nothing
}
}
Context context = view.getContext();
String url = request.getUrl().toString();

if (!url.startsWith("https://") && !url.startsWith("http://")) {
try {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
return true;
} catch (ActivityNotFoundException e) {
// Do nothing
}
}
return false;
}

Expand Down

0 comments on commit a182cc4

Please sign in to comment.