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

Commit 187cf29f authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge changes from topic "nov10b" into main

* changes:
  Initial Process and Binder support, with CTS.
  Start using Ravenwood annotations in source tree.
parents e968b57b 5e210d7d
Loading
Loading
Loading
Loading
+96 −0
Original line number Original line Diff line number Diff line
@@ -30,9 +30,11 @@ import com.android.internal.os.BinderCallHeavyHitterWatcher;
import com.android.internal.os.BinderCallHeavyHitterWatcher.BinderCallHeavyHitterListener;
import com.android.internal.os.BinderCallHeavyHitterWatcher.BinderCallHeavyHitterListener;
import com.android.internal.os.BinderInternal;
import com.android.internal.os.BinderInternal;
import com.android.internal.os.BinderInternal.CallSession;
import com.android.internal.os.BinderInternal.CallSession;
import com.android.internal.os.SomeArgs;
import com.android.internal.util.FastPrintWriter;
import com.android.internal.util.FastPrintWriter;
import com.android.internal.util.FunctionalUtils.ThrowingRunnable;
import com.android.internal.util.FunctionalUtils.ThrowingRunnable;
import com.android.internal.util.FunctionalUtils.ThrowingSupplier;
import com.android.internal.util.FunctionalUtils.ThrowingSupplier;
import com.android.internal.util.Preconditions;


import dalvik.annotation.optimization.CriticalNative;
import dalvik.annotation.optimization.CriticalNative;


@@ -46,6 +48,7 @@ import java.io.IOException;
import java.io.PrintWriter;
import java.io.PrintWriter;
import java.lang.reflect.Modifier;
import java.lang.reflect.Modifier;
import java.util.concurrent.atomic.AtomicReferenceArray;
import java.util.concurrent.atomic.AtomicReferenceArray;
import java.util.function.Supplier;


/**
/**
 * Base class for a remotable object, the core part of a lightweight
 * Base class for a remotable object, the core part of a lightweight
@@ -289,6 +292,33 @@ public class Binder implements IBinder {
        sWarnOnBlockingOnCurrentThread.set(sWarnOnBlocking);
        sWarnOnBlockingOnCurrentThread.set(sWarnOnBlocking);
    }
    }


    private static ThreadLocal<SomeArgs> sIdentity$ravenwood;

    @android.ravenwood.annotation.RavenwoodKeepWholeClass
    private static class IdentitySupplier implements Supplier<SomeArgs> {
        @Override
        public SomeArgs get() {
            final SomeArgs args = SomeArgs.obtain();
            // Match IPCThreadState behavior
            args.arg1 = Boolean.FALSE;
            args.argi1 = android.os.Process.myUid();
            args.argi2 = android.os.Process.myPid();
            return args;
        }
    }

    /** @hide */
    @android.ravenwood.annotation.RavenwoodKeep
    public static void init$ravenwood() {
        sIdentity$ravenwood = ThreadLocal.withInitial(new IdentitySupplier());
    }

    /** @hide */
    @android.ravenwood.annotation.RavenwoodKeep
    public static void reset$ravenwood() {
        sIdentity$ravenwood = null;
    }

    /**
    /**
     * Raw native pointer to JavaBBinderHolder object. Owned by this Java object. Not null.
     * Raw native pointer to JavaBBinderHolder object. Owned by this Java object. Not null.
     */
     */
