Skip to content

Commit 4e44348

Browse files
chethaaseAndroid (Google) Code Review
authored andcommitted
Merge "Fix shift/mask error in ArtbEvaluator" into jb-mr1-dev
2 parents 4aa3c03 + 9b55998 commit 4e44348

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/java/android/animation/ArgbEvaluator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ public class ArgbEvaluator implements TypeEvaluator {
4040
*/
4141
public Object evaluate(float fraction, Object startValue, Object endValue) {
4242
int startInt = (Integer) startValue;
43-
int startA = (startInt >> 24);
43+
int startA = (startInt >> 24) & 0xff;
4444
int startR = (startInt >> 16) & 0xff;
4545
int startG = (startInt >> 8) & 0xff;
4646
int startB = startInt & 0xff;
4747

4848
int endInt = (Integer) endValue;
49-
int endA = (endInt >> 24);
49+
int endA = (endInt >> 24) & 0xff;
5050
int endR = (endInt >> 16) & 0xff;
5151
int endG = (endInt >> 8) & 0xff;
5252
int endB = endInt & 0xff;

0 commit comments

Comments
 (0)