Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6cfc7a0a authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix bug 3365208 - Contextual Action Bar is not displayed when the...

Merge "Fix bug 3365208 - Contextual Action Bar is not displayed when the context item is changing" into honeycomb
parents fc14d42b a1e6358a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -388,6 +388,7 @@ public class ActionBarImpl extends ActionBar {
            mActionMode.finish();
        }

        mUpperContextView.killMode();
        ActionMode mode = new ActionModeImpl(callback);
        if (callback.onCreateActionMode(mode, mode.getMenu())) {
            mode.invalidate();
+3 −7
Original line number Diff line number Diff line
@@ -160,10 +160,6 @@ public class ActionBarContextView extends ViewGroup implements AnimatorListener
    }

    public void initForMode(final ActionMode mode) {
        if (mAnimationMode != ANIMATE_IDLE || mAnimateInOnLayout) {
            killMode();
        }

        if (mClose == null) {
            LayoutInflater inflater = LayoutInflater.from(mContext);
            mClose = inflater.inflate(R.layout.action_mode_close_item, this, false);
@@ -198,15 +194,15 @@ public class ActionBarContextView extends ViewGroup implements AnimatorListener
            return;
        }

        mAnimationMode = ANIMATE_OUT;
        finishAnimation();
        mAnimationMode = ANIMATE_OUT;
        mCurrentAnimation = makeOutAnimation();
        mCurrentAnimation.start();
    }

    private void finishAnimation() {
        final Animator a = mCurrentAnimation;
        if (a != null && a.isRunning()) {
        if (a != null) {
            mCurrentAnimation = null;
            a.end();
        }
@@ -448,7 +444,7 @@ public class ActionBarContextView extends ViewGroup implements AnimatorListener

    @Override
    public void onAnimationEnd(Animator animation) {
        if (mAnimationMode != ANIMATE_IN) {
        if (mAnimationMode == ANIMATE_OUT) {
            killMode();
        }
        mAnimationMode = ANIMATE_IDLE;
+1 −0
Original line number Diff line number Diff line
@@ -1985,6 +1985,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
                }

                if (mActionModeView != null) {
                    mActionModeView.killMode();
                    mode = new StandaloneActionMode(getContext(), mActionModeView, wrappedCallback);
                    if (callback.onCreateActionMode(mode, mode.getMenu())) {
                        mode.invalidate();