summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2016-02-15 19:47:25 (GMT)
committercretin45 <cretin45@gmail.com>2016-02-15 19:59:03 (GMT)
commit60bb0d60a2eeb79a4f0e3c3f7b2b81332cfccebf (patch)
treede869048981ab492d7cab992747679eb5c8827ba /src
parent577d34207e3d9fcd676d093019bd85da631cef8b (diff)
downloadandroid_packages_apps_Trebuchet-60bb0d60a2eeb79a4f0e3c3f7b2b81332cfccebf.zip
android_packages_apps_Trebuchet-60bb0d60a2eeb79a4f0e3c3f7b2b81332cfccebf.tar.gz
android_packages_apps_Trebuchet-60bb0d60a2eeb79a4f0e3c3f7b2b81332cfccebf.tar.bz2
Trebuchet: Don't animate folder if locked state changed
Issue-id: CYNGNOS-2046 Change-Id: If6488d018b83b8e20874dbe0d32479f19ceac4cc
Diffstat (limited to 'src')
-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 64e8579..927c69b 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;
}
@@ -3591,7 +3594,6 @@ public class Launcher extends Activity
info.opened = false;
if (info.hidden) {
mHiddenFolderAuth = false;
- mHiddenFolderIcon = null;
}
ViewGroup parent = (ViewGroup) folder.getParent().getParent();
@@ -3602,11 +3604,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) {