Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12d330bb authored by Ted Bauer's avatar Ted Bauer
Browse files

Remove bulk comparison on boot.

We no longer need to bulk compare the previous and current storage mechanisms; this was in place for initial testing. Remove to improve boot-up speed.

Bug: 312444587
Change-Id: I1ee1fb8961bbb376bd4c7a4b159ebacf77ca8987
Test: m
Flag: com.android.providers.settings.disable_bulk_compare
parent 81217d12
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -409,6 +409,11 @@ final class SettingsState {
                        Slog.w(LOG_TAG, "Bulk sync request to acongid failed.");
                    }
                }

                if (Flags.disableBulkCompare()) {
                    return;
                }

                // TOBO(b/312444587): remove the comparison logic after Test Mission 2.
                if (requests == null) {
                    Map<String, AconfigdFlagInfo> aconfigdFlagMap =
@@ -421,7 +426,7 @@ final class SettingsState {
        }
    }

    // TOBO(b/312444587): remove the comparison logic after Test Mission 2.
    // TODO(b/312444587): remove the comparison logic after Test Mission 2.
    public int compareFlagValueInNewStorage(
            Map<String, AconfigdFlagInfo> defaultFlagMap,
            Map<String, AconfigdFlagInfo> aconfigdFlagMap) {
+10 −0
Original line number Diff line number Diff line
@@ -101,3 +101,13 @@ flag {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    name: "disable_bulk_compare"
    namespace: "core_experiments_team_internal"
    description: "Disable bulk comparison between DeviceConfig and aconfig storage."
    bug: "312444587"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.aconfig.Aconfig.parsed_flags;
import android.aconfigd.AconfigdFlagInfo;
import android.os.Looper;
import android.platform.test.annotations.RequiresFlagsEnabled;
import android.platform.test.annotations.RequiresFlagsDisabled;
import android.platform.test.flag.junit.CheckFlagsRule;
import android.platform.test.flag.junit.DeviceFlagsValueProvider;
import android.util.Xml;
@@ -1304,6 +1305,7 @@ public class SettingsStateTest {
    }

    @Test
    @RequiresFlagsDisabled(Flags.FLAG_DISABLE_BULK_COMPARE)
    public void testCompareFlagValueInNewStorage() {
                int configKey = SettingsState.makeKey(SettingsState.SETTINGS_TYPE_CONFIG, 0);
        Object lock = new Object();