chore: Cleanup, and hidden feature logged

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
This commit is contained in:
Pun Butrach committed 2026-01-10 20:48:25 +07:00
1 parent 5180c3d4c4
commit 11f7abcb66
1818 files changed
+104945 -147848

No files matched your search

@@ -32,7 +32,6 @@ import com.android.launcher3.model.data.CollectionInfo;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.LauncherAppWidgetInfo;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.util.Preconditions;
import com.patrykmichalik.opto.core.PreferenceExtensionsKt;
import app.lawnchair.preferences2.PreferenceManager2;
@@ -75,7 +74,8 @@ public class DeleteDropTarget extends ButtonDropTarget {
/**
* @return true for items that should have a "Remove" action in accessibility.
*/
private boolean supportsAccessibilityDrop(ItemInfo info, View view) {
@Override
public boolean supportsAccessibilityDrop(ItemInfo info, View view) {
if (info instanceof WorkspaceItemInfo) {
// Support the action unless the item is in a context menu.
return canRemove(info);
@@ -85,14 +85,6 @@ public class DeleteDropTarget extends ButtonDropTarget {
|| (info instanceof CollectionInfo);
}
@Override
public int getSupportedAccessibilityAction(ItemInfo info, View view) {
if (supportsAccessibilityDrop(info, view)) {
return getAccessibilityAction();
}
return LauncherAccessibilityDelegate.INVALID;
}
@Override
public int getAccessibilityAction() {
return LauncherAccessibilityDelegate.REMOVE;
@@ -151,7 +143,7 @@ public class DeleteDropTarget extends ButtonDropTarget {
public void completeDrop(DragObject d) {
ItemInfo item = d.dragInfo;
if (canRemove(item)) {
mDropTargetHandler.onDeleteComplete(item, /* view */ null);
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."
@@ -163,8 +155,7 @@ public class DeleteDropTarget extends ButtonDropTarget {
* Removes the item from the workspace. If the view is not null, it also removes the view.
*/
@Override
public void onAccessibilityDrop(View view, ItemInfo item, int action) {
Preconditions.assertTrue(action == getAccessibilityAction());
public void onAccessibilityDrop(View view, ItemInfo item) {
// Remove the item from launcher and the db, we can ignore the containerInfo in this call
// because we already remove the drag view from the folder (if the drag originated from
// a folder) in Folder.beginDrag()