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

Commit 8fa0f212 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/27940383',...

Merge cherrypicks of ['googleplex-android-review.googlesource.com/27940383', 'googleplex-android-review.googlesource.com/27975410', 'googleplex-android-review.googlesource.com/27950609', 'googleplex-android-review.googlesource.com/28051259', 'googleplex-android-review.googlesource.com/28156919', 'googleplex-android-review.googlesource.com/28153099', 'googleplex-android-review.googlesource.com/28351960', 'googleplex-android-review.googlesource.com/28352745'] into 24Q3-release.

Change-Id: I9d375e0311f7481a068b7968c08d95ee3969f949
parents 4ece4fd2 3d95aea3
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -193,3 +193,14 @@ flag {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
  name: "ensure_wallpaper_in_transitions"
  namespace: "windowing_frontend"
  description: "Ensure that wallpaper window tokens are always present/available for collection in transitions"
  bug: "347593088"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}
+2 −0
Original line number Diff line number Diff line
@@ -269,7 +269,9 @@ public class SplitDecorManager extends WindowlessWindowManager {

        if (update) {
            if (immediately) {
                t.setAlpha(mBackgroundLeash, showVeil ? 1f : 0f);
                t.setVisibility(mBackgroundLeash, showVeil);
                t.setAlpha(mIconLeash, showVeil ? 1f : 0f);
                t.setVisibility(mIconLeash, showVeil);
            } else {
                startFadeAnimation(showVeil, false, null);
+21 −4
Original line number Diff line number Diff line
@@ -28,13 +28,16 @@ import static android.view.WindowManager.TRANSIT_SLEEP;
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;
import static android.window.TransitionInfo.FLAG_IS_WALLPAPER;
import static android.window.TransitionInfo.FLAG_NO_ANIMATION;
import static android.window.TransitionInfo.FLAG_STARTING_WINDOW_TRANSFER_RECIPIENT;

import static com.android.window.flags.Flags.ensureWallpaperInTransitions;
import static com.android.systemui.shared.Flags.returnAnimationFrameworkLibrary;
import static com.android.wm.shell.shared.TransitionUtil.isClosingType;
import static com.android.wm.shell.shared.TransitionUtil.isOpeningType;
@@ -74,6 +77,7 @@ import androidx.annotation.BinderThread;
import com.android.internal.R;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.protolog.common.ProtoLog;
import com.android.window.flags.Flags;
import com.android.wm.shell.RootTaskDisplayAreaOrganizer;
import com.android.wm.shell.ShellTaskOrganizer;
import com.android.wm.shell.common.DisplayController;
@@ -513,12 +517,17 @@ public class Transitions implements RemoteCallable<Transitions>,
        boolean isOpening = isOpeningType(info.getType());
        for (int i = info.getChanges().size() - 1; i >= 0; --i) {
            final TransitionInfo.Change change = info.getChanges().get(i);
            if (change.hasFlags(TransitionInfo.FLAGS_IS_NON_APP_WINDOW)) {
            if (change.hasFlags(FLAGS_IS_NON_APP_WINDOW & ~FLAG_IS_WALLPAPER)) {
                // Currently system windows are controlled by WindowState, so don't change their
                // surfaces. Otherwise their surfaces could be hidden or cropped unexpectedly.
                // This includes Wallpaper (always z-ordered at bottom) and IME (associated with
                // app), because there may not be a transition associated with their visibility
                // changes, and currently they don't need transition animation.
                // This includes IME (associated with app), because there may not be a transition
                // associated with their visibility changes, and currently they don't need a
                // transition animation.
                continue;
            }
            if (change.hasFlags(FLAG_IS_WALLPAPER) && !ensureWallpaperInTransitions()) {
                // Wallpaper is always z-ordered at bottom, and historically is not animated by
                // transition handlers.
                continue;
            }
            final SurfaceControl leash = change.getLeash();
@@ -571,6 +580,14 @@ public class Transitions implements RemoteCallable<Transitions>,
        final boolean isOpening = isOpeningType(transitType);
        final boolean isClosing = isClosingType(transitType);
        final int mode = change.getMode();
        // Ensure wallpapers stay in the back
        if (change.hasFlags(FLAG_IS_WALLPAPER) && Flags.ensureWallpaperInTransitions()) {
            if (mode == TRANSIT_OPEN || mode == TRANSIT_TO_FRONT) {
                return -zSplitLine + numChanges - i;
            } else {
                return -zSplitLine - i;
            }
        }
        // Put all the OPEN/SHOW on top
        if (mode == TRANSIT_OPEN || mode == TRANSIT_TO_FRONT) {
            if (isOpening) {
+10 −0
Original line number Diff line number Diff line
@@ -1105,3 +1105,13 @@ flag {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
  name: "translucent_occluding_activity_fix"
  namespace: "systemui"
  description: "Fixes occlusion animation for transluent activities"
  bug: "303010980"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}
+8 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.app.PendingIntent
import android.app.TaskInfo
import android.app.WindowConfiguration
import android.content.ComponentName
import android.graphics.Color
import android.graphics.Matrix
import android.graphics.Rect
import android.graphics.RectF
@@ -53,6 +54,7 @@ import com.android.app.animation.Interpolators
import com.android.internal.annotations.VisibleForTesting
import com.android.internal.policy.ScreenDecorationsUtils
import com.android.systemui.Flags.activityTransitionUseLargestWindow
import com.android.systemui.Flags.translucentOccludingActivityFix
import com.android.systemui.shared.Flags.returnAnimationFrameworkLibrary
import com.android.wm.shell.shared.IShellTransitions
import com.android.wm.shell.shared.ShellTransitions
@@ -991,7 +993,12 @@ constructor(
                    controller.createAnimatorState()
                }
            val windowBackgroundColor =
                window.taskInfo?.let { callback.getBackgroundColor(it) } ?: window.backgroundColor
                if (translucentOccludingActivityFix() && window.isTranslucent) {
                    Color.TRANSPARENT
                } else {
                    window.taskInfo?.let { callback.getBackgroundColor(it) }
                        ?: window.backgroundColor
                }

            // TODO(b/184121838): We should somehow get the top and bottom radius of the window
            // instead of recomputing isExpandingFullyAbove here.
Loading