Squashed commits from aosp/master to mark some @CorePlatformApi as @SystemApi(MODULE_LIBRARIES) in sc-dev.
All these commits have been reviewed by API council.
After this commmit, the following 2 generated current.txt are identical.
api/module-lib-current.txt
mmodules/core_platform_api/api/stable_platform/current.txt
It's a squashed commit of the following cherry-picks from aosp/master:
4d2b9075 Mark stable dalvik.annotation.codegen.CovariantReturnType
0bbbd1bd Add explicit @hide javadoc and @CorePlatformApi and @IntraCoreApi to Compatibility.ChangeConfig
59b1f07c Annotate @CorePlatformApi(STABLE) APIs with @SystemApi(MODULE_LIBRARIES)
82f70f4b Annotate APIs in ojluni/ with @SystemApi(MODULE_LIBRARIES)
d61c64ab Mark stable @FastNative and @CriticalNative
fb26c7c4 Mark stable and document dalvik.system.DelegateLastClassLoader
919efd41 Make StructLinger and Os.get/setsockoptLinger @SystemApi(MODULE_LIBRARIES)
Bug: 154796679
Bug: 157639992
Bug: 165363822
Test: m droid
Merged-In: I3dbf33a1a08ae7ba591e8743bb97723fb7defb09
Change-Id: Iad2b230640411f06aca1fdeead5fa326ef4110d8
diff --git a/JavaLibrary.bp b/JavaLibrary.bp
index 6a0cf80..da67bc1 100644
--- a/JavaLibrary.bp
+++ b/JavaLibrary.bp
@@ -890,6 +890,13 @@
srcs: [
":core_oj_api_files",
":core_libart_api_files",
+
+ // Some source files in :core_oj_api_files and :openjdk_mmodule_extra_files are
+ // annotated by applying annotations to the .annotated.java stubs files in
+ // ojluni/annotated/mmodules and rather than in the original source. See the comments
+ // in openjdk_java_files.bp for more details.
+ ":openjdk_mmodule_extra_files",
+
],
libs: [
// Put framework-api-annotations into libs to avoid exposing the definition of framework's
@@ -921,8 +928,10 @@
droiddoc_options: [
rewrite_openjdk_doc_args,
"--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.* ",
+ "--hide-annotation libcore.api.Hide",
],
+ merge_inclusion_annotations_dirs: ["ojluni-annotated-mmodule-stubs"],
// Emit nullability annotations from the source to the stub files.
annotations_enabled: true,
diff --git a/api/module-lib-current.txt b/api/module-lib-current.txt
index 195abb7..9bdbd5c 100644
--- a/api/module-lib-current.txt
+++ b/api/module-lib-current.txt
@@ -1,6 +1,523 @@
// Signature format: 2.0
+package android.compat {
+
+ public final class Compatibility {
+ method public static void clearBehaviorChangeDelegate();
+ method public static void clearOverrides();
+ method public static boolean isChangeEnabled(long);
+ method public static void reportUnconditionalChange(long);
+ method public static void setBehaviorChangeDelegate(android.compat.Compatibility.BehaviorChangeDelegate);
+ method public static void setOverrides(android.compat.Compatibility.ChangeConfig);
+ }
+
+ public static interface Compatibility.BehaviorChangeDelegate {
+ method public default boolean isChangeEnabled(long);
+ method public default void onChangeReported(long);
+ }
+
+ public static final class Compatibility.ChangeConfig {
+ ctor public Compatibility.ChangeConfig(@NonNull java.util.Set<java.lang.Long>, @NonNull java.util.Set<java.lang.Long>);
+ method @NonNull public long[] getDisabledChangesArray();
+ method @NonNull public java.util.Set<java.lang.Long> getDisabledSet();
+ method @NonNull public long[] getEnabledChangesArray();
+ method @NonNull public java.util.Set<java.lang.Long> getEnabledSet();
+ method public boolean isEmpty();
+ method public boolean isForceDisabled(long);
+ method public boolean isForceEnabled(long);
+ }
+
+}
+
+package android.system {
+
+ public final class NetlinkSocketAddress extends java.net.SocketAddress {
+ ctor public NetlinkSocketAddress(int, int);
+ method public int getGroupsMask();
+ method public int getPortId();
+ }
+
+ public final class Os {
+ method @Nullable public static android.system.StructCapUserData[] capget(@NonNull android.system.StructCapUserHeader) throws android.system.ErrnoException;
+ method public static void capset(@NonNull android.system.StructCapUserHeader, @NonNull android.system.StructCapUserData[]) throws android.system.ErrnoException;
+ method public static int getpgid(int) throws android.system.ErrnoException;
+ method @Nullable public static android.system.StructRlimit getrlimit(int) throws android.system.ErrnoException;
+ method public static int getsockoptInt(@NonNull java.io.FileDescriptor, int, int) throws android.system.ErrnoException;
+ method @Nullable public static android.system.StructLinger getsockoptLinger(@NonNull java.io.FileDescriptor, int, int) throws android.system.ErrnoException;
+ method public static int ioctlInt(@NonNull java.io.FileDescriptor, int) throws android.system.ErrnoException;
+ method @Nullable public static java.io.FileDescriptor[] pipe2(int) throws android.system.ErrnoException;
+ method @Nullable public static String realpath(@Nullable String) throws android.system.ErrnoException;
+ method public static void setpgid(int, int) throws android.system.ErrnoException;
+ method public static void setregid(int, int) throws android.system.ErrnoException;
+ method public static void setreuid(int, int) throws android.system.ErrnoException;
+ method public static void setsockoptIfreq(@NonNull java.io.FileDescriptor, int, int, @Nullable String) throws android.system.ErrnoException;
+ method public static void setsockoptLinger(@NonNull java.io.FileDescriptor, int, int, @NonNull android.system.StructLinger) throws android.system.ErrnoException;
+ method public static long splice(@NonNull java.io.FileDescriptor, @Nullable android.system.Int64Ref, @NonNull java.io.FileDescriptor, @Nullable android.system.Int64Ref, long, int) throws android.system.ErrnoException;
+ method public static void unlink(@Nullable String) throws android.system.ErrnoException;
+ }
+
+ public final class OsConstants {
+ method public static int CAP_TO_INDEX(int);
+ method public static int CAP_TO_MASK(int);
+ field public static final int ARPHRD_LOOPBACK;
+ field public static final int EUSERS;
+ field public static final int MAP_POPULATE;
+ field public static final int O_DIRECT;
+ field public static final int PR_CAP_AMBIENT;
+ field public static final int PR_CAP_AMBIENT_RAISE;
+ field public static final int RLIMIT_NOFILE;
+ field public static final int RTMGRP_IPV4_IFADDR;
+ field public static final int SPLICE_F_MORE;
+ field public static final int SPLICE_F_MOVE;
+ field public static final int TIOCOUTQ;
+ field public static final int UDP_ENCAP;
+ field public static final int UDP_ENCAP_ESPINUDP;
+ field public static final int XATTR_CREATE;
+ field public static final int XATTR_REPLACE;
+ field public static final int _LINUX_CAPABILITY_VERSION_3;
+ }
+
+ public final class PacketSocketAddress extends java.net.SocketAddress {
+ ctor public PacketSocketAddress(int, int, byte[]);
+ }
+
+ public final class StructCapUserData {
+ ctor public StructCapUserData(int, int, int);
+ field public final int effective;
+ field public final int inheritable;
+ field public final int permitted;
+ }
+
+ public final class StructCapUserHeader {
+ ctor public StructCapUserHeader(int, int);
+ }
+
+ public final class StructLinger {
+ ctor public StructLinger(int, int);
+ method public boolean isOn();
+ field public final int l_linger;
+ }
+
+ public final class StructRlimit {
+ field public final long rlim_cur;
+ }
+
+ public final class UnixSocketAddress extends java.net.SocketAddress {
+ method public static android.system.UnixSocketAddress createFileSystem(String);
+ }
+
+ public final class VmSocketAddress extends java.net.SocketAddress {
+ ctor public VmSocketAddress(int, int);
+ method public int getSvmCid();
+ method public int getSvmPort();
+ }
+
+}
+
+package dalvik.annotation.codegen {
+
+ @java.lang.annotation.Repeatable(CovariantReturnType.CovariantReturnTypes.class) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD}) public @interface CovariantReturnType {
+ method public abstract int presentAfter();
+ method public abstract Class<?> returnType();
+ }
+
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD}) public static @interface CovariantReturnType.CovariantReturnTypes {
+ method public abstract dalvik.annotation.codegen.CovariantReturnType[] value();
+ }
+
+}
+
+package dalvik.annotation.optimization {
+
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) public @interface CriticalNative {
+ }
+
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) public @interface FastNative {
+ }
+
+}
+
+package dalvik.system {
+
+ public final class AnnotatedStackTraceElement {
+ method @Nullable public Object getBlockedOn();
+ method @Nullable public Object[] getHeldLocks();
+ method @NonNull public StackTraceElement getStackTraceElement();
+ }
+
+ public class AppSpecializationHooks {
+ method public static void handleCompatChangesBeforeBindingApplication();
+ }
+
+ public class BaseDexClassLoader extends java.lang.ClassLoader {
+ method public void addDexPath(@Nullable String);
+ method public void addNativePath(@NonNull java.util.Collection<java.lang.String>);
+ method @NonNull public String getLdLibraryPath();
+ method public void reportClassLoaderChain();
+ method public static void setReporter(@Nullable dalvik.system.BaseDexClassLoader.Reporter);
+ }
+
+ public static interface BaseDexClassLoader.Reporter {
+ method public void report(@NonNull java.util.Map<java.lang.String,java.lang.String>);
+ }
+
+ public final class BlockGuard {
+ method @NonNull public static dalvik.system.BlockGuard.Policy getThreadPolicy();
+ method @NonNull public static dalvik.system.BlockGuard.VmPolicy getVmPolicy();
+ method public static void setThreadPolicy(@NonNull dalvik.system.BlockGuard.Policy);
+ method public static void setVmPolicy(@NonNull dalvik.system.BlockGuard.VmPolicy);
+ field public static final dalvik.system.BlockGuard.Policy LAX_POLICY;
+ field public static final dalvik.system.BlockGuard.VmPolicy LAX_VM_POLICY;
+ }
+
+ public static interface BlockGuard.Policy {
+ method public int getPolicyMask();
+ method public void onReadFromDisk();
+ method public void onUnbufferedIO();
+ method public void onWriteToDisk();
+ }
+
+ public static interface BlockGuard.VmPolicy {
+ method public void onPathAccess(@NonNull String);
+ }
+
+ public final class CloseGuard {
+ method public void close();
+ method public static dalvik.system.CloseGuard get();
+ method public static dalvik.system.CloseGuard.Reporter getReporter();
+ method public void open(String);
+ method public void openWithCallSite(String, String);
+ method public static void setEnabled(boolean);
+ method public static void setReporter(dalvik.system.CloseGuard.Reporter);
+ method public void warnIfOpen();
+ }
+
+ public static interface CloseGuard.Reporter {
+ method public void report(String, Throwable);
+ method public default void report(String);
+ }
+
+ public final class DelegateLastClassLoader extends dalvik.system.PathClassLoader {
+ ctor public DelegateLastClassLoader(String, String, ClassLoader, ClassLoader[]);
+ }
+
+ @Deprecated public final class DexFile {
+ method @Deprecated @NonNull public static dalvik.system.DexFile.OptimizationInfo getDexFileOptimizationInfo(@NonNull String, @NonNull String) throws java.io.FileNotFoundException;
+ method @Deprecated @Nullable public static String[] getDexFileOutputPaths(@NonNull String, @NonNull String) throws java.io.FileNotFoundException;
+ method @Deprecated public static int getDexOptNeeded(@NonNull String, @NonNull String, @NonNull String, @Nullable String, boolean, boolean) throws java.io.FileNotFoundException, java.io.IOException;
+ method @Deprecated @NonNull public static String getSafeModeCompilerFilter(@NonNull String);
+ method @Deprecated public static boolean isProfileGuidedCompilerFilter(@NonNull String);
+ method @Deprecated public static boolean isValidCompilerFilter(@NonNull String);
+ field @Deprecated public static final int DEX2OAT_FOR_FILTER = 3; // 0x3
+ field @Deprecated public static final int NO_DEXOPT_NEEDED = 0; // 0x0
+ }
+
+ @Deprecated public static final class DexFile.OptimizationInfo {
+ method @Deprecated @NonNull public String getReason();
+ method @Deprecated @NonNull public String getStatus();
+ }
+
+ public class PathClassLoader extends dalvik.system.BaseDexClassLoader {
+ ctor public PathClassLoader(@NonNull String, @Nullable String, @Nullable ClassLoader, @Nullable ClassLoader[]);
+ }
+
+ public final class RuntimeHooks {
+ method public static void setTimeZoneIdSupplier(@NonNull java.util.function.Supplier<java.lang.String>);
+ method public static void setUncaughtExceptionPreHandler(@Nullable java.lang.Thread.UncaughtExceptionHandler);
+ }
+
+ public abstract class SocketTagger {
+ ctor public SocketTagger();
+ method public static dalvik.system.SocketTagger get();
+ method public static void set(dalvik.system.SocketTagger);
+ method public abstract void tag(java.io.FileDescriptor) throws java.net.SocketException;
+ method public final void tag(java.net.Socket) throws java.net.SocketException;
+ method public final void tag(java.net.DatagramSocket) throws java.net.SocketException;
+ method public abstract void untag(java.io.FileDescriptor) throws java.net.SocketException;
+ method public final void untag(java.net.Socket) throws java.net.SocketException;
+ method public final void untag(java.net.DatagramSocket) throws java.net.SocketException;
+ }
+
+ public final class VMDebug {
+ method public static void attachAgent(String, ClassLoader) throws java.io.IOException;
+ method public static long countInstancesOfClass(Class, boolean);
+ method public static long[] countInstancesOfClasses(Class[], boolean);
+ method public static void dumpHprofData(String) throws java.io.IOException;
+ method public static void dumpHprofData(String, java.io.FileDescriptor) throws java.io.IOException;
+ method public static void dumpHprofDataDdms();
+ method public static void dumpReferenceTables();
+ method public static int getAllocCount(int);
+ method @dalvik.annotation.optimization.FastNative public static int getLoadedClassCount();
+ method public static int getMethodTracingMode();
+ method public static String getRuntimeStat(String);
+ method public static java.util.Map<java.lang.String,java.lang.String> getRuntimeStats();
+ method public static String[] getVmFeatureList();
+ method @dalvik.annotation.optimization.FastNative public static boolean isDebuggerConnected();
+ method @dalvik.annotation.optimization.FastNative public static boolean isDebuggingEnabled();
+ method @dalvik.annotation.optimization.FastNative public static long lastDebuggerActivity();
+ method @dalvik.annotation.optimization.FastNative public static void printLoadedClasses(int);
+ method public static void resetAllocCount(int);
+ method public static void setAllocTrackerStackDepth(int);
+ method public static void startAllocCounting();
+ method public static void startMethodTracing(String, int, int, boolean, int);
+ method public static void startMethodTracing(String, java.io.FileDescriptor, int, int, boolean, int, boolean);
+ method public static void startMethodTracingDdms(int, int, boolean, int);
+ method public static void stopAllocCounting();
+ method public static void stopMethodTracing();
+ method @dalvik.annotation.optimization.FastNative public static long threadCpuTimeNanos();
+ field public static final int KIND_ALL_COUNTS = -1; // 0xffffffff
+ field public static final int KIND_GLOBAL_ALLOCATED_BYTES = 2; // 0x2
+ field public static final int KIND_GLOBAL_ALLOCATED_OBJECTS = 1; // 0x1
+ field public static final int KIND_GLOBAL_CLASS_INIT_COUNT = 32; // 0x20
+ field public static final int KIND_GLOBAL_CLASS_INIT_TIME = 64; // 0x40
+ field public static final int KIND_GLOBAL_FREED_BYTES = 8; // 0x8
+ field public static final int KIND_GLOBAL_FREED_OBJECTS = 4; // 0x4
+ field public static final int KIND_GLOBAL_GC_INVOCATIONS = 16; // 0x10
+ field public static final int KIND_THREAD_ALLOCATED_BYTES = 131072; // 0x20000
+ field public static final int KIND_THREAD_ALLOCATED_OBJECTS = 65536; // 0x10000
+ field public static final int KIND_THREAD_GC_INVOCATIONS = 1048576; // 0x100000
+ field public static final int TRACE_COUNT_ALLOCS = 1; // 0x1
+ }
+
+ public final class VMRuntime {
+ method @dalvik.annotation.optimization.FastNative public long addressOf(Object);
+ method public static void bootCompleted();
+ method public void clampGrowthLimit();
+ method public void clearGrowthLimit();
+ method public static String getCurrentInstructionSet();
+ method public static String getInstructionSet(String);
+ method public static dalvik.system.VMRuntime getRuntime();
+ method public int getTargetSdkVersion();
+ method @dalvik.annotation.optimization.FastNative public boolean is64Bit();
+ method public static boolean is64BitAbi(String);
+ method public static boolean is64BitInstructionSet(String);
+ method @dalvik.annotation.optimization.FastNative public boolean isCheckJniEnabled();
+ method @dalvik.annotation.optimization.FastNative public boolean isNativeDebuggable();
+ method public static boolean isValidClassLoaderContext(String);
+ method @dalvik.annotation.optimization.FastNative public Object newNonMovableArray(Class<?>, int);
+ method @dalvik.annotation.optimization.FastNative public Object newUnpaddedArray(Class<?>, int);
+ method public void notifyStartupCompleted();
+ method public void preloadDexCaches();
+ method public static void registerAppInfo(String, String, String, String[], int);
+ method public void registerNativeAllocation(long);
+ method @Deprecated public void registerNativeAllocation(int);
+ method public void registerNativeFree(long);
+ method @Deprecated public void registerNativeFree(int);
+ method public static void registerSensitiveThread();
+ method public void requestConcurrentGC();
+ method public static void resetJitCounters();
+ method public static void setDedupeHiddenApiWarnings(boolean);
+ method public void setDisabledCompatChanges(long[]);
+ method public void setHiddenApiAccessLogSamplingRate(int);
+ method public void setHiddenApiExemptions(String[]);
+ method public static void setHiddenApiUsageLogger(dalvik.system.VMRuntime.HiddenApiUsageLogger);
+ method public static void setNonSdkApiUsageConsumer(java.util.function.Consumer<java.lang.String>);
+ method public static void setProcessDataDirectory(String);
+ method public static void setProcessPackageName(String);
+ method public void setTargetSdkVersion(int);
+ method public void updateProcessState(int);
+ method public String vmInstructionSet();
+ method public String vmLibrary();
+ field public static final int CODE_PATH_TYPE_PRIMARY_APK = 1; // 0x1
+ field public static final int CODE_PATH_TYPE_SECONDARY_DEX = 4; // 0x4
+ field public static final int CODE_PATH_TYPE_SPLIT_APK = 2; // 0x2
+ field public static final int SDK_VERSION_CUR_DEVELOPMENT = 10000; // 0x2710
+ }
+
+ public static interface VMRuntime.HiddenApiUsageLogger {
+ method public void hiddenApiUsed(int, String, String, int, boolean);
+ field public static final int ACCESS_METHOD_JNI = 2; // 0x2
+ field public static final int ACCESS_METHOD_LINKING = 3; // 0x3
+ field public static final int ACCESS_METHOD_NONE = 0; // 0x0
+ field public static final int ACCESS_METHOD_REFLECTION = 1; // 0x1
+ }
+
+ public final class ZygoteHooks {
+ method public static void gcAndFinalize();
+ method public static boolean isIndefiniteThreadSuspensionSafe();
+ method public static void onBeginPreload();
+ method public static void onEndPreload();
+ method public static void postForkChild(int, boolean, boolean, String);
+ method public static void postForkCommon();
+ method public static void postForkSystemServer(int);
+ method public static void preFork();
+ method public static void startZygoteNoThreadCreation();
+ method public static void stopZygoteNoThreadCreation();
+ }
+
+}
+
+package java.io {
+
+ public final class FileDescriptor {
+ method public int getInt$();
+ method public void setInt$(int);
+ }
+
+ public class FileInputStream extends java.io.InputStream {
+ ctor public FileInputStream(java.io.FileDescriptor, boolean);
+ }
+
+}
+
+package java.lang {
+
+ public class Thread implements java.lang.Runnable {
+ method public static java.lang.Thread.UncaughtExceptionHandler getUncaughtExceptionPreHandler();
+ method public static void setUncaughtExceptionPreHandler(java.lang.Thread.UncaughtExceptionHandler);
+ }
+
+}
+
+package java.net {
+
+ public class DatagramSocket implements java.io.Closeable {
+ method public java.io.FileDescriptor getFileDescriptor$();
+ }
+
+ public final class Inet4Address extends java.net.InetAddress {
+ field public static final java.net.InetAddress ALL;
+ field public static final java.net.InetAddress ANY;
+ field public static final java.net.InetAddress LOOPBACK;
+ }
+
+ public final class Inet6Address extends java.net.InetAddress {
+ field public static final java.net.InetAddress ANY;
+ field public static final java.net.InetAddress LOOPBACK;
+ }
+
+ public class InetAddress implements java.io.Serializable {
+ method public static void clearDnsCache();
+ method @NonNull public static java.net.InetAddress[] getAllByNameOnNet(@Nullable String, int) throws java.net.UnknownHostException;
+ method @NonNull public static java.net.InetAddress getByNameOnNet(@Nullable String, int) throws java.net.UnknownHostException;
+ method @Deprecated public static boolean isNumeric(String);
+ method @Deprecated public static java.net.InetAddress parseNumericAddress(String);
+ }
+
+ public class Socket implements java.io.Closeable {
+ method public java.io.FileDescriptor getFileDescriptor$();
+ }
+
+ public abstract class SocketImpl implements java.net.SocketOptions {
+ method public java.io.FileDescriptor getFD$();
+ }
+
+}
+
+package java.nio {
+
+ public abstract class ByteBuffer extends java.nio.Buffer implements java.lang.Comparable<java.nio.ByteBuffer> {
+ method public void setAccessible(boolean);
+ }
+
+ public class DirectByteBuffer extends java.nio.MappedByteBuffer {
+ ctor public DirectByteBuffer(int, long, java.io.FileDescriptor, Runnable, boolean);
+ method public final long address();
+ method public final void setAccessible(boolean);
+ }
+
+ public final class NIOAccess {
+ method public static Object getBaseArray(java.nio.Buffer);
+ method public static int getBaseArrayOffset(java.nio.Buffer);
+ }
+
+ public final class NioUtils {
+ method public static void freeDirectBuffer(java.nio.ByteBuffer);
+ method public static byte[] unsafeArray(java.nio.ByteBuffer);
+ method public static int unsafeArrayOffset(java.nio.ByteBuffer);
+ }
+
+}
+
+package java.security {
+
+ public abstract class Provider extends java.util.Properties {
+ method public void warmUpServiceProvision();
+ }
+
+ public abstract class Signature extends java.security.SignatureSpi {
+ method public java.security.SignatureSpi getCurrentSpi();
+ }
+
+}
+
+package java.text {
+
+ public abstract class DateFormat extends java.text.Format {
+ method public static final void set24HourTimePref(Boolean);
+ }
+
+}
+
+package java.util {
+
+ public class LinkedHashMap<K, V> extends java.util.HashMap<K,V> implements java.util.Map<K,V> {
+ method public java.util.Map.Entry<K,V> eldest();
+ }
+
+}
+
+package java.util.zip {
+
+ public class ZipEntry implements java.lang.Cloneable {
+ method public long getDataOffset();
+ }
+
+}
+
+package javax.net.ssl {
+
+ public abstract class HttpsURLConnection extends java.net.HttpURLConnection {
+ method public static javax.net.ssl.HostnameVerifier getStrictHostnameVerifier();
+ }
+
+}
+
+package libcore.content.type {
+
+ public final class MimeMap {
+ method @NonNull public libcore.content.type.MimeMap.Builder buildUpon();
+ method @NonNull public static libcore.content.type.MimeMap.Builder builder();
+ method @NonNull public java.util.Set<java.lang.String> extensions();
+ method @NonNull public static libcore.content.type.MimeMap getDefault();
+ method @Nullable public String guessExtensionFromMimeType(@Nullable String);
+ method @Nullable public String guessMimeTypeFromExtension(@Nullable String);
+ method public boolean hasExtension(@Nullable String);
+ method public boolean hasMimeType(@Nullable String);
+ method @NonNull public java.util.Set<java.lang.String> mimeTypes();
+ method public static void setDefaultSupplier(@NonNull java.util.function.Supplier<libcore.content.type.MimeMap>);
+ }
+
+ public static final class MimeMap.Builder {
+ method @NonNull public libcore.content.type.MimeMap.Builder addMimeMapping(@NonNull String, @NonNull java.util.List<java.lang.String>);
+ method @NonNull public libcore.content.type.MimeMap build();
+ }
+
+}
+
package libcore.io {
+ public class ForwardingOs implements libcore.io.Os {
+ ctor protected ForwardingOs(@NonNull libcore.io.Os);
+ method public boolean access(@Nullable String, int) throws android.system.ErrnoException;
+ method public java.io.FileDescriptor open(@Nullable String, int, int) throws android.system.ErrnoException;
+ method public void remove(@Nullable String) throws android.system.ErrnoException;
+ method public void rename(@Nullable String, @Nullable String) throws android.system.ErrnoException;
+ method @Nullable public android.system.StructStat stat(@Nullable String) throws android.system.ErrnoException;
+ method public void unlink(@Nullable String) throws android.system.ErrnoException;
+ }
+
+ public final class IoUtils {
+ method public static int acquireRawFd(@NonNull java.io.FileDescriptor);
+ method public static void close(@Nullable java.io.FileDescriptor) throws java.io.IOException;
+ method public static void closeQuietly(@Nullable AutoCloseable);
+ method public static void closeQuietly(@Nullable java.io.FileDescriptor);
+ method public static void closeQuietly(@Nullable java.net.Socket);
+ method @NonNull public static byte[] readFileAsByteArray(@NonNull String) throws java.io.IOException;
+ method @NonNull public static String readFileAsString(@NonNull String) throws java.io.IOException;
+ method public static void setBlocking(@NonNull java.io.FileDescriptor, boolean) throws java.io.IOException;
+ method public static void setFdOwner(@NonNull java.io.FileDescriptor, @NonNull Object);
+ }
+
public final class Memory {
method public static void memmove(@NonNull Object, int, @NonNull Object, int, long);
method public static int peekInt(@NonNull byte[], int, @NonNull java.nio.ByteOrder);
@@ -10,5 +527,270 @@
method public static void pokeShort(@NonNull byte[], int, short, @NonNull java.nio.ByteOrder);
}
+ public interface Os {
+ method public static boolean compareAndSetDefault(libcore.io.Os, libcore.io.Os);
+ method public static libcore.io.Os getDefault();
+ }
+
+ public final class Streams {
+ method public static int copy(@NonNull java.io.InputStream, @NonNull java.io.OutputStream) throws java.io.IOException;
+ method public static void readFully(@NonNull java.io.InputStream, @NonNull byte[]) throws java.io.IOException;
+ method @NonNull public static byte[] readFully(@NonNull java.io.InputStream) throws java.io.IOException;
+ method @NonNull public static String readFully(@NonNull java.io.Reader) throws java.io.IOException;
+ method @NonNull public static byte[] readFullyNoClose(@NonNull java.io.InputStream) throws java.io.IOException;
+ method public static int readSingleByte(@NonNull java.io.InputStream) throws java.io.IOException;
+ method public static long skipByReading(@NonNull java.io.InputStream, long) throws java.io.IOException;
+ method public static void writeSingleByte(@NonNull java.io.OutputStream, int) throws java.io.IOException;
+ }
+
+}
+
+package libcore.net {
+
+ public class InetAddressUtils {
+ method public static boolean isNumericAddress(String);
+ method public static java.net.InetAddress parseNumericAddress(String);
+ }
+
+ public abstract class NetworkSecurityPolicy {
+ ctor public NetworkSecurityPolicy();
+ method public static libcore.net.NetworkSecurityPolicy getInstance();
+ method public abstract boolean isCertificateTransparencyVerificationRequired(String);
+ method public abstract boolean isCleartextTrafficPermitted();
+ method public abstract boolean isCleartextTrafficPermitted(String);
+ method public static void setInstance(libcore.net.NetworkSecurityPolicy);
+ }
+
+}
+
+package libcore.net.event {
+
+ public final class NetworkEventDispatcher {
+ method public void dispatchNetworkConfigurationChange();
+ method public static libcore.net.event.NetworkEventDispatcher getInstance();
+ }
+
+}
+
+package libcore.net.http {
+
+ public interface Dns {
+ method @NonNull public java.util.List<java.net.InetAddress> lookup(@Nullable String) throws java.net.UnknownHostException;
+ }
+
+ public class HttpURLConnectionFactory {
+ method @NonNull public static libcore.net.http.HttpURLConnectionFactory createInstance();
+ method public java.net.URLConnection openConnection(@NonNull java.net.URL, @NonNull javax.net.SocketFactory, @NonNull java.net.Proxy) throws java.io.IOException;
+ method public void setDns(@NonNull libcore.net.http.Dns);
+ method public void setNewConnectionPool(int, long, @NonNull java.util.concurrent.TimeUnit);
+ }
+
+}
+
+package libcore.util {
+
+ public final class FP16 {
+ method public static short ceil(short);
+ method public static int compare(short, short);
+ method public static boolean equals(short, short);
+ method public static short floor(short);
+ method public static boolean greater(short, short);
+ method public static boolean greaterEquals(short, short);
+ method public static boolean isInfinite(short);
+ method public static boolean isNaN(short);
+ method public static boolean isNormalized(short);
+ method public static boolean less(short, short);
+ method public static boolean lessEquals(short, short);
+ method public static short max(short, short);
+ method public static short min(short, short);
+ method public static short rint(short);
+ method public static float toFloat(short);
+ method public static short toHalf(float);
+ method public static String toHexString(short);
+ method public static short trunc(short);
+ field public static final short EPSILON = 5120; // 0x1400
+ field public static final int EXPONENT_BIAS = 15; // 0xf
+ field public static final int EXPONENT_SHIFT = 10; // 0xa
+ field public static final int EXPONENT_SIGNIFICAND_MASK = 32767; // 0x7fff
+ field public static final short LOWEST_VALUE = -1025; // 0xfffffbff
+ field public static final int MAX_EXPONENT = 15; // 0xf
+ field public static final short MAX_VALUE = 31743; // 0x7bff
+ field public static final int MIN_EXPONENT = -14; // 0xfffffff2
+ field public static final short MIN_NORMAL = 1024; // 0x400
+ field public static final short MIN_VALUE = 1; // 0x1
+ field public static final short NEGATIVE_INFINITY = -1024; // 0xfffffc00
+ field public static final short NEGATIVE_ZERO = -32768; // 0xffff8000
+ field public static final short NaN = 32256; // 0x7e00
+ field public static final short POSITIVE_INFINITY = 31744; // 0x7c00
+ field public static final short POSITIVE_ZERO = 0; // 0x0
+ field public static final int SHIFTED_EXPONENT_MASK = 31; // 0x1f
+ field public static final int SIGNIFICAND_MASK = 1023; // 0x3ff
+ field public static final int SIGN_MASK = 32768; // 0x8000
+ field public static final int SIGN_SHIFT = 15; // 0xf
+ field public static final int SIZE = 16; // 0x10
+ }
+
+ public class HexEncoding {
+ method public static byte[] decode(String) throws java.lang.IllegalArgumentException;
+ method public static byte[] decode(String, boolean) throws java.lang.IllegalArgumentException;
+ method public static byte[] decode(char[]) throws java.lang.IllegalArgumentException;
+ method public static byte[] decode(char[], boolean) throws java.lang.IllegalArgumentException;
+ method public static char[] encode(byte[]);
+ method public static char[] encode(byte[], boolean);
+ method public static char[] encode(byte[], int, int);
+ method public static String encodeToString(byte, boolean);
+ method public static String encodeToString(byte[]);
+ method public static String encodeToString(byte[], boolean);
+ }
+
+ public class NativeAllocationRegistry {
+ ctor public NativeAllocationRegistry(@NonNull ClassLoader, long, long);
+ method public static void applyFreeFunction(long, long);
+ method public static libcore.util.NativeAllocationRegistry createMalloced(@NonNull ClassLoader, long, long);
+ method public static libcore.util.NativeAllocationRegistry createMalloced(@NonNull ClassLoader, long);
+ method public static libcore.util.NativeAllocationRegistry createNonmalloced(@NonNull ClassLoader, long, long);
+ method @NonNull public Runnable registerNativeAllocation(@NonNull Object, long);
+ }
+
+ public class SneakyThrow {
+ method public static void sneakyThrow(@NonNull Throwable);
+ }
+
+ public class XmlObjectFactory {
+ method @NonNull public static org.xml.sax.XMLReader newXMLReader();
+ method @NonNull public static org.xmlpull.v1.XmlPullParser newXmlPullParser();
+ method @NonNull public static org.xmlpull.v1.XmlSerializer newXmlSerializer();
+ }
+
+}
+
+package org.apache.harmony.dalvik.ddmc {
+
+ public class Chunk {
+ ctor public Chunk(int, byte[], int, int);
+ ctor public Chunk(int, java.nio.ByteBuffer);
+ field public int type;
+ }
+
+ public abstract class ChunkHandler {
+ ctor public ChunkHandler();
+ method public static org.apache.harmony.dalvik.ddmc.Chunk createFailChunk(int, String);
+ method public abstract org.apache.harmony.dalvik.ddmc.Chunk handleChunk(org.apache.harmony.dalvik.ddmc.Chunk);
+ method public static String name(int);
+ method public abstract void onConnected();
+ method public abstract void onDisconnected();
+ method public static int type(String);
+ method public static java.nio.ByteBuffer wrapChunk(org.apache.harmony.dalvik.ddmc.Chunk);
+ field public static final java.nio.ByteOrder CHUNK_ORDER;
+ }
+
+ public final class DdmServer {
+ method public static void registerHandler(int, org.apache.harmony.dalvik.ddmc.ChunkHandler);
+ method public static void registrationComplete();
+ method public static void sendChunk(org.apache.harmony.dalvik.ddmc.Chunk);
+ method public static org.apache.harmony.dalvik.ddmc.ChunkHandler unregisterHandler(int);
+ }
+
+ public final class DdmVmInternal {
+ method public static void setRecentAllocationsTrackingEnabled(boolean);
+ method public static void setThreadNotifyEnabled(boolean);
+ }
+
+}
+
+package org.json {
+
+ public class JSONObject {
+ method @NonNull public java.util.Set<java.lang.String> keySet();
+ }
+
+}
+
+package sun.misc {
+
+ public class Cleaner extends java.lang.ref.PhantomReference<java.lang.Object> {
+ method public void clean();
+ method public static sun.misc.Cleaner create(Object, Runnable);
+ }
+
+ public final class Unsafe {
+ method public int arrayBaseOffset(Class);
+ method public int arrayIndexScale(Class);
+ method @dalvik.annotation.optimization.FastNative public void copyMemory(long, long, long);
+ method @dalvik.annotation.optimization.FastNative public boolean getBoolean(Object, long);
+ method @dalvik.annotation.optimization.FastNative public byte getByte(Object, long);
+ method @dalvik.annotation.optimization.FastNative public byte getByte(long);
+ method @dalvik.annotation.optimization.FastNative public double getDouble(Object, long);
+ method @dalvik.annotation.optimization.FastNative public double getDouble(long);
+ method @dalvik.annotation.optimization.FastNative public float getFloat(Object, long);
+ method @dalvik.annotation.optimization.FastNative public float getFloat(long);
+ method @dalvik.annotation.optimization.FastNative public int getInt(Object, long);
+ method @dalvik.annotation.optimization.FastNative public int getInt(long);
+ method @dalvik.annotation.optimization.FastNative public long getLong(Object, long);
+ method @dalvik.annotation.optimization.FastNative public long getLong(long);
+ method @dalvik.annotation.optimization.FastNative public Object getObject(Object, long);
+ method public static sun.misc.Unsafe getUnsafe();
+ method public long objectFieldOffset(java.lang.reflect.Field);
+ method @dalvik.annotation.optimization.FastNative public void putBoolean(Object, long, boolean);
+ method @dalvik.annotation.optimization.FastNative public void putByte(Object, long, byte);
+ method @dalvik.annotation.optimization.FastNative public void putByte(long, byte);
+ method @dalvik.annotation.optimization.FastNative public void putDouble(Object, long, double);
+ method @dalvik.annotation.optimization.FastNative public void putDouble(long, double);
+ method @dalvik.annotation.optimization.FastNative public void putFloat(Object, long, float);
+ method @dalvik.annotation.optimization.FastNative public void putFloat(long, float);
+ method @dalvik.annotation.optimization.FastNative public void putInt(Object, long, int);
+ method @dalvik.annotation.optimization.FastNative public void putInt(long, int);
+ method @dalvik.annotation.optimization.FastNative public void putLong(Object, long, long);
+ method @dalvik.annotation.optimization.FastNative public void putLong(long, long);
+ method @dalvik.annotation.optimization.FastNative public void putObject(Object, long, Object);
+ }
+
+}
+
+package sun.security.jca {
+
+ public class Providers {
+ method public static Object startJarVerification();
+ method public static void stopJarVerification(Object);
+ }
+
+}
+
+package sun.security.pkcs {
+
+ public class PKCS7 {
+ ctor public PKCS7(java.io.InputStream) throws java.io.IOException, sun.security.pkcs.ParsingException;
+ ctor public PKCS7(byte[]) throws sun.security.pkcs.ParsingException;
+ method public java.security.cert.X509Certificate[] getCertificates();
+ method public sun.security.pkcs.SignerInfo[] getSignerInfos();
+ method public sun.security.pkcs.SignerInfo verify(sun.security.pkcs.SignerInfo, java.io.InputStream) throws java.io.IOException, java.security.NoSuchAlgorithmException, java.security.SignatureException;
+ method public sun.security.pkcs.SignerInfo[] verify(byte[]) throws java.security.NoSuchAlgorithmException, java.security.SignatureException;
+ }
+
+ public class ParsingException extends java.io.IOException {
+ }
+
+ public class SignerInfo {
+ ctor public SignerInfo();
+ method public java.util.ArrayList<java.security.cert.X509Certificate> getCertificateChain(sun.security.pkcs.PKCS7) throws java.io.IOException;
+ }
+
+}
+
+package sun.security.util {
+
+ public final class ObjectIdentifier implements java.io.Serializable {
+ ctor public ObjectIdentifier(String) throws java.io.IOException;
+ }
+
+}
+
+package sun.security.x509 {
+
+ public class AlgorithmId implements java.io.Serializable {
+ ctor public AlgorithmId(sun.security.util.ObjectIdentifier);
+ method public String getName();
+ }
+
}
diff --git a/dalvik/src/main/java/dalvik/annotation/codegen/CovariantReturnType.java b/dalvik/src/main/java/dalvik/annotation/codegen/CovariantReturnType.java
index 21d3aeb..95a87af 100644
--- a/dalvik/src/main/java/dalvik/annotation/codegen/CovariantReturnType.java
+++ b/dalvik/src/main/java/dalvik/annotation/codegen/CovariantReturnType.java
@@ -16,12 +16,15 @@
package dalvik.annotation.codegen;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-import libcore.api.CorePlatformApi;
/**
* Indicates to the platform toolchain that there is an upcoming public SDK API change for a method.
@@ -61,7 +64,8 @@
@Repeatable(CovariantReturnType.CovariantReturnTypes.class)
@Retention(RetentionPolicy.CLASS)
@Target({ ElementType.METHOD})
-@CorePlatformApi
+@SystemApi(client = MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public @interface CovariantReturnType {
/**
@@ -70,7 +74,8 @@
*
* @hide
*/
- @CorePlatformApi
+ @SystemApi(client = MODULE_LIBRARIES)
+ @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
Class<?> returnType();
/**
@@ -79,16 +84,19 @@
*
* @hide
*/
- @CorePlatformApi
+ @SystemApi(client = MODULE_LIBRARIES)
+ @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
int presentAfter();
/** @hide */
@Retention(RetentionPolicy.CLASS)
@Target({ElementType.METHOD})
- @CorePlatformApi
+ @SystemApi(client = MODULE_LIBRARIES)
+ @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@interface CovariantReturnTypes {
- @CorePlatformApi
/** @hide */
+ @SystemApi(client = MODULE_LIBRARIES)
+ @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
CovariantReturnType[] value();
}
}
diff --git a/dalvik/src/main/java/dalvik/annotation/optimization/CriticalNative.java b/dalvik/src/main/java/dalvik/annotation/optimization/CriticalNative.java
index c64aa5f..0dac897 100644
--- a/dalvik/src/main/java/dalvik/annotation/optimization/CriticalNative.java
+++ b/dalvik/src/main/java/dalvik/annotation/optimization/CriticalNative.java
@@ -16,6 +16,10 @@
package dalvik.annotation.optimization;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -93,7 +97,8 @@
*
* @hide
*/
-@libcore.api.CorePlatformApi
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@SystemApi(client = MODULE_LIBRARIES)
@Retention(RetentionPolicy.CLASS) // Save memory, don't instantiate as an object at runtime.
@Target(ElementType.METHOD)
public @interface CriticalNative {}
diff --git a/dalvik/src/main/java/dalvik/annotation/optimization/FastNative.java b/dalvik/src/main/java/dalvik/annotation/optimization/FastNative.java
index 847e4df..db3efe0 100644
--- a/dalvik/src/main/java/dalvik/annotation/optimization/FastNative.java
+++ b/dalvik/src/main/java/dalvik/annotation/optimization/FastNative.java
@@ -16,6 +16,10 @@
package dalvik.annotation.optimization;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -72,7 +76,8 @@
*
* @hide
*/
-@libcore.api.CorePlatformApi
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.IntraCoreApi
@Retention(RetentionPolicy.CLASS) // Save memory, don't instantiate as an object at runtime.
@Target(ElementType.METHOD)
diff --git a/dalvik/src/main/java/dalvik/system/AppSpecializationHooks.java b/dalvik/src/main/java/dalvik/system/AppSpecializationHooks.java
index b95aa62..e311902 100644
--- a/dalvik/src/main/java/dalvik/system/AppSpecializationHooks.java
+++ b/dalvik/src/main/java/dalvik/system/AppSpecializationHooks.java
@@ -16,13 +16,16 @@
package dalvik.system;
-import libcore.api.CorePlatformApi;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
/**
* Used by frameworks to specialize libcore in an app process.
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public class AppSpecializationHooks {
@@ -39,6 +42,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void handleCompatChangesBeforeBindingApplication() {
com.android.i18n.system.AppSpecializationHooks
diff --git a/dalvik/src/main/java/dalvik/system/BaseDexClassLoader.java b/dalvik/src/main/java/dalvik/system/BaseDexClassLoader.java
index 20f4c3d..60511a9 100644
--- a/dalvik/src/main/java/dalvik/system/BaseDexClassLoader.java
+++ b/dalvik/src/main/java/dalvik/system/BaseDexClassLoader.java
@@ -16,6 +16,9 @@
package dalvik.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import java.io.File;
import java.io.IOException;
@@ -141,6 +144,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public void reportClassLoaderChain() {
if (reporter == null) {
@@ -229,6 +233,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public void addDexPath(@Nullable String dexPath) {
addDexPath(dexPath, false /*isTrusted*/);
@@ -250,6 +255,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public void addNativePath(@NonNull Collection<String> libPaths) {
pathList.addNativePath(libPaths);
@@ -346,6 +352,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public @NonNull String getLdLibraryPath() {
StringBuilder result = new StringBuilder();
@@ -371,6 +378,7 @@
* @param newReporter the new Reporter. Setting {@code null} will cancel reporting.
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void setReporter(@Nullable Reporter newReporter) {
reporter = newReporter;
@@ -389,6 +397,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public interface Reporter {
/**
@@ -403,6 +412,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
void report(@NonNull Map<String, String> contextsMap);
}
diff --git a/dalvik/src/main/java/dalvik/system/BlockGuard.java b/dalvik/src/main/java/dalvik/system/BlockGuard.java
index 6a5e26b..3472f70 100644
--- a/dalvik/src/main/java/dalvik/system/BlockGuard.java
+++ b/dalvik/src/main/java/dalvik/system/BlockGuard.java
@@ -16,6 +16,9 @@
package dalvik.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import java.util.Objects;
@@ -34,6 +37,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
public final class BlockGuard {
@@ -46,6 +50,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
public interface Policy {
@@ -54,6 +59,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
void onWriteToDisk();
@@ -63,6 +69,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
void onReadFromDisk();
@@ -80,6 +87,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
void onUnbufferedIO();
@@ -100,6 +108,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
int getPolicyMask();
}
@@ -108,6 +117,7 @@
* Per-process interface used to implement {@code StrictMode.VmPolicy}.
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public interface VmPolicy {
/**
@@ -131,6 +141,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
void onPathAccess(@NonNull String path);
}
@@ -188,6 +199,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final Policy LAX_POLICY = new Policy() {
@Override public String toString() { return "LAX_POLICY"; }
@@ -208,6 +220,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final VmPolicy LAX_VM_POLICY = new VmPolicy() {
@Override public String toString() { return "LAX_VM_POLICY"; }
@@ -232,6 +245,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
public static @NonNull Policy getThreadPolicy() {
@@ -250,6 +264,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void setThreadPolicy(@NonNull Policy policy) {
threadPolicy.set(Objects.requireNonNull(policy));
@@ -263,6 +278,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static @NonNull VmPolicy getVmPolicy() {
return vmPolicy;
@@ -279,6 +295,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void setVmPolicy(@NonNull VmPolicy policy) {
vmPolicy = Objects.requireNonNull(policy);
diff --git a/dalvik/src/main/java/dalvik/system/CloseGuard.java b/dalvik/src/main/java/dalvik/system/CloseGuard.java
index 124892b..959a5a3 100644
--- a/dalvik/src/main/java/dalvik/system/CloseGuard.java
+++ b/dalvik/src/main/java/dalvik/system/CloseGuard.java
@@ -16,6 +16,9 @@
package dalvik.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
/**
@@ -110,6 +113,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
public final class CloseGuard {
@@ -146,6 +150,7 @@
* @hide
*/
@UnsupportedAppUsage(trackingBug=111170242)
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
public static CloseGuard get() {
@@ -164,6 +169,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void setEnabled(boolean enabled) {
CloseGuard.stackAndTrackingEnabled = enabled;
@@ -187,6 +193,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void setReporter(Reporter rep) {
if (rep == null) {
@@ -202,6 +209,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static Reporter getReporter() {
return reporter;
@@ -248,6 +256,7 @@
* @hide
*/
@UnsupportedAppUsage(trackingBug=111170242)
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
public void open(String closer) {
@@ -266,6 +275,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public void openWithCallSite(String closer, String callsite) {
// always perform the check for valid API usage...
@@ -304,6 +314,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
public void close() {
@@ -325,6 +336,7 @@
* @hide
*/
@UnsupportedAppUsage(trackingBug=111170242)
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
public void warnIfOpen() {
@@ -358,6 +370,7 @@
* Interface to allow customization of reporting behavior.
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public interface Reporter {
/**
@@ -365,6 +378,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
void report(String message, Throwable allocationSite);
@@ -372,6 +386,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
default void report(String message) {}
}
diff --git a/dalvik/src/main/java/dalvik/system/DelegateLastClassLoader.java b/dalvik/src/main/java/dalvik/system/DelegateLastClassLoader.java
index 9481e3f..5966139 100644
--- a/dalvik/src/main/java/dalvik/system/DelegateLastClassLoader.java
+++ b/dalvik/src/main/java/dalvik/system/DelegateLastClassLoader.java
@@ -16,6 +16,10 @@
package dalvik.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import sun.misc.CompoundEnumeration;
import java.io.IOException;
@@ -104,9 +108,32 @@
}
/**
+ * Creates a {@code DelegateLastClassLoader} that operates on a given {@code dexPath}
+ * and a {@code librarySearchPath}.
+ *
+ * The {@code dexPath} should consist of one or more of the following, separated by
+ * {@code File.pathSeparator}, which is {@code ":"} on Android.
+ *
+ * <ul>
+ * <li>JAR/ZIP/APK files, possibly containing a "classes.dex" file as well as arbitrary
+ * resources.
+ * <li>Raw ".dex" files (not inside a zip file).
+ * </ul>
+ *
+ * @param dexPath the list of jar/apk files containing classes and resources, delimited by
+ * {@code File.pathSeparator}, which defaults to {@code ":"} on Android.
+ * @param librarySearchPath the list of directories containing native libraries, delimited
+ * by {@code File.pathSeparator}; may be {@code null}.
+ * @param parent the parent class loader. May be {@code null} for the boot classloader.
+ * @param sharedLibraryLoaders class loaders of Java shared libraries
+ * used by this new class loader. The shared library loaders are
+ * always checked before the {@code dexPath} when looking
+ * up classes and resources.
+ *
* @hide
*/
- @libcore.api.CorePlatformApi
+ @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+ @SystemApi(client = MODULE_LIBRARIES)
public DelegateLastClassLoader(
String dexPath, String librarySearchPath, ClassLoader parent,
ClassLoader[] sharedLibraryLoaders) {
diff --git a/dalvik/src/main/java/dalvik/system/DexFile.java b/dalvik/src/main/java/dalvik/system/DexFile.java
index 6db4a58..f8e7f42 100644
--- a/dalvik/src/main/java/dalvik/system/DexFile.java
+++ b/dalvik/src/main/java/dalvik/system/DexFile.java
@@ -16,6 +16,9 @@
package dalvik.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import android.system.ErrnoException;
@@ -461,6 +464,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int NO_DEXOPT_NEEDED = 0;
@@ -491,6 +495,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int DEX2OAT_FOR_FILTER = 3;
@@ -538,6 +543,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native int getDexOptNeeded(@NonNull String fileName,
@NonNull String instructionSet, @NonNull String compilerFilter, @Nullable String classLoaderContext,
@@ -563,6 +569,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final class OptimizationInfo {
// The human readable refined optimization status of the validity of the odex file.
@@ -583,6 +590,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public @NonNull String getStatus() {
return status;
@@ -595,6 +603,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public @NonNull String getReason() {
return reason;
@@ -611,6 +620,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static @NonNull OptimizationInfo getDexFileOptimizationInfo(
@NonNull String fileName, @NonNull String instructionSet) throws FileNotFoundException {
@@ -644,6 +654,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native @Nullable String[] getDexFileOutputPaths(@NonNull String fileName, @NonNull String instructionSet)
throws FileNotFoundException;
@@ -656,6 +667,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public native static boolean isValidCompilerFilter(@NonNull String filter);
@@ -667,6 +679,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public native static boolean isProfileGuidedCompilerFilter(@NonNull String filter);
@@ -692,6 +705,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public native static @NonNull String getSafeModeCompilerFilter(@NonNull String filter);
diff --git a/dalvik/src/main/java/dalvik/system/PathClassLoader.java b/dalvik/src/main/java/dalvik/system/PathClassLoader.java
index d5d17f3..1b74cd9 100644
--- a/dalvik/src/main/java/dalvik/system/PathClassLoader.java
+++ b/dalvik/src/main/java/dalvik/system/PathClassLoader.java
@@ -16,6 +16,10 @@
package dalvik.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import libcore.util.NonNull;
import libcore.util.Nullable;
@@ -95,6 +99,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public PathClassLoader(
@NonNull String dexPath, @Nullable String librarySearchPath, @Nullable ClassLoader parent,
diff --git a/dalvik/src/main/java/dalvik/system/RuntimeHooks.java b/dalvik/src/main/java/dalvik/system/RuntimeHooks.java
index 3b71d2f..d86998b 100644
--- a/dalvik/src/main/java/dalvik/system/RuntimeHooks.java
+++ b/dalvik/src/main/java/dalvik/system/RuntimeHooks.java
@@ -16,6 +16,10 @@
package dalvik.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import java.util.Objects;
import java.util.TimeZone;
import java.util.function.Supplier;
@@ -32,6 +36,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final class RuntimeHooks {
@@ -55,6 +60,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void setTimeZoneIdSupplier(@NonNull Supplier<String> zoneIdSupplier) {
if (RuntimeHooks.zoneIdSupplier != null) {
@@ -84,6 +90,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void setUncaughtExceptionPreHandler(
@Nullable Thread.UncaughtExceptionHandler uncaughtExceptionHandler) {
diff --git a/dalvik/src/main/java/dalvik/system/SocketTagger.java b/dalvik/src/main/java/dalvik/system/SocketTagger.java
index 4cce915..62803d9 100644
--- a/dalvik/src/main/java/dalvik/system/SocketTagger.java
+++ b/dalvik/src/main/java/dalvik/system/SocketTagger.java
@@ -16,6 +16,9 @@
package dalvik.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import java.io.FileDescriptor;
import java.net.DatagramSocket;
@@ -27,6 +30,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public abstract class SocketTagger {
@@ -39,6 +43,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public SocketTagger() {
}
@@ -53,6 +58,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public abstract void tag(FileDescriptor socketDescriptor) throws SocketException;
@@ -69,6 +75,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public abstract void untag(FileDescriptor socketDescriptor) throws SocketException;
@@ -83,6 +90,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final void tag(Socket socket) throws SocketException {
if (!socket.isClosed()) {
@@ -105,6 +113,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final void untag(Socket socket) throws SocketException {
if (!socket.isClosed()) {
@@ -122,6 +131,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final void tag(DatagramSocket socket) throws SocketException {
if (!socket.isClosed()) {
@@ -143,6 +153,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final void untag(DatagramSocket socket) throws SocketException {
if (!socket.isClosed()) {
@@ -157,6 +168,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static synchronized void set(SocketTagger tagger) {
if (tagger == null) {
@@ -173,6 +185,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static synchronized SocketTagger get() {
return tagger;
diff --git a/dalvik/src/main/java/dalvik/system/VMDebug.java b/dalvik/src/main/java/dalvik/system/VMDebug.java
index 5b5f3ad..512d5ab 100644
--- a/dalvik/src/main/java/dalvik/system/VMDebug.java
+++ b/dalvik/src/main/java/dalvik/system/VMDebug.java
@@ -16,6 +16,9 @@
package dalvik.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import java.io.FileDescriptor;
@@ -34,6 +37,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final class VMDebug {
/**
@@ -42,6 +46,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
// Must match android.os.Debug.TRACE_COUNT_ALLOCS.
public static final int TRACE_COUNT_ALLOCS = 1;
@@ -65,6 +70,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int KIND_GLOBAL_ALLOCATED_OBJECTS =
KIND_ALLOCATED_OBJECTS;
@@ -75,6 +81,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int KIND_GLOBAL_ALLOCATED_BYTES =
KIND_ALLOCATED_BYTES;
@@ -85,6 +92,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int KIND_GLOBAL_FREED_OBJECTS =
KIND_FREED_OBJECTS;
@@ -95,6 +103,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int KIND_GLOBAL_FREED_BYTES =
KIND_FREED_BYTES;
@@ -105,6 +114,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int KIND_GLOBAL_GC_INVOCATIONS =
KIND_GC_INVOCATIONS;
@@ -115,6 +125,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int KIND_GLOBAL_CLASS_INIT_COUNT =
KIND_CLASS_INIT_COUNT;
@@ -125,6 +136,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int KIND_GLOBAL_CLASS_INIT_TIME =
KIND_CLASS_INIT_TIME;
@@ -135,6 +147,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int KIND_THREAD_ALLOCATED_OBJECTS =
KIND_ALLOCATED_OBJECTS << 16;
@@ -145,6 +158,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int KIND_THREAD_ALLOCATED_BYTES =
KIND_ALLOCATED_BYTES << 16;
@@ -155,6 +169,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int KIND_THREAD_GC_INVOCATIONS =
KIND_GC_INVOCATIONS << 16;
@@ -164,6 +179,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int KIND_ALL_COUNTS = 0xffffffff;
@@ -177,6 +193,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@FastNative
public static native long lastDebuggerActivity();
@@ -189,6 +206,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@FastNative
public static native boolean isDebuggingEnabled();
@@ -201,6 +219,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@FastNative
public static native boolean isDebuggerConnected();
@@ -214,6 +233,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native String[] getVmFeatureList();
@@ -241,6 +261,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void startMethodTracing(String traceFileName, int bufferSize, int flags, boolean samplingEnabled, int intervalUs) {
startMethodTracingFilename(traceFileName, checkBufferSize(bufferSize), flags, samplingEnabled, intervalUs);
@@ -267,6 +288,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void startMethodTracing(String traceFileName, FileDescriptor fd, int bufferSize,
int flags, boolean samplingEnabled, int intervalUs,
@@ -294,6 +316,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void startMethodTracingDdms(int bufferSize, int flags, boolean samplingEnabled, int intervalUs) {
startMethodTracingDdmsImpl(checkBufferSize(bufferSize), flags, samplingEnabled, intervalUs);
@@ -321,6 +344,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native int getMethodTracingMode();
@@ -329,6 +353,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native void stopMethodTracing();
@@ -346,6 +371,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@FastNative
public static native long threadCpuTimeNanos();
@@ -355,6 +381,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native void startAllocCounting();
@@ -363,6 +390,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native void stopAllocCounting();
@@ -374,6 +402,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native int getAllocCount(int kind);
@@ -384,6 +413,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native void resetAllocCount(int kinds);
@@ -446,6 +476,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@FastNative
public static native void printLoadedClasses(int flags);
@@ -457,6 +488,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@FastNative
public static native int getLoadedClassCount();
@@ -473,6 +505,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void dumpHprofData(String filename) throws IOException {
if (filename == null) {
@@ -489,6 +522,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native void dumpHprofDataDdms();
@@ -503,6 +537,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void dumpHprofData(String fileName, FileDescriptor fd)
throws IOException {
@@ -519,6 +554,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native void dumpReferenceTables();
@@ -536,6 +572,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native long countInstancesOfClass(Class klass, boolean assignable);
@@ -555,6 +592,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native long[] countInstancesOfClasses(Class[] classes, boolean assignable);
@@ -602,6 +640,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static String getRuntimeStat(String statName) {
if (statName == null) {
@@ -622,6 +661,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static Map<String, String> getRuntimeStats() {
HashMap<String, String> map = new HashMap<>();
@@ -647,6 +687,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void attachAgent(String agent, ClassLoader classLoader) throws IOException {
nativeAttachAgent(agent, classLoader);
@@ -677,6 +718,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native void setAllocTrackerStackDepth(int stackDepth);
}
diff --git a/dalvik/src/main/java/dalvik/system/ZygoteHooks.java b/dalvik/src/main/java/dalvik/system/ZygoteHooks.java
index a7b6b71..5e0c140 100644
--- a/dalvik/src/main/java/dalvik/system/ZygoteHooks.java
+++ b/dalvik/src/main/java/dalvik/system/ZygoteHooks.java
@@ -16,6 +16,10 @@
package dalvik.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import libcore.icu.ICU;
import java.io.File;
@@ -31,6 +35,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final class ZygoteHooks {
private static long token;
@@ -46,6 +51,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native void startZygoteNoThreadCreation();
@@ -54,6 +60,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void onBeginPreload() {
com.android.i18n.system.ZygoteHooks.onBeginPreload();
@@ -79,6 +86,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void onEndPreload() {
com.android.i18n.system.ZygoteHooks.onEndPreload();
@@ -96,6 +104,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void gcAndFinalize() {
final VMRuntime runtime = VMRuntime.getRuntime();
@@ -114,6 +123,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native void stopZygoteNoThreadCreation();
@@ -126,6 +136,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void preFork() {
Daemons.stop();
@@ -141,6 +152,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void postForkSystemServer(int runtimeFlags) {
nativePostForkSystemServer(runtimeFlags);
@@ -157,6 +169,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void postForkChild(int runtimeFlags, boolean isSystemServer,
boolean isChildZygote, String instructionSet) {
@@ -182,6 +195,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void postForkCommon() {
// Notify the runtime before creating new threads.
@@ -199,6 +213,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static boolean isIndefiniteThreadSuspensionSafe() {
// TODO: Make this return true if we're done with JIT compilation.
diff --git a/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/Chunk.java b/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/Chunk.java
index 3eb599e..38b4113 100644
--- a/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/Chunk.java
+++ b/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/Chunk.java
@@ -16,6 +16,9 @@
package org.apache.harmony.dalvik.ddmc;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import java.nio.ByteBuffer;
@@ -28,6 +31,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public class Chunk {
@@ -36,6 +40,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public int type; // chunk type
/**
@@ -69,6 +74,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public Chunk(int type, byte[] data, int offset, int length) {
this.type = type;
@@ -87,6 +93,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public Chunk(int type, ByteBuffer buf) {
this.type = type;
diff --git a/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/ChunkHandler.java b/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/ChunkHandler.java
index 1f51978..fe936d5 100644
--- a/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/ChunkHandler.java
+++ b/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/ChunkHandler.java
@@ -16,6 +16,9 @@
package org.apache.harmony.dalvik.ddmc;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
@@ -28,6 +31,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public abstract class ChunkHandler {
@@ -37,6 +41,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final ByteOrder CHUNK_ORDER = ByteOrder.BIG_ENDIAN;
@@ -50,6 +55,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public ChunkHandler() {}
@@ -59,6 +65,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public abstract void onConnected();
@@ -68,6 +75,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public abstract void onDisconnected();
@@ -82,6 +90,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public abstract Chunk handleChunk(Chunk request);
@@ -95,6 +104,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static Chunk createFailChunk(int errorCode, String msg) {
if (msg == null)
@@ -120,6 +130,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static ByteBuffer wrapChunk(Chunk request) {
ByteBuffer in;
@@ -134,6 +145,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static int type(String typeName) {
if (typeName.length() != 4) {
@@ -151,6 +163,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static String name(int type)
{
diff --git a/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/DdmServer.java b/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/DdmServer.java
index 6078024..1465641 100644
--- a/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/DdmServer.java
+++ b/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/DdmServer.java
@@ -16,6 +16,9 @@
package org.apache.harmony.dalvik.ddmc;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import java.util.Collection;
@@ -30,6 +33,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final class DdmServer {
@@ -60,6 +64,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void registerHandler(int type, ChunkHandler handler) {
if (handler == null) {
@@ -81,6 +86,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static ChunkHandler unregisterHandler(int type) {
synchronized (mHandlerMap) {
@@ -94,6 +100,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void registrationComplete() {
// sync on mHandlerMap because it's convenient and makes a kind of
@@ -115,6 +122,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void sendChunk(Chunk chunk) {
nativeSendChunk(chunk.type, chunk.data, chunk.offset, chunk.length);
diff --git a/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/DdmVmInternal.java b/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/DdmVmInternal.java
index 0b20466..8aca688 100644
--- a/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/DdmVmInternal.java
+++ b/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/DdmVmInternal.java
@@ -16,14 +16,17 @@
package org.apache.harmony.dalvik.ddmc;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
-import dalvik.annotation.optimization.FastNative;
/**
* Declarations for some VM-internal DDM stuff.
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final class DdmVmInternal {
@@ -39,6 +42,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
native public static void setThreadNotifyEnabled(boolean enabled);
@@ -69,6 +73,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
native public static void setRecentAllocationsTrackingEnabled(boolean enabled);
}
diff --git a/json/src/main/java/org/json/JSONObject.java b/json/src/main/java/org/json/JSONObject.java
index 9ca3a23..c7a881d 100644
--- a/json/src/main/java/org/json/JSONObject.java
+++ b/json/src/main/java/org/json/JSONObject.java
@@ -16,6 +16,9 @@
package org.json;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import java.util.ArrayList;
@@ -679,6 +682,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@NonNull public Set<@NonNull String> keySet() {
return nameValuePairs.keySet();
diff --git a/libart/src/main/java/dalvik/system/AnnotatedStackTraceElement.java b/libart/src/main/java/dalvik/system/AnnotatedStackTraceElement.java
index cb7edbc..cce747d 100644
--- a/libart/src/main/java/dalvik/system/AnnotatedStackTraceElement.java
+++ b/libart/src/main/java/dalvik/system/AnnotatedStackTraceElement.java
@@ -16,6 +16,9 @@
package dalvik.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import libcore.util.NonNull;
import libcore.util.Nullable;
@@ -26,6 +29,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final class AnnotatedStackTraceElement {
/**
@@ -56,6 +60,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@NonNull public StackTraceElement getStackTraceElement() {
return stackTraceElement;
@@ -69,6 +74,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@Nullable public Object[] getHeldLocks() {
return heldLocks;
@@ -83,6 +89,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@Nullable public Object getBlockedOn() {
return blockedOn;
diff --git a/libart/src/main/java/dalvik/system/VMRuntime.java b/libart/src/main/java/dalvik/system/VMRuntime.java
index 2ec54d9..2b5d8cd 100644
--- a/libart/src/main/java/dalvik/system/VMRuntime.java
+++ b/libart/src/main/java/dalvik/system/VMRuntime.java
@@ -16,13 +16,15 @@
package dalvik.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.ChangeId;
import android.compat.annotation.EnabledSince;
import android.compat.annotation.Disabled;
import android.compat.annotation.UnsupportedAppUsage;
import dalvik.annotation.compat.VersionCodes;
-import dalvik.annotation.optimization.CriticalNative;
import dalvik.annotation.optimization.FastNative;
import libcore.api.CorePlatformApi;
@@ -40,6 +42,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
public final class VMRuntime {
@@ -104,6 +107,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public interface HiddenApiUsageLogger {
@@ -115,6 +119,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int ACCESS_METHOD_NONE = 0;
@@ -123,6 +128,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int ACCESS_METHOD_REFLECTION = 1;
@@ -131,6 +137,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int ACCESS_METHOD_JNI = 2;
@@ -140,6 +147,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int ACCESS_METHOD_LINKING = 3;
@@ -159,6 +167,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public void hiddenApiUsed(int sampledValue, String appPackageName,
String signature, int accessType, boolean accessDenied);
@@ -176,6 +185,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void setHiddenApiUsageLogger(HiddenApiUsageLogger hiddenApiUsageLogger) {
VMRuntime.hiddenApiUsageLogger = hiddenApiUsageLogger;
@@ -200,6 +210,7 @@
* any released version in {@code android.os.Build.VERSION_CODES}.
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
// Must match android.os.Build.VERSION_CODES.CUR_DEVELOPMENT.
public static final int SDK_VERSION_CUR_DEVELOPMENT = 10000;
@@ -230,6 +241,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
public static VMRuntime getRuntime() {
@@ -273,6 +285,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public native String vmLibrary();
@@ -284,6 +297,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public native String vmInstructionSet();
@@ -295,6 +309,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = CorePlatformApi.Status.STABLE)
@FastNative
public native boolean is64Bit();
@@ -307,6 +322,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@FastNative
public native boolean isCheckJniEnabled();
@@ -377,6 +393,7 @@
*/
@UnsupportedAppUsage(maxTargetSdk=0, publicAlternatives="Use the {@code targetSdkVersion}"
+" attribute in the {@code uses-sdk} manifest tag instead.")
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public synchronized void setTargetSdkVersion(int targetSdkVersion) {
this.targetSdkVersion = targetSdkVersion;
@@ -393,6 +410,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public synchronized void setDisabledCompatChanges(long[] disabledCompatChanges) {
this.disabledCompatChanges = disabledCompatChanges;
@@ -407,6 +425,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public synchronized int getTargetSdkVersion() {
return targetSdkVersion;
@@ -513,6 +532,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public native void setHiddenApiExemptions(String[] signaturePrefixes);
@@ -524,6 +544,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public native void setHiddenApiAccessLogSamplingRate(int rate);
@@ -539,6 +560,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
@FastNative
@@ -556,6 +578,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@FastNative
public native Object newUnpaddedArray(Class<?> componentType, int minLength);
@@ -570,6 +593,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
@FastNative
@@ -582,6 +606,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public native void clearGrowthLimit();
@@ -591,6 +616,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public native void clampGrowthLimit();
@@ -601,6 +627,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@FastNative
public native boolean isNativeDebuggable();
@@ -627,6 +654,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public native void registerNativeAllocation(long bytes);
@@ -641,6 +669,7 @@
*/
@UnsupportedAppUsage
@Deprecated
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public void registerNativeAllocation(int bytes) {
registerNativeAllocation((long) bytes);
@@ -654,6 +683,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public native void registerNativeFree(long bytes);
@@ -667,6 +697,7 @@
*/
@UnsupportedAppUsage
@Deprecated
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public void registerNativeFree(int bytes) {
registerNativeFree((long) bytes);
@@ -742,6 +773,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public native void requestConcurrentGC();
@@ -783,6 +815,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public native void updateProcessState(int state);
@@ -792,6 +825,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public native void notifyStartupCompleted();
@@ -801,6 +835,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public native void preloadDexCaches();
@@ -811,6 +846,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int CODE_PATH_TYPE_PRIMARY_APK = 1 << 0;
/**
@@ -820,6 +856,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int CODE_PATH_TYPE_SPLIT_APK = 1 << 1;
/**
@@ -829,6 +866,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int CODE_PATH_TYPE_SECONDARY_DEX = 1 << 2;
@@ -849,6 +887,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native void registerAppInfo(
String packageName,
@@ -869,6 +908,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static String getInstructionSet(String abi) {
final String instructionSet = ABI_TO_INSTRUCTION_SET_MAP.get(abi);
@@ -888,6 +928,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static boolean is64BitInstructionSet(String instructionSet) {
return "arm64".equals(instructionSet) ||
@@ -905,6 +946,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static boolean is64BitAbi(String abi) {
return is64BitInstructionSet(getInstructionSet(abi));
@@ -924,6 +966,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native void bootCompleted();
@@ -934,6 +977,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native void resetJitCounters();
@@ -945,6 +989,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native String getCurrentInstructionSet();
@@ -954,6 +999,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native void registerSensitiveThread();
@@ -972,6 +1018,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void setNonSdkApiUsageConsumer(Consumer<String> consumer) {
nonSdkApiUsageConsumer = consumer;
@@ -985,6 +1032,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native void setDedupeHiddenApiWarnings(boolean dedupe);
@@ -995,6 +1043,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native void setProcessPackageName(String packageName);
@@ -1005,6 +1054,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native void setProcessDataDirectory(String dataDir);
@@ -1020,6 +1070,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native boolean isValidClassLoaderContext(String encodedClassLoaderContext);
}
diff --git a/luni/src/main/java/android/compat/Compatibility.java b/luni/src/main/java/android/compat/Compatibility.java
index c020a91..28147dd 100644
--- a/luni/src/main/java/android/compat/Compatibility.java
+++ b/luni/src/main/java/android/compat/Compatibility.java
@@ -16,6 +16,9 @@
package android.compat;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.ChangeId;
import libcore.api.CorePlatformApi;
@@ -34,6 +37,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
@IntraCoreApi
public final class Compatibility {
@@ -56,6 +60,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
@IntraCoreApi
public static void reportUnconditionalChange(@ChangeId long changeId) {
@@ -79,6 +84,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
@IntraCoreApi
public static boolean isChangeEnabled(@ChangeId long changeId) {
@@ -96,6 +102,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public static void setBehaviorChangeDelegate(BehaviorChangeDelegate callbacks) {
sCallbacks = Objects.requireNonNull(callbacks);
@@ -106,6 +113,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public static void clearBehaviorChangeDelegate() {
sCallbacks = DEFAULT_CALLBACKS;
@@ -117,6 +125,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public static void setOverrides(ChangeConfig overrides) {
// Setting overrides twice in a row does not need to be supported because
@@ -135,6 +144,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public static void clearOverrides() {
if (!(sCallbacks instanceof OverrideCallbacks)) {
@@ -152,6 +162,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public interface BehaviorChangeDelegate {
/**
@@ -159,6 +170,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
default void onChangeReported(long changeId) {
// Do not use String.format here (b/160912695)
@@ -170,6 +182,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
default boolean isChangeEnabled(long changeId) {
// Do not use String.format here (b/160912695)
@@ -178,12 +191,22 @@
}
}
+ /**
+ * @hide
+ */
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
@IntraCoreApi
public static final class ChangeConfig {
private final Set<Long> enabled;
private final Set<Long> disabled;
+ /**
+ * @hide
+ */
+ @SystemApi(client = MODULE_LIBRARIES)
+ @CorePlatformApi(status = CorePlatformApi.Status.STABLE)
+ @IntraCoreApi
public ChangeConfig(@NonNull Set<@NonNull Long> enabled, @NonNull Set<@NonNull Long> disabled) {
this.enabled = Objects.requireNonNull(enabled);
this.disabled = Objects.requireNonNull(disabled);
@@ -201,6 +224,12 @@
}
}
+ /**
+ * @hide
+ */
+ @SystemApi(client = MODULE_LIBRARIES)
+ @CorePlatformApi(status = CorePlatformApi.Status.STABLE)
+ @IntraCoreApi
public boolean isEmpty() {
return enabled.isEmpty() && disabled.isEmpty();
}
@@ -214,30 +243,75 @@
return result;
}
+ /**
+ * @hide
+ */
+ @SystemApi(client = MODULE_LIBRARIES)
+ @CorePlatformApi(status = CorePlatformApi.Status.STABLE)
+ @IntraCoreApi
public @NonNull long[] getEnabledChangesArray() {
return toLongArray(enabled);
}
+
+ /**
+ * @hide
+ */
+ @SystemApi(client = MODULE_LIBRARIES)
+ @CorePlatformApi(status = CorePlatformApi.Status.STABLE)
+ @IntraCoreApi
public @NonNull long[] getDisabledChangesArray() {
return toLongArray(disabled);
}
+
+ /**
+ * @hide
+ */
+ @SystemApi(client = MODULE_LIBRARIES)
+ @CorePlatformApi(status = CorePlatformApi.Status.STABLE)
+ @IntraCoreApi
public @NonNull Set<@NonNull Long> getEnabledSet() {
return Collections.unmodifiableSet(enabled);
}
+
+ /**
+ * @hide
+ */
+ @SystemApi(client = MODULE_LIBRARIES)
+ @CorePlatformApi(status = CorePlatformApi.Status.STABLE)
+ @IntraCoreApi
public @NonNull Set<@NonNull Long> getDisabledSet() {
return Collections.unmodifiableSet(disabled);
}
+
+ /**
+ * @hide
+ */
+ @SystemApi(client = MODULE_LIBRARIES)
+ @CorePlatformApi(status = CorePlatformApi.Status.STABLE)
+ @IntraCoreApi
public boolean isForceEnabled(long changeId) {
return enabled.contains(changeId);
}
+
+ /**
+ * @hide
+ */
+ @SystemApi(client = MODULE_LIBRARIES)
+ @CorePlatformApi(status = CorePlatformApi.Status.STABLE)
+ @IntraCoreApi
public boolean isForceDisabled(long changeId) {
return disabled.contains(changeId);
}
+
+ /**
+ * @hide
+ */
@Override
public boolean equals(Object o) {
if (this == o) return true;
@@ -249,11 +323,18 @@
disabled.equals(that.disabled);
}
+ /**
+ * @hide
+ */
@Override
public int hashCode() {
return Objects.hash(enabled, disabled);
}
+
+ /**
+ * @hide
+ */
@Override
public String toString() {
return "ChangeConfig{enabled=" + enabled + ", disabled=" + disabled + '}';
diff --git a/luni/src/main/java/android/system/NetlinkSocketAddress.java b/luni/src/main/java/android/system/NetlinkSocketAddress.java
index 3cdfefb..ecccfa3 100644
--- a/luni/src/main/java/android/system/NetlinkSocketAddress.java
+++ b/luni/src/main/java/android/system/NetlinkSocketAddress.java
@@ -16,6 +16,9 @@
package android.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import java.net.SocketAddress;
@@ -48,6 +51,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final class NetlinkSocketAddress extends SocketAddress {
/**
@@ -88,6 +92,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public NetlinkSocketAddress(int nlPortId, int nlGroupsMask) {
this.nlPortId = nlPortId;
@@ -101,6 +106,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public int getPortId() {
return nlPortId;
@@ -113,6 +119,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public int getGroupsMask() {
return nlGroupsMask;
diff --git a/luni/src/main/java/android/system/Os.java b/luni/src/main/java/android/system/Os.java
index 437edc6..9beb8786 100755
--- a/luni/src/main/java/android/system/Os.java
+++ b/luni/src/main/java/android/system/Os.java
@@ -16,6 +16,9 @@
package android.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import libcore.io.Libcore;
@@ -81,6 +84,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static @Nullable StructCapUserData[] capget(@NonNull StructCapUserHeader hdr) throws ErrnoException {
return Libcore.os.capget(hdr);
@@ -104,6 +108,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void capset(@NonNull StructCapUserHeader hdr, @NonNull StructCapUserData[] data)
throws ErrnoException {
@@ -253,6 +258,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static int getpgid(int pid) throws ErrnoException { return Libcore.os.getpgid(pid); }
@@ -283,6 +289,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static @Nullable StructRlimit getrlimit(int resource) throws ErrnoException { return Libcore.os.getrlimit(resource); }
@@ -314,6 +321,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static int getsockoptInt(@NonNull FileDescriptor fd, int level, int option) throws ErrnoException { return Libcore.os.getsockoptInt(fd, level, option); }
@@ -334,6 +342,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static @Nullable StructLinger getsockoptLinger(@NonNull FileDescriptor fd, int level, int option) throws ErrnoException { return Libcore.os.getsockoptLinger(fd, level, option); }
@@ -395,6 +404,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static int ioctlInt(@NonNull FileDescriptor fd, int cmd) throws ErrnoException {
return Libcore.os.ioctlInt(fd, cmd);
@@ -515,6 +525,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static @Nullable FileDescriptor[] pipe2(int flags) throws ErrnoException { return Libcore.os.pipe2(flags); }
@@ -591,6 +602,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
public static @Nullable String realpath(@Nullable String path) throws ErrnoException { return Libcore.os.realpath(path); }
@@ -706,6 +718,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void setpgid(int pid, int pgid) throws ErrnoException { Libcore.os.setpgid(pid, pgid); }
@@ -722,6 +735,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void setregid(int rgid, int egid) throws ErrnoException { Libcore.os.setregid(rgid, egid); }
@@ -738,6 +752,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void setreuid(int ruid, int euid) throws ErrnoException { Libcore.os.setreuid(ruid, euid); }
@@ -769,6 +784,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void setsockoptIfreq(@NonNull FileDescriptor fd, int level, int option, @Nullable String value) throws ErrnoException { Libcore.os.setsockoptIfreq(fd, level, option, value); }
@@ -796,6 +812,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void setsockoptLinger(@NonNull FileDescriptor fd, int level, int option, @NonNull StructLinger value) throws ErrnoException { Libcore.os.setsockoptLinger(fd, level, option, value); }
@@ -892,6 +909,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static long splice(@NonNull FileDescriptor fdIn, @Nullable Int64Ref offIn, @NonNull FileDescriptor fdOut, @Nullable Int64Ref offOut, long len, int flags) throws ErrnoException { return Libcore.os.splice(fdIn, offIn, fdOut, offOut, len, flags); }
@@ -961,6 +979,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void unlink(@Nullable String pathname) throws ErrnoException { Libcore.os.unlink(pathname); }
diff --git a/luni/src/main/java/android/system/OsConstants.java b/luni/src/main/java/android/system/OsConstants.java
index dabb41a..2c09edb 100644
--- a/luni/src/main/java/android/system/OsConstants.java
+++ b/luni/src/main/java/android/system/OsConstants.java
@@ -16,6 +16,9 @@
package android.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
/**
@@ -36,6 +39,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static int CAP_TO_INDEX(int x) { return x >>> 5; }
@@ -50,6 +54,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static int CAP_TO_MASK(int x) { return 1 << (x & 31); }
@@ -185,6 +190,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int ARPHRD_LOOPBACK = placeholder();
public static final int CAP_AUDIT_CONTROL = placeholder();
@@ -325,6 +331,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int EUSERS = placeholder();
// On Linux, EWOULDBLOCK == EAGAIN. Use EAGAIN instead, to reduce confusion.
@@ -421,6 +428,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int _LINUX_CAPABILITY_VERSION_3 = placeholder();
public static final int MAP_FIXED = placeholder();
@@ -433,6 +441,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int MAP_POPULATE = placeholder();
public static final int MAP_PRIVATE = placeholder();
@@ -489,6 +498,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int O_DIRECT = placeholder();
public static final int O_EXCL = placeholder();
@@ -520,6 +530,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int PR_CAP_AMBIENT = placeholder();
/**
@@ -532,6 +543,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int PR_CAP_AMBIENT_RAISE = placeholder();
public static final int PR_GET_DUMPABLE = placeholder();
@@ -555,6 +567,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int RLIMIT_NOFILE = placeholder();
public static final int RT_SCOPE_HOST = placeholder();
@@ -571,6 +584,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int RTMGRP_IPV4_IFADDR = placeholder();
/** @hide */
@@ -719,6 +733,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int SPLICE_F_MOVE = placeholder();
/** @hide */
@@ -736,6 +751,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int SPLICE_F_MORE = placeholder();
public static final int STDERR_FILENO = placeholder();
@@ -785,6 +801,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int TIOCOUTQ = placeholder();
/**
@@ -793,6 +810,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int UDP_ENCAP = placeholder();
/** @hide */
@@ -800,6 +818,7 @@
public static final int UDP_ENCAP_ESPINUDP_NON_IKE = placeholder();
/** @hide */
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int UDP_ENCAP_ESPINUDP = placeholder();
/** @hide */
@@ -822,6 +841,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int XATTR_CREATE = placeholder();
/**
@@ -835,6 +855,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int XATTR_REPLACE = placeholder();
public static final int X_OK = placeholder();
diff --git a/luni/src/main/java/android/system/PacketSocketAddress.java b/luni/src/main/java/android/system/PacketSocketAddress.java
index 86afc0c..dca8d06 100644
--- a/luni/src/main/java/android/system/PacketSocketAddress.java
+++ b/luni/src/main/java/android/system/PacketSocketAddress.java
@@ -16,6 +16,9 @@
package android.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import java.net.SocketAddress;
@@ -30,6 +33,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final class PacketSocketAddress extends SocketAddress {
/**
@@ -94,6 +98,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public PacketSocketAddress(int sll_protocol, int sll_ifindex, byte[] sll_addr) {
this.sll_protocol = sll_protocol;
diff --git a/luni/src/main/java/android/system/StructCapUserData.java b/luni/src/main/java/android/system/StructCapUserData.java
index c31e615..a4aa87c 100644
--- a/luni/src/main/java/android/system/StructCapUserData.java
+++ b/luni/src/main/java/android/system/StructCapUserData.java
@@ -16,6 +16,10 @@
package android.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import libcore.util.Objects;
/**
@@ -27,6 +31,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final class StructCapUserData {
/**
@@ -34,6 +39,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final int effective; /* __u32 */
@@ -42,6 +48,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final int permitted; /* __u32 */
@@ -50,6 +57,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final int inheritable; /* __u32 */
@@ -62,6 +70,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public StructCapUserData(int effective, int permitted, int inheritable) {
this.effective = effective;
diff --git a/luni/src/main/java/android/system/StructCapUserHeader.java b/luni/src/main/java/android/system/StructCapUserHeader.java
index c773a47..249313a 100644
--- a/luni/src/main/java/android/system/StructCapUserHeader.java
+++ b/luni/src/main/java/android/system/StructCapUserHeader.java
@@ -16,6 +16,10 @@
package android.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import libcore.util.Objects;
/**
@@ -26,6 +30,7 @@
* Capabilities defined in <a href="https://man7.org/linux/man-pages/man7/capabilities.7.html">capabilities(7)</a>
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final class StructCapUserHeader {
/**
@@ -55,6 +60,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public StructCapUserHeader(int version, int pid) {
this.version = version;
diff --git a/luni/src/main/java/android/system/StructLinger.java b/luni/src/main/java/android/system/StructLinger.java
index 2a29fc0..52f4f8e 100644
--- a/luni/src/main/java/android/system/StructLinger.java
+++ b/luni/src/main/java/android/system/StructLinger.java
@@ -16,6 +16,10 @@
package android.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import libcore.util.Objects;
/**
@@ -36,6 +40,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final class StructLinger {
/**
@@ -50,6 +55,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final int l_linger;
@@ -61,6 +67,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public StructLinger(int l_onoff, int l_linger) {
this.l_onoff = l_onoff;
@@ -74,6 +81,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public boolean isOn() {
return l_onoff != 0;
diff --git a/luni/src/main/java/android/system/StructRlimit.java b/luni/src/main/java/android/system/StructRlimit.java
index 6287e4c..b35c075 100644
--- a/luni/src/main/java/android/system/StructRlimit.java
+++ b/luni/src/main/java/android/system/StructRlimit.java
@@ -16,6 +16,10 @@
package android.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import libcore.util.Objects;
/**
@@ -26,6 +30,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final class StructRlimit {
@@ -34,6 +39,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final long rlim_cur;
/**
diff --git a/luni/src/main/java/android/system/UnixSocketAddress.java b/luni/src/main/java/android/system/UnixSocketAddress.java
index 7ccc594..3a7c822 100644
--- a/luni/src/main/java/android/system/UnixSocketAddress.java
+++ b/luni/src/main/java/android/system/UnixSocketAddress.java
@@ -16,6 +16,10 @@
package android.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import java.net.SocketAddress;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
@@ -29,6 +33,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final class UnixSocketAddress extends SocketAddress {
@@ -86,6 +91,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static UnixSocketAddress createFileSystem(String pathName) {
byte[] pathNameBytes = pathName.getBytes(StandardCharsets.UTF_8);
diff --git a/luni/src/main/java/android/system/VmSocketAddress.java b/luni/src/main/java/android/system/VmSocketAddress.java
index e31ce23..1ff85bd 100644
--- a/luni/src/main/java/android/system/VmSocketAddress.java
+++ b/luni/src/main/java/android/system/VmSocketAddress.java
@@ -16,6 +16,10 @@
package android.system;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import java.net.SocketAddress;
import libcore.api.CorePlatformApi;
import libcore.util.Objects;
@@ -37,6 +41,7 @@
* @see <a href="https://man7.org/linux/man-pages/man7/vsock.7.html">vsock(7)</a>
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public final class VmSocketAddress extends SocketAddress {
/**
@@ -61,6 +66,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public VmSocketAddress(int svmPort, int svmCid) {
this.svmPort = svmPort;
@@ -72,6 +78,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public int getSvmPort() {
return svmPort;
@@ -82,6 +89,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public int getSvmCid() {
return svmCid;
diff --git a/luni/src/main/java/java/nio/NIOAccess.java b/luni/src/main/java/java/nio/NIOAccess.java
index 842aa6d..13968fb 100644
--- a/luni/src/main/java/java/nio/NIOAccess.java
+++ b/luni/src/main/java/java/nio/NIOAccess.java
@@ -16,6 +16,10 @@
package java.nio;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import android.compat.annotation.UnsupportedAppUsage;
/**
@@ -24,6 +28,7 @@
* @hide
*/
// @VisibleForTesting : was default
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final class NIOAccess {
@@ -55,6 +60,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static Object getBaseArray(Buffer b) {
return b.hasArray() ? b.array() : null;
@@ -73,6 +79,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static int getBaseArrayOffset(Buffer b) {
return b.hasArray() ? ((b.arrayOffset() + b.position) << b._elementSizeShift) : 0;
diff --git a/luni/src/main/java/java/nio/NioUtils.java b/luni/src/main/java/java/nio/NioUtils.java
index 34c269b..cfac508 100644
--- a/luni/src/main/java/java/nio/NioUtils.java
+++ b/luni/src/main/java/java/nio/NioUtils.java
@@ -16,6 +16,9 @@
package java.nio;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import java.io.Closeable;
@@ -32,6 +35,7 @@
/**
* @hide internal use only
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final class NioUtils {
private NioUtils() {
@@ -45,6 +49,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void freeDirectBuffer(ByteBuffer buffer) {
if (buffer == null) {
@@ -92,6 +97,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static byte[] unsafeArray(ByteBuffer b) {
return b.array();
@@ -107,6 +113,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static int unsafeArrayOffset(ByteBuffer b) {
return b.arrayOffset();
diff --git a/luni/src/main/java/libcore/content/type/MimeMap.java b/luni/src/main/java/libcore/content/type/MimeMap.java
index 2ef1217..fcd08ec 100644
--- a/luni/src/main/java/libcore/content/type/MimeMap.java
+++ b/luni/src/main/java/libcore/content/type/MimeMap.java
@@ -16,6 +16,10 @@
package libcore.content.type;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
@@ -34,6 +38,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public final class MimeMap {
@@ -46,6 +51,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public static @NonNull Builder builder() {
return new Builder();
@@ -61,6 +67,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public @NonNull Builder buildUpon() {
return new Builder(mimeToExt, extToMime);
@@ -107,6 +114,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public static @NonNull MimeMap getDefault() {
return Objects.requireNonNull(instanceSupplier.get());
@@ -125,6 +133,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public static void setDefaultSupplier(@NonNull Supplier<@NonNull MimeMap> mimeMapSupplier) {
instanceSupplier = new MemoizingSupplier<>(Objects.requireNonNull(mimeMapSupplier));
@@ -139,6 +148,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public final boolean hasExtension(@Nullable String extension) {
return guessMimeTypeFromExtension(extension) != null;
@@ -154,6 +164,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public final @Nullable String guessMimeTypeFromExtension(@Nullable String extension) {
if (extension == null) {
@@ -172,6 +183,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public final boolean hasMimeType(@Nullable String mimeType) {
return guessExtensionFromMimeType(mimeType) != null;
@@ -187,6 +199,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public final @Nullable String guessExtensionFromMimeType(@Nullable String mimeType) {
if (mimeType == null) {
@@ -205,6 +218,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public @NonNull Set<String> mimeTypes() {
return Collections.unmodifiableSet(mimeToExt.keySet());
@@ -220,6 +234,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public @NonNull Set<String> extensions() {
return Collections.unmodifiableSet(extToMime.keySet());
@@ -278,6 +293,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public static final class Builder {
private final Map<String, String> mimeToExt;
@@ -382,6 +398,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public @NonNull Builder addMimeMapping(@NonNull String mimeSpec, @NonNull List<@NonNull String> extensionSpecs)
{
@@ -415,6 +432,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public @NonNull MimeMap build() {
return new MimeMap(mimeToExt, extToMime);
diff --git a/luni/src/main/java/libcore/io/ForwardingOs.java b/luni/src/main/java/libcore/io/ForwardingOs.java
index 02b0ca9..8320be0 100755
--- a/luni/src/main/java/libcore/io/ForwardingOs.java
+++ b/luni/src/main/java/libcore/io/ForwardingOs.java
@@ -16,6 +16,8 @@
package libcore.io;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
import android.system.ErrnoException;
import android.system.GaiException;
import android.system.Int32Ref;
@@ -36,6 +38,7 @@
import android.system.StructUcred;
import android.system.StructUtsname;
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import java.io.FileDescriptor;
import java.io.InterruptedIOException;
@@ -54,6 +57,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public class ForwardingOs implements Os {
@UnsupportedAppUsage
@@ -67,6 +71,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
protected ForwardingOs(@NonNull Os os) {
this.os = Objects.requireNonNull(os);
@@ -117,6 +122,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
/**
@@ -556,6 +562,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public FileDescriptor open(@Nullable String path, int flags, int mode) throws ErrnoException { return os.open(path, flags, mode); }
@@ -666,6 +673,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public void remove(@Nullable String path) throws ErrnoException { os.remove(path); }
@@ -691,6 +699,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public void rename(@Nullable String oldPath, @Nullable String newPath) throws ErrnoException { os.rename(oldPath, newPath); }
@@ -839,6 +848,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public @Nullable StructStat stat(@Nullable String path) throws ErrnoException { return os.stat(path); }
@@ -916,6 +926,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public void unlink(@Nullable String pathname) throws ErrnoException { os.unlink(pathname); }
diff --git a/luni/src/main/java/libcore/io/IoUtils.java b/luni/src/main/java/libcore/io/IoUtils.java
index 7b7d778..5cbe882 100644
--- a/luni/src/main/java/libcore/io/IoUtils.java
+++ b/luni/src/main/java/libcore/io/IoUtils.java
@@ -16,6 +16,9 @@
package libcore.io;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import android.system.ErrnoException;
import android.system.StructStat;
@@ -39,6 +42,7 @@
import static android.system.OsConstants.O_RDONLY;
/** @hide */
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final class IoUtils {
private IoUtils() {
@@ -60,6 +64,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static int acquireRawFd(@NonNull FileDescriptor fd) {
Objects.requireNonNull(fd);
@@ -145,6 +150,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void setFdOwner(@NonNull FileDescriptor fd, @NonNull Object owner) {
Objects.requireNonNull(fd);
@@ -172,6 +178,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void close(@Nullable FileDescriptor fd) throws IOException {
IoBridge.closeAndSignalBlockedThreads(fd);
@@ -185,6 +192,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void closeQuietly(@Nullable AutoCloseable closeable) {
if (closeable != null) {
@@ -205,6 +213,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void closeQuietly(@Nullable FileDescriptor fd) {
try {
@@ -221,6 +230,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void closeQuietly(@Nullable Socket socket) {
if (socket != null) {
@@ -243,6 +253,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void setBlocking(@NonNull FileDescriptor fd, boolean blocking) throws IOException {
try {
@@ -268,6 +279,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static @NonNull byte[] readFileAsByteArray(@NonNull String absolutePath) throws IOException {
return new FileReader(absolutePath).readFully().toByteArray();
@@ -283,6 +295,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static @NonNull String readFileAsString(@NonNull String absolutePath) throws IOException {
return new FileReader(absolutePath).readFully().toString(StandardCharsets.UTF_8);
diff --git a/luni/src/main/java/libcore/io/Os.java b/luni/src/main/java/libcore/io/Os.java
index bc96133..0c58455 100755
--- a/luni/src/main/java/libcore/io/Os.java
+++ b/luni/src/main/java/libcore/io/Os.java
@@ -16,6 +16,8 @@
package libcore.io;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
import android.system.ErrnoException;
import android.system.GaiException;
import android.system.Int32Ref;
@@ -36,6 +38,7 @@
import android.system.StructUcred;
import android.system.StructUtsname;
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import java.io.FileDescriptor;
import java.io.InterruptedIOException;
@@ -55,6 +58,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public interface Os {
@@ -785,6 +789,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static boolean compareAndSetDefault(Os expect, Os update) {
return Libcore.compareAndSetOs(expect, update);
@@ -795,6 +800,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static Os getDefault() {
return Libcore.getOs();
diff --git a/luni/src/main/java/libcore/io/Streams.java b/luni/src/main/java/libcore/io/Streams.java
index 809c84d..6002118 100644
--- a/luni/src/main/java/libcore/io/Streams.java
+++ b/luni/src/main/java/libcore/io/Streams.java
@@ -16,6 +16,9 @@
package libcore.io;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import java.io.ByteArrayOutputStream;
@@ -35,6 +38,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final class Streams {
private static AtomicReference<byte[]> skipBuffer = new AtomicReference<byte[]>();
@@ -53,6 +57,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static int readSingleByte(@NonNull InputStream in) throws IOException {
byte[] buffer = new byte[1];
@@ -72,6 +77,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void writeSingleByte(@NonNull OutputStream out, int b) throws IOException {
byte[] buffer = new byte[1];
@@ -90,6 +96,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void readFully(@NonNull InputStream in, @NonNull byte[] dst) throws IOException {
readFully(in, dst, 0, dst.length);
@@ -135,6 +142,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static @NonNull byte[] readFully(@NonNull InputStream in) throws IOException {
try {
@@ -154,6 +162,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static @NonNull byte[] readFullyNoClose(@NonNull InputStream in) throws IOException {
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
@@ -174,6 +183,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static @NonNull String readFully(@NonNull Reader reader) throws IOException {
try {
@@ -218,6 +228,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static long skipByReading(@NonNull InputStream in, long byteCount) throws IOException {
// acquire the shared skip buffer.
@@ -257,6 +268,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static int copy(@NonNull InputStream in, @NonNull OutputStream out) throws IOException {
int total = 0;
diff --git a/luni/src/main/java/libcore/net/InetAddressUtils.java b/luni/src/main/java/libcore/net/InetAddressUtils.java
index de0c832..a3860b5 100644
--- a/luni/src/main/java/libcore/net/InetAddressUtils.java
+++ b/luni/src/main/java/libcore/net/InetAddressUtils.java
@@ -15,6 +15,10 @@
*/
package libcore.net;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import android.system.GaiException;
import android.system.StructAddrinfo;
import java.net.Inet4Address;
@@ -30,6 +34,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public class InetAddressUtils {
@@ -53,6 +58,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static boolean isNumericAddress(String address) {
return parseNumericAddressNoThrow(address) != null;
@@ -73,6 +79,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static InetAddress parseNumericAddress(String address) {
InetAddress result = parseNumericAddressNoThrow(address);
diff --git a/luni/src/main/java/libcore/net/NetworkSecurityPolicy.java b/luni/src/main/java/libcore/net/NetworkSecurityPolicy.java
index 44e918e..ab4678e 100644
--- a/luni/src/main/java/libcore/net/NetworkSecurityPolicy.java
+++ b/luni/src/main/java/libcore/net/NetworkSecurityPolicy.java
@@ -16,6 +16,9 @@
package libcore.net;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
/**
@@ -31,6 +34,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
public abstract class NetworkSecurityPolicy {
@@ -44,6 +48,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
public NetworkSecurityPolicy() {
@@ -56,6 +61,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
public static NetworkSecurityPolicy getInstance() {
@@ -69,6 +75,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void setInstance(NetworkSecurityPolicy policy) {
if (policy == null) {
@@ -101,6 +108,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public abstract boolean isCleartextTrafficPermitted();
@@ -116,6 +124,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public abstract boolean isCleartextTrafficPermitted(String hostname);
@@ -132,6 +141,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
public abstract boolean isCertificateTransparencyVerificationRequired(String hostname);
diff --git a/luni/src/main/java/libcore/net/event/NetworkEventDispatcher.java b/luni/src/main/java/libcore/net/event/NetworkEventDispatcher.java
index 4009a7e..4324a61 100644
--- a/luni/src/main/java/libcore/net/event/NetworkEventDispatcher.java
+++ b/luni/src/main/java/libcore/net/event/NetworkEventDispatcher.java
@@ -16,6 +16,9 @@
package libcore.net.event;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
@@ -25,6 +28,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final class NetworkEventDispatcher {
@@ -41,6 +45,7 @@
* @hide
*/
@UnsupportedAppUsage
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static NetworkEventDispatcher getInstance() {
return instance;
@@ -84,6 +89,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public void dispatchNetworkConfigurationChange() {
for (NetworkEventListener listener : listeners) {
diff --git a/luni/src/main/java/libcore/net/http/Dns.java b/luni/src/main/java/libcore/net/http/Dns.java
index 6ef96fe..a5bb423 100644
--- a/luni/src/main/java/libcore/net/http/Dns.java
+++ b/luni/src/main/java/libcore/net/http/Dns.java
@@ -16,6 +16,10 @@
package libcore.net.http;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import libcore.api.CorePlatformApi;
import java.net.InetAddress;
@@ -28,6 +32,7 @@
* A domain name service that resolves IP addresses for host names.
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public interface Dns extends com.android.okhttp.internalandroidapi.Dns {
/**
@@ -38,6 +43,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
@NonNull List<@NonNull InetAddress> lookup(@Nullable String hostname) throws UnknownHostException;
}
\ No newline at end of file
diff --git a/luni/src/main/java/libcore/net/http/HttpURLConnectionFactory.java b/luni/src/main/java/libcore/net/http/HttpURLConnectionFactory.java
index d5874bc..9a713bd 100644
--- a/luni/src/main/java/libcore/net/http/HttpURLConnectionFactory.java
+++ b/luni/src/main/java/libcore/net/http/HttpURLConnectionFactory.java
@@ -16,6 +16,10 @@
package libcore.net.http;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import libcore.api.CorePlatformApi;
import java.io.IOException;
@@ -34,6 +38,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public class HttpURLConnectionFactory {
private final com.android.okhttp.internalandroidapi.HttpURLConnectionFactory mFactory;
@@ -43,6 +48,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
@NonNull public static HttpURLConnectionFactory createInstance() {
return new HttpURLConnectionFactory();
@@ -62,6 +68,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public void setNewConnectionPool(int maxIdleConnections, long keepAliveDuration,
@NonNull TimeUnit timeUnit) {
@@ -75,6 +82,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public void setDns(@NonNull Dns dns) {
mFactory.setDns(dns);
@@ -93,6 +101,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@CorePlatformApi(status = CorePlatformApi.Status.STABLE)
public URLConnection openConnection(@NonNull URL url, @NonNull SocketFactory socketFactory,
@NonNull Proxy proxy) throws IOException {
diff --git a/luni/src/main/java/libcore/util/FP16.java b/luni/src/main/java/libcore/util/FP16.java
index 575a214..d5a78ed 100644
--- a/luni/src/main/java/libcore/util/FP16.java
+++ b/luni/src/main/java/libcore/util/FP16.java
@@ -16,6 +16,10 @@
package libcore.util;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
/**
* <p>The {@code FP16} class is a wrapper and a utility class to manipulate half-precision 16-bit
* <a href="https://en.wikipedia.org/wiki/Half-precision_floating-point_format">IEEE 754</a>
@@ -86,6 +90,7 @@
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final class FP16 {
/**
@@ -93,6 +98,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int SIZE = 16;
@@ -102,6 +108,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final short EPSILON = (short) 0x1400;
@@ -110,6 +117,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int MAX_EXPONENT = 15;
/**
@@ -117,6 +125,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int MIN_EXPONENT = -14;
@@ -125,6 +134,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final short LOWEST_VALUE = (short) 0xfbff;
/**
@@ -132,6 +142,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final short MAX_VALUE = (short) 0x7bff;
/**
@@ -139,6 +150,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final short MIN_NORMAL = (short) 0x0400;
/**
@@ -146,6 +158,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final short MIN_VALUE = (short) 0x0001;
/**
@@ -153,6 +166,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final short NaN = (short) 0x7e00;
/**
@@ -160,6 +174,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final short NEGATIVE_INFINITY = (short) 0xfc00;
/**
@@ -167,6 +182,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final short NEGATIVE_ZERO = (short) 0x8000;
/**
@@ -174,6 +190,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final short POSITIVE_INFINITY = (short) 0x7c00;
/**
@@ -181,6 +198,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final short POSITIVE_ZERO = (short) 0x0000;
@@ -189,6 +207,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int SIGN_SHIFT = 15;
@@ -197,6 +216,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int EXPONENT_SHIFT = 10;
@@ -205,6 +225,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int SIGN_MASK = 0x8000;
@@ -213,6 +234,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int SHIFTED_EXPONENT_MASK = 0x1f;
@@ -221,6 +243,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int SIGNIFICAND_MASK = 0x3ff;
@@ -229,6 +252,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int EXPONENT_SIGNIFICAND_MASK = 0x7fff;
@@ -237,6 +261,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final int EXPONENT_BIAS = 15;
@@ -273,6 +298,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static int compare(short x, short y) {
if (less(x, y)) return -1;
@@ -305,6 +331,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static short rint(short h) {
int bits = h & 0xffff;
@@ -350,6 +377,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static short ceil(short h) {
int bits = h & 0xffff;
@@ -393,6 +421,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static short floor(short h) {
int bits = h & 0xffff;
@@ -434,6 +463,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static short trunc(short h) {
int bits = h & 0xffff;
@@ -465,6 +495,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static short min(short x, short y) {
if (isNaN(x)) return NaN;
@@ -493,6 +524,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static short max(short x, short y) {
if (isNaN(x)) return NaN;
@@ -518,6 +550,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static boolean less(short x, short y) {
if (isNaN(x)) return false;
@@ -539,6 +572,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static boolean lessEquals(short x, short y) {
if (isNaN(x)) return false;
@@ -560,6 +594,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static boolean greater(short x, short y) {
if (isNaN(x)) return false;
@@ -581,6 +616,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static boolean greaterEquals(short x, short y) {
if (isNaN(x)) return false;
@@ -602,6 +638,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static boolean equals(short x, short y) {
if (isNaN(x)) return false;
@@ -620,6 +657,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static boolean isInfinite(short h) {
return (h & EXPONENT_SIGNIFICAND_MASK) == POSITIVE_INFINITY;
@@ -634,6 +672,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static boolean isNaN(short h) {
return (h & EXPONENT_SIGNIFICAND_MASK) > POSITIVE_INFINITY;
@@ -651,6 +690,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static boolean isNormalized(short h) {
return (h & POSITIVE_INFINITY) != 0 && (h & POSITIVE_INFINITY) != POSITIVE_INFINITY;
@@ -673,6 +713,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static float toFloat(short h) {
int bits = h & 0xffff;
@@ -730,6 +771,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static short toHalf(float f) {
int bits = Float.floatToRawIntBits(f);
@@ -812,6 +854,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static String toHexString(short h) {
StringBuilder o = new StringBuilder();
diff --git a/luni/src/main/java/libcore/util/HexEncoding.java b/luni/src/main/java/libcore/util/HexEncoding.java
index 02d1110..5edcb20 100644
--- a/luni/src/main/java/libcore/util/HexEncoding.java
+++ b/luni/src/main/java/libcore/util/HexEncoding.java
@@ -16,10 +16,15 @@
package libcore.util;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
/**
* Hexadecimal encoding where each byte is represented by two hexadecimal digits.
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public class HexEncoding {
@@ -44,6 +49,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static String encodeToString(byte b, boolean upperCase) {
char[] digits = upperCase ? UPPER_CASE_DIGITS : LOWER_CASE_DIGITS;
@@ -61,6 +67,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static char[] encode(byte[] data) {
return encode(data, 0, data.length, true /* upperCase */);
@@ -76,6 +83,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static char[] encode(byte[] data, boolean upperCase) {
return encode(data, 0, data.length, upperCase);
@@ -91,6 +99,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static char[] encode(byte[] data, int offset, int len) {
return encode(data, offset, len, true /* upperCase */);
@@ -120,6 +129,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static String encodeToString(byte[] data) {
return encodeToString(data, true /* upperCase */);
@@ -135,6 +145,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static String encodeToString(byte[] data, boolean upperCase) {
return new String(encode(data, upperCase));
@@ -151,6 +162,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static byte[] decode(String encoded) throws IllegalArgumentException {
return decode(encoded.toCharArray());
@@ -169,6 +181,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static byte[] decode(String encoded, boolean allowSingleChar)
throws IllegalArgumentException {
@@ -186,6 +199,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static byte[] decode(char[] encoded) throws IllegalArgumentException {
return decode(encoded, false);
@@ -204,6 +218,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static byte[] decode(char[] encoded, boolean allowSingleChar)
throws IllegalArgumentException {
diff --git a/luni/src/main/java/libcore/util/NativeAllocationRegistry.java b/luni/src/main/java/libcore/util/NativeAllocationRegistry.java
index 387a1db..e336525 100644
--- a/luni/src/main/java/libcore/util/NativeAllocationRegistry.java
+++ b/luni/src/main/java/libcore/util/NativeAllocationRegistry.java
@@ -16,6 +16,10 @@
package libcore.util;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import dalvik.system.VMRuntime;
import sun.misc.Cleaner;
@@ -42,6 +46,7 @@
* used to register any number of native allocations of that kind.
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
public class NativeAllocationRegistry {
@@ -80,6 +85,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static NativeAllocationRegistry createNonmalloced(
@NonNull ClassLoader classLoader, long freeFunction, long size) {
@@ -110,6 +116,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static NativeAllocationRegistry createMalloced(
@NonNull ClassLoader classLoader, long freeFunction, long size) {
@@ -129,6 +136,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
public static NativeAllocationRegistry createMalloced(
@@ -202,6 +210,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public NativeAllocationRegistry(@NonNull ClassLoader classLoader, long freeFunction, long size) {
this(classLoader, freeFunction, size, size == 0);
@@ -241,6 +250,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
public @NonNull Runnable registerNativeAllocation(@NonNull Object referent, long nativePtr) {
@@ -335,6 +345,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static native void applyFreeFunction(long freeFunction, long nativePtr);
}
diff --git a/luni/src/main/java/libcore/util/SneakyThrow.java b/luni/src/main/java/libcore/util/SneakyThrow.java
index 46f2e87..5a347d9 100644
--- a/luni/src/main/java/libcore/util/SneakyThrow.java
+++ b/luni/src/main/java/libcore/util/SneakyThrow.java
@@ -16,6 +16,10 @@
package libcore.util;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
/**
* Provides a hacky method that always throws {@code t} even if {@code t} is a checked exception.
* and is not declared to be thrown.
@@ -25,6 +29,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public class SneakyThrow {
@@ -39,6 +44,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void sneakyThrow(@NonNull Throwable t) {
SneakyThrow.<RuntimeException>sneakyThrow_(t);
diff --git a/luni/src/main/java/libcore/util/XmlObjectFactory.java b/luni/src/main/java/libcore/util/XmlObjectFactory.java
index 8be04ae..7a1d7ec 100644
--- a/luni/src/main/java/libcore/util/XmlObjectFactory.java
+++ b/luni/src/main/java/libcore/util/XmlObjectFactory.java
@@ -16,6 +16,10 @@
package libcore.util;
+import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
+
+import android.annotation.SystemApi;
+
import com.android.org.kxml2.io.KXmlParser;
import com.android.org.kxml2.io.KXmlSerializer;
import org.apache.harmony.xml.ExpatReader;
@@ -28,6 +32,7 @@
*
* @hide
*/
+@SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public class XmlObjectFactory {
@@ -41,6 +46,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static @NonNull XmlSerializer newXmlSerializer() {
return new KXmlSerializer();
@@ -54,6 +60,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static @NonNull XmlPullParser newXmlPullParser() {
return new KXmlParser();
@@ -66,6 +73,7 @@
*
* @hide
*/
+ @SystemApi(client = MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static @NonNull XMLReader newXMLReader() {
return new ExpatReader();
diff --git a/mmodules/core_platform_api/api/stable_platform/current.txt b/mmodules/core_platform_api/api/stable_platform/current.txt
index c7ee205..9bdbd5c 100644
--- a/mmodules/core_platform_api/api/stable_platform/current.txt
+++ b/mmodules/core_platform_api/api/stable_platform/current.txt
@@ -113,6 +113,29 @@
}
+package dalvik.annotation.codegen {
+
+ @java.lang.annotation.Repeatable(CovariantReturnType.CovariantReturnTypes.class) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD}) public @interface CovariantReturnType {
+ method public abstract int presentAfter();
+ method public abstract Class<?> returnType();
+ }
+
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD}) public static @interface CovariantReturnType.CovariantReturnTypes {
+ method public abstract dalvik.annotation.codegen.CovariantReturnType[] value();
+ }
+
+}
+
+package dalvik.annotation.optimization {
+
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) public @interface CriticalNative {
+ }
+
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) public @interface FastNative {
+ }
+
+}
+
package dalvik.system {
public final class AnnotatedStackTraceElement {
@@ -173,6 +196,10 @@
method public default void report(String);
}
+ public final class DelegateLastClassLoader extends dalvik.system.PathClassLoader {
+ ctor public DelegateLastClassLoader(String, String, ClassLoader, ClassLoader[]);
+ }
+
@Deprecated public final class DexFile {
method @Deprecated @NonNull public static dalvik.system.DexFile.OptimizationInfo getDexFileOptimizationInfo(@NonNull String, @NonNull String) throws java.io.FileNotFoundException;
method @Deprecated @Nullable public static String[] getDexFileOutputPaths(@NonNull String, @NonNull String) throws java.io.FileNotFoundException;
@@ -219,15 +246,15 @@
method public static void dumpHprofDataDdms();
method public static void dumpReferenceTables();
method public static int getAllocCount(int);
- method public static int getLoadedClassCount();
+ method @dalvik.annotation.optimization.FastNative public static int getLoadedClassCount();
method public static int getMethodTracingMode();
method public static String getRuntimeStat(String);
method public static java.util.Map<java.lang.String,java.lang.String> getRuntimeStats();
method public static String[] getVmFeatureList();
- method public static boolean isDebuggerConnected();
- method public static boolean isDebuggingEnabled();
- method public static long lastDebuggerActivity();
- method public static void printLoadedClasses(int);
+ method @dalvik.annotation.optimization.FastNative public static boolean isDebuggerConnected();
+ method @dalvik.annotation.optimization.FastNative public static boolean isDebuggingEnabled();
+ method @dalvik.annotation.optimization.FastNative public static long lastDebuggerActivity();
+ method @dalvik.annotation.optimization.FastNative public static void printLoadedClasses(int);
method public static void resetAllocCount(int);
method public static void setAllocTrackerStackDepth(int);
method public static void startAllocCounting();
@@ -236,7 +263,7 @@
method public static void startMethodTracingDdms(int, int, boolean, int);
method public static void stopAllocCounting();
method public static void stopMethodTracing();
- method public static long threadCpuTimeNanos();
+ method @dalvik.annotation.optimization.FastNative public static long threadCpuTimeNanos();
field public static final int KIND_ALL_COUNTS = -1; // 0xffffffff
field public static final int KIND_GLOBAL_ALLOCATED_BYTES = 2; // 0x2
field public static final int KIND_GLOBAL_ALLOCATED_OBJECTS = 1; // 0x1
@@ -252,7 +279,7 @@
}
public final class VMRuntime {
- method public long addressOf(Object);
+ method @dalvik.annotation.optimization.FastNative public long addressOf(Object);
method public static void bootCompleted();
method public void clampGrowthLimit();
method public void clearGrowthLimit();
@@ -260,14 +287,14 @@
method public static String getInstructionSet(String);
method public static dalvik.system.VMRuntime getRuntime();
method public int getTargetSdkVersion();
- method public boolean is64Bit();
+ method @dalvik.annotation.optimization.FastNative public boolean is64Bit();
method public static boolean is64BitAbi(String);
method public static boolean is64BitInstructionSet(String);
- method public boolean isCheckJniEnabled();
- method public boolean isNativeDebuggable();
+ method @dalvik.annotation.optimization.FastNative public boolean isCheckJniEnabled();
+ method @dalvik.annotation.optimization.FastNative public boolean isNativeDebuggable();
method public static boolean isValidClassLoaderContext(String);
- method public Object newNonMovableArray(Class<?>, int);
- method public Object newUnpaddedArray(Class<?>, int);
+ method @dalvik.annotation.optimization.FastNative public Object newNonMovableArray(Class<?>, int);
+ method @dalvik.annotation.optimization.FastNative public Object newUnpaddedArray(Class<?>, int);
method public void notifyStartupCompleted();
method public void preloadDexCaches();
method public static void registerAppInfo(String, String, String, String[], int);
@@ -689,33 +716,33 @@
public final class Unsafe {
method public int arrayBaseOffset(Class);
method public int arrayIndexScale(Class);
- method public void copyMemory(long, long, long);
- method public boolean getBoolean(Object, long);
- method public byte getByte(Object, long);
- method public byte getByte(long);
- method public double getDouble(Object, long);
- method public double getDouble(long);
- method public float getFloat(Object, long);
- method public float getFloat(long);
- method public int getInt(Object, long);
- method public int getInt(long);
- method public long getLong(Object, long);
- method public long getLong(long);
- method public Object getObject(Object, long);
+ method @dalvik.annotation.optimization.FastNative public void copyMemory(long, long, long);
+ method @dalvik.annotation.optimization.FastNative public boolean getBoolean(Object, long);
+ method @dalvik.annotation.optimization.FastNative public byte getByte(Object, long);
+ method @dalvik.annotation.optimization.FastNative public byte getByte(long);
+ method @dalvik.annotation.optimization.FastNative public double getDouble(Object, long);
+ method @dalvik.annotation.optimization.FastNative public double getDouble(long);
+ method @dalvik.annotation.optimization.FastNative public float getFloat(Object, long);
+ method @dalvik.annotation.optimization.FastNative public float getFloat(long);
+ method @dalvik.annotation.optimization.FastNative public int getInt(Object, long);
+ method @dalvik.annotation.optimization.FastNative public int getInt(long);
+ method @dalvik.annotation.optimization.FastNative public long getLong(Object, long);
+ method @dalvik.annotation.optimization.FastNative public long getLong(long);
+ method @dalvik.annotation.optimization.FastNative public Object getObject(Object, long);
method public static sun.misc.Unsafe getUnsafe();
method public long objectFieldOffset(java.lang.reflect.Field);
- method public void putBoolean(Object, long, boolean);
- method public void putByte(Object, long, byte);
- method public void putByte(long, byte);
- method public void putDouble(Object, long, double);
- method public void putDouble(long, double);
- method public void putFloat(Object, long, float);
- method public void putFloat(long, float);
- method public void putInt(Object, long, int);
- method public void putInt(long, int);
- method public void putLong(Object, long, long);
- method public void putLong(long, long);
- method public void putObject(Object, long, Object);
+ method @dalvik.annotation.optimization.FastNative public void putBoolean(Object, long, boolean);
+ method @dalvik.annotation.optimization.FastNative public void putByte(Object, long, byte);
+ method @dalvik.annotation.optimization.FastNative public void putByte(long, byte);
+ method @dalvik.annotation.optimization.FastNative public void putDouble(Object, long, double);
+ method @dalvik.annotation.optimization.FastNative public void putDouble(long, double);
+ method @dalvik.annotation.optimization.FastNative public void putFloat(Object, long, float);
+ method @dalvik.annotation.optimization.FastNative public void putFloat(long, float);
+ method @dalvik.annotation.optimization.FastNative public void putInt(Object, long, int);
+ method @dalvik.annotation.optimization.FastNative public void putInt(long, int);
+ method @dalvik.annotation.optimization.FastNative public void putLong(Object, long, long);
+ method @dalvik.annotation.optimization.FastNative public void putLong(long, long);
+ method @dalvik.annotation.optimization.FastNative public void putObject(Object, long, Object);
}
}
diff --git a/mmodules/intracoreapi/api/intra/current.txt b/mmodules/intracoreapi/api/intra/current.txt
index 3b9b746..bc021cf 100644
--- a/mmodules/intracoreapi/api/intra/current.txt
+++ b/mmodules/intracoreapi/api/intra/current.txt
@@ -7,14 +7,14 @@
}
@libcore.api.CorePlatformApi(status=libcore.api.CorePlatformApi.Status.STABLE) @libcore.api.IntraCoreApi public static final class Compatibility.ChangeConfig {
- ctor public Compatibility.ChangeConfig(@NonNull java.util.Set<java.lang.Long>, @NonNull java.util.Set<java.lang.Long>);
- method @NonNull public long[] getDisabledChangesArray();
- method @NonNull public java.util.Set<java.lang.Long> getDisabledSet();
- method @NonNull public long[] getEnabledChangesArray();
- method @NonNull public java.util.Set<java.lang.Long> getEnabledSet();
- method public boolean isEmpty();
- method public boolean isForceDisabled(long);
- method public boolean isForceEnabled(long);
+ ctor @libcore.api.CorePlatformApi(status=libcore.api.CorePlatformApi.Status.STABLE) @libcore.api.IntraCoreApi public Compatibility.ChangeConfig(@NonNull java.util.Set<java.lang.Long>, @NonNull java.util.Set<java.lang.Long>);
+ method @NonNull @libcore.api.CorePlatformApi(status=libcore.api.CorePlatformApi.Status.STABLE) @libcore.api.IntraCoreApi public long[] getDisabledChangesArray();
+ method @NonNull @libcore.api.CorePlatformApi(status=libcore.api.CorePlatformApi.Status.STABLE) @libcore.api.IntraCoreApi public java.util.Set<java.lang.Long> getDisabledSet();
+ method @NonNull @libcore.api.CorePlatformApi(status=libcore.api.CorePlatformApi.Status.STABLE) @libcore.api.IntraCoreApi public long[] getEnabledChangesArray();
+ method @NonNull @libcore.api.CorePlatformApi(status=libcore.api.CorePlatformApi.Status.STABLE) @libcore.api.IntraCoreApi public java.util.Set<java.lang.Long> getEnabledSet();
+ method @libcore.api.CorePlatformApi(status=libcore.api.CorePlatformApi.Status.STABLE) @libcore.api.IntraCoreApi public boolean isEmpty();
+ method @libcore.api.CorePlatformApi(status=libcore.api.CorePlatformApi.Status.STABLE) @libcore.api.IntraCoreApi public boolean isForceDisabled(long);
+ method @libcore.api.CorePlatformApi(status=libcore.api.CorePlatformApi.Status.STABLE) @libcore.api.IntraCoreApi public boolean isForceEnabled(long);
}
}
@@ -42,7 +42,7 @@
package dalvik.annotation.optimization {
- @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) @libcore.api.CorePlatformApi @libcore.api.IntraCoreApi public @interface FastNative {
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) @libcore.api.CorePlatformApi(status=libcore.api.CorePlatformApi.Status.STABLE) @libcore.api.IntraCoreApi public @interface FastNative {
}
@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD}) @libcore.api.IntraCoreApi public @interface ReachabilitySensitive {
diff --git a/ojluni/annotations/README b/ojluni/annotations/README
index e88e233..15d9738 100644
--- a/ojluni/annotations/README
+++ b/ojluni/annotations/README
@@ -31,8 +31,8 @@
check in this change, it will have undesirable consequences until you
reach step 4, below.
2. make openjdk-mmodule-stubs-no-javadoc
- 3. FILES="your/package/and/Class.java another/package/AnotherClass.java"; for FILE in $FILES; do mkdir -p libcore/ojluni/annotations/mmodule/$(dirname ${FILE}) && cp out/soong/.intermediates/libcore/openjdk-mmodule-stubs-no-javadoc/android_common/stubsDir/${FILE} libcore/ojluni/annotations/mmodule/${FILE/%.java/.annotated.java}; done
- 4. Add @libcore.api.Hide to each top-level class in the new files. This will prevent it from being added to the public API. A JavaDoc @hide tag will not work as metalava will ignore javadoc from the stub files.
+ 3. FILES="your/package/and/Class.java another/package/AnotherClass.java"; for FILE in $FILES; do mkdir -p libcore/ojluni/annotations/mmodule/$(dirname ${FILE}) && unzip out/soong/.intermediates/libcore/openjdk-mmodule-stubs-no-javadoc/android_common/metalava/openjdk-mmodule-stubs-no-javadoc-stubs.srcjar ${FILE} && mv ${FILE} libcore/ojluni/annotations/mmodule/${FILE/%.java/.annotated.java}; done
+ 4. Add @libcore.api.Hide to each class, methods and fields in the new files. This will prevent it from being added to the public API. A JavaDoc @hide tag will not work as metalava will ignore javadoc from the stub files.
5. Add @libcore.api.CorePlatformApi and @libcore.api.IntraCoreApi as desired
to the classes and members.
- To see the effect of the files under this directory:
diff --git a/ojluni/annotations/mmodule/java/io/FileDescriptor.annotated.java b/ojluni/annotations/mmodule/java/io/FileDescriptor.annotated.java
index 915d410..cc16cd6 100644
--- a/ojluni/annotations/mmodule/java/io/FileDescriptor.annotated.java
+++ b/ojluni/annotations/mmodule/java/io/FileDescriptor.annotated.java
@@ -36,9 +36,11 @@
public native void sync() throws java.io.SyncFailedException;
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public int getInt$() { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public void setInt$(int fd) { throw new RuntimeException("Stub!"); }
diff --git a/ojluni/annotations/mmodule/java/io/FileInputStream.annotated.java b/ojluni/annotations/mmodule/java/io/FileInputStream.annotated.java
index 8978137..ac26aeb 100644
--- a/ojluni/annotations/mmodule/java/io/FileInputStream.annotated.java
+++ b/ojluni/annotations/mmodule/java/io/FileInputStream.annotated.java
@@ -38,6 +38,7 @@
public FileInputStream(java.io.FileDescriptor fdObj) { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public FileInputStream(java.io.FileDescriptor fdObj, boolean isFdOwner) { throw new RuntimeException("Stub!"); }
diff --git a/ojluni/annotations/mmodule/java/lang/Thread.annotated.java b/ojluni/annotations/mmodule/java/lang/Thread.annotated.java
index 7682796..8308a99 100644
--- a/ojluni/annotations/mmodule/java/lang/Thread.annotated.java
+++ b/ojluni/annotations/mmodule/java/lang/Thread.annotated.java
@@ -141,9 +141,11 @@
public static java.lang.Thread.UncaughtExceptionHandler getDefaultUncaughtExceptionHandler() { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void setUncaughtExceptionPreHandler(UncaughtExceptionHandler eh) { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static UncaughtExceptionHandler getUncaughtExceptionPreHandler() { throw new RuntimeException("Stub!"); }
diff --git a/ojluni/annotations/mmodule/java/net/DatagramSocket.annotated.java b/ojluni/annotations/mmodule/java/net/DatagramSocket.annotated.java
index 8f7ddf7..52b5bff 100644
--- a/ojluni/annotations/mmodule/java/net/DatagramSocket.annotated.java
+++ b/ojluni/annotations/mmodule/java/net/DatagramSocket.annotated.java
@@ -103,6 +103,7 @@
public static synchronized void setDatagramSocketImplFactory(java.net.DatagramSocketImplFactory fac) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public java.io.FileDescriptor getFileDescriptor$() { throw new RuntimeException("Stub!"); }
}
diff --git a/ojluni/annotations/mmodule/java/net/Inet4Address.annotated.java b/ojluni/annotations/mmodule/java/net/Inet4Address.annotated.java
index b3f6c4c..4692b1f 100644
--- a/ojluni/annotations/mmodule/java/net/Inet4Address.annotated.java
+++ b/ojluni/annotations/mmodule/java/net/Inet4Address.annotated.java
@@ -62,14 +62,17 @@
public boolean equals(java.lang.Object obj) { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final java.net.InetAddress ALL;
static { ALL = null; }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final java.net.InetAddress ANY;
static { ANY = null; }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final java.net.InetAddress LOOPBACK;
static { LOOPBACK = null; }
diff --git a/ojluni/annotations/mmodule/java/net/Inet6Address.annotated.java b/ojluni/annotations/mmodule/java/net/Inet6Address.annotated.java
index 2a465e5..567d877 100644
--- a/ojluni/annotations/mmodule/java/net/Inet6Address.annotated.java
+++ b/ojluni/annotations/mmodule/java/net/Inet6Address.annotated.java
@@ -71,10 +71,12 @@
public boolean isIPv4CompatibleAddress() { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final java.net.InetAddress ANY;
static { ANY = null; }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final java.net.InetAddress LOOPBACK;
static { LOOPBACK = null; }
diff --git a/ojluni/annotations/mmodule/java/net/InetAddress.annotated.java b/ojluni/annotations/mmodule/java/net/InetAddress.annotated.java
index 3ec88f4..6229cc9 100644
--- a/ojluni/annotations/mmodule/java/net/InetAddress.annotated.java
+++ b/ojluni/annotations/mmodule/java/net/InetAddress.annotated.java
@@ -87,18 +87,23 @@
public static java.net.InetAddress getLocalHost() throws java.net.UnknownHostException { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static boolean isNumeric(java.lang.String address) { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static java.net.InetAddress parseNumericAddress(java.lang.String numericAddress) { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static void clearDnsCache() { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static java.net.InetAddress getByNameOnNet(java.lang.String host, int netId) throws java.net.UnknownHostException { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static java.net.InetAddress[] getAllByNameOnNet(java.lang.String host, int netId) throws java.net.UnknownHostException { throw new RuntimeException("Stub!"); }
}
diff --git a/ojluni/annotations/mmodule/java/net/Socket.annotated.java b/ojluni/annotations/mmodule/java/net/Socket.annotated.java
index 2123660..61014de 100644
--- a/ojluni/annotations/mmodule/java/net/Socket.annotated.java
+++ b/ojluni/annotations/mmodule/java/net/Socket.annotated.java
@@ -139,6 +139,7 @@
public void setPerformancePreferences(int connectionTime, int latency, int bandwidth) { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
public java.io.FileDescriptor getFileDescriptor$() { throw new RuntimeException("Stub!"); }
diff --git a/ojluni/annotations/mmodule/java/net/SocketImpl.annotated.java b/ojluni/annotations/mmodule/java/net/SocketImpl.annotated.java
index 46c201f..a29ed76 100644
--- a/ojluni/annotations/mmodule/java/net/SocketImpl.annotated.java
+++ b/ojluni/annotations/mmodule/java/net/SocketImpl.annotated.java
@@ -62,6 +62,7 @@
protected java.io.FileDescriptor getFileDescriptor() { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public java.io.FileDescriptor getFD$() { throw new RuntimeException("Stub!"); }
diff --git a/ojluni/annotations/mmodule/java/nio/ByteBuffer.annotated.java b/ojluni/annotations/mmodule/java/nio/ByteBuffer.annotated.java
index c2d01c5..369d0a5 100644
--- a/ojluni/annotations/mmodule/java/nio/ByteBuffer.annotated.java
+++ b/ojluni/annotations/mmodule/java/nio/ByteBuffer.annotated.java
@@ -151,6 +151,7 @@
public boolean isAccessible() { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public void setAccessible(boolean value) { throw new RuntimeException("Stub!"); }
}
diff --git a/ojluni/annotations/mmodule/java/nio/DirectByteBuffer.annotated.java b/ojluni/annotations/mmodule/java/nio/DirectByteBuffer.annotated.java
index 6612539..8031e93 100644
--- a/ojluni/annotations/mmodule/java/nio/DirectByteBuffer.annotated.java
+++ b/ojluni/annotations/mmodule/java/nio/DirectByteBuffer.annotated.java
@@ -28,108 +28,162 @@
package java.nio;
+@libcore.api.Hide
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@SuppressWarnings({"unchecked", "deprecation", "all"})
public class DirectByteBuffer extends java.nio.MappedByteBuffer implements sun.nio.ch.DirectBuffer {
+@libcore.api.Hide
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public DirectByteBuffer(int cap, long addr, java.io.FileDescriptor fd, java.lang.Runnable unmapper, boolean isReadOnly) { super(0, 0, 0, 0); throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.lang.Object attachment() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final sun.misc.Cleaner cleaner() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.ByteBuffer slice() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.ByteBuffer duplicate() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.ByteBuffer asReadOnlyBuffer() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final long address() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final byte get() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final byte get(int i) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public java.nio.ByteBuffer get(byte[] dst, int dstOffset, int length) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public java.nio.ByteBuffer put(java.nio.ByteBuffer src) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.ByteBuffer put(byte x) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.ByteBuffer put(int i, byte x) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public java.nio.ByteBuffer put(byte[] src, int srcOffset, int length) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.ByteBuffer compact() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final boolean isDirect() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final boolean isReadOnly() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final char getChar() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final char getChar(int i) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.ByteBuffer putChar(char x) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.ByteBuffer putChar(int i, char x) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.CharBuffer asCharBuffer() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final short getShort() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final short getShort(int i) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.ByteBuffer putShort(short x) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.ByteBuffer putShort(int i, short x) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.ShortBuffer asShortBuffer() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public int getInt() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public int getInt(int i) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.ByteBuffer putInt(int x) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.ByteBuffer putInt(int i, int x) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.IntBuffer asIntBuffer() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final long getLong() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final long getLong(int i) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.ByteBuffer putLong(long x) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.ByteBuffer putLong(int i, long x) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.LongBuffer asLongBuffer() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final float getFloat() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final float getFloat(int i) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.ByteBuffer putFloat(float x) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.ByteBuffer putFloat(int i, float x) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.FloatBuffer asFloatBuffer() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final double getDouble() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final double getDouble(int i) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.ByteBuffer putDouble(double x) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.ByteBuffer putDouble(int i, double x) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final java.nio.DoubleBuffer asDoubleBuffer() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public final boolean isAccessible() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public final void setAccessible(boolean value) { throw new RuntimeException("Stub!"); }
}
diff --git a/ojluni/annotations/mmodule/java/security/Provider.annotated.java b/ojluni/annotations/mmodule/java/security/Provider.annotated.java
index 1d6652a..3ffe654 100644
--- a/ojluni/annotations/mmodule/java/security/Provider.annotated.java
+++ b/ojluni/annotations/mmodule/java/security/Provider.annotated.java
@@ -106,6 +106,7 @@
public boolean isRegistered() { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public synchronized void warmUpServiceProvision() { throw new RuntimeException("Stub!"); }
@SuppressWarnings({"unchecked", "deprecation", "all"})
diff --git a/ojluni/annotations/mmodule/java/security/Signature.annotated.java b/ojluni/annotations/mmodule/java/security/Signature.annotated.java
index 4ac3abd..8aaf5c4 100644
--- a/ojluni/annotations/mmodule/java/security/Signature.annotated.java
+++ b/ojluni/annotations/mmodule/java/security/Signature.annotated.java
@@ -86,6 +86,7 @@
public java.lang.Object clone() throws java.lang.CloneNotSupportedException { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public java.security.SignatureSpi getCurrentSpi() { throw new RuntimeException("Stub!"); }
diff --git a/ojluni/annotations/mmodule/java/text/DateFormat.annotated.java b/ojluni/annotations/mmodule/java/text/DateFormat.annotated.java
index 6456c83..12a850e 100644
--- a/ojluni/annotations/mmodule/java/text/DateFormat.annotated.java
+++ b/ojluni/annotations/mmodule/java/text/DateFormat.annotated.java
@@ -83,6 +83,7 @@
public static final java.text.DateFormat getInstance() { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static final void set24HourTimePref(java.lang.Boolean is24Hour) { throw new RuntimeException("Stub!"); }
diff --git a/ojluni/annotations/mmodule/java/util/LinkedHashMap.annotated.java b/ojluni/annotations/mmodule/java/util/LinkedHashMap.annotated.java
index 0354493..ada21b1 100644
--- a/ojluni/annotations/mmodule/java/util/LinkedHashMap.annotated.java
+++ b/ojluni/annotations/mmodule/java/util/LinkedHashMap.annotated.java
@@ -48,6 +48,7 @@
public void clear() { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public java.util.Map.Entry<K,V> eldest() { throw new RuntimeException("Stub!"); }
diff --git a/ojluni/annotations/mmodule/java/util/zip/ZipEntry.annotated.java b/ojluni/annotations/mmodule/java/util/zip/ZipEntry.annotated.java
index 519cb13..6c840f7 100644
--- a/ojluni/annotations/mmodule/java/util/zip/ZipEntry.annotated.java
+++ b/ojluni/annotations/mmodule/java/util/zip/ZipEntry.annotated.java
@@ -38,6 +38,7 @@
public ZipEntry(java.util.zip.ZipEntry e) { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public long getDataOffset() { throw new RuntimeException("Stub!"); }
diff --git a/ojluni/annotations/mmodule/javax/net/ssl/HttpsURLConnection.annotated.java b/ojluni/annotations/mmodule/javax/net/ssl/HttpsURLConnection.annotated.java
index 8379981..5177ba3 100644
--- a/ojluni/annotations/mmodule/javax/net/ssl/HttpsURLConnection.annotated.java
+++ b/ojluni/annotations/mmodule/javax/net/ssl/HttpsURLConnection.annotated.java
@@ -43,6 +43,7 @@
public void setHostnameVerifier(javax.net.ssl.HostnameVerifier v) { throw new RuntimeException("Stub!"); }
+ @android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static javax.net.ssl.HostnameVerifier getStrictHostnameVerifier() { throw new RuntimeException("Stub!"); }
diff --git a/ojluni/annotations/mmodule/sun/misc/Cleaner.annotated.java b/ojluni/annotations/mmodule/sun/misc/Cleaner.annotated.java
index 3c2531c..06dddd4 100644
--- a/ojluni/annotations/mmodule/sun/misc/Cleaner.annotated.java
+++ b/ojluni/annotations/mmodule/sun/misc/Cleaner.annotated.java
@@ -28,16 +28,22 @@
import java.lang.ref.*;
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.Hide
@SuppressWarnings({"unchecked", "deprecation", "all"})
public class Cleaner extends java.lang.ref.PhantomReference<java.lang.Object> {
+@libcore.api.Hide
Cleaner(java.lang.Object referent, java.lang.Runnable thunk) { super(null, null); throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public static sun.misc.Cleaner create(java.lang.Object ob, java.lang.Runnable thunk) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public void clean() { throw new RuntimeException("Stub!"); }
}
diff --git a/ojluni/annotations/mmodule/sun/misc/Unsafe.annotated.java b/ojluni/annotations/mmodule/sun/misc/Unsafe.annotated.java
index 9407d1a..f6e755e 100644
--- a/ojluni/annotations/mmodule/sun/misc/Unsafe.annotated.java
+++ b/ojluni/annotations/mmodule/sun/misc/Unsafe.annotated.java
@@ -23,107 +23,278 @@
* questions.
*/
+
package sun.misc;
-// sun.misc.Unsafe is part of the Core Platform API as platform uses protobuf and protobuf uses
-// this API for fast structure updates from native code (b/144502743).
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.Hide
@SuppressWarnings({"unchecked", "deprecation", "all"})
public final class Unsafe {
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public static sun.misc.Unsafe getUnsafe() {
- throw new RuntimeException("Stub!");
- }
+private Unsafe() { throw new RuntimeException("Stub!"); }
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public int arrayBaseOffset(Class clazz) {
- throw new RuntimeException("Stub!");
- }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public static sun.misc.Unsafe getUnsafe() { throw new RuntimeException("Stub!"); }
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public int arrayIndexScale(Class clazz) {
- throw new RuntimeException("Stub!");
- }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public long objectFieldOffset(java.lang.reflect.Field field) { throw new RuntimeException("Stub!"); }
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native void copyMemory(long srcAddr, long destAddr, long bytes);
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public int arrayBaseOffset(java.lang.Class clazz) { throw new RuntimeException("Stub!"); }
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native boolean getBoolean(Object obj, long offset);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native byte getByte(long address);
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public int arrayIndexScale(java.lang.Class clazz) { throw new RuntimeException("Stub!"); }
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native byte getByte(Object obj, long offset);
+@libcore.api.Hide
+public native boolean compareAndSwapInt(java.lang.Object obj, long offset, int expectedValue, int newValue);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native double getDouble(Object obj, long offset);
+@libcore.api.Hide
+public native boolean compareAndSwapLong(java.lang.Object obj, long offset, long expectedValue, long newValue);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native double getDouble(long address);
+@libcore.api.Hide
+public native boolean compareAndSwapObject(java.lang.Object obj, long offset, java.lang.Object expectedValue, java.lang.Object newValue);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native float getFloat(Object obj, long offset);
+@libcore.api.Hide
+public native int getIntVolatile(java.lang.Object obj, long offset);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native float getFloat(long address);
+@libcore.api.Hide
+public native void putIntVolatile(java.lang.Object obj, long offset, int newValue);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native int getInt(long address);
+@libcore.api.Hide
+public native long getLongVolatile(java.lang.Object obj, long offset);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native int getInt(Object obj, long offset);
+@libcore.api.Hide
+public native void putLongVolatile(java.lang.Object obj, long offset, long newValue);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native long getLong(long address);
+@libcore.api.Hide
+public native void putObjectVolatile(java.lang.Object obj, long offset, java.lang.Object newValue);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native long getLong(Object obj, long offset);
+@libcore.api.Hide
+public native java.lang.Object getObjectVolatile(java.lang.Object obj, long offset);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native Object getObject(Object obj, long offset);
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native int getInt(java.lang.Object obj, long offset);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public long objectFieldOffset(java.lang.reflect.Field field) {
- throw new RuntimeException("Stub!");
- }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native void putInt(java.lang.Object obj, long offset, int newValue);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native void putBoolean(Object obj, long offset, boolean newValue);
+@libcore.api.Hide
+public native void putOrderedInt(java.lang.Object obj, long offset, int newValue);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native void putByte(long address, byte newValue);
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native long getLong(java.lang.Object obj, long offset);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native void putByte(Object obj, long offset, byte newValue);
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native void putLong(java.lang.Object obj, long offset, long newValue);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native void putDouble(Object obj, long offset, double newValue);
+@libcore.api.Hide
+public native void putOrderedLong(java.lang.Object obj, long offset, long newValue);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native void putDouble(long address, double newValue);
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native java.lang.Object getObject(java.lang.Object obj, long offset);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native void putFloat(Object obj, long offset, float newValue);
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native void putObject(java.lang.Object obj, long offset, java.lang.Object newValue);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native void putFloat(long address, float newValue);
+@libcore.api.Hide
+public native void putOrderedObject(java.lang.Object obj, long offset, java.lang.Object newValue);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native void putInt(long address, int newValue);
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native boolean getBoolean(java.lang.Object obj, long offset);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native void putInt(Object obj, long offset, int newValue);
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native void putBoolean(java.lang.Object obj, long offset, boolean newValue);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native void putLong(long address, long newValue);
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native byte getByte(java.lang.Object obj, long offset);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native void putLong(Object obj, long offset, long newValue);
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native void putByte(java.lang.Object obj, long offset, byte newValue);
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public native void putObject(Object obj, long offset, Object newValue);
+@libcore.api.Hide
+public native char getChar(java.lang.Object obj, long offset);
+
+@libcore.api.Hide
+public native void putChar(java.lang.Object obj, long offset, char newValue);
+
+@libcore.api.Hide
+public native short getShort(java.lang.Object obj, long offset);
+
+@libcore.api.Hide
+public native void putShort(java.lang.Object obj, long offset, short newValue);
+
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native float getFloat(java.lang.Object obj, long offset);
+
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native void putFloat(java.lang.Object obj, long offset, float newValue);
+
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native double getDouble(java.lang.Object obj, long offset);
+
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native void putDouble(java.lang.Object obj, long offset, double newValue);
+
+@libcore.api.Hide
+public native void park(boolean absolute, long time);
+
+@libcore.api.Hide
+public native void unpark(java.lang.Object obj);
+
+@libcore.api.Hide
+public native java.lang.Object allocateInstance(java.lang.Class<?> c);
+
+@libcore.api.Hide
+public native int addressSize();
+
+@libcore.api.Hide
+public native int pageSize();
+
+@libcore.api.Hide
+public native long allocateMemory(long bytes);
+
+@libcore.api.Hide
+public native void freeMemory(long address);
+
+@libcore.api.Hide
+public native void setMemory(long address, long bytes, byte value);
+
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native byte getByte(long address);
+
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native void putByte(long address, byte x);
+
+@libcore.api.Hide
+public native short getShort(long address);
+
+@libcore.api.Hide
+public native void putShort(long address, short x);
+
+@libcore.api.Hide
+public native char getChar(long address);
+
+@libcore.api.Hide
+public native void putChar(long address, char x);
+
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native int getInt(long address);
+
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native void putInt(long address, int x);
+
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native long getLong(long address);
+
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native void putLong(long address, long x);
+
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native float getFloat(long address);
+
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native void putFloat(long address, float x);
+
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native double getDouble(long address);
+
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native void putDouble(long address, double x);
+
+@libcore.api.Hide
+public native void copyMemoryToPrimitiveArray(long srcAddr, java.lang.Object dst, long dstOffset, long bytes);
+
+@libcore.api.Hide
+public native void copyMemoryFromPrimitiveArray(java.lang.Object src, long srcOffset, long dstAddr, long bytes);
+
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public native void copyMemory(long srcAddr, long dstAddr, long bytes);
+
+@libcore.api.Hide
+public int getAndAddInt(java.lang.Object o, long offset, int delta) { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public long getAndAddLong(java.lang.Object o, long offset, long delta) { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public int getAndSetInt(java.lang.Object o, long offset, int newValue) { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public long getAndSetLong(java.lang.Object o, long offset, long newValue) { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public java.lang.Object getAndSetObject(java.lang.Object o, long offset, java.lang.Object newValue) { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public native void loadFence();
+
+@libcore.api.Hide
+public native void storeFence();
+
+@libcore.api.Hide
+public native void fullFence();
+
+@libcore.api.Hide
+public static final int INVALID_FIELD_OFFSET = -1; // 0xffffffff
}
+
diff --git a/ojluni/annotations/mmodule/sun/security/jca/Providers.annotated.java b/ojluni/annotations/mmodule/sun/security/jca/Providers.annotated.java
index 03bbc4e..476ebb5 100644
--- a/ojluni/annotations/mmodule/sun/security/jca/Providers.annotated.java
+++ b/ojluni/annotations/mmodule/sun/security/jca/Providers.annotated.java
@@ -31,41 +31,58 @@
import java.util.Set;
import java.security.NoSuchAlgorithmException;
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.Hide
@SuppressWarnings({"unchecked", "deprecation", "all"})
public class Providers {
+@libcore.api.Hide
Providers() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public static java.security.Provider getSunProvider() { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
public static java.lang.Object startJarVerification() { throw new RuntimeException("Stub!"); }
-
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
public static void stopJarVerification(java.lang.Object obj) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public static sun.security.jca.ProviderList getProviderList() { throw new RuntimeException("Stub!"); }
-public static void setProviderList(sun.security.jca.ProviderList newList) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
+public static void setProviderList(ProviderList newList) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public static sun.security.jca.ProviderList getFullProviderList() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public static sun.security.jca.ProviderList getThreadProviderList() { throw new RuntimeException("Stub!"); }
-public static synchronized sun.security.jca.ProviderList beginThreadProviderList(sun.security.jca.ProviderList list) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
+public static synchronized sun.security.jca.ProviderList beginThreadProviderList(ProviderList list) { throw new RuntimeException("Stub!"); }
-public static synchronized void endThreadProviderList(sun.security.jca.ProviderList list) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
+public static synchronized void endThreadProviderList(ProviderList list) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public static void setMaximumAllowableApiLevelForBcDeprecation(int targetApiLevel) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public static int getMaximumAllowableApiLevelForBcDeprecation() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public static synchronized void checkBouncyCastleDeprecation(java.lang.String provider, java.lang.String service, java.lang.String algorithm) throws java.security.NoSuchAlgorithmException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public static synchronized void checkBouncyCastleDeprecation(java.security.Provider provider, java.lang.String service, java.lang.String algorithm) throws java.security.NoSuchAlgorithmException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public static final int DEFAULT_MAXIMUM_ALLOWABLE_TARGET_API_LEVEL_FOR_BC_DEPRECATION = 27; // 0x1b
}
diff --git a/ojluni/annotations/mmodule/sun/security/pkcs/PKCS7.annotated.java b/ojluni/annotations/mmodule/sun/security/pkcs/PKCS7.annotated.java
index c6bc489..3bb1a66 100644
--- a/ojluni/annotations/mmodule/sun/security/pkcs/PKCS7.annotated.java
+++ b/ojluni/annotations/mmodule/sun/security/pkcs/PKCS7.annotated.java
@@ -30,58 +30,86 @@
import java.io.*;
import java.util.*;
import java.security.*;
+import java.security.cert.X509Certificate;
import sun.security.util.*;
import sun.security.x509.AlgorithmId;
import sun.security.x509.X500Name;
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.Hide
@SuppressWarnings({"unchecked", "deprecation", "all"})
public class PKCS7 {
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
public PKCS7(java.io.InputStream in) throws java.io.IOException, sun.security.pkcs.ParsingException { throw new RuntimeException("Stub!"); }
-public PKCS7(sun.security.util.DerInputStream derin) throws sun.security.pkcs.ParsingException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
+public PKCS7(DerInputStream derin) throws sun.security.pkcs.ParsingException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public PKCS7(byte[] bytes) throws sun.security.pkcs.ParsingException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public PKCS7(sun.security.x509.AlgorithmId[] digestAlgorithmIds, sun.security.pkcs.ContentInfo contentInfo, java.security.cert.X509Certificate[] certificates, java.security.cert.X509CRL[] crls, sun.security.pkcs.SignerInfo[] signerInfos) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public PKCS7(sun.security.x509.AlgorithmId[] digestAlgorithmIds, sun.security.pkcs.ContentInfo contentInfo, java.security.cert.X509Certificate[] certificates, sun.security.pkcs.SignerInfo[] signerInfos) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public void encodeSignedData(java.io.OutputStream out) throws java.io.IOException { throw new RuntimeException("Stub!"); }
-public void encodeSignedData(sun.security.util.DerOutputStream out) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
+public void encodeSignedData(DerOutputStream out) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public sun.security.pkcs.SignerInfo verify(sun.security.pkcs.SignerInfo info, byte[] bytes) throws java.security.NoSuchAlgorithmException, java.security.SignatureException { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
public sun.security.pkcs.SignerInfo verify(sun.security.pkcs.SignerInfo info, java.io.InputStream dataInputStream) throws java.io.IOException, java.security.NoSuchAlgorithmException, java.security.SignatureException { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
public sun.security.pkcs.SignerInfo[] verify(byte[] bytes) throws java.security.NoSuchAlgorithmException, java.security.SignatureException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public sun.security.pkcs.SignerInfo[] verify() throws java.security.NoSuchAlgorithmException, java.security.SignatureException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public java.math.BigInteger getVersion() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public sun.security.x509.AlgorithmId[] getDigestAlgorithmIds() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public sun.security.pkcs.ContentInfo getContentInfo() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
public java.security.cert.X509Certificate[] getCertificates() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public java.security.cert.X509CRL[] getCRLs() { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
public sun.security.pkcs.SignerInfo[] getSignerInfos() { throw new RuntimeException("Stub!"); }
-public java.security.cert.X509Certificate getCertificate(java.math.BigInteger serial, sun.security.x509.X500Name issuerName) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
+public X509Certificate getCertificate(java.math.BigInteger serial, X500Name issuerName) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public java.lang.String toString() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public boolean isOldStyle() { throw new RuntimeException("Stub!"); }
}
diff --git a/ojluni/annotations/mmodule/sun/security/pkcs/ParsingException.annotated.java b/ojluni/annotations/mmodule/sun/security/pkcs/ParsingException.annotated.java
index 854f394..bdc70dc 100644
--- a/ojluni/annotations/mmodule/sun/security/pkcs/ParsingException.annotated.java
+++ b/ojluni/annotations/mmodule/sun/security/pkcs/ParsingException.annotated.java
@@ -32,12 +32,15 @@
package sun.security.pkcs;
-@libcore.api.Hide
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
@SuppressWarnings({"unchecked", "deprecation", "all"})
public class ParsingException extends java.io.IOException {
+@libcore.api.Hide
public ParsingException() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public ParsingException(java.lang.String s) { throw new RuntimeException("Stub!"); }
}
diff --git a/ojluni/annotations/mmodule/sun/security/pkcs/SignerInfo.annotated.java b/ojluni/annotations/mmodule/sun/security/pkcs/SignerInfo.annotated.java
index 787b295..6a85427 100644
--- a/ojluni/annotations/mmodule/sun/security/pkcs/SignerInfo.annotated.java
+++ b/ojluni/annotations/mmodule/sun/security/pkcs/SignerInfo.annotated.java
@@ -28,52 +28,77 @@
package sun.security.pkcs;
import sun.security.util.DerEncoder;
+import sun.security.util.DerInputStream;
+import sun.security.x509.X500Name;
import java.io.IOException;
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.Hide
@SuppressWarnings({"unchecked", "deprecation", "all"})
public class SignerInfo implements sun.security.util.DerEncoder {
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
public SignerInfo() { throw new RuntimeException("Stub!"); }
-public SignerInfo(sun.security.x509.X500Name issuerName, java.math.BigInteger serial, sun.security.x509.AlgorithmId digestAlgorithmId, sun.security.x509.AlgorithmId digestEncryptionAlgorithmId, byte[] encryptedDigest) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
+public SignerInfo(X500Name issuerName, java.math.BigInteger serial, sun.security.x509.AlgorithmId digestAlgorithmId, sun.security.x509.AlgorithmId digestEncryptionAlgorithmId, byte[] encryptedDigest) { throw new RuntimeException("Stub!"); }
-public SignerInfo(sun.security.x509.X500Name issuerName, java.math.BigInteger serial, sun.security.x509.AlgorithmId digestAlgorithmId, sun.security.pkcs.PKCS9Attributes authenticatedAttributes, sun.security.x509.AlgorithmId digestEncryptionAlgorithmId, byte[] encryptedDigest, sun.security.pkcs.PKCS9Attributes unauthenticatedAttributes) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
+public SignerInfo(X500Name issuerName, java.math.BigInteger serial, sun.security.x509.AlgorithmId digestAlgorithmId, PKCS9Attributes authenticatedAttributes, sun.security.x509.AlgorithmId digestEncryptionAlgorithmId, byte[] encryptedDigest, PKCS9Attributes unauthenticatedAttributes) { throw new RuntimeException("Stub!"); }
-public SignerInfo(sun.security.util.DerInputStream derin) throws java.io.IOException, sun.security.pkcs.ParsingException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
+public SignerInfo(DerInputStream derin) throws java.io.IOException, sun.security.pkcs.ParsingException { throw new RuntimeException("Stub!"); }
-public SignerInfo(sun.security.util.DerInputStream derin, boolean oldStyle) throws java.io.IOException, sun.security.pkcs.ParsingException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
+public SignerInfo(DerInputStream derin, boolean oldStyle) throws java.io.IOException, sun.security.pkcs.ParsingException { throw new RuntimeException("Stub!"); }
-public void encode(sun.security.util.DerOutputStream out) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
+public void encode(DerOutputStream out) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public void derEncode(java.io.OutputStream out) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public java.security.cert.X509Certificate getCertificate(sun.security.pkcs.PKCS7 block) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
public java.util.ArrayList<java.security.cert.X509Certificate> getCertificateChain(sun.security.pkcs.PKCS7 block) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public java.math.BigInteger getVersion() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public sun.security.x509.X500Name getIssuerName() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public java.math.BigInteger getCertificateSerialNumber() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public sun.security.x509.AlgorithmId getDigestAlgorithmId() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public sun.security.pkcs.PKCS9Attributes getAuthenticatedAttributes() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public sun.security.x509.AlgorithmId getDigestEncryptionAlgorithmId() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public byte[] getEncryptedDigest() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public sun.security.pkcs.PKCS9Attributes getUnauthenticatedAttributes() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public sun.security.pkcs.PKCS7 getTsToken() throws java.io.IOException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public java.security.Timestamp getTimestamp() throws java.security.cert.CertificateException, java.io.IOException, java.security.NoSuchAlgorithmException, java.security.SignatureException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public java.lang.String toString() { throw new RuntimeException("Stub!"); }
}
diff --git a/ojluni/annotations/mmodule/sun/security/util/ObjectIdentifier.annotated.java b/ojluni/annotations/mmodule/sun/security/util/ObjectIdentifier.annotated.java
index 90a4dc4..2892b72 100644
--- a/ojluni/annotations/mmodule/sun/security/util/ObjectIdentifier.annotated.java
+++ b/ojluni/annotations/mmodule/sun/security/util/ObjectIdentifier.annotated.java
@@ -26,32 +26,40 @@
package sun.security.util;
-import java.io.*;
-import java.math.BigInteger;
-
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.Hide
@SuppressWarnings({"unchecked", "deprecation", "all"})
public final class ObjectIdentifier implements java.io.Serializable {
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
public ObjectIdentifier(java.lang.String oid) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public ObjectIdentifier(int[] values) throws java.io.IOException { throw new RuntimeException("Stub!"); }
-public ObjectIdentifier(sun.security.util.DerInputStream in) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
+public ObjectIdentifier(DerInputStream in) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public static sun.security.util.ObjectIdentifier newInternal(int[] values) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
@Deprecated
public boolean equals(sun.security.util.ObjectIdentifier other) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public boolean equals(java.lang.Object obj) { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public int hashCode() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public int[] toIntArray() { throw new RuntimeException("Stub!"); }
+@libcore.api.Hide
public java.lang.String toString() { throw new RuntimeException("Stub!"); }
}
diff --git a/ojluni/annotations/mmodule/sun/security/x509/AlgorithmId.annotated.java b/ojluni/annotations/mmodule/sun/security/x509/AlgorithmId.annotated.java
index 1fc8d82..0399caa 100644
--- a/ojluni/annotations/mmodule/sun/security/x509/AlgorithmId.annotated.java
+++ b/ojluni/annotations/mmodule/sun/security/x509/AlgorithmId.annotated.java
@@ -24,31 +24,260 @@
* questions.
*/
+
package sun.security.x509;
-import java.io.Serializable;
-import java.security.NoSuchAlgorithmException;
-import sun.security.util.DerEncoder;
-import sun.security.util.ObjectIdentifier;
-
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
@libcore.api.IntraCoreApi
@libcore.api.Hide
-public class AlgorithmId implements Serializable, DerEncoder {
+@SuppressWarnings({"unchecked", "deprecation", "all"})
+public class AlgorithmId implements java.io.Serializable {
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- public AlgorithmId(ObjectIdentifier oid) {
- throw new RuntimeException("Stub!");
- }
+@libcore.api.Hide
+@Deprecated
+public AlgorithmId() { throw new RuntimeException("Stub!"); }
- @libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
- @libcore.api.IntraCoreApi
- public String getName() {
- throw new RuntimeException("Stub!");
- }
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.Hide
+public AlgorithmId(sun.security.util.ObjectIdentifier oid) { throw new RuntimeException("Stub!"); }
- @libcore.api.IntraCoreApi
- public static AlgorithmId get(String algname) throws NoSuchAlgorithmException {
- throw new RuntimeException("Stub!");
- }
+@libcore.api.Hide
+public AlgorithmId(sun.security.util.ObjectIdentifier oid, java.security.AlgorithmParameters algparams) { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+protected void decodeParams() throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public final void encode(DerOutputStream out) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+@libcore.api.IntraCoreApi
+@libcore.api.Hide
+public void derEncode(java.io.OutputStream out) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public final byte[] encode() throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public final sun.security.util.ObjectIdentifier getOID() { throw new RuntimeException("Stub!"); }
+
+@android.annotation.SystemApi(client = android.annotation.SystemApi.Client.MODULE_LIBRARIES)
+@libcore.api.CorePlatformApi(status = libcore.api.CorePlatformApi.Status.STABLE)
+@libcore.api.IntraCoreApi
+@libcore.api.Hide
+public java.lang.String getName() { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public java.security.AlgorithmParameters getParameters() { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public byte[] getEncodedParams() throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public boolean equals(sun.security.x509.AlgorithmId other) { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public boolean equals(java.lang.Object other) { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public final boolean equals(sun.security.util.ObjectIdentifier id) { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public int hashCode() { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+protected java.lang.String paramsToString() { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public java.lang.String toString() { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public static sun.security.x509.AlgorithmId parse(DerValue val) throws java.io.IOException { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+@Deprecated
+public static sun.security.x509.AlgorithmId getAlgorithmId(java.lang.String algname) throws java.security.NoSuchAlgorithmException { throw new RuntimeException("Stub!"); }
+
+@libcore.api.IntraCoreApi
+@libcore.api.Hide
+public static sun.security.x509.AlgorithmId get(java.lang.String algname) throws java.security.NoSuchAlgorithmException { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public static sun.security.x509.AlgorithmId get(java.security.AlgorithmParameters algparams) throws java.security.NoSuchAlgorithmException { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public static java.lang.String makeSigAlg(java.lang.String digAlg, java.lang.String encAlg) { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public static java.lang.String getEncAlgFromSigAlg(java.lang.String signatureAlgorithm) { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public static java.lang.String getDigAlgFromSigAlg(java.lang.String signatureAlgorithm) { throw new RuntimeException("Stub!"); }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier AES_oid;
+static { AES_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier DH_PKIX_oid;
+static { DH_PKIX_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier DH_oid;
+static { DH_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier DSA_OIW_oid;
+static { DSA_OIW_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier DSA_oid;
+static { DSA_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier ECDH_oid;
+static { ECDH_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier EC_oid;
+static { EC_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier MD2_oid;
+static { MD2_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier MD5_oid;
+static { MD5_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier RSAEncryption_oid;
+static { RSAEncryption_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier RSA_oid;
+static { RSA_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier SHA224_oid;
+static { SHA224_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier SHA256_oid;
+static { SHA256_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier SHA384_oid;
+static { SHA384_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier SHA512_oid;
+static { SHA512_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier SHA_oid;
+static { SHA_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier md2WithRSAEncryption_oid;
+static { md2WithRSAEncryption_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier md5WithRSAEncryption_oid;
+static { md5WithRSAEncryption_oid = null; }
+
+@libcore.api.Hide
+protected DerValue params;
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier pbeWithMD5AndDES_oid;
+static { pbeWithMD5AndDES_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier pbeWithMD5AndRC2_oid;
+static { pbeWithMD5AndRC2_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier pbeWithSHA1AndDES_oid;
+static { pbeWithSHA1AndDES_oid = null; }
+
+@libcore.api.Hide
+public static sun.security.util.ObjectIdentifier pbeWithSHA1AndDESede_oid;
+
+@libcore.api.Hide
+public static sun.security.util.ObjectIdentifier pbeWithSHA1AndRC2_40_oid;
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier pbeWithSHA1AndRC2_oid;
+static { pbeWithSHA1AndRC2_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier sha1WithDSA_OIW_oid;
+static { sha1WithDSA_OIW_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier sha1WithDSA_oid;
+static { sha1WithDSA_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier sha1WithECDSA_oid;
+static { sha1WithECDSA_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier sha1WithRSAEncryption_OIW_oid;
+static { sha1WithRSAEncryption_OIW_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier sha1WithRSAEncryption_oid;
+static { sha1WithRSAEncryption_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier sha224WithDSA_oid;
+static { sha224WithDSA_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier sha224WithECDSA_oid;
+static { sha224WithECDSA_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier sha224WithRSAEncryption_oid;
+static { sha224WithRSAEncryption_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier sha256WithDSA_oid;
+static { sha256WithDSA_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier sha256WithECDSA_oid;
+static { sha256WithECDSA_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier sha256WithRSAEncryption_oid;
+static { sha256WithRSAEncryption_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier sha384WithECDSA_oid;
+static { sha384WithECDSA_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier sha384WithRSAEncryption_oid;
+static { sha384WithRSAEncryption_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier sha512WithECDSA_oid;
+static { sha512WithECDSA_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier sha512WithRSAEncryption_oid;
+static { sha512WithRSAEncryption_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier shaWithDSA_OIW_oid;
+static { shaWithDSA_OIW_oid = null; }
+
+@libcore.api.Hide
+public static final sun.security.util.ObjectIdentifier specifiedWithECDSA_oid;
+static { specifiedWithECDSA_oid = null; }
}
+