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

Commit 9991c6ba authored by Ats Jenk's avatar Ats Jenk
Browse files

Remove inline variable creation with instanceof

This is not support by the protolog tool. Which means none of the
protologs in this file work.
Moving back to the old format of creating the variable separately.

Bug: 329326194
Test: m SystemUITitan, enable bubbles protolog to logcat, check that
  logs are in logcat
Change-Id: Ifb12353ee6837cf4c28063b2ff5b94ca5f97f5a2
parent af8f1ceb
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -449,17 +449,21 @@ public class BubbleStackView extends FrameLayout

                @Override
                public void onStuckToTarget(@NonNull MagnetizedObject.MagneticTarget target,
                        @NonNull MagnetizedObject draggedObject) {
                    if (draggedObject.getUnderlyingObject() instanceof View view) {
                        @NonNull MagnetizedObject<?> draggedObject) {
                    Object underlyingObject = draggedObject.getUnderlyingObject();
                    if (underlyingObject instanceof View) {
                        View view = (View) underlyingObject;
                        animateDismissBubble(view, true);
                    }
                }

                @Override
                public void onUnstuckFromTarget(@NonNull MagnetizedObject.MagneticTarget target,
                        @NonNull MagnetizedObject draggedObject,
                        @NonNull MagnetizedObject<?> draggedObject,
                        float velX, float velY, boolean wasFlungOut) {
                    if (draggedObject.getUnderlyingObject() instanceof View view) {
                    Object underlyingObject = draggedObject.getUnderlyingObject();
                    if (underlyingObject instanceof View) {
                        View view = (View) underlyingObject;
                        animateDismissBubble(view, false);

                        if (wasFlungOut) {
@@ -474,7 +478,9 @@ public class BubbleStackView extends FrameLayout
                @Override
                public void onReleasedInTarget(@NonNull MagnetizedObject.MagneticTarget target,
                        @NonNull MagnetizedObject<?> draggedObject) {
                    if (draggedObject.getUnderlyingObject() instanceof View view) {
                    Object underlyingObject = draggedObject.getUnderlyingObject();
                    if (underlyingObject instanceof View) {
                        View view = (View) underlyingObject;
                        mExpandedAnimationController.dismissDraggedOutBubble(
                                view /* bubble */,
                                mDismissView.getHeight() /* translationYBy */,