Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dfceaf2c authored by Michael Kolb's avatar Michael Kolb
Browse files

Prevent dialog from invalid context

  Bug: 6346748

Change-Id: Ia65ecc1ecb882b480127aca0034db25a9e51ed3c
parent 32f038de
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.webkit;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
@@ -146,6 +147,7 @@ class WebCoreThreadWatchdog implements Runnable {
                        break;

                    case TIMED_OUT:
                        if ((mContext == null) || !(mContext instanceof Activity)) return;
                        new AlertDialog.Builder(mContext)
                            .setMessage(com.android.internal.R.string.webpage_unresponsive)
                            .setPositiveButton(com.android.internal.R.string.force_close,