Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8f5a255 authored by George Mount's avatar George Mount Committed by Android (Google) Code Review
Browse files

Merge "Disallow makeSceneTransitionAnimation without FEATURE_CONTENT_TRANSITIONS"

parents 0ab4c729 5d1be536
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -365,11 +365,15 @@ public class ActivityOptions {
     * @param listener The listener to use to monitor activity transition events.
     * @param listener The listener to use to monitor activity transition events.
     * @return Returns a new ActivityOptions object that you can use to
     * @return Returns a new ActivityOptions object that you can use to
     *         supply these options as the options Bundle when starting an activity.
     *         supply these options as the options Bundle when starting an activity.
     *         Returns null if the Window does not have {@link Window#FEATURE_CONTENT_TRANSITIONS}.
     * @see android.transition.Transition#setEpicenterCallback(
     * @see android.transition.Transition#setEpicenterCallback(
     *          android.transition.Transition.EpicenterCallback)
     *          android.transition.Transition.EpicenterCallback)
     */
     */
    public static ActivityOptions makeSceneTransitionAnimation(Window window,
    public static ActivityOptions makeSceneTransitionAnimation(Window window,
            ActivityTransitionListener listener) {
            ActivityTransitionListener listener) {
        if (!window.hasFeature(Window.FEATURE_CONTENT_TRANSITIONS)) {
            return null;
        }
        ActivityOptions opts = new ActivityOptions();
        ActivityOptions opts = new ActivityOptions();
        opts.mAnimationType = ANIM_SCENE_TRANSITION;
        opts.mAnimationType = ANIM_SCENE_TRANSITION;
        ExitTransitionCoordinator exit = new ExitTransitionCoordinator(window, listener);
        ExitTransitionCoordinator exit = new ExitTransitionCoordinator(window, listener);