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

Commit d371f982 authored by Jason Monk's avatar Jason Monk
Browse files

Add system property to not disable plugins on crash

Should be used only during dev to avoid having to turn crashing
plugins back on constantly.

Test: Manual
Change-Id: I2f2a461bf7aef017781ed3b61fcb216d7e1cbae9
parent 4f70b9cf
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -22,6 +22,7 @@ import android.net.Uri;
import android.os.Build;
import android.os.Build;
import android.os.HandlerThread;
import android.os.HandlerThread;
import android.os.Looper;
import android.os.Looper;
import android.os.SystemProperties;
import android.util.ArrayMap;
import android.util.ArrayMap;


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


        @Override
        @Override
        public void uncaughtException(Thread thread, Throwable throwable) {
        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.
            // Search for and disable plugins that may have been involved in this crash.
            boolean disabledAny = checkStack(throwable);
            boolean disabledAny = checkStack(throwable);
            if (!disabledAny) {
            if (!disabledAny) {