Merge "Stop requesting focus on folder if it was closed without animating." into ub-launcher3-burnaby-polish

This commit is contained in:
Tony Wickham
2015-11-19 00:36:20 +00:00
committed by Android (Google) Code Review
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -640,7 +640,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
@Override
public void onAnimationEnd(Animator animation) {
setLayerType(LAYER_TYPE_NONE, null);
close();
close(true);
}
@Override
public void onAnimationStart(Animator animation) {
@@ -654,7 +654,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
oa.start();
}
public void close() {
public void close(boolean wasAnimated) {
// TODO: Clear all active animations.
DragLayer parent = (DragLayer) getParent();
if (parent != null) {
@@ -662,7 +662,9 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
}
mDragController.removeDropTarget(this);
clearFocus();
mFolderIcon.requestFocus();
if (wasAnimated) {
mFolderIcon.requestFocus();
}
if (mRearrangeOnClose) {
rearrangeChildren();
+1 -1
View File
@@ -3226,7 +3226,7 @@ public class Launcher extends Activity
if (animate) {
folder.animateClosed();
} else {
folder.close();
folder.close(false);
}
// Notify the accessibility manager that this folder "window" has disappeared and no