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 8371a508a2
commit 64a10d3370

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);