mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 09:26:51 +00:00
Log.wtf if DeleteDropTarget "canRemove", but doesn't remove item from the database.
Bug: 379606516 Test: Verified locally that these logs show when hard-coded to appear. Also verified that normal usage doesn't cause crashes. Flag: EXEMPT bug logs Change-Id: Iadc67f4a063f5924c758468c6b227b23368fc192
This commit is contained in:
@@ -22,6 +22,7 @@ import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCH
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import com.android.launcher3.accessibility.LauncherAccessibilityDelegate;
|
||||
@@ -131,6 +132,10 @@ public class DeleteDropTarget extends ButtonDropTarget {
|
||||
ItemInfo item = d.dragInfo;
|
||||
if (canRemove(item)) {
|
||||
mDropTargetHandler.onDeleteComplete(item);
|
||||
} else if (mText == getResources().getText(R.string.remove_drop_target_label)) {
|
||||
Log.wtf("b/379606516", "If the drop target text is 'remove', then"
|
||||
+ " users should always be able to delete the item from launcher's db."
|
||||
+ " Invalid drag ItemInfo: " + item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user