summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2016-02-15 11:47:25 -0800
committerTom Powell <zifnab@zifnab06.net>2017-03-26 16:17:17 -0700
commitc9b4d0a2001084b46819e6e9af2aab4cc65422cd (patch)
treee7ddc09fcd6df2f20b7840699c0676d7bb441541
parent5aea909a1c063c6cf1509200e76d068dfdccb132 (diff)
downloadandroid_packages_apps_Trebuchet-c9b4d0a2001084b46819e6e9af2aab4cc65422cd.zip
android_packages_apps_Trebuchet-c9b4d0a2001084b46819e6e9af2aab4cc65422cd.tar.gz
android_packages_apps_Trebuchet-c9b4d0a2001084b46819e6e9af2aab4cc65422cd.tar.bz2
Trebuchet: Don't animate folder if locked state changed
Issue-id: CYNGNOS-2046 Change-Id: If6488d018b83b8e20874dbe0d32479f19ceac4cc
-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 568d6eb..8879fea 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -271,6 +271,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;
@@ -839,6 +840,7 @@ public class Launcher extends Activity
mHiddenFolderAuth = resultCode == RESULT_OK;
if (mHiddenFolderIcon != null && mHiddenFolderAuth) {
mHiddenFolderIcon.getFolder().saveHiddenFolderState(true);
+ mHiddenFolderLockStateChanged = true;
} else {
mHiddenFolderAuth = false;
}
@@ -846,6 +848,7 @@ public class Launcher extends Activity
mHiddenFolderAuth = resultCode == RESULT_OK;
if (mHiddenFolderIcon != null && mHiddenFolderAuth) {
mHiddenFolderIcon.getFolder().saveHiddenFolderState(false);
+ mHiddenFolderLockStateChanged = true;
} else {
mHiddenFolderAuth = false;
}
@@ -3541,7 +3544,6 @@ public class Launcher extends Activity
info.opened = false;
if (info.hidden) {
mHiddenFolderAuth = false;
- mHiddenFolderIcon = null;
}
ViewGroup parent = (ViewGroup) folder.getParent().getParent();
@@ -3552,11 +3554,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) {