Update Launcher UI when model changes are made outside of Launcher UI

Bug: 305877212
Flag: EXEMPT bugfix
Test: Verified manually by modifing folder in taskbar
Change-Id: I513dcfbc9e4ffcd970766ce8352815571e576461
This commit is contained in:
Sunny Goyal
2025-03-26 13:51:18 -07:00
parent 66ac9dc459
commit ca1f87d8f5
9 changed files with 55 additions and 39 deletions
@@ -81,6 +81,7 @@ import com.android.launcher3.anim.PendingAnimation;
import com.android.launcher3.anim.RevealOutlineAnimation;
import com.android.launcher3.anim.RoundedRectRevealOutlineProvider;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.model.ModelWriter;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.TaskItemInfo;
import com.android.launcher3.taskbar.bubbles.BubbleBarController;
@@ -412,6 +413,12 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
return mTaskbarIconAlpha;
}
/** Creates a ModelWriter for updating model properties */
public ModelWriter getModelWriter() {
return LauncherAppState.getInstance(mActivity).getModel()
.getWriter(false, mActivity.getCellPosMapper(), mModelCallbacks);
}
/**
* Should be called when the recents button is disabled, so we can hide Taskbar icons as well.
*/