mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Log the reason why a WorkspaceItemInfo was removed
In the past we've seen a WorkspaceItem disappeared from the workspace but wasn't able to determine why it was removed. This CL includes the reason why it was removed in the error log, which hopefully would help us debugging similar issues in the future. Bug: 231239260 Test: make Change-Id: Iba3d57568c9b3e011a6b65b26f0d4170d42fe1a5
This commit is contained in:
@@ -17,6 +17,8 @@ package com.android.launcher3.model;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.LauncherModel;
|
||||
import com.android.launcher3.LauncherModel.CallbackTask;
|
||||
@@ -128,8 +130,9 @@ public abstract class BaseModelUpdateTask implements ModelUpdateTask {
|
||||
scheduleCallbackTask(c -> c.bindAllWidgets(widgets));
|
||||
}
|
||||
|
||||
public void deleteAndBindComponentsRemoved(final Predicate<ItemInfo> matcher) {
|
||||
getModelWriter().deleteItemsFromDatabase(matcher);
|
||||
public void deleteAndBindComponentsRemoved(final Predicate<ItemInfo> matcher,
|
||||
@Nullable final String reason) {
|
||||
getModelWriter().deleteItemsFromDatabase(matcher, reason);
|
||||
|
||||
// Call the components-removed callback
|
||||
scheduleCallbackTask(c -> c.bindWorkspaceComponentsRemoved(matcher));
|
||||
|
||||
Reference in New Issue
Block a user