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

Commit baca819d authored by Evan Rosky's avatar Evan Rosky
Browse files

Null check before writing RemoteAnimationTarget proto

Change-related variables are null when not changing, thus
we need to check for that before trying to write them to proto

Bug: 123538318
Test: ActivityLifecycleTopResumedStateTests#testTopPositionLostOnFinish
      passes

Change-Id: I643c48621602b5203f7f64a9af0578273f115dbe
parent debdadec
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -246,8 +246,12 @@ public class RemoteAnimationTarget implements Parcelable {
        position.writeToProto(proto, POSITION);
        sourceContainerBounds.writeToProto(proto, SOURCE_CONTAINER_BOUNDS);
        windowConfiguration.writeToProto(proto, WINDOW_CONFIGURATION);
        if (startLeash != null) {
            startLeash.writeToProto(proto, START_LEASH);
        }
        if (startBounds != null) {
            startBounds.writeToProto(proto, START_BOUNDS);
        }
        proto.end(token);
    }