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

Commit 458df51d authored by Selim Cinek's avatar Selim Cinek Committed by android-build-merger
Browse files

Merge changes If981a380,I48a8f882,I4b248b2f,Id9e6ce2a,Ib5239325, ... into nyc-dev am: 4f0e1e1d

am: ea5b8849

* commit 'ea5b8849':
  Fixed a bug where custom notifications were invisible
  Fixed a transformation error when fading in views
  Fixed animation jank in notification groups
  Fixed a bug where the single line view would be invisible
  Fixed a bug where huns could be invisible
  Fixed a crash with notification children
parents d2598d34 ea5b8849
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -527,6 +527,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
            mGuts.setVisibility(oldGuts.getVisibility());
            addView(mGuts, index);
        }
        mPrivateLayout.reInflateViews();
        mPublicLayout.reInflateViews();
    }

    public interface ExpansionLogger {
+16 −2
Original line number Diff line number Diff line
@@ -248,14 +248,16 @@ public class NotificationContentView extends FrameLayout {
    public void reset(boolean resetActualHeight) {
        if (mContractedChild != null) {
            mContractedChild.animate().cancel();
            removeView(mContractedChild);
        }
        if (mExpandedChild != null) {
            mExpandedChild.animate().cancel();
            removeView(mExpandedChild);
        }
        if (mHeadsUpChild != null) {
            mHeadsUpChild.animate().cancel();
            removeView(mHeadsUpChild);
        }
        removeAllViews();
        mContractedChild = null;
        mExpandedChild = null;
        mHeadsUpChild = null;
@@ -494,7 +496,8 @@ public class NotificationContentView extends FrameLayout {
                return VISIBLE_TYPE_EXPANDED;
            }
        } else {
            if (viewHeight <= mContractedChild.getHeight() || noExpandedChild) {
            if (noExpandedChild || (viewHeight <= mContractedChild.getHeight()
                    && (!mIsChildInGroup || !mContainingNotification.isExpanded()))) {
                return VISIBLE_TYPE_CONTRACTED;
            } else {
                return VISIBLE_TYPE_EXPANDED;
@@ -569,6 +572,9 @@ public class NotificationContentView extends FrameLayout {
        if (mIsChildInGroup) {
            mSingleLineView = mHybridViewManager.bindFromNotification(
                    mSingleLineView, mStatusBarNotification.getNotification());
        } else if (mSingleLineView != null) {
            removeView(mSingleLineView);
            mSingleLineView = null;
        }
    }

@@ -685,4 +691,12 @@ public class NotificationContentView extends FrameLayout {
    public void requestSelectLayout(boolean needsAnimation) {
        selectLayout(needsAnimation, false);
    }

    public void reInflateViews() {
        if (mIsChildInGroup && mSingleLineView != null) {
            removeView(mSingleLineView);
            mSingleLineView = null;
            updateSingleLineView();
        }
    }
}
+6 −0
Original line number Diff line number Diff line
@@ -45,4 +45,10 @@ public class NotificationCustomViewWrapper extends NotificationViewWrapper {
            mInvertHelper.update(dark);
        }
    }

    @Override
    public void setVisible(boolean visible) {
        super.setVisible(visible);
        mView.setAlpha(visible ? 1.0f : 0.0f);
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -105,6 +105,7 @@ public abstract class NotificationViewWrapper implements TransformableView {

    @Override
    public void setVisible(boolean visible) {
        mView.animate().cancel();
        mView.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
    }
}
+9 −4
Original line number Diff line number Diff line
@@ -293,14 +293,19 @@ public class TransformState {
        mTransformedView.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
        mTransformedView.setAlpha(visible ? 1.0f : 0.0f);
        if (visible) {
            mTransformedView.setTranslationX(0);
            mTransformedView.setTranslationY(0);
            mTransformedView.setScaleX(1.0f);
            mTransformedView.setScaleY(1.0f);
            resetTransformedView();
        }
    }

    public void prepareFadeIn() {
        resetTransformedView();
    }

    private void resetTransformedView() {
        mTransformedView.setTranslationX(0);
        mTransformedView.setTranslationY(0);
        mTransformedView.setScaleX(1.0f);
        mTransformedView.setScaleY(1.0f);
    }

    public static TransformState obtain() {
Loading