Merge pull request #6733 from Douile/fix/recaptcha-webview-background-activity

Prevent recaptcha webview from keeping youtube loaded in background
This commit is contained in:
Stypox 2021-07-27 11:41:17 +02:00 committed by GitHub
commit 0cb801179c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -162,6 +162,9 @@ public class ReCaptchaActivity extends AppCompatActivity {
setResult(RESULT_OK); setResult(RESULT_OK);
} }
// Navigate to blank page (unloads youtube to prevent background playback)
recaptchaBinding.reCaptchaWebView.loadUrl("about:blank");
final Intent intent = new Intent(this, org.schabi.newpipe.MainActivity.class); final Intent intent = new Intent(this, org.schabi.newpipe.MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
NavUtils.navigateUpTo(this, intent); NavUtils.navigateUpTo(this, intent);