Merge "Adjust NativeAllocationRegistry for new accounting"
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 f83147f..ac994bb 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
@@ -75,6 +75,7 @@
      * Get a stack trace for the specified thread ID.  The ID can be found
      * in the data from getThreadStats.
      */
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     native public static StackTraceElement[] getStackTraceById(int threadId);
 
diff --git a/luni/src/main/java/libcore/io/Os.java b/luni/src/main/java/libcore/io/Os.java
index 0cbed32..1b01161 100644
--- a/luni/src/main/java/libcore/io/Os.java
+++ b/luni/src/main/java/libcore/io/Os.java
@@ -130,10 +130,13 @@
     public void mkdir(String path, int mode) throws ErrnoException;
     public void mkfifo(String path, int mode) throws ErrnoException;
     public void mlock(long address, long byteCount) throws ErrnoException;
+    @UnsupportedAppUsage
     public long mmap(long address, long byteCount, int prot, int flags, FileDescriptor fd, long offset) throws ErrnoException;
     public void msync(long address, long byteCount, int flags) throws ErrnoException;
     public void munlock(long address, long byteCount) throws ErrnoException;
+    @UnsupportedAppUsage
     public void munmap(long address, long byteCount) throws ErrnoException;
+    @UnsupportedAppUsage
     public FileDescriptor open(String path, int flags, int mode) throws ErrnoException;
     public FileDescriptor[] pipe2(int flags) throws ErrnoException;
     /* TODO: if we used the non-standard ppoll(2) behind the scenes, we could take a long timeout. */
@@ -145,6 +148,7 @@
     public int pwrite(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, InterruptedIOException;
     public int pwrite(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, long offset) throws ErrnoException, InterruptedIOException;
     public int read(FileDescriptor fd, ByteBuffer buffer) throws ErrnoException, InterruptedIOException;
+    @UnsupportedAppUsage
     public int read(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount) throws ErrnoException, InterruptedIOException;
     public String readlink(String path) throws ErrnoException;
     public String realpath(String path) throws ErrnoException;
diff --git a/luni/src/main/java/libcore/util/EmptyArray.java b/luni/src/main/java/libcore/util/EmptyArray.java
index 5afd4c5..5b60683 100644
--- a/luni/src/main/java/libcore/util/EmptyArray.java
+++ b/luni/src/main/java/libcore/util/EmptyArray.java
@@ -35,6 +35,7 @@
     @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final int[] INT = new int[0];
+    @UnsupportedAppUsage
     @libcore.api.CorePlatformApi
     public static final long[] LONG = new long[0];
 
diff --git a/luni/src/test/java/dalvik/system/create_test_jar.sh b/luni/src/test/java/dalvik/system/create_test_jar.sh
index 7042328..5e78cff 100755
--- a/luni/src/test/java/dalvik/system/create_test_jar.sh
+++ b/luni/src/test/java/dalvik/system/create_test_jar.sh
@@ -58,7 +58,7 @@
               return \"I'm not really a HashMap\";\
           }\
       }" > java/util/HashMap.java
-javac java/util/HashMap.java
+javac --patch-module=java.base=. java/util/HashMap.java
 dx --dex --core-library --output=./bootoverride.jar --verbose java/util/HashMap.class
 
 mkdir -p android/icu
diff --git a/mmodules/intracoreapi/api/intra/current-api.txt b/mmodules/intracoreapi/api/intra/current-api.txt
index 577ba78..3691d58 100644
--- a/mmodules/intracoreapi/api/intra/current-api.txt
+++ b/mmodules/intracoreapi/api/intra/current-api.txt
@@ -459,10 +459,6 @@
 
 package java.net {
 
-  public class InetAddress implements java.io.Serializable {
-    method public static boolean isNumeric(java.lang.String);
-  }
-
   public class Socket implements java.io.Closeable {
     method public java.io.FileDescriptor getFileDescriptor$();
   }
diff --git a/ojluni/annotations/hiddenapi/sun/misc/CharacterDecoder.java b/ojluni/annotations/hiddenapi/sun/misc/CharacterDecoder.java
index aeadfa6..de6f942 100644
--- a/ojluni/annotations/hiddenapi/sun/misc/CharacterDecoder.java
+++ b/ojluni/annotations/hiddenapi/sun/misc/CharacterDecoder.java
@@ -78,6 +78,7 @@
         throw new RuntimeException("Stub!");
     }
 
+    @dalvik.annotation.compat.UnsupportedAppUsage
     public byte[] decodeBuffer(java.lang.String inputString) throws java.io.IOException {
         throw new RuntimeException("Stub!");
     }
diff --git a/ojluni/annotations/hiddenapi/sun/misc/CharacterEncoder.java b/ojluni/annotations/hiddenapi/sun/misc/CharacterEncoder.java
index bc5e716..bbbf3f7 100644
--- a/ojluni/annotations/hiddenapi/sun/misc/CharacterEncoder.java
+++ b/ojluni/annotations/hiddenapi/sun/misc/CharacterEncoder.java
@@ -73,6 +73,7 @@
         throw new RuntimeException("Stub!");
     }
 
+    @dalvik.annotation.compat.UnsupportedAppUsage
     public java.lang.String encode(byte[] aBuffer) {
         throw new RuntimeException("Stub!");
     }
@@ -114,5 +115,6 @@
         throw new RuntimeException("Stub!");
     }
 
-    @dalvik.annotation.compat.UnsupportedAppUsage protected java.io.PrintStream pStream;
+    @dalvik.annotation.compat.UnsupportedAppUsage
+    protected java.io.PrintStream pStream;
 }
diff --git a/ojluni/annotations/hiddenapi/sun/util/calendar/AbstractCalendar.java b/ojluni/annotations/hiddenapi/sun/util/calendar/AbstractCalendar.java
index 0cfb35f..dd8fd2b 100644
--- a/ojluni/annotations/hiddenapi/sun/util/calendar/AbstractCalendar.java
+++ b/ojluni/annotations/hiddenapi/sun/util/calendar/AbstractCalendar.java
@@ -37,6 +37,7 @@
         throw new RuntimeException("Stub!");
     }
 
+    @dalvik.annotation.compat.UnsupportedAppUsage
     public sun.util.calendar.Era[] getEras() {
         throw new RuntimeException("Stub!");
     }
diff --git a/ojluni/annotations/mmodule/java/net/InetAddress.annotated.java b/ojluni/annotations/mmodule/java/net/InetAddress.annotated.java
index 54b6fd0..6f4492d 100644
--- a/ojluni/annotations/mmodule/java/net/InetAddress.annotated.java
+++ b/ojluni/annotations/mmodule/java/net/InetAddress.annotated.java
@@ -88,7 +88,6 @@
 public static java.net.InetAddress getLocalHost() throws java.net.UnknownHostException { throw new RuntimeException("Stub!"); }
 
 @libcore.api.CorePlatformApi
-@libcore.api.IntraCoreApi
 public static boolean isNumeric(java.lang.String address) { throw new RuntimeException("Stub!"); }
 
 @libcore.api.CorePlatformApi