Making 2 flags read only since they are used on backup and restore

The flags are narrow_grid_restore and grid_migration_fix.

Flag: ACONFIG enable_grid_migration_fix enabled
Flag: ACONFIG enable_narrow_grid_restore enabled
Bug: 325286145
Bug: 325285743
Test: BackupAndRestoreDBSelectionTest.kt
Test: GridMigrationTest.kt
Change-Id: Ia6a439553c3c5098115144eae532342ce73be4f2
diff --git a/aconfig/launcher.aconfig b/aconfig/launcher.aconfig
index 20c5248..4de1c96 100644
--- a/aconfig/launcher.aconfig
+++ b/aconfig/launcher.aconfig
@@ -188,19 +188,21 @@
 }
 
 flag {
-    name: "grid_migration_fix"
+    name: "enable_grid_migration_fix"
     namespace: "launcher"
     description: "Keep items in place when migrating to a bigger grid"
     bug: "325286145"
+    is_fixed_read_only: true
     metadata {
       purpose: PURPOSE_BUGFIX
     }
 }
 
 flag {
-    name: "narrow_grid_restore"
+    name: "enable_narrow_grid_restore"
     namespace: "launcher"
     description: "Using only the most recent workspace when restoring to avoid confusion."
+    is_fixed_read_only: true
     bug: "325285743"
     metadata {
       purpose: PURPOSE_BUGFIX
diff --git a/src/com/android/launcher3/model/GridSizeMigrationUtil.java b/src/com/android/launcher3/model/GridSizeMigrationUtil.java
index c40484d..15190c7 100644
--- a/src/com/android/launcher3/model/GridSizeMigrationUtil.java
+++ b/src/com/android/launcher3/model/GridSizeMigrationUtil.java
@@ -124,7 +124,7 @@
             return true;
         }
 
-        if (Flags.gridMigrationFix()
+        if (Flags.enableGridMigrationFix()
                 && srcDeviceState.getColumns().equals(destDeviceState.getColumns())
                 && srcDeviceState.getRows() < destDeviceState.getRows()) {
             // Only use this strategy when comparing the previous grid to the new grid and the
diff --git a/src/com/android/launcher3/provider/RestoreDbTask.java b/src/com/android/launcher3/provider/RestoreDbTask.java
index f2b7d18..99542f3 100644
--- a/src/com/android/launcher3/provider/RestoreDbTask.java
+++ b/src/com/android/launcher3/provider/RestoreDbTask.java
@@ -123,7 +123,7 @@
         // executed again.
         LauncherPrefs.get(context).removeSync(RESTORE_DEVICE);
 
-        if (Flags.narrowGridRestore()) {
+        if (Flags.enableNarrowGridRestore()) {
             String oldPhoneFileName = idp.dbFile;
             removeOldDBs(context, oldPhoneFileName);
             trySettingPreviousGidAsCurrent(context, idp, oldPhoneFileName);
diff --git a/tests/src/com/android/launcher3/backuprestore/BackupAndRestoreDBSelectionTest.kt b/tests/src/com/android/launcher3/backuprestore/BackupAndRestoreDBSelectionTest.kt
index 3e36bbb..479b201 100644
--- a/tests/src/com/android/launcher3/backuprestore/BackupAndRestoreDBSelectionTest.kt
+++ b/tests/src/com/android/launcher3/backuprestore/BackupAndRestoreDBSelectionTest.kt
@@ -48,7 +48,7 @@
 
     @Before
     fun setUp() {
-        setFlagsRule.setFlags(true, Flags.FLAG_NARROW_GRID_RESTORE)
+        setFlagsRule.setFlags(true, Flags.FLAG_ENABLE_NARROW_GRID_RESTORE)
     }
 
     @Test
diff --git a/tests/src/com/android/launcher3/model/GridMigrationTest.kt b/tests/src/com/android/launcher3/model/GridMigrationTest.kt
index da4a208..15222a4 100644
--- a/tests/src/com/android/launcher3/model/GridMigrationTest.kt
+++ b/tests/src/com/android/launcher3/model/GridMigrationTest.kt
@@ -85,7 +85,7 @@
 
     @Before
     fun setup() {
-        setFlagsRule.setFlags(false, Flags.FLAG_GRID_MIGRATION_FIX)
+        setFlagsRule.setFlags(false, Flags.FLAG_ENABLE_GRID_MIGRATION_FIX)
     }
 
     private fun migrate(src: GridMigrationData, dst: GridMigrationData) {
@@ -223,7 +223,7 @@
 
     @Test
     fun `flagged 5x5 to 5x8`() {
-        setFlagsRule.setFlags(true, Flags.FLAG_GRID_MIGRATION_FIX)
+        setFlagsRule.setFlags(true, Flags.FLAG_ENABLE_GRID_MIGRATION_FIX)
         runTest(
             src = GridMigrationData(DB_FILE, DeviceGridState(5, 5, 5, TYPE_PHONE, DB_FILE)),
             dst =