mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 09:26:51 +00:00
Add Logs to track app uninstall and icon removal
Some users are affected by a bug that keeps orphaned app icons after a package is uninstalled. Since we are unable to pinpoint to what exactly is causing this, we're adding logs so we could tell where exactly things are failing. Bug: 124817089 Change-Id: If168935115a7d323fd60c2b19426c1dbd43dbce3
This commit is contained in:
@@ -40,15 +40,18 @@ import com.android.launcher3.LauncherSettings.Settings;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.WorkspaceItemInfo;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.logging.FileLog;
|
||||
import com.android.launcher3.model.BgDataModel.Callbacks;
|
||||
import com.android.launcher3.util.ContentWriter;
|
||||
import com.android.launcher3.util.ItemInfoMatcher;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Class for handling model updates.
|
||||
@@ -262,9 +265,12 @@ public class ModelWriter {
|
||||
/**
|
||||
* Removes the specified items from the database
|
||||
*/
|
||||
public void deleteItemsFromDatabase(final Iterable<? extends ItemInfo> items) {
|
||||
public void deleteItemsFromDatabase(final Collection<? extends ItemInfo> items) {
|
||||
ModelVerifier verifier = new ModelVerifier();
|
||||
|
||||
FileLog.d(TAG, "removing items from db " + items.stream().map(
|
||||
(item) -> item.getTargetComponent() == null ? ""
|
||||
: item.getTargetComponent().getPackageName()).collect(
|
||||
Collectors.joining(",")), new Exception());
|
||||
enqueueDeleteRunnable(() -> {
|
||||
for (ItemInfo item : items) {
|
||||
final Uri uri = Favorites.getContentUri(item.id);
|
||||
|
||||
Reference in New Issue
Block a user