summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2016-02-15 11:47:25 -0800
committerEd Carrigan <cretin45@gmail.com>2016-02-16 09:28:56 -0800
commitd6c299aec06299b3ffa98c00365e4c95bacffe20 (patch)
treef72ebd31b84faa8fb487ec16b3c0f2f334b3eb5e
parent6cd620ff8356a3cc454451db1580b0cf737501fe (diff)
downloadandroid_packages_apps_Trebuchet-d6c299aec06299b3ffa98c00365e4c95bacffe20.tar.gz
android_packages_apps_Trebuchet-d6c299aec06299b3ffa98c00365e4c95bacffe20.tar.bz2
android_packages_apps_Trebuchet-d6c299aec06299b3ffa98c00365e4c95bacffe20.zip
Trebuchet: Don't animate folder if locked state changed
Issue-id: CYNGNOS-2046 Change-Id: If6488d018b83b8e20874dbe0d32479f19ceac4cc (cherry picked from commit 60bb0d60a2eeb79a4f0e3c3f7b2b81332cfccebf)
-rw-r--r--src/com/android/launcher3/Launcher.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index a027c0ce3..23ebbd4fc 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -281,6 +281,7 @@ public class Launcher extends Activity
private int[] mTmpAddItemCellCoordinates = new int[2];
protected FolderIcon mHiddenFolderIcon;
+ private boolean mHiddenFolderLockStateChanged = false;
private boolean mHiddenFolderAuth = false;
@Thunk Hotseat mHotseat;
@@ -861,6 +862,7 @@ public class Launcher extends Activity
mHiddenFolderAuth = resultCode == RESULT_OK;
if (mHiddenFolderIcon != null && mHiddenFolderAuth) {
mHiddenFolderIcon.getFolder().saveHiddenFolderState(true);
+ mHiddenFolderLockStateChanged = true;
} else {
mHiddenFolderAuth = false;
}
@@ -868,6 +870,7 @@ public class Launcher extends Activity
mHiddenFolderAuth = resultCode == RESULT_OK;
if (mHiddenFolderIcon != null && mHiddenFolderAuth) {
mHiddenFolderIcon.getFolder().saveHiddenFolderState(false);
+ mHiddenFolderLockStateChanged = true;
} else {
mHiddenFolderAuth = false;
}
@@ -3590,7 +3593,6 @@ public class Launcher extends Activity
info.opened = false;
if (info.hidden) {
mHiddenFolderAuth = false;
- mHiddenFolderIcon = null;
}
ViewGroup parent = (ViewGroup) folder.getParent().getParent();
@@ -3601,11 +3603,13 @@ public class Launcher extends Activity
((CellLayout.LayoutParams) fi.getLayoutParams()).canReorder = true;
}
}
- folder.animateClosed(animate);
+ folder.animateClosed(mHiddenFolderLockStateChanged ? false : animate);
// Notify the accessibility manager that this folder "window" has disappeard and no
// longer occludeds the workspace items
getDragLayer().sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
+ mHiddenFolderIcon = null;
+ mHiddenFolderLockStateChanged = false;
}
public boolean onLongClick(View v) {