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

* commit 'a7118e33b494b26bfbd37c895a1c412cd5da56ec':
  Fix for 4080402 NPE in Transition.setDuration
This commit is contained in:
Rajneesh Chowdury
2011-03-10 15:12:34 -08:00
committed by Android Git Automerger
2 changed files with 5 additions and 7 deletions

View File

@ -131,6 +131,11 @@ public abstract class Transition {
if (durationMs > getMaximumDuration()) { if (durationMs > getMaximumDuration()) {
throw new IllegalArgumentException("The duration is too large"); 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; mWidth = dbo.outWidth;
mHeight = dbo.outHeight; mHeight = dbo.outHeight;
if (afterMediaItem != null) {
mNativeHelper = afterMediaItem.getNativeContext();
}else {
mNativeHelper = beforeMediaItem.getNativeContext();
}
mRGBMaskFile = String.format(mNativeHelper.getProjectPath() + mRGBMaskFile = String.format(mNativeHelper.getProjectPath() +
"/" + "mask" + transitionId+ ".rgb"); "/" + "mask" + transitionId+ ".rgb");