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

Commit ae0baf72 authored by John Wu's avatar John Wu Committed by Android (Google) Code Review
Browse files

Merge "[Ravenwood] Support specifying instrumentation class" into main

parents b133562b 2d3fb0bd
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ import android.os.SystemProperties;
import android.os.TestLooperManager;
import android.os.UserHandle;
import android.os.UserManager;
import android.ravenwood.annotation.RavenwoodIgnore;
import android.ravenwood.annotation.RavenwoodKeep;
import android.ravenwood.annotation.RavenwoodKeepPartialClass;
import android.ravenwood.annotation.RavenwoodKeepWholeClass;
@@ -196,7 +197,7 @@ public class Instrumentation {
     * @param arguments Any additional arguments that were supplied when the 
     *                  instrumentation was started.
     */
    @android.ravenwood.annotation.RavenwoodKeep
    @RavenwoodKeep
    public void onCreate(Bundle arguments) {
    }

@@ -205,6 +206,7 @@ public class Instrumentation {
     * thread will call to {@link #onStart} where you can implement the
     * instrumentation.
     */
    @RavenwoodIgnore(reason = "Ravenwood has its own test thread")
    public void start() {
        if (mRunner != null) {
            throw new RuntimeException("Instrumentation already started");
@@ -346,6 +348,7 @@ public class Instrumentation {
     * 
     * @return Returns the complete component name for this instrumentation.
     */
    @RavenwoodKeep
    public ComponentName getComponentName() {
        return mComponent;
    }
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.util.SparseArray;
 * instrumentation.  This corresponds to information collected
 * from the AndroidManifest.xml's <instrumentation> tag.
 */
@android.ravenwood.annotation.RavenwoodKeepWholeClass
public class InstrumentationInfo extends PackageItemInfo implements Parcelable {
    /**
     * The name of the application package being instrumented.  From the
+2 −0
Original line number Diff line number Diff line
@@ -1312,6 +1312,7 @@ public final class StrictMode {
     *
     * @param policy the policy to put into place
     */
    @android.ravenwood.annotation.RavenwoodIgnore
    public static void setThreadPolicy(final ThreadPolicy policy) {
        setThreadPolicyMask(policy.mask);
        sThreadViolationListener.set(policy.mListener);
@@ -1436,6 +1437,7 @@ public final class StrictMode {
     *
     * @return the old policy, to be passed to setThreadPolicy to restore the policy.
     */
    @android.ravenwood.annotation.RavenwoodIgnore
    public static ThreadPolicy allowThreadDiskReads() {
        return new ThreadPolicy(
                allowThreadDiskReadsMask(),
+2 −2
Original line number Diff line number Diff line
@@ -64,8 +64,8 @@ public class RavenwoodBaseContext extends Context {
        // Only usable by ravenwood.
    }

    private static RuntimeException notSupported() {
        return new RuntimeException("This Context API is not yet supported under"
    private static RavenwoodUnsupportedApiException notSupported() {
        return new RavenwoodUnsupportedApiException("This Context API is not yet supported under"
                + " the Ravenwood deviceless testing environment. Contact g/ravenwood");
    }

+994 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading