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

Commit 05f24631 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Remove inTransitionSelfOrParent

Since legacy transition is removed, it is the same as inTransition().

Bug: 365884835
Flag: EXEMPT remove unused code
Test: CtsWindowManagerDeviceWindow
Change-Id: I64077f92d56553f44112462821797d7a2d8150ba
parent 230ffb85
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -3817,7 +3817,7 @@ final class ActivityRecord extends WindowToken {
        }

        if (isCurrentVisible) {
            if (isNextNotYetVisible || delayRemoval || (next != null && isInTransition())) {
            if (isNextNotYetVisible || delayRemoval || (next != null && inTransition())) {
                // Add this activity to the list of stopping activities. It will be processed and
                // destroyed when the next activity reports idle.
                addToStopping(false /* scheduleIdle */, false /* idleDelayed */,
@@ -7956,10 +7956,6 @@ final class ActivityRecord extends WindowToken {
        }
    }

    boolean isInTransition() {
        return inTransitionSelfOrParent();
    }

    /**
     * In some cases, applying insets to bounds changes the orientation. For example, if a
     * close-to-square display rotates to portrait to respect a portrait orientation activity, after
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ class ActivityRecordInputSink {
        final boolean allowPassthrough = activityBelowInTask != null && (
                activityBelowInTask.mAllowedTouchUid == mActivityRecord.getUid()
                        || activityBelowInTask.isUid(mActivityRecord.getUid()));
        if (allowPassthrough || !mIsCompatEnabled || mActivityRecord.isInTransition()
        if (allowPassthrough || !mIsCompatEnabled || mActivityRecord.inTransition()
                || !mActivityRecord.mActivityRecordInputSinkEnabled) {
            // Set to non-touchable, so the touch events can pass through.
            mInputWindowHandleWrapper.setInputConfigMasked(InputConfig.NOT_TOUCHABLE,
+1 −1
Original line number Diff line number Diff line
@@ -2171,7 +2171,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
            final ActivityRecord s = mStoppingActivities.get(i);
            // Activity in a force hidden task should not be counted as animating, i.e., we want to
            // send onStop before any configuration change when removing pip transition is ongoing.
            final boolean animating = s.isInTransition()
            final boolean animating = s.inTransition()
                    && s.getTask() != null && !s.getTask().isForceHidden();
            ProtoLog.v(WM_DEBUG_STATES, "Stopping %s: nowVisible=%b animating=%b "
                    + "finishing=%s", s, s.nowVisible, animating, s.finishing);
+2 −2
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ class AppCompatReachabilityPolicy {
        // The check on the transition state only makes sense if the event is coming from core.
        // In case the event is coming from Shell, the transition should not be considered.
        final boolean skipWhenOnTransition = source == REACHABILITY_SOURCE_CORE
                && mActivityRecord.isInTransition();
                && mActivityRecord.inTransition();
        if (!reachabilityOverrides.isHorizontalReachabilityEnabled() || skipWhenOnTransition) {
            return;
        }
@@ -183,7 +183,7 @@ class AppCompatReachabilityPolicy {
        // The check on the transition state only makes sense if the event is coming from core.
        // In case the event is coming from Shell, the transition should not be considered.
        final boolean skipWhenOnTransition = source == REACHABILITY_SOURCE_CORE
                && mActivityRecord.isInTransition();
                && mActivityRecord.inTransition();
        if (!reachabilityOverrides.isVerticalReachabilityEnabled() || skipWhenOnTransition) {
            return;
        }
+2 −2
Original line number Diff line number Diff line
@@ -2035,7 +2035,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        if (prevRotatedLaunchingApp != null
                && prevRotatedLaunchingApp.getWindowConfiguration().getRotation() == rotation
                // It is animating so we can expect there will have a transition callback.
                && (prevRotatedLaunchingApp.isInTransition())) {
                && prevRotatedLaunchingApp.inTransition()) {
            // It may be the case that multiple activities launch consecutively. Because their
            // rotation are the same, the transformed state can be shared to avoid duplicating
            // the heavy operations. This also benefits that the states of multiple activities
@@ -4387,7 +4387,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
            final boolean nonAppImeLayeringTargetAnimatingExit = mImeLayeringTarget.mAnimatingExit
                    && mImeLayeringTarget.mAttrs.type != TYPE_BASE_APPLICATION
                    && mImeLayeringTarget.isSelfAnimating(0, ANIMATION_TYPE_WINDOW_ANIMATION);
            if (mImeLayeringTarget.inTransitionSelfOrParent()
            if (mImeLayeringTarget.inTransition()
                    || nonAppImeLayeringTargetAnimatingExit) {
                showImeScreenshot();
            }
Loading