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

Commit 863cf416 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Remove enabled flag migrate_predictive_back_transition" into main

parents 975b6d7d 3b3401df
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -281,20 +281,6 @@ public final class BackNavigationInfo implements Parcelable {
        }
    }

    /**
     * Callback to be called when the back gesture is finished in order to notify the server that
     * it can ask app to start rendering.
     * @hide
     * @param triggerBack Boolean indicating if back gesture has been triggered.
     */
    public void onBackGestureFinished(boolean triggerBack) {
        if (mOnBackNavigationDone != null) {
            Bundle result = new Bundle();
            result.putBoolean(KEY_GESTURE_FINISHED, triggerBack);
            mOnBackNavigationDone.sendResult(result);
        }
    }

    /**
     * Get customize animation info.
     * @hide
+0 −11
Original line number Diff line number Diff line
@@ -291,17 +291,6 @@ flag {
  }
}

flag {
  name: "migrate_predictive_back_transition"
  namespace: "windowing_frontend"
  description: "Create transition when visibility change from predictive back"
  bug: "347168362"
  is_fixed_read_only: true
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
  name: "always_capture_activity_snapshot"
  namespace: "windowing_frontend"
+9 −19
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ import static android.window.TransitionInfo.FLAG_MOVED_TO_TOP;
import static android.window.TransitionInfo.FLAG_SHOW_WALLPAPER;

import static com.android.internal.jank.InteractionJankMonitor.CUJ_PREDICTIVE_BACK_HOME;
import static com.android.window.flags.Flags.migratePredictiveBackTransition;
import static com.android.window.flags.Flags.predictiveBackSystemAnims;
import static com.android.window.flags.Flags.unifyBackNavigationTransition;
import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BACK_PREVIEW;
@@ -215,9 +214,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
                        ProtoLog.i(WM_SHELL_BACK_PREVIEW, "Navigation window gone.");
                        setTriggerBack(false);
                        // Trigger close transition if necessary.
                        if (Flags.migratePredictiveBackTransition()) {
                        mBackTransitionHandler.onAnimationFinished();
                        }
                        resetTouchTracker();
                        // Don't wait for animation start
                        mShellExecutor.removeCallbacks(mAnimationTimeoutRunnable);
@@ -918,9 +915,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
        mShellExecutor.executeDelayed(mAnimationTimeoutRunnable, MAX_ANIMATION_DURATION);

        // The next callback should be {@link #onBackAnimationFinished}.
        final boolean migrateBackToTransition = migratePredictiveBackTransition();
        if (mCurrentTracker.getTriggerBack()) {
            if (migrateBackToTransition) {
            // notify core gesture is commit
            if (shouldTriggerCloseTransition()) {
                mBackTransitionHandler.mCloseTransitionRequested = true;
@@ -930,11 +925,6 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
                dispatchOnBackInvoked(callback);
                mRealCallbackInvoked = true;
            }
            } else {
                // notify gesture finished
                mBackNavigationInfo.onBackGestureFinished(true);
            }

            // start post animation
            dispatchOnBackInvoked(mActiveCallback);
        } else {
+6 −14
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ import android.os.IBinder;
import android.view.SurfaceControl;
import android.window.TransitionInfo;

import com.android.window.flags.Flags;
import com.android.wm.shell.common.RemoteCallable;
import com.android.wm.shell.common.ShellExecutor;
import com.android.wm.shell.common.SingleInstanceRemoteListener;
@@ -73,7 +72,6 @@ public class HomeTransitionObserver implements TransitionObserver,
            final int mode = change.getMode();
            final boolean isBackGesture = change.hasFlags(FLAG_BACK_GESTURE_ANIMATED);
            if (taskInfo.getActivityType() == ACTIVITY_TYPE_HOME) {
                if (Flags.migratePredictiveBackTransition()) {
                final boolean gestureToHomeTransition = isBackGesture
                        && TransitionUtil.isClosingType(info.getType());
                if (gestureToHomeTransition || TransitionUtil.isClosingMode(mode)
@@ -81,12 +79,6 @@ public class HomeTransitionObserver implements TransitionObserver,
                    notifyHomeVisibilityChanged(gestureToHomeTransition
                            || TransitionUtil.isOpeningType(mode));
                }
                } else {
                    if (TransitionUtil.isOpenOrCloseMode(mode) || isBackGesture) {
                        notifyHomeVisibilityChanged(TransitionUtil.isOpeningType(mode)
                                || isBackGesture);
                    }
                }
            }
        }
    }
+0 −8
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ import static android.view.WindowManager.TRANSIT_TO_BACK;
import static android.view.WindowManager.TRANSIT_TO_FRONT;
import static android.view.WindowManager.fixScale;
import static android.window.TransitionInfo.FLAGS_IS_NON_APP_WINDOW;
import static android.window.TransitionInfo.FLAG_BACK_GESTURE_ANIMATED;
import static android.window.TransitionInfo.FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY;
import static android.window.TransitionInfo.FLAG_IS_BEHIND_STARTING_WINDOW;
import static android.window.TransitionInfo.FLAG_IS_OCCLUDED;
@@ -40,7 +39,6 @@ import static android.window.TransitionInfo.FLAG_STARTING_WINDOW_TRANSFER_RECIPI

import static com.android.systemui.shared.Flags.returnAnimationFrameworkLongLived;
import static com.android.window.flags.Flags.ensureWallpaperInTransitions;
import static com.android.window.flags.Flags.migratePredictiveBackTransition;
import static com.android.wm.shell.shared.TransitionUtil.isClosingType;
import static com.android.wm.shell.shared.TransitionUtil.isOpeningType;

@@ -848,12 +846,6 @@ public class Transitions implements RemoteCallable<Transitions>,
                info.getChanges().remove(i);
                continue;
            }
            // The change has already animated by back gesture, don't need to play transition
            // animation on it.
            if (!migratePredictiveBackTransition()
                    && change.hasFlags(FLAG_BACK_GESTURE_ANIMATED)) {
                info.getChanges().remove(i);
            }
        }
        // There does not need animation when:
        // A. Transfer starting window. Apply transfer starting window directly if there is no other
Loading