OSDN Git Service
(root)
/
android-x86
/
frameworks-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b2f771
)
Allow null target in ObjectAnimator if the target has never been set
author
Doris Liu
<tianliu@google.com>
Mon, 26 Sep 2016 22:12:46 +0000
(15:12 -0700)
committer
Doris Liu
<tianliu@google.com>
Mon, 26 Sep 2016 22:32:41 +0000
(22:32 +0000)
BUG:
31684571
Test: http://ag/
1484115
Change-Id: I867fc3f93ddf70c58ae4387317ac875c5bafbebe
core/java/android/animation/ObjectAnimator.java
patch
|
blob
|
history
diff --git
a/core/java/android/animation/ObjectAnimator.java
b/core/java/android/animation/ObjectAnimator.java
index
9a2aa30
..
0c21c4f
100644
(file)
--- a/
core/java/android/animation/ObjectAnimator.java
+++ b/
core/java/android/animation/ObjectAnimator.java
@@
-977,8
+977,9
@@
public final class ObjectAnimator extends ValueAnimator {
@Override
void animateValue(float fraction) {
final Object target = getTarget();
- if (target == null) {
- // We lost the target reference, cancel and clean up.
+ if (mTarget != null && target == null) {
+ // We lost the target reference, cancel and clean up. Note: we allow null target if the
+ /// target has never been set.
cancel();
return;
}