Merge "Update Launcher UI when model changes are made outside of Launcher UI" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
d46249c412
@@ -113,6 +113,7 @@ import com.android.launcher3.icons.BitmapRenderer;
|
||||
import com.android.launcher3.icons.FastBitmapDrawable;
|
||||
import com.android.launcher3.logger.LauncherAtom;
|
||||
import com.android.launcher3.logging.StatsLogManager;
|
||||
import com.android.launcher3.model.ModelWriter;
|
||||
import com.android.launcher3.model.data.AppInfo;
|
||||
import com.android.launcher3.model.data.AppPairInfo;
|
||||
import com.android.launcher3.model.data.FolderInfo;
|
||||
@@ -829,6 +830,11 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
||||
return mControllers.taskbarDragController;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelWriter getModelWriter() {
|
||||
return mControllers.taskbarViewController.getModelWriter();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public BubbleControllers getBubbleControllers() {
|
||||
return mControllers.bubbleControllers.orElse(null);
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user