Replace ENABLE_LAUNCHER_BR_METRICS flags with fixed aconfig flag.

This is necessary because the value of the read-write flag will not be updated in time for backup/restore.

Bug: 307527314
Test: compiles
Flag: ACONFIG ENABLE_LAUNCHER_BR_METRICS_FIXED TEAMFOOD
Change-Id: I67a1a820734d8881b3ed5be4a1f2f1556e6e4704
This commit is contained in:
Charlie Anderson
2024-01-11 12:20:23 -05:00
parent eb1966c278
commit da3138cd91
5 changed files with 21 additions and 24 deletions

View File

@@ -18,7 +18,7 @@ package com.android.launcher3.model;
import static com.android.launcher3.BuildConfig.WIDGET_ON_FIRST_SCREEN;
import static com.android.launcher3.Flags.enableSupportForArchiving;
import static com.android.launcher3.Flags.enableLauncherBrMetrics;
import static com.android.launcher3.Flags.enableLauncherBrMetricsFixed;
import static com.android.launcher3.LauncherPrefs.IS_FIRST_LOAD_AFTER_RESTORE;
import static com.android.launcher3.LauncherPrefs.SHOULD_SHOW_SMARTSPACE;
import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_APP_PAIR;
@@ -234,7 +234,7 @@ public class LoaderTask implements Runnable {
mIsRestoreFromBackup =
(Boolean) LauncherPrefs.get(mApp.getContext()).get(IS_FIRST_LOAD_AFTER_RESTORE);
LauncherRestoreEventLogger restoreEventLogger = null;
if (enableLauncherBrMetrics()) {
if (enableLauncherBrMetricsFixed()) {
restoreEventLogger = LauncherRestoreEventLogger.Companion
.newInstance(mApp.getContext());
}