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

Commit db2fa049 authored by Sunny Goyal's avatar Sunny Goyal Committed by Android (Google) Code Review
Browse files

Merge "Moving saving state transtion listener logic to individual views" into ub-launcher3-master

parents 0666592b db364379
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -2951,10 +2951,9 @@ public class Launcher extends Activity
        }

        if (toState == State.APPS) {
            mStateTransitionAnimation.startAnimationToAllApps(mWorkspace.getState(), animated,
                    focusSearchBar);
            mStateTransitionAnimation.startAnimationToAllApps(animated, focusSearchBar);
        } else {
            mStateTransitionAnimation.startAnimationToWidgets(mWorkspace.getState(), animated);
            mStateTransitionAnimation.startAnimationToWidgets(animated);
        }

        // Change the state *after* we've called all the transition code
+40 −210

File changed.

Preview size limit exceeded, changes collapsed.

+0 −27
Original line number Diff line number Diff line
/*
 * Copyright (C) 2015 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.launcher3;

/**
 * An interface to get callbacks during a launcher transition.
 */
public interface LauncherTransitionable {
    void onLauncherTransitionPrepare(Launcher l, boolean animated, boolean multiplePagesVisible);
    void onLauncherTransitionStart(Launcher l, boolean animated, boolean toWorkspace);
    void onLauncherTransitionStep(Launcher l, float t);
    void onLauncherTransitionEnd(Launcher l, boolean animated, boolean toWorkspace);
}
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ public class PinchAnimationManager {
            public void onAnimationEnd(Animator animation) {
                mIsAnimating = false;
                thresholdManager.reset();
                mWorkspace.onLauncherTransitionEnd(mLauncher, false, true);
                mWorkspace.onEndStateTransition();
            }
        });
        animator.setDuration(duration).start();
+2 −2
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ public class PinchToOverviewListener extends ScaleGestureDetector.SimpleOnScaleG
        mInterpolator = mWorkspace.isInOverviewMode() ? new LogDecelerateInterpolator(100, 0)
                : new LogAccelerateInterpolator(100, 0);
        mPinchStarted = true;
        mWorkspace.onLauncherTransitionPrepare(mLauncher, false, true);
        mWorkspace.onPrepareStateTransition(true);
        return true;
    }

@@ -142,7 +142,7 @@ public class PinchToOverviewListener extends ScaleGestureDetector.SimpleOnScaleG
                    mThresholdManager);
        } else {
            mThresholdManager.reset();
            mWorkspace.onLauncherTransitionEnd(mLauncher, false, true);
            mWorkspace.onEndStateTransition();
        }
        mPinchStarted = false;
        mPinchCanceled = false;
Loading