Add the aconfig flag enable_chips for WebView feature CHIPS

This change list adds a chips flag to guard the new API and the CHIPS compat ID to guard the CHIPS feature in WebView.

Test: Not available for test right now
Flag: android.webkit.enable_chips
Bug: 380890146
Change-Id: I7cae29eb192eea7c3e6ddba298508c3268b0aa8f
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index f0f0fc9..0286c10 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -19315,6 +19315,7 @@
     method @Deprecated public abstract void setUseWebViewBackgroundForOverscrollBackground(boolean);
     method @Deprecated public abstract void setUserAgent(int);
     method public abstract void setVideoOverlayForEmbeddedEncryptedVideoEnabled(boolean);
+    field @FlaggedApi("android.webkit.enable_chips") public static final long ENABLE_CHIPS = 380890146L; // 0x16b3ec22L
     field public static final long ENABLE_SIMPLIFIED_DARK_MODE = 214741472L; // 0xcccb1e0L
     field @FlaggedApi("android.webkit.user_agent_reduction") public static final long ENABLE_USER_AGENT_REDUCTION = 371034303L; // 0x161d88bfL
   }
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index ab5969b..14b208a 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -1788,4 +1788,17 @@
      * @see #setDisabledActionModeMenuItems
      */
     public static final int MENU_ITEM_PROCESS_TEXT = 1 << 2;
+
+    /**
+     * Enable CHIPS for webview.
+     * This provides a means to check if partitioned cookies are enabled by default.
+     * CHIPS will only be enabled by default for apps targeting Android B or above.
+     *
+     * @hide
+     */
+    @ChangeId
+    @EnabledAfter(targetSdkVersion = android.os.Build.VERSION_CODES.VANILLA_ICE_CREAM)
+    @FlaggedApi(android.webkit.Flags.FLAG_ENABLE_CHIPS)
+    @SystemApi
+    public static final long ENABLE_CHIPS = 380890146L;
 }
diff --git a/core/java/android/webkit/flags.aconfig b/core/java/android/webkit/flags.aconfig
index c5176a2..16cbb8a 100644
--- a/core/java/android/webkit/flags.aconfig
+++ b/core/java/android/webkit/flags.aconfig
@@ -36,6 +36,14 @@
 }
 
 flag {
+    name: "enable_chips"
+    is_exported: true
+    namespace: "webview"
+    description: "New feature enable CHIPS for webview"
+    bug: "359448044"
+}
+
+flag {
     name: "file_system_access"
     is_exported: true
     namespace: "webview"