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

Commit 2cd45dfb authored by Selim Cinek's avatar Selim Cinek
Browse files

Enabled appear and dissappear animations for the overflow card

Bug: 21651647
Change-Id: I0732cb27ec8f88ae74fcff11340092879ba8bae3
parent f87baef1
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -540,9 +540,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView

    private void startAppearAnimation(boolean isAppearing, float translationDirection, long delay,
            long duration, final Runnable onFinishedRunnable) {
        if (mAppearAnimator != null) {
            mAppearAnimator.cancel();
        }
        cancelAppearAnimation();
        mAnimationTranslationY = translationDirection * getActualHeight();
        if (mAppearAnimationFraction == -1.0f) {
            // not initialized yet, we start anew
@@ -613,6 +611,17 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
        mAppearAnimator.start();
    }

    private void cancelAppearAnimation() {
        if (mAppearAnimator != null) {
            mAppearAnimator.cancel();
        }
    }

    public void cancelAppearDrawing() {
        cancelAppearAnimation();
        enableAppearDrawing(false);
    }

    private void updateAppearRect() {
        float inverseFraction = (1.0f - mAppearAnimationFraction);
        float translationFraction = mCurrentAppearInterpolator.getInterpolation(inverseFraction);
+2 −5
Original line number Diff line number Diff line
@@ -1840,11 +1840,8 @@ public abstract class BaseStatusBar extends SystemUI implements
            }
        }

        if (onKeyguard && mKeyguardIconOverflowContainer.getIconsView().getChildCount() > 0) {
            mKeyguardIconOverflowContainer.setVisibility(View.VISIBLE);
        } else {
            mKeyguardIconOverflowContainer.setVisibility(View.GONE);
        }
        mStackScroller.updateOverflowContainerVisibility(onKeyguard
                && mKeyguardIconOverflowContainer.getIconsView().getChildCount() > 0);

        mStackScroller.changeViewPosition(mDismissView, mStackScroller.getChildCount() - 1);
        mStackScroller.changeViewPosition(mEmptyShadeView, mStackScroller.getChildCount() - 2);
+9 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ public abstract class ExpandableView extends FrameLayout {
    private ArrayList<View> mMatchParentViews = new ArrayList<View>();
    private int mClipTopOptimization;
    private static Rect mClipRect = new Rect();
    private boolean mWillBeGone;

    public ExpandableView(Context context, AttributeSet attrs) {
        super(context, attrs);
@@ -374,6 +375,14 @@ public abstract class ExpandableView extends FrameLayout {
        updateClipping();
    }

    public boolean willBeGone() {
        return mWillBeGone;
    }

    public void setWillBeGone(boolean willBeGone) {
        mWillBeGone = willBeGone;
    }

    /**
     * A listener notifying when {@link #getActualHeight} changes.
     */
+0 −9
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@ public abstract class StackScrollerDecorView extends ExpandableView {
    protected View mContent;
    private boolean mIsVisible;
    private boolean mAnimating;
    private boolean mWillBeGone;

    public StackScrollerDecorView(Context context, AttributeSet attrs) {
        super(context, attrs);
@@ -134,13 +133,5 @@ public abstract class StackScrollerDecorView extends ExpandableView {
        mContent.animate().cancel();
    }

    public boolean willBeGone() {
        return mWillBeGone;
    }

    public void setWillBeGone(boolean willBeGone) {
        mWillBeGone = willBeGone;
    }

    protected abstract View findContentView();
}
+1 −2
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.IPackageManager;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.database.ContentObserver;
@@ -707,7 +706,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
                        R.layout.status_bar_notification_keyguard_overflow, mStackScroller, false);
        mKeyguardIconOverflowContainer.setOnActivatedListener(this);
        mKeyguardIconOverflowContainer.setOnClickListener(mOverflowClickListener);
        mStackScroller.addView(mKeyguardIconOverflowContainer);
        mStackScroller.setOverflowContainer(mKeyguardIconOverflowContainer);

        SpeedBumpView speedBump = (SpeedBumpView) LayoutInflater.from(mContext).inflate(
                        R.layout.status_bar_notification_speed_bump, mStackScroller, false);
Loading