Merge "Stop requesting focus on folder if it was closed without animating." into ub-launcher3-burnaby-polish
am: 55bd16bfdc
* commit '55bd16bfdce57772691519fb894b95c7f088846e':
Stop requesting focus on folder if it was closed without animating.
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java
index 5275508..1161f23 100644
--- a/src/com/android/launcher3/Folder.java
+++ b/src/com/android/launcher3/Folder.java
@@ -651,7 +651,7 @@
@Override
public void onAnimationEnd(Animator animation) {
setLayerType(LAYER_TYPE_NONE, null);
- close();
+ close(true);
}
@Override
public void onAnimationStart(Animator animation) {
@@ -665,7 +665,7 @@
oa.start();
}
- public void close() {
+ public void close(boolean wasAnimated) {
// TODO: Clear all active animations.
DragLayer parent = (DragLayer) getParent();
if (parent != null) {
@@ -673,7 +673,9 @@
}
mDragController.removeDropTarget(this);
clearFocus();
- mFolderIcon.requestFocus();
+ if (wasAnimated) {
+ mFolderIcon.requestFocus();
+ }
if (mRearrangeOnClose) {
rearrangeChildren();
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index cca0e36..a1bf173 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -3185,7 +3185,7 @@
if (animate) {
folder.animateClosed();
} else {
- folder.close();
+ folder.close(false);
}
// Notify the accessibility manager that this folder "window" has disappeared and no