Fix back button not showing in all floating views

We only show the back button when adding the floating view to the
drag layer if it is already "open". A couple of floating items
(folder and options popup) added first then set mIsOpen, causing
the back button to not appear. (We have to check that it is open,
and not just on the drag layer, because we want to get rid of the
back button when changing to some states such as spring-loaded. If
we only checked if the view was present, it wouldn't hide if one of
the floating views such as folder or shortcuts was animated closed.)

Bug: 76169527
Change-Id: I0dff6d2e3424eab72d47dccc42cc703a0fb0141b
This commit is contained in:
Tony Wickham
2018-03-23 16:22:06 -07:00
parent f6a8f955ed
commit b65040ac7b
2 changed files with 3 additions and 3 deletions

View File

@@ -288,8 +288,8 @@ public class OptionsPopupView extends AbstractFloatingView
lp.y = Utilities.boundToRange((int) (y - height / 2), insets.top + margin,
maxHeight - insets.bottom - height - margin);
launcher.getDragLayer().addView(view);
view.animateOpen();
launcher.getDragLayer().addView(view);
}
public static boolean onWidgetsClicked(Launcher launcher) {