Merge "Fix for 4080402 NPE in Transition.setDuration" into honeycomb-mr1

This commit is contained in:
Rajneesh Chowdury
2011-03-10 15:10:39 -08:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 7 deletions

View File

@@ -131,6 +131,11 @@ public abstract class Transition {
if (durationMs > getMaximumDuration()) {
throw new IllegalArgumentException("The duration is too large");
}
if (afterMediaItem != null) {
mNativeHelper = afterMediaItem.getNativeContext();
}else {
mNativeHelper = beforeMediaItem.getNativeContext();
}
}
/**

View File

@@ -104,13 +104,6 @@ public class TransitionAlpha extends Transition {
mWidth = dbo.outWidth;
mHeight = dbo.outHeight;
if (afterMediaItem != null) {
mNativeHelper = afterMediaItem.getNativeContext();
}else {
mNativeHelper = beforeMediaItem.getNativeContext();
}
mRGBMaskFile = String.format(mNativeHelper.getProjectPath() +
"/" + "mask" + transitionId+ ".rgb");