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

Commit aa5bdeb8 authored by Marcus Hagerott's avatar Marcus Hagerott
Browse files

Add debug wait to RunMethodInstrumentation

Test
manually ran instrumentation with debug flag set.

Change-Id: I01e24c5d1b7d7485fd5f09af3cd5af47b5377e4c
parent 9d96196f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ import android.app.Activity;
import android.app.Instrumentation;
import android.content.Context;
import android.os.Bundle;
import android.os.Debug;
import android.support.test.InstrumentationRegistry;
import android.util.Log;

@@ -62,6 +63,9 @@ public class RunMethodInstrumentation extends Instrumentation {
        Log.d(TAG, "Running " + className + "." + methodName);
        Log.d(TAG, "args=" + args);

        if (arguments.containsKey("debug") && Boolean.parseBoolean(arguments.getString("debug"))) {
            Debug.waitForDebugger();
        }
        start();
    }