diff options
author | Artem Shvadskiy <ashvadskiy@cyngn.com> | 2016-02-09 13:27:40 -0800 |
---|---|---|
committer | Artem Shvadskiy <ashvadskiy@cyngn.com> | 2016-02-09 13:27:40 -0800 |
commit | 3bf013a1eb2764fb3c12dc55739cf3c78fd3c20c (patch) | |
tree | 3ff2a040398b67dbd47b7516cb3743f389451890 /src | |
parent | 3722477e3550364b94b22083f6a3b3ec3c515398 (diff) | |
download | android_packages_apps_Trebuchet-3bf013a1eb2764fb3c12dc55739cf3c78fd3c20c.tar.gz android_packages_apps_Trebuchet-3bf013a1eb2764fb3c12dc55739cf3c78fd3c20c.tar.bz2 android_packages_apps_Trebuchet-3bf013a1eb2764fb3c12dc55739cf3c78fd3c20c.zip |
Prevent finalizing of remote folder
Change-Id: I69872c917e710e93db38891817a509c7a3e65e63
issue-id: CYNGNOS-1948
issue-id: CYNGNOS-1951
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/Folder.java | 6 | ||||
-rw-r--r-- | src/com/android/launcher3/LauncherModel.java | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java index 2e73c5749..82488169f 100644 --- a/src/com/android/launcher3/Folder.java +++ b/src/com/android/launcher3/Folder.java @@ -1562,15 +1562,19 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList /** * Update the view tied to this shortcut. * @param info updated info to be applied to view. + * @return true if view for info was found, false otherwise. */ @SuppressWarnings("unused") - public void updateViewForInfo(final ShortcutInfo info) { + public boolean updateViewForInfo(final ShortcutInfo info) { View v = getViewForInfo(info); if (v != null & v instanceof BubbleTextView) { ((BubbleTextView) v).reapplyItemInfo(info); mItemsInvalidated = true; + return true; } + + return false; } public View getViewForInfo(ShortcutInfo item) { diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java index 2934b600d..f8f539016 100644 --- a/src/com/android/launcher3/LauncherModel.java +++ b/src/com/android/launcher3/LauncherModel.java @@ -2734,7 +2734,9 @@ public class LauncherModel extends BroadcastReceiver finalItem.container = folder.container; LauncherModel.deleteItemFromDatabase(mContext, folder); // only replace this item back on the workspace if it's not protected - if (!mHiddenApps.contains(finalItem.intent.getComponent())) { + // and not a remote folder. + if (!mHiddenApps.contains(finalItem.intent.getComponent()) && + !folder.isRemote()) { LauncherModel.addOrMoveItemInDatabase(mContext, finalItem, folder.container, folder.screenId, folder.cellX, folder.cellY); workspaceItems.add(finalItem); |