Prevent recaptcha webview from keeping youtube loaded in background

After the cookies are extracted from the recaptcha webview make it load an empty
page to prevent youtube being loaded unecessarily in the background.
This commit is contained in:
Douile 2021-07-22 02:31:26 +01:00
parent fd4e1b8d2c
commit cd86ed3877
No known key found for this signature in database
GPG Key ID: DAB413485BA6CFFD
1 changed files with 3 additions and 0 deletions

View File

@ -162,6 +162,9 @@ public class ReCaptchaActivity extends AppCompatActivity {
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);