Merge "Fixes tests and issues when toggling new app shortcut popup flag." into tm-qpr-dev am: d4eed6ec90

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21992972

Change-Id: Ic4c29770d9b485252bc8e12e7666f8ab0598cdec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Charlie Anderson
2023-03-17 00:45:25 +00:00
committed by Automerger Merge Worker
5 changed files with 33 additions and 6 deletions
@@ -320,11 +320,14 @@ public class PopupContainerWithArrow<T extends Context & ActivityContext>
initializeSystemShortcuts(systemShortcuts);
} else {
mDeepShortcutContainer.setVisibility(View.GONE);
mSystemShortcutContainer = inflateAndAdd(R.layout.system_shortcut_rows_container,
this, 0);
mWidgetContainer = mSystemShortcutContainer;
if (!shortcuts.isEmpty()) {
for (int i = 0; i < shortcuts.size(); i++) {
initializeSystemShortcut(
R.layout.system_shortcut,
this,
mSystemShortcutContainer,
shortcuts.get(i),
i < shortcuts.size() - 1);
}
@@ -351,7 +354,7 @@ public class PopupContainerWithArrow<T extends Context & ActivityContext>
addAllShortcutsMaterialU(deepShortcutCount, systemShortcuts);
} else if (!systemShortcuts.isEmpty()) {
addSystemShortcutsMaterialU(systemShortcuts,
R.layout.system_shortcut_rows_container,
R.layout.system_shortcut_rows_container_material_u,
R.layout.system_shortcut);
}
show();
@@ -388,7 +391,7 @@ public class PopupContainerWithArrow<T extends Context & ActivityContext>
if (deepShortcutCount + systemShortcuts.size() <= SHORTCUT_COLLAPSE_THRESHOLD) {
// add all system shortcuts including widgets shortcut to same container
addSystemShortcutsMaterialU(systemShortcuts,
R.layout.system_shortcut_rows_container,
R.layout.system_shortcut_rows_container_material_u,
R.layout.system_shortcut);
addDeepShortcutsMaterialU(deepShortcutCount);
return;