summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArtem Shvadskiy <ashvadskiy@cyngn.com>2016-02-09 21:27:40 (GMT)
committerArtem Shvadskiy <ashvadskiy@cyngn.com>2016-02-09 21:27:40 (GMT)
commit3bf013a1eb2764fb3c12dc55739cf3c78fd3c20c (patch)
tree3ff2a040398b67dbd47b7516cb3743f389451890 /src
parent3722477e3550364b94b22083f6a3b3ec3c515398 (diff)
downloadandroid_packages_apps_Trebuchet-3bf013a1eb2764fb3c12dc55739cf3c78fd3c20c.zip
android_packages_apps_Trebuchet-3bf013a1eb2764fb3c12dc55739cf3c78fd3c20c.tar.gz
android_packages_apps_Trebuchet-3bf013a1eb2764fb3c12dc55739cf3c78fd3c20c.tar.bz2
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.java6
-rw-r--r--src/com/android/launcher3/LauncherModel.java4
2 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java
index 2e73c57..8248816 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 2934b60..f8f5390 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);