Skip to content

Commit

Permalink
Prevent recaptcha webview from keeping youtube loaded in background
Browse files Browse the repository at this point in the history
After the cookies are extracted from the recaptcha webview make it load an empty
page to prevent youtube being loaded unecessarily in the background.
  • Loading branch information
Douile committed Jul 22, 2021
1 parent fd4e1b8 commit 5045bfc
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ private void saveCookiesAndFinish() {
setResult(RESULT_OK);
}

// Navigate to blank page (unloads youtube to prevent background playback)
recaptchaBinding.reCaptchaWebView.loadData("", "text/html", null);


final Intent intent = new Intent(this, org.schabi.newpipe.MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
NavUtils.navigateUpTo(this, intent);
Expand Down

0 comments on commit 5045bfc

Please sign in to comment.