Loading api/current.xml +22 −0 Original line number Diff line number Diff line Loading @@ -19870,6 +19870,17 @@ visibility="public" > </method> <method name="isRunning" return="boolean" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="removeAllListeners" return="void" abstract="false" Loading Loading @@ -20968,6 +20979,17 @@ visibility="public" > </method> <method name="isRunning" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="play" return="android.animation.Sequencer.Builder" abstract="false" core/java/android/animation/Animatable.java +7 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,13 @@ public abstract class Animatable implements Cloneable { public void end() { } /** * Returns whether this Animatable is currently running (having been started and not yet ended). * @return Whether the Animatable is running. */ public abstract boolean isRunning(); /** * Adds a listener to the set of listeners that are sent events through the life of an * animation, such as start, repeat, and end. Loading core/java/android/animation/Animator.java +11 −5 Original line number Diff line number Diff line Loading @@ -699,15 +699,21 @@ public class Animator<T> extends Animatable { @Override public void end() { if (!sAnimations.contains(this) && (Thread.currentThread() == Looper.getMainLooper().getThread())) { // Special case if the animation has not yet started. Set the end value. long endTime = mDuration; if (mRepeatCount > 0) { endTime += mRepeatCount * mDuration; } setCurrentPlayTime(endTime); } // Just set the ENDED flag - this causes the animation to end the next time a frame // is processed. mPlayingState = ENDED; } /** * Returns whether this Animator is currently running (having been started and not yet ended). * @return Wehther the Animator is running. */ @Override public boolean isRunning() { return mPlayingState == RUNNING; } Loading Loading @@ -737,6 +743,7 @@ public class Animator<T> extends Animatable { */ private void endAnimation() { sAnimations.remove(this); mPlayingState = STOPPED; if (mListeners != null) { ArrayList<AnimatableListener> tmpListeners = (ArrayList<AnimatableListener>) mListeners.clone(); Loading @@ -744,7 +751,6 @@ public class Animator<T> extends Animatable { listener.onAnimationEnd(this); } } mPlayingState = STOPPED; } /** Loading core/java/android/animation/Sequencer.java +17 −14 Original line number Diff line number Diff line Loading @@ -240,6 +240,21 @@ public final class Sequencer extends Animatable { } } /** * Returns true if any of the child animations of this Sequencer have been started and have not * yet ended. * @return Whether this Sequencer has been started and has not yet ended. */ @Override public boolean isRunning() { for (Node node : mNodes) { if (node.animation.isRunning()) { return true; } } return false; } /** * {@inheritDoc} * Loading Loading @@ -467,14 +482,10 @@ public final class Sequencer extends Animatable { public void onAnimationEnd(Animatable animation) { animation.removeListener(this); mPlayingSet.remove(animation); Node animNode = mSequencer.mNodeMap.get(animation); animNode.done = true; ArrayList<Node> sortedNodes = mSequencer.mSortedNodes; int numNodes = sortedNodes.size(); int nodeIndex = sortedNodes.indexOf(animNode); boolean allDone = true; for (int i = nodeIndex + 1; i < numNodes; ++i) { if (!sortedNodes.get(i).done) { for (Node node : sortedNodes) { if (node.animation.isRunning()) { allDone = false; break; } Loading Loading @@ -558,7 +569,6 @@ public final class Sequencer extends Animatable { } } } node.done = false; // also reset done flag } } } Loading Loading @@ -625,13 +635,6 @@ public final class Sequencer extends Animatable { */ public ArrayList<Node> nodeDependents = null; /** * Flag indicating whether the animation in this node is finished. This flag * is used by Sequencer to check, as each animation ends, whether all child animations * are done and it's time to send out an end event for the entire Sequencer. */ public boolean done = false; /** * Constructs the Node with the animation that it encapsulates. A Node has no * dependencies by default; dependencies are added via the addDependency() Loading core/java/android/text/TextLine.java +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ class TextLine { } } tl = new TextLine(); Log.e("TLINE", "new: " + tl); Log.v("TLINE", "new: " + tl); return tl; } Loading Loading
api/current.xml +22 −0 Original line number Diff line number Diff line Loading @@ -19870,6 +19870,17 @@ visibility="public" > </method> <method name="isRunning" return="boolean" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="removeAllListeners" return="void" abstract="false" Loading Loading @@ -20968,6 +20979,17 @@ visibility="public" > </method> <method name="isRunning" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="play" return="android.animation.Sequencer.Builder" abstract="false"
core/java/android/animation/Animatable.java +7 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,13 @@ public abstract class Animatable implements Cloneable { public void end() { } /** * Returns whether this Animatable is currently running (having been started and not yet ended). * @return Whether the Animatable is running. */ public abstract boolean isRunning(); /** * Adds a listener to the set of listeners that are sent events through the life of an * animation, such as start, repeat, and end. Loading
core/java/android/animation/Animator.java +11 −5 Original line number Diff line number Diff line Loading @@ -699,15 +699,21 @@ public class Animator<T> extends Animatable { @Override public void end() { if (!sAnimations.contains(this) && (Thread.currentThread() == Looper.getMainLooper().getThread())) { // Special case if the animation has not yet started. Set the end value. long endTime = mDuration; if (mRepeatCount > 0) { endTime += mRepeatCount * mDuration; } setCurrentPlayTime(endTime); } // Just set the ENDED flag - this causes the animation to end the next time a frame // is processed. mPlayingState = ENDED; } /** * Returns whether this Animator is currently running (having been started and not yet ended). * @return Wehther the Animator is running. */ @Override public boolean isRunning() { return mPlayingState == RUNNING; } Loading Loading @@ -737,6 +743,7 @@ public class Animator<T> extends Animatable { */ private void endAnimation() { sAnimations.remove(this); mPlayingState = STOPPED; if (mListeners != null) { ArrayList<AnimatableListener> tmpListeners = (ArrayList<AnimatableListener>) mListeners.clone(); Loading @@ -744,7 +751,6 @@ public class Animator<T> extends Animatable { listener.onAnimationEnd(this); } } mPlayingState = STOPPED; } /** Loading
core/java/android/animation/Sequencer.java +17 −14 Original line number Diff line number Diff line Loading @@ -240,6 +240,21 @@ public final class Sequencer extends Animatable { } } /** * Returns true if any of the child animations of this Sequencer have been started and have not * yet ended. * @return Whether this Sequencer has been started and has not yet ended. */ @Override public boolean isRunning() { for (Node node : mNodes) { if (node.animation.isRunning()) { return true; } } return false; } /** * {@inheritDoc} * Loading Loading @@ -467,14 +482,10 @@ public final class Sequencer extends Animatable { public void onAnimationEnd(Animatable animation) { animation.removeListener(this); mPlayingSet.remove(animation); Node animNode = mSequencer.mNodeMap.get(animation); animNode.done = true; ArrayList<Node> sortedNodes = mSequencer.mSortedNodes; int numNodes = sortedNodes.size(); int nodeIndex = sortedNodes.indexOf(animNode); boolean allDone = true; for (int i = nodeIndex + 1; i < numNodes; ++i) { if (!sortedNodes.get(i).done) { for (Node node : sortedNodes) { if (node.animation.isRunning()) { allDone = false; break; } Loading Loading @@ -558,7 +569,6 @@ public final class Sequencer extends Animatable { } } } node.done = false; // also reset done flag } } } Loading Loading @@ -625,13 +635,6 @@ public final class Sequencer extends Animatable { */ public ArrayList<Node> nodeDependents = null; /** * Flag indicating whether the animation in this node is finished. This flag * is used by Sequencer to check, as each animation ends, whether all child animations * are done and it's time to send out an end event for the entire Sequencer. */ public boolean done = false; /** * Constructs the Node with the animation that it encapsulates. A Node has no * dependencies by default; dependencies are added via the addDependency() Loading
core/java/android/text/TextLine.java +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ class TextLine { } } tl = new TextLine(); Log.e("TLINE", "new: " + tl); Log.v("TLINE", "new: " + tl); return tl; } Loading