Updating drop button targets
> Splitting DeleteDropTarget into delete and uninstall
> Showing UninstallDropTarget for app shortcuts on workspace
> Showing InfoDropTarget only when developer options is enabled
Change-Id: I4396571d2199d1581bb9c733aef88ab9b0ebd79d
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 37f1ea8..f7df6bc 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -1079,7 +1079,7 @@
* @param context
* @param item
*/
- static void deleteItemFromDatabase(Context context, final ItemInfo item) {
+ public static void deleteItemFromDatabase(Context context, final ItemInfo item) {
ArrayList<ItemInfo> items = new ArrayList<ItemInfo>();
items.add(item);
deleteItemsFromDatabase(context, items);
@@ -1185,7 +1185,7 @@
/**
* Remove the contents of the specified folder from the database
*/
- static void deleteFolderContentsFromDatabase(Context context, final FolderInfo info) {
+ public static void deleteFolderContentsFromDatabase(Context context, final FolderInfo info) {
final ContentResolver cr = context.getContentResolver();
Runnable r = new Runnable() {
@@ -3106,6 +3106,9 @@
si.status &= ~ShortcutInfo.FLAG_RESTORED_ICON
& ~ShortcutInfo.FLAG_AUTOINTALL_ICON
& ~ShortcutInfo.FLAG_INSTALL_SESSION_ACTIVE;
+ if (appInfo != null) {
+ si.flags = appInfo.flags;
+ }
infoUpdated = true;
si.updateIcon(mIconCache);
@@ -3414,6 +3417,9 @@
info.user = user;
info.contentDescription = mUserManager.getBadgedLabelForUser(
info.title.toString(), info.user);
+ if (lai != null) {
+ info.flags = AppInfo.initFlags(lai);
+ }
return info;
}