diff options
author | Winson Chung <winsonc@google.com> | 2014-12-18 21:56:20 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2014-12-18 21:56:20 +0000 |
commit | f69fe23bff0984ade6a44a3534dbc8e889d29531 (patch) | |
tree | 36c8b8114cdcec1fd7edf85ae02043cd8e7b9ad9 /core/java/android/app | |
parent | 536fbce41ded0a0c40505118b7ac937e470b9269 (diff) | |
parent | 5d40d0b645e31063d08e304e4ba2880b267234b9 (diff) | |
download | frameworks_base-f69fe23bff0984ade6a44a3534dbc8e889d29531.zip frameworks_base-f69fe23bff0984ade6a44a3534dbc8e889d29531.tar.gz frameworks_base-f69fe23bff0984ade6a44a3534dbc8e889d29531.tar.bz2 |
am 4edaa5e4: am a320b217: Merge "Bug 18784289: Fix issue with transition animation callback." into lmp-mr1-dev
automerge: 5d40d0b
* commit '5d40d0b645e31063d08e304e4ba2880b267234b9':
Bug 18784289: Fix issue with transition animation callback.
Diffstat (limited to 'core/java/android/app')
-rw-r--r-- | core/java/android/app/ActivityOptions.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java index 3d390bf..39ae65c 100644 --- a/core/java/android/app/ActivityOptions.java +++ b/core/java/android/app/ActivityOptions.java @@ -384,6 +384,8 @@ public class ActivityOptions { * of the animation. * @param startX The x starting location of the bitmap, relative to <var>source</var>. * @param startY The y starting location of the bitmap, relative to <var>source</var>. + * @param handler If <var>listener</var> is non-null this must be a valid + * Handler on which to dispatch the callback; otherwise it should be null. * @param listener Optional OnAnimationStartedListener to find out when the * requested animation has started running. If for some reason the animation * is not executed, the callback will happen immediately. @@ -393,9 +395,9 @@ public class ActivityOptions { */ public static ActivityOptions makeThumbnailAspectScaleUpAnimation(View source, Bitmap thumbnail, int startX, int startY, int targetWidth, int targetHeight, - OnAnimationStartedListener listener) { + Handler handler, OnAnimationStartedListener listener) { return makeAspectScaledThumbnailAnimation(source, thumbnail, startX, startY, - targetWidth, targetHeight, listener, true); + targetWidth, targetHeight, handler, listener, true); } /** @@ -408,6 +410,8 @@ public class ActivityOptions { * of the animation. * @param startX The x end location of the bitmap, relative to <var>source</var>. * @param startY The y end location of the bitmap, relative to <var>source</var>. + * @param handler If <var>listener</var> is non-null this must be a valid + * Handler on which to dispatch the callback; otherwise it should be null. * @param listener Optional OnAnimationStartedListener to find out when the * requested animation has started running. If for some reason the animation * is not executed, the callback will happen immediately. @@ -417,14 +421,14 @@ public class ActivityOptions { */ public static ActivityOptions makeThumbnailAspectScaleDownAnimation(View source, Bitmap thumbnail, int startX, int startY, int targetWidth, int targetHeight, - OnAnimationStartedListener listener) { + Handler handler, OnAnimationStartedListener listener) { return makeAspectScaledThumbnailAnimation(source, thumbnail, startX, startY, - targetWidth, targetHeight, listener, false); + targetWidth, targetHeight, handler, listener, false); } private static ActivityOptions makeAspectScaledThumbnailAnimation(View source, Bitmap thumbnail, int startX, int startY, int targetWidth, int targetHeight, - OnAnimationStartedListener listener, boolean scaleUp) { + Handler handler, OnAnimationStartedListener listener, boolean scaleUp) { ActivityOptions opts = new ActivityOptions(); opts.mPackageName = source.getContext().getPackageName(); opts.mAnimationType = scaleUp ? ANIM_THUMBNAIL_ASPECT_SCALE_UP : @@ -436,7 +440,7 @@ public class ActivityOptions { opts.mStartY = pts[1] + startY; opts.mWidth = targetWidth; opts.mHeight = targetHeight; - opts.setOnAnimationStartedListener(source.getHandler(), listener); + opts.setOnAnimationStartedListener(handler, listener); return opts; } |