Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix WebView crash on Android 5 #877

Merged
merged 1 commit into from
Dec 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Configuration;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
Expand Down Expand Up @@ -150,6 +151,18 @@ public class ReadArticleActivity extends BaseActionBarActivity {
private boolean onPageFinishedCallPostponedUntilResume;
private boolean loadingFinished;

// TODO: remove after updating to ~"androidx.appcompat:appcompat:1.2.0"
// https://issuetracker.google.com/issues/141132133
// https://stackoverflow.com/q/58028821
// workaround: https://github.com/ankidroid/Anki-Android/issues/5507#issuecomment-543501300
@Override
public void applyOverrideConfiguration(Configuration overrideConfiguration) {
if (Build.VERSION.SDK_INT >= 21 && Build.VERSION.SDK_INT <= 25) {
return;
}
super.applyOverrideConfiguration(overrideConfiguration);
}

public void onCreate(Bundle savedInstanceState) {

settings = App.getInstance().getSettings();
Expand Down