Fall-safe

This commit is contained in:
M66B 2021-02-17 09:00:05 +01:00
parent d61da50881
commit 0018ceb4d6
2 changed files with 16 additions and 0 deletions

View File

@ -2451,6 +2451,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
private void bindConversationActions(TupleMessageEx message, ConversationActions cactions) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
boolean has = false;
clearActions();
if (cactions != null) {
List<ConversationAction> actions = cactions.getConversationActions();
for (final ConversationAction action : actions) {

View File

@ -21,6 +21,7 @@ package eu.faircode.email;
import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
import android.util.Pair;
@ -28,6 +29,7 @@ import android.view.InputDevice;
import android.view.MotionEvent;
import android.view.View;
import android.webkit.DownloadListener;
import android.webkit.RenderProcessGoneDetail;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
@ -97,6 +99,11 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
this.intf = intf;
setWebViewClient(new WebViewClient() {
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
Log.i("Started url=" + url);
}
@Override
public void onPageFinished(WebView view, String url) {
Log.i("Finished url=" + url);
@ -109,6 +116,14 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
ApplicationEx.getMainHandler().post(onPageFinished);
}
@Override
public boolean onRenderProcessGone(WebView view, RenderProcessGoneDetail detail) {
Log.i("Render process gone");
if (onPageFinished != null)
ApplicationEx.getMainHandler().post(onPageFinished);
return super.onRenderProcessGone(view, detail);
}
public boolean shouldOverrideUrlLoading(WebView view, String url) {
Log.i("Open url=" + url);
return intf.onOpenLink(url);