Make the phenotype flag live across system restarts in the test.

Bug: 232384296
Change-Id: I0cbc3e221a5a3c0b3a5f43978ac934cac534dd70
Merged-In: I0cbc3e221a5a3c0b3a5f43978ac934cac534dd70
Test: atest odsign_e2e_tests_full
(cherry picked from commit 59831b5fe40249aab697915980caf2347be1199e)
diff --git a/test/odsign/test-src/com/android/tests/odsign/OdrefreshHostTest.java b/test/odsign/test-src/com/android/tests/odsign/OdrefreshHostTest.java
index 1b852d7..de497c5 100644
--- a/test/odsign/test-src/com/android/tests/odsign/OdrefreshHostTest.java
+++ b/test/odsign/test-src/com/android/tests/odsign/OdrefreshHostTest.java
@@ -146,9 +146,12 @@
     @Test
     public void verifyEnableUffdGcChangeTriggersCompilation() throws Exception {
         try {
-            // Disable phenotype flag syncing.
+            // Disable phenotype flag syncing. Potentially, we can set
+            // `set_sync_disabled_for_tests` to `until_reboot`, but setting it to
+            // `persistent` prevents unrelated system crashes/restarts from affecting the
+            // test. `set_sync_disabled_for_tests` is reset in the `finally` block anyway.
             getDevice().executeShellV2Command(
-                    "device_config set_sync_disabled_for_tests until_reboot");
+                    "device_config set_sync_disabled_for_tests persistent");
 
             // Simulate that the phenotype flag is set to the default value.
             getDevice().executeShellV2Command(