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

Commit df179d69 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes I8673cb95,I2f2a461b

* changes:
  Make plugins have an application context
  Add system property to not disable plugins on crash
parents c0f50362 6a652a44
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -305,6 +305,11 @@ public class PluginInstanceManager<T extends Plugin> {
            }
            return getBaseContext().getSystemService(name);
        }

        @Override
        public Context getApplicationContext() {
            return this;
        }
    }

    private static class PluginInfo<T> {
+5 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.net.Uri;
import android.os.Build;
import android.os.HandlerThread;
import android.os.Looper;
import android.os.SystemProperties;
import android.util.ArrayMap;

import com.android.internal.annotations.VisibleForTesting;
@@ -208,6 +209,10 @@ public class PluginManager extends BroadcastReceiver {

        @Override
        public void uncaughtException(Thread thread, Throwable throwable) {
            if (SystemProperties.getBoolean("plugin.debugging", false)) {
                mHandler.uncaughtException(thread, throwable);
                return;
            }
            // Search for and disable plugins that may have been involved in this crash.
            boolean disabledAny = checkStack(throwable);
            if (!disabledAny) {