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

Commit 23a2ce1f authored by Michael Kolb's avatar Michael Kolb Committed by Android (Google) Code Review
Browse files

Merge "Prevent dialog from invalid context"

parents 3cdfcdc1 dfceaf2c
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,