Skip to content

Commit

Permalink
Trebuchet: fix behavior when ShowSearchBar feature is toggled off
Browse files Browse the repository at this point in the history
This bug was introduced with the New Folder UI changes

Repro:
 - Turn off Show Search Bar
 - Open App Drawer
 - Close App Drawer
 - Observe: "small" search bar shows up at the top of the screen

Change-Id: I18e59acff3197ea908473c89ff3ade8eaf9bed28
  • Loading branch information
Raj Yengisetty committed May 13, 2015
1 parent 8df1f02 commit faff75b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/com/android/launcher3/SearchDropTargetBar.java
Expand Up @@ -97,13 +97,6 @@ private void setupAnimation(ObjectAnimator anim, final View v) {
anim.setInterpolator(sAccelerateInterpolator);
anim.setDuration(sTransitionInDuration);
anim.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
if (v.getVisibility() != View.VISIBLE) {
v.setVisibility(View.VISIBLE);
}
}

@Override
public void onAnimationEnd(Animator animation) {
v.setLayerType(View.LAYER_TYPE_NONE, null);
Expand Down Expand Up @@ -227,6 +220,10 @@ public void onDragEnd() {
prepareStartAnimation(mDropTargetBar);
mDropTargetBarAnim.reverse();
if (!isAnyFolderOpen() && (!mIsSearchBarHidden || mQSBSearchBar.getAlpha() < 1f)) {
if (mLauncher != null && mLauncher.shouldShowSearchBar()
&& mQSBSearchBar.getVisibility() != View.VISIBLE) {
mQSBSearchBar.setVisibility(View.VISIBLE);
}
prepareStartAnimation(mQSBSearchBar);
mQSBSearchBarAnim.reverse();
}
Expand Down

0 comments on commit faff75b

Please sign in to comment.