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

Commit 6c892be4 authored by Doris Liu's avatar Doris Liu Committed by Android Git Automerger
Browse files

am f39708c3: am 803a1e84: am a2f04382: Merge "Use ArrayMap instead of HashMap...

am f39708c3: am 803a1e84: am a2f04382: Merge "Use ArrayMap instead of HashMap for storing relavant nodes" into mnc-dev

* commit 'f39708c3':
  Use ArrayMap instead of HashMap for storing relavant nodes
parents 6ea5c3d7 f39708c3
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -16,9 +16,10 @@

package android.animation;

import android.util.ArrayMap;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;

/**
@@ -68,7 +69,7 @@ public final class AnimatorSet extends Animator {
     * to a single node representing that Animator, not create a new Node
     * if one already exists.
     */
    private HashMap<Animator, Node> mNodeMap = new HashMap<Animator, Node>();
    private ArrayMap<Animator, Node> mNodeMap = new ArrayMap<Animator, Node>();

    /**
     * Set of all nodes created for this AnimatorSet. This list is used upon
@@ -646,7 +647,7 @@ public final class AnimatorSet extends Animator {
        anim.mTerminated = false;
        anim.mStarted = false;
        anim.mPlayingSet = new ArrayList<Animator>();
        anim.mNodeMap = new HashMap<Animator, Node>();
        anim.mNodeMap = new ArrayMap<Animator, Node>();
        anim.mNodes = new ArrayList<Node>(nodeCount);
        anim.mSortedNodes = new ArrayList<Node>(nodeCount);
        anim.mReversible = mReversible;