@@ -312,8 +342,14 @@ public class Binder implements IBinder {
     * Warning: oneway transactions do not receive PID.
     * Warning: oneway transactions do not receive PID.
     */
     */
    @CriticalNative
    @CriticalNative
    @android.ravenwood.annotation.RavenwoodReplace
    public static final native int getCallingPid();
    public static final native int getCallingPid();


    /** @hide */
    public static final int getCallingPid$ravenwood() {
        return Preconditions.requireNonNullViaRavenwoodRule(sIdentity$ravenwood).get().argi2;
    }

    /**
    /**
     * Return the Linux UID assigned to the process that sent you the
     * Return the Linux UID assigned to the process that sent you the
     * current transaction that is being processed. This UID can be used with
     * current transaction that is being processed. This UID can be used with
@@ -322,8 +358,14 @@ public class Binder implements IBinder {
     * incoming transaction, then its own UID is returned.
     * incoming transaction, then its own UID is returned.
     */
     */
    @CriticalNative
    @CriticalNative
    @android.ravenwood.annotation.RavenwoodReplace
    public static final native int getCallingUid();
    public static final native int getCallingUid();


    /** @hide */
    public static final int getCallingUid$ravenwood() {
        return Preconditions.requireNonNullViaRavenwoodRule(sIdentity$ravenwood).get().argi1;
    }

    /**
    /**
     * Returns {@code true} if the current thread is currently executing an
     * Returns {@code true} if the current thread is currently executing an
     * incoming transaction.
     * incoming transaction.
@@ -331,6 +373,7 @@ public class Binder implements IBinder {
     * @hide
     * @hide
     */
     */
    @CriticalNative
    @CriticalNative
    @android.ravenwood.annotation.RavenwoodReplace
    public static final native boolean isDirectlyHandlingTransactionNative();
    public static final native boolean isDirectlyHandlingTransactionNative();


    /** @hide */
    /** @hide */
@@ -344,6 +387,7 @@ public class Binder implements IBinder {
    /**
    /**
     * @hide
     * @hide
     */
     */
    @android.ravenwood.annotation.RavenwoodKeep
    public static final boolean isDirectlyHandlingTransaction() {
    public static final boolean isDirectlyHandlingTransaction() {
        return sIsHandlingBinderTransaction || isDirectlyHandlingTransactionNative();
        return sIsHandlingBinderTransaction || isDirectlyHandlingTransactionNative();
    }
    }
@@ -363,8 +407,15 @@ public class Binder implements IBinder {
    * @hide
    * @hide
    */
    */
    @CriticalNative
    @CriticalNative
    @android.ravenwood.annotation.RavenwoodReplace
    private static native boolean hasExplicitIdentity();
    private static native boolean hasExplicitIdentity();


    /** @hide */
    private static boolean hasExplicitIdentity$ravenwood() {
        return Preconditions.requireNonNullViaRavenwoodRule(sIdentity$ravenwood).get().arg1
                == Boolean.TRUE;
    }

    /**
    /**
     * Return the Linux UID assigned to the process that sent the transaction
     * Return the Linux UID assigned to the process that sent the transaction
     * currently being processed.
     * currently being processed.
@@ -373,6 +424,7 @@ public class Binder implements IBinder {
     * executing an incoming transaction and the calling identity has not been
     * executing an incoming transaction and the calling identity has not been
     * explicitly set with {@link #clearCallingIdentity()}
     * explicitly set with {@link #clearCallingIdentity()}
     */
     */
    @android.ravenwood.annotation.RavenwoodKeep
    public static final int getCallingUidOrThrow() {
    public static final int getCallingUidOrThrow() {
        if (!isDirectlyHandlingTransaction() && !hasExplicitIdentity()) {
        if (!isDirectlyHandlingTransaction() && !hasExplicitIdentity()) {
            throw new IllegalStateException(
            throw new IllegalStateException(
@@ -434,8 +486,26 @@ public class Binder implements IBinder {
     * @see #restoreCallingIdentity(long)
     * @see #restoreCallingIdentity(long)
     */
     */
    @CriticalNative
    @CriticalNative
    @android.ravenwood.annotation.RavenwoodReplace
    public static final native long clearCallingIdentity();
    public static final native long clearCallingIdentity();


    /** @hide */
    public static final long clearCallingIdentity$ravenwood() {
        final SomeArgs args = Preconditions.requireNonNullViaRavenwoodRule(
                sIdentity$ravenwood).get();
        long res = ((long) args.argi1 << 32) | args.argi2;
        if (args.arg1 == Boolean.TRUE) {
            res |= (0x1 << 30);
        } else {
            res &= ~(0x1 << 30);
        }
        // Match IPCThreadState behavior
        args.arg1 = Boolean.TRUE;
        args.argi1 = android.os.Process.myUid();
        args.argi2 = android.os.Process.myPid();
        return res;
    }

    /**
    /**
     * Restore the identity of the incoming IPC on the current thread
     * Restore the identity of the incoming IPC on the current thread
     * back to a previously identity that was returned by {@link
     * back to a previously identity that was returned by {@link
@@ -447,8 +517,18 @@ public class Binder implements IBinder {
     * @see #clearCallingIdentity
     * @see #clearCallingIdentity
     */
     */
    @CriticalNative
    @CriticalNative
    @android.ravenwood.annotation.RavenwoodReplace
    public static final native void restoreCallingIdentity(long token);
    public static final native void restoreCallingIdentity(long token);


    /** @hide */
    public static final void restoreCallingIdentity$ravenwood(long token) {
        final SomeArgs args = Preconditions.requireNonNullViaRavenwoodRule(
                sIdentity$ravenwood).get();
        args.arg1 = ((token & (0x1 << 30)) != 0) ? Boolean.TRUE : Boolean.FALSE;
        args.argi1 = (int) (token >> 32);
        args.argi2 = (int) (token & ~(0x1 << 30));
    }

    /**
    /**
     * Convenience method for running the provided action enclosed in
     * Convenience method for running the provided action enclosed in
     * {@link #clearCallingIdentity}/{@link #restoreCallingIdentity}.
     * {@link #clearCallingIdentity}/{@link #restoreCallingIdentity}.
@@ -644,8 +724,14 @@ public class Binder implements IBinder {
     * in order to prevent the process from holding on to objects longer than
     * in order to prevent the process from holding on to objects longer than
     * it needs to.
     * it needs to.
     */
     */
    @android.ravenwood.annotation.RavenwoodReplace
    public static final native void flushPendingCommands();
    public static final native void flushPendingCommands();


    /** @hide */
    public static final void flushPendingCommands$ravenwood() {
        // Ravenwood doesn't support IPC; ignored
    }

    /**
    /**
     * Add the calling thread to the IPC thread pool. This function does
     * Add the calling thread to the IPC thread pool. This function does
     * not return until the current process is exiting.
     * not return until the current process is exiting.
@@ -703,6 +789,7 @@ public class Binder implements IBinder {
     * <p>If you're creating a Binder token (a Binder object without an attached interface),
     * <p>If you're creating a Binder token (a Binder object without an attached interface),
     * you should use {@link #Binder(String)} instead.
     * you should use {@link #Binder(String)} instead.
     */
     */
    @android.ravenwood.annotation.RavenwoodKeep
    public Binder() {
    public Binder() {
        this(null);
        this(null);
    }
    }
@@ -719,6 +806,7 @@ public class Binder implements IBinder {
     * Instead of creating multiple tokens with the same descriptor, consider adding a suffix to
     * Instead of creating multiple tokens with the same descriptor, consider adding a suffix to
     * help identify them.
     * help identify them.
     */
     */
    @android.ravenwood.annotation.RavenwoodKeep
    public Binder(@Nullable String descriptor) {
    public Binder(@Nullable String descriptor) {
        mObject = getNativeBBinderHolder();
        mObject = getNativeBBinderHolder();
        if (mObject != 0L) {
        if (mObject != 0L) {
@@ -742,6 +830,7 @@ public class Binder implements IBinder {
     * will be implemented for you to return the given owner IInterface when
     * will be implemented for you to return the given owner IInterface when
     * the corresponding descriptor is requested.
     * the corresponding descriptor is requested.
     */
     */
    @android.ravenwood.annotation.RavenwoodKeep
    public void attachInterface(@Nullable IInterface owner, @Nullable String descriptor) {
    public void attachInterface(@Nullable IInterface owner, @Nullable String descriptor) {
        mOwner = owner;
        mOwner = owner;
        mDescriptor = descriptor;
        mDescriptor = descriptor;
@@ -750,6 +839,7 @@ public class Binder implements IBinder {
    /**
    /**
     * Default implementation returns an empty interface name.
     * Default implementation returns an empty interface name.
     */
     */
    @android.ravenwood.annotation.RavenwoodKeep
    public @Nullable String getInterfaceDescriptor() {
    public @Nullable String getInterfaceDescriptor() {
        return mDescriptor;
        return mDescriptor;
    }
    }
@@ -758,6 +848,7 @@ public class Binder implements IBinder {
     * Default implementation always returns true -- if you got here,
     * Default implementation always returns true -- if you got here,
     * the object is alive.
     * the object is alive.
     */
     */
    @android.ravenwood.annotation.RavenwoodKeep
    public boolean pingBinder() {
    public boolean pingBinder() {
        return true;
        return true;
    }
    }
@@ -768,6 +859,7 @@ public class Binder implements IBinder {
     * Note that if you're calling on a local binder, this always returns true
     * Note that if you're calling on a local binder, this always returns true
     * because your process is alive if you're calling it.
     * because your process is alive if you're calling it.
     */
     */
    @android.ravenwood.annotation.RavenwoodKeep
    public boolean isBinderAlive() {
    public boolean isBinderAlive() {
        return true;
        return true;
    }
    }
@@ -777,6 +869,7 @@ public class Binder implements IBinder {
     * to return the associated {@link IInterface} if it matches the requested
     * to return the associated {@link IInterface} if it matches the requested
     * descriptor.
     * descriptor.
     */
     */
    @android.ravenwood.annotation.RavenwoodKeep
    public @Nullable IInterface queryLocalInterface(@NonNull String descriptor) {
    public @Nullable IInterface queryLocalInterface(@NonNull String descriptor) {
        if (mDescriptor != null && mDescriptor.equals(descriptor)) {
        if (mDescriptor != null && mDescriptor.equals(descriptor)) {
            return mOwner;
            return mOwner;
@@ -1250,12 +1343,14 @@ public class Binder implements IBinder {
    /**
    /**
     * Local implementation is a no-op.
     * Local implementation is a no-op.
     */
     */
    @android.ravenwood.annotation.RavenwoodKeep
    public void linkToDeath(@NonNull DeathRecipient recipient, int flags) {
    public void linkToDeath(@NonNull DeathRecipient recipient, int flags) {
    }
    }


    /**
    /**
     * Local implementation is a no-op.
     * Local implementation is a no-op.
     */
     */
    @android.ravenwood.annotation.RavenwoodKeep
    public boolean unlinkToDeath(@NonNull DeathRecipient recipient, int flags) {
    public boolean unlinkToDeath(@NonNull DeathRecipient recipient, int flags) {
        return true;
        return true;
    }
    }
@@ -1283,6 +1378,7 @@ public class Binder implements IBinder {
        }
        }
    }
    }


    @android.ravenwood.annotation.RavenwoodReplace
    private static native long getNativeBBinderHolder();
    private static native long getNativeBBinderHolder();


    private static long getNativeBBinderHolder$ravenwood() {
    private static long getNativeBBinderHolder$ravenwood() {
+1 −0
Original line number Original line Diff line number Diff line
@@ -194,6 +194,7 @@ public interface IBinder {
     * Limit that should be placed on IPC sizes, in bytes, to keep them safely under the transaction
     * Limit that should be placed on IPC sizes, in bytes, to keep them safely under the transaction
     * buffer limit.
     * buffer limit.
     */
     */
    @android.ravenwood.annotation.RavenwoodKeep
    static int getSuggestedMaxIpcSizeBytes() {
    static int getSuggestedMaxIpcSizeBytes() {
        return MAX_IPC_SIZE;
        return MAX_IPC_SIZE;
    }
    }
+32 −0
Original line number Original line Diff line number Diff line
@@ -34,6 +34,9 @@ import android.system.StructPollfd;
import android.util.Pair;
import android.util.Pair;
import android.webkit.WebViewZygote;
import android.webkit.WebViewZygote;


import com.android.internal.os.SomeArgs;
import com.android.internal.util.Preconditions;

import dalvik.system.VMRuntime;
import dalvik.system.VMRuntime;


import libcore.io.IoUtils;
import libcore.io.IoUtils;
@@ -833,14 +836,37 @@ public class Process {
        return VMRuntime.getRuntime().is64Bit();
        return VMRuntime.getRuntime().is64Bit();
    }
    }


    private static SomeArgs sIdentity$ravenwood;

    /** @hide */
    @android.ravenwood.annotation.RavenwoodKeep
    public static void init$ravenwood(int uid, int pid) {
        final SomeArgs args = SomeArgs.obtain();
        args.argi1 = uid;
        args.argi2 = pid;
        sIdentity$ravenwood = args;
    }

    /** @hide */
    @android.ravenwood.annotation.RavenwoodKeep
    public static void reset$ravenwood() {
        sIdentity$ravenwood = null;
    }

    /**
    /**
     * Returns the identifier of this process, which can be used with
     * Returns the identifier of this process, which can be used with
     * {@link #killProcess} and {@link #sendSignal}.
     * {@link #killProcess} and {@link #sendSignal}.
     */
     */
    @android.ravenwood.annotation.RavenwoodReplace
    public static final int myPid() {
    public static final int myPid() {
        return Os.getpid();
        return Os.getpid();
    }
    }


    /** @hide */
    public static final int myPid$ravenwood() {
        return Preconditions.requireNonNullViaRavenwoodRule(sIdentity$ravenwood).argi2;
    }

    /**
    /**
     * Returns the identifier of this process' parent.
     * Returns the identifier of this process' parent.
     * @hide
     * @hide
@@ -864,10 +890,16 @@ public class Process {
     * app-specific sandbox.  It is different from {@link #myUserHandle} in that
     * app-specific sandbox.  It is different from {@link #myUserHandle} in that
     * a uid identifies a specific app sandbox in a specific user.
     * a uid identifies a specific app sandbox in a specific user.
     */
     */
    @android.ravenwood.annotation.RavenwoodReplace
    public static final int myUid() {
    public static final int myUid() {
        return Os.getuid();
        return Os.getuid();
    }
    }


    /** @hide */
    public static final int myUid$ravenwood() {
        return Preconditions.requireNonNullViaRavenwoodRule(sIdentity$ravenwood).argi1;
    }

    /**
    /**
     * Returns this process's user handle.  This is the
     * Returns this process's user handle.  This is the
     * user the process is running under.  It is distinct from
     * user the process is running under.  It is distinct from
+39 −0
Original line number Original line Diff line number Diff line
@@ -24,6 +24,7 @@ import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Context;
import android.location.ILocationManager;
import android.location.ILocationManager;
import android.location.LocationTime;
import android.location.LocationTime;
import android.text.format.DateUtils;
import android.util.Slog;
import android.util.Slog;


import dalvik.annotation.optimization.CriticalNative;
import dalvik.annotation.optimization.CriticalNative;
@@ -125,6 +126,7 @@ public final class SystemClock {
     *
     *
     * @param ms to sleep before returning, in milliseconds of uptime.
     * @param ms to sleep before returning, in milliseconds of uptime.
     */
     */
    @android.ravenwood.annotation.RavenwoodKeep
    public static void sleep(long ms)
    public static void sleep(long ms)
    {
    {
        long start = uptimeMillis();
        long start = uptimeMillis();
@@ -186,8 +188,16 @@ public final class SystemClock {
     * @return milliseconds of non-sleep uptime since boot.
     * @return milliseconds of non-sleep uptime since boot.
     */
     */
    @CriticalNative
    @CriticalNative
    @android.ravenwood.annotation.RavenwoodReplace
    native public static long uptimeMillis();
    native public static long uptimeMillis();


    /** @hide */
    public static long uptimeMillis$ravenwood() {
        // Ravenwood booted in Jan 2023, and has been in deep sleep for one week
        return System.currentTimeMillis() - (1672556400L * 1_000)
                - (DateUtils.WEEK_IN_MILLIS * 1_000);
    }

    /**
    /**
     * Returns nanoseconds since boot, not counting time spent in deep sleep.
     * Returns nanoseconds since boot, not counting time spent in deep sleep.
     *
     *
@@ -195,8 +205,16 @@ public final class SystemClock {
     * @hide
     * @hide
     */
     */
    @CriticalNative
    @CriticalNative
    @android.ravenwood.annotation.RavenwoodReplace
    public static native long uptimeNanos();
    public static native long uptimeNanos();


    /** @hide */
    public static long uptimeNanos$ravenwood() {
        // Ravenwood booted in Jan 2023, and has been in deep sleep for one week
        return System.nanoTime() - (1672556400L * 1_000_000_000)
                - (DateUtils.WEEK_IN_MILLIS * 1_000_000_000);
    }

    /**
    /**
     * Return {@link Clock} that starts at system boot, not counting time spent
     * Return {@link Clock} that starts at system boot, not counting time spent
     * in deep sleep.
     * in deep sleep.
@@ -218,8 +236,15 @@ public final class SystemClock {
     * @return elapsed milliseconds since boot.
     * @return elapsed milliseconds since boot.
     */
     */
    @CriticalNative
    @CriticalNative
    @android.ravenwood.annotation.RavenwoodReplace
    native public static long elapsedRealtime();
    native public static long elapsedRealtime();


    /** @hide */
    public static long elapsedRealtime$ravenwood() {
        // Ravenwood booted in Jan 2023, and has been in deep sleep for one week
        return System.currentTimeMillis() - (1672556400L * 1_000);
    }

    /**
    /**
     * Return {@link Clock} that starts at system boot, including time spent in
     * Return {@link Clock} that starts at system boot, including time spent in
     * sleep.
     * sleep.
@@ -241,8 +266,15 @@ public final class SystemClock {
     * @return elapsed nanoseconds since boot.
     * @return elapsed nanoseconds since boot.
     */
     */
    @CriticalNative
    @CriticalNative
    @android.ravenwood.annotation.RavenwoodReplace
    public static native long elapsedRealtimeNanos();
    public static native long elapsedRealtimeNanos();


    /** @hide */
    public static long elapsedRealtimeNanos$ravenwood() {
        // Ravenwood booted in Jan 2023, and has been in deep sleep for one week
        return System.nanoTime() - (1672556400L * 1_000_000_000);
    }

    /**
    /**
     * Returns milliseconds running in the current thread.
     * Returns milliseconds running in the current thread.
     *
     *
@@ -271,8 +303,15 @@ public final class SystemClock {
     */
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage
    @CriticalNative
    @CriticalNative
    @android.ravenwood.annotation.RavenwoodReplace
    public static native long currentTimeMicro();
    public static native long currentTimeMicro();


    /** @hide */
    public static long currentTimeMicro$ravenwood() {
        // Ravenwood booted in Jan 2023, and has been in deep sleep for one week
        return System.nanoTime() / 1000L;
    }

    /**
    /**
     * Returns milliseconds since January 1, 1970 00:00:00.0 UTC, synchronized
     * Returns milliseconds since January 1, 1970 00:00:00.0 UTC, synchronized
     * using a remote network source outside the device.
     * using a remote network source outside the device.
+9 −0
Original line number Original line Diff line number Diff line
@@ -40,6 +40,7 @@ import java.util.function.IntFunction;
/**
/**
 * Static utility methods for arrays that aren't already included in {@link java.util.Arrays}.
 * Static utility methods for arrays that aren't already included in {@link java.util.Arrays}.
 */
 */
@android.ravenwood.annotation.RavenwoodKeepWholeClass
public class ArrayUtils {
public class ArrayUtils {
    private static final int CACHE_SIZE = 73;
    private static final int CACHE_SIZE = 73;
    private static Object[] sCache = new Object[CACHE_SIZE];
    private static Object[] sCache = new Object[CACHE_SIZE];
@@ -48,35 +49,43 @@ public class ArrayUtils {


    private ArrayUtils() { /* cannot be instantiated */ }
    private ArrayUtils() { /* cannot be instantiated */ }


    @android.ravenwood.annotation.RavenwoodReplace
    public static byte[] newUnpaddedByteArray(int minLen) {
    public static byte[] newUnpaddedByteArray(int minLen) {
        return (byte[])VMRuntime.getRuntime().newUnpaddedArray(byte.class, minLen);
        return (byte[])VMRuntime.getRuntime().newUnpaddedArray(byte.class, minLen);
    }
    }


    @android.ravenwood.annotation.RavenwoodReplace
    public static char[] newUnpaddedCharArray(int minLen) {
    public static char[] newUnpaddedCharArray(int minLen) {
        return (char[])VMRuntime.getRuntime().newUnpaddedArray(char.class, minLen);
        return (char[])VMRuntime.getRuntime().newUnpaddedArray(char.class, minLen);
    }
    }


    @android.ravenwood.annotation.RavenwoodReplace
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    public static int[] newUnpaddedIntArray(int minLen) {
    public static int[] newUnpaddedIntArray(int minLen) {
        return (int[])VMRuntime.getRuntime().newUnpaddedArray(int.class, minLen);
        return (int[])VMRuntime.getRuntime().newUnpaddedArray(int.class, minLen);
    }
    }


    @android.ravenwood.annotation.RavenwoodReplace
    public static boolean[] newUnpaddedBooleanArray(int minLen) {
    public static boolean[] newUnpaddedBooleanArray(int minLen) {
        return (boolean[])VMRuntime.getRuntime().newUnpaddedArray(boolean.class, minLen);
        return (boolean[])VMRuntime.getRuntime().newUnpaddedArray(boolean.class, minLen);
    }
    }


    @android.ravenwood.annotation.RavenwoodReplace
    public static long[] newUnpaddedLongArray(int minLen) {
    public static long[] newUnpaddedLongArray(int minLen) {
        return (long[])VMRuntime.getRuntime().newUnpaddedArray(long.class, minLen);
        return (long[])VMRuntime.getRuntime().newUnpaddedArray(long.class, minLen);
    }
    }


    @android.ravenwood.annotation.RavenwoodReplace
    public static float[] newUnpaddedFloatArray(int minLen) {
    public static float[] newUnpaddedFloatArray(int minLen) {
        return (float[])VMRuntime.getRuntime().newUnpaddedArray(float.class, minLen);
        return (float[])VMRuntime.getRuntime().newUnpaddedArray(float.class, minLen);
    }
    }


    @android.ravenwood.annotation.RavenwoodReplace
    public static Object[] newUnpaddedObjectArray(int minLen) {
    public static Object[] newUnpaddedObjectArray(int minLen) {
        return (Object[])VMRuntime.getRuntime().newUnpaddedArray(Object.class, minLen);
        return (Object[])VMRuntime.getRuntime().newUnpaddedArray(Object.class, minLen);
    }
    }


    @android.ravenwood.annotation.RavenwoodReplace
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    @SuppressWarnings("unchecked")
    @SuppressWarnings("unchecked")
    public static <T> T[] newUnpaddedArray(Class<T> clazz, int minLen) {
    public static <T> T[] newUnpaddedArray(Class<T> clazz, int minLen) {
Loading