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

Commit 271318db authored by wilsonshih's avatar wilsonshih Committed by Wei Sheng Shih
Browse files

Fix NPE on RemoteAnimationTargetCompat

Fix a common NPE error.

Test: build/flash, check remote animation works fine.
Bug: 175686676
Change-Id: I3d7fed5756225d99ab2976640aaeee07aa6eac14
parent fdb069d3
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -118,9 +118,9 @@ public class RemoteAnimationTargetCompat {
    }
    }


    public static RemoteAnimationTargetCompat[] wrap(RemoteAnimationTarget[] apps) {
    public static RemoteAnimationTargetCompat[] wrap(RemoteAnimationTarget[] apps) {
        final RemoteAnimationTargetCompat[] appsCompat =
        final int length = apps != null ? apps.length : 0;
                new RemoteAnimationTargetCompat[apps != null ? apps.length : 0];
        final RemoteAnimationTargetCompat[] appsCompat = new RemoteAnimationTargetCompat[length];
        for (int i = 0; i < apps.length; i++) {
        for (int i = 0; i < length; i++) {
            appsCompat[i] = new RemoteAnimationTargetCompat(apps[i]);
            appsCompat[i] = new RemoteAnimationTargetCompat(apps[i]);
        }
        }
        return appsCompat;
        return appsCompat;