add native_flags_health_check_enabled to Settings.Global

add native_flags_health_check_enabled to Settings.Global. It is used
to receive the corresponding experiment flag from P/H.

Bug: 119627143
Test: manual on device
Change-Id: I980f73925818a5cb6f756d78bad324bafefc3784
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index d579f0f..6742a47 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -13700,6 +13700,15 @@
          */
         public static final String LAST_ACTIVE_USER_ID = "last_active_persistent_user_id";
 
+
+        /**
+         * Whether we've enabled native flags health check on this device. Takes effect on
+         * reboot. The value "1" enables native flags health check; otherwise it's disabled.
+         * @hide
+         */
+        public static final String NATIVE_FLAGS_HEALTH_CHECK_ENABLED =
+                "native_flags_health_check_enabled";
+
     }
 
     /**
diff --git a/core/proto/android/providers/settings/global.proto b/core/proto/android/providers/settings/global.proto
index 7de8020..d917536 100644
--- a/core/proto/android/providers/settings/global.proto
+++ b/core/proto/android/providers/settings/global.proto
@@ -550,6 +550,10 @@
     }
     optional MultiSim multi_sim = 76;
 
+    // Whether we've enabled native flags health check on this device. Takes effect on
+    // reboot. The value "1" enables native flags health check; otherwise it's disabled.
+    optional SettingProto native_flags_health_check_enabled = 144 [ (android.privacy).dest = DEST_AUTOMATIC ];
+
     message Netstats {
         option (android.msg_privacy).dest = DEST_EXPLICIT;
 
@@ -987,5 +991,5 @@
 
     // Please insert fields in alphabetical order and group them into messages
     // if possible (to avoid reaching the method limit).
-    // Next tag = 144;
+    // Next tag = 145;
 }
diff --git a/core/tests/coretests/src/android/provider/SettingsBackupTest.java b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
index 4802ebe..2145717 100644
--- a/core/tests/coretests/src/android/provider/SettingsBackupTest.java
+++ b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
@@ -308,6 +308,7 @@
                     Settings.Global.MULTI_SIM_SMS_SUBSCRIPTION,
                     Settings.Global.MULTI_SIM_VOICE_CALL_SUBSCRIPTION,
                     Settings.Global.MULTI_SIM_VOICE_PROMPT,
+                    Settings.Global.NATIVE_FLAGS_HEALTH_CHECK_ENABLED,
                     Settings.Global.NETSTATS_DEV_BUCKET_DURATION,
                     Settings.Global.NETSTATS_DEV_DELETE_AGE,
                     Settings.Global.NETSTATS_DEV_PERSIST_BYTES,