Fix accidental API pollution in java.util.zip.

Package-private interface ZipConstants turns out to be implemented by
all the public Zip* classes in the package, so they can uselessly
expose duplicate copies of the constants. This means I can't add my
own constants there because they'll leak.

This didn't break the build because we lose the "implements ZipConstants"
and ZipConstants.class somewhere around the apicheck part of the build.
See http://b/2421864 for that.

Anyway, let's mop up the spill before anyone can see it...
diff --git a/libcore/archive/src/main/java/java/util/zip/ZipConstants.java b/libcore/archive/src/main/java/java/util/zip/ZipConstants.java
index f0b1f69..4ce65bc 100644
--- a/libcore/archive/src/main/java/java/util/zip/ZipConstants.java
+++ b/libcore/archive/src/main/java/java/util/zip/ZipConstants.java
@@ -17,6 +17,11 @@
 
 package java.util.zip;
 
+/**
+ * Do not add constants to this interface! It's implemented by the classes
+ * in this package whose names start "Zip", and the constants are thereby
+ * public API.
+ */
 interface ZipConstants {
 
     public static final long LOCSIG = 0x4034b50, EXTSIG = 0x8074b50,
@@ -30,25 +35,4 @@
             CENNAM = 28, CENEXT = 30, CENCOM = 32, CENDSK = 34, CENATT = 36,
             CENATX = 38, CENOFF = 42, ENDSUB = 8, ENDTOT = 10, ENDSIZ = 12,
             ENDOFF = 16, ENDCOM = 20;
-
-    /**
-     * General Purpose Bit Flags, Bit 3.
-     * If this bit is set, the fields crc-32, compressed
-     * size and uncompressed size are set to zero in the
-     * local header.  The correct values are put in the
-     * data descriptor immediately following the compressed
-     * data.  (Note: PKZIP version 2.04g for DOS only
-     * recognizes this bit for method 8 compression, newer
-     * versions of PKZIP recognize this bit for any
-     * compression method.)
-     */
-    public static final int GPBF_DATA_DESCRIPTOR_FLAG = 1 << 3; // android-added
-
-    /**
-     * General Purpose Bit Flags, Bit 11.
-     * Language encoding flag (EFS).  If this bit is set,
-     * the filename and comment fields for this file
-     * must be encoded using UTF-8.
-     */
-    public static final int GPBF_UTF8_FLAG = 1 << 11; // android-added
 }
diff --git a/libcore/archive/src/main/java/java/util/zip/ZipFile.java b/libcore/archive/src/main/java/java/util/zip/ZipFile.java
index 48541e1..6513622 100644
--- a/libcore/archive/src/main/java/java/util/zip/ZipFile.java
+++ b/libcore/archive/src/main/java/java/util/zip/ZipFile.java
@@ -43,6 +43,26 @@
  * @see ZipOutputStream
  */
 public class ZipFile implements ZipConstants {
+    /**
+     * General Purpose Bit Flags, Bit 3.
+     * If this bit is set, the fields crc-32, compressed
+     * size and uncompressed size are set to zero in the
+     * local header.  The correct values are put in the
+     * data descriptor immediately following the compressed
+     * data.  (Note: PKZIP version 2.04g for DOS only
+     * recognizes this bit for method 8 compression, newer
+     * versions of PKZIP recognize this bit for any
+     * compression method.)
+     */
+    static final int GPBF_DATA_DESCRIPTOR_FLAG = 1 << 3; // android-added
+
+    /**
+     * General Purpose Bit Flags, Bit 11.
+     * Language encoding flag (EFS).  If this bit is set,
+     * the filename and comment fields for this file
+     * must be encoded using UTF-8.
+     */
+    static final int GPBF_UTF8_FLAG = 1 << 11; // android-added
 
     /**
      * Open ZIP file for read.
diff --git a/libcore/archive/src/main/java/java/util/zip/ZipInputStream.java b/libcore/archive/src/main/java/java/util/zip/ZipInputStream.java
index ddebd6f..c2af30c 100644
--- a/libcore/archive/src/main/java/java/util/zip/ZipInputStream.java
+++ b/libcore/archive/src/main/java/java/util/zip/ZipInputStream.java
@@ -234,7 +234,7 @@
             throw new ZipException(Messages.getString("archive.22")); //$NON-NLS-1$
         }
         int flags = getShort(hdrBuf, LOCFLG - LOCVER);
-        hasDD = ((flags & GPBF_DATA_DESCRIPTOR_FLAG) == GPBF_DATA_DESCRIPTOR_FLAG);
+        hasDD = ((flags & ZipFile.GPBF_DATA_DESCRIPTOR_FLAG) != 0);
         int cetime = getShort(hdrBuf, LOCTIM - LOCVER);
         int cemodDate = getShort(hdrBuf, LOCTIM - LOCVER + 2);
         int cecompressionMethod = getShort(hdrBuf, LOCHOW - LOCVER);
diff --git a/libcore/archive/src/main/java/java/util/zip/ZipOutputStream.java b/libcore/archive/src/main/java/java/util/zip/ZipOutputStream.java
index f85e253..e53061a 100644
--- a/libcore/archive/src/main/java/java/util/zip/ZipOutputStream.java
+++ b/libcore/archive/src/main/java/java/util/zip/ZipOutputStream.java
@@ -140,7 +140,7 @@
         }
         // Update the CentralDirectory
         // http://www.pkware.com/documents/casestudies/APPNOTE.TXT
-        int flags = currentEntry.getMethod() == STORED ? 0 : GPBF_DATA_DESCRIPTOR_FLAG;
+        int flags = currentEntry.getMethod() == STORED ? 0 : ZipFile.GPBF_DATA_DESCRIPTOR_FLAG;
         writeLong(cDir, CENSIG);
         writeShort(cDir, ZIPLocalHeaderVersionNeeded); // Version created
         writeShort(cDir, ZIPLocalHeaderVersionNeeded); // Version to extract
@@ -285,10 +285,10 @@
         // BEGIN android-changed
         // Local file header.
         // http://www.pkware.com/documents/casestudies/APPNOTE.TXT
-        int flags = currentEntry.getMethod() == STORED ? 0 : GPBF_DATA_DESCRIPTOR_FLAG;
+        int flags = currentEntry.getMethod() == STORED ? 0 : ZipFile.GPBF_DATA_DESCRIPTOR_FLAG;
         // Java always outputs UTF-8 filenames. (Before Java 7, the RI didn't set this flag and used
         // modified UTF-8. From Java 7, it sets this flag and uses normal UTF-8.)
-        flags |= GPBF_UTF8_FLAG;
+        flags |= ZipFile.GPBF_UTF8_FLAG;
         writeLong(out, LOCSIG); // Entry header
         writeShort(out, ZIPLocalHeaderVersionNeeded); // Extraction version
         writeShort(out, flags);