Skip to content

Commit

Permalink
Merge pull request #877 from wallabag/fix_webview
Browse files Browse the repository at this point in the history
Fix WebView crash on Android 5
  • Loading branch information
Strubbl authored Dec 10, 2019
2 parents 123f18f + bbea67a commit f34c1ca
Showing 1 changed file with 13 additions and 0 deletions.
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

0 comments on commit f34c1ca

Please sign in to comment.