mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Dragging app from workspace to App Info doesn't consume the app.
In other words, the app stays on the workspace after showing the info. Change-Id: Ibcf925c2c4c083b16ce0510a9fcedbe3fcef5b9d
This commit is contained in:
@@ -82,7 +82,7 @@ public class UninstallDropTarget extends ButtonDropTarget {
|
||||
void completeDrop(final DragObject d) {
|
||||
final Pair<ComponentName, Integer> componentInfo = getAppInfoFlags(d.dragInfo);
|
||||
final UserHandleCompat user = d.dragInfo.user;
|
||||
if (startUninstallActivity(mLauncher, d.dragInfo)) {
|
||||
if (startActivityWithUninstallAffordance(d)) {
|
||||
|
||||
final Runnable checkIfUninstallWasSuccess = new Runnable() {
|
||||
@Override
|
||||
@@ -99,6 +99,10 @@ public class UninstallDropTarget extends ButtonDropTarget {
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean startActivityWithUninstallAffordance(DragObject d) {
|
||||
return startUninstallActivity(mLauncher, d.dragInfo);
|
||||
}
|
||||
|
||||
public static boolean startUninstallActivity(Launcher launcher, ItemInfo info) {
|
||||
final Pair<ComponentName, Integer> componentInfo = getAppInfoFlags(info);
|
||||
final UserHandleCompat user = info.user;
|
||||
@@ -115,7 +119,7 @@ public class UninstallDropTarget extends ButtonDropTarget {
|
||||
/**
|
||||
* Interface defining an object that can provide uninstallable drag objects.
|
||||
*/
|
||||
public static interface UninstallSource {
|
||||
public interface UninstallSource {
|
||||
|
||||
/**
|
||||
* A pending uninstall operation was complete.
|
||||
|
||||
Reference in New Issue
Block a user