Migrate smartspace as a widget and smartspace removal toggle flags to aconfig

Bug: 336823684, 336823681
Test: none
Flag: ACONFIG enable_smartspace_as_a_widget DISABLED
Flag: ACONFIG enable_smartspace_removal_toggle DISABLED
Change-Id: I4cba42e09f58365f761ab866b15a494817e6bb0f
This commit is contained in:
fbaron committed 2024-04-25 14:26:30 -07:00
1 parent 545fe2496b
commit 9d08e0fe70
17 files changed
+67 -58

No files matched your search

@@ -19,8 +19,8 @@ import static android.content.pm.LauncherApps.ShortcutQuery.FLAG_GET_KEY_FIELDS_
import static com.android.launcher3.BuildConfig.QSB_ON_FIRST_SCREEN;
import static com.android.launcher3.BuildConfig.WIDGETS_ENABLED;
import static com.android.launcher3.config.FeatureFlags.ENABLE_SMARTSPACE_REMOVAL;
import static com.android.launcher3.config.FeatureFlags.shouldShowFirstPageWidget;
import static com.android.launcher3.Flags.enableSmartspaceRemovalToggle;
import static com.android.launcher3.Utilities.SHOULD_SHOW_FIRST_PAGE_WIDGET;
import static com.android.launcher3.shortcuts.ShortcutRequest.PINNED;
import static java.util.stream.Collectors.groupingBy;
@@ -138,7 +138,7 @@ public class BgDataModel {
*/
public int lastLoadId = -1;
public boolean isFirstPagePinnedItemEnabled = QSB_ON_FIRST_SCREEN
&& !ENABLE_SMARTSPACE_REMOVAL.get();
&& !enableSmartspaceRemovalToggle();
/**
* Clears all the data
@@ -163,7 +163,7 @@ public class BgDataModel {
}
}
if ((FeatureFlags.QSB_ON_FIRST_SCREEN
&& !shouldShowFirstPageWidget())
&& !SHOULD_SHOW_FIRST_PAGE_WIDGET)
|| screenSet.isEmpty()) {
screenSet.add(Workspace.FIRST_SCREEN_ID);
}