Loading services/core/java/com/android/server/wm/DisplayArea.java +5 −1 Original line number Diff line number Diff line Loading @@ -341,7 +341,11 @@ public class DisplayArea<T extends WindowContainer> extends WindowContainer<T> { if (childArea == null) { continue; } pw.println(prefix + "* " + childArea.getName()); pw.print(prefix + "* " + childArea.getName()); if (childArea.isOrganized()) { pw.print(" (organized)"); } pw.println(); if (childArea.isTaskDisplayArea()) { // TaskDisplayArea can only contain task. And it is already printed by display. continue; Loading services/core/java/com/android/server/wm/DisplayContent.java +3 −2 Original line number Diff line number Diff line Loading @@ -3458,9 +3458,8 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp @Override public void dump(PrintWriter pw, String prefix, boolean dumpAll) { super.dump(pw, prefix, dumpAll); pw.print(prefix); pw.println("Display: mDisplayId=" + mDisplayId + " rootTasks=" + getRootTaskCount()); pw.println("Display: mDisplayId=" + mDisplayId + (isOrganized() ? " (organized)" : "")); final String subPrefix = " " + prefix; pw.print(subPrefix); pw.print("init="); pw.print(mInitialDisplayWidth); pw.print("x"); pw.print(mInitialDisplayHeight); pw.print(" "); pw.print(mInitialDisplayDensity); Loading Loading @@ -3491,6 +3490,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp pw.println(" mTouchExcludeRegion=" + mTouchExcludeRegion); pw.println(); super.dump(pw, prefix, dumpAll); pw.print(prefix); pw.print("mLayoutSeq="); pw.println(mLayoutSeq); pw.print(" mCurrentFocus="); pw.println(mCurrentFocus); Loading Loading @@ -3582,6 +3582,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp pw.println(); mInsetsStateController.dump(prefix, pw); mDwpcHelper.dump(prefix, pw); pw.println(); } @Override Loading services/core/java/com/android/server/wm/RootWindowContainer.java +0 −1 Original line number Diff line number Diff line Loading @@ -3457,7 +3457,6 @@ class RootWindowContainer extends WindowContainer<DisplayContent> final DisplayContent display = getChildAt(i); display.dump(pw, prefix, dumpAll); } pw.println(); } /** Loading services/core/java/com/android/server/wm/Transition.java +18 −6 Original line number Diff line number Diff line Loading @@ -167,9 +167,9 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { private SurfaceControl.Transaction mFinishTransaction = null; /** * Contains change infos for both participants and all ancestors. We have to track ancestors * because they are all promotion candidates and thus we need their start-states * to be captured. * Contains change infos for both participants and all remote-animatable ancestors. The * ancestors can be the promotion candidates so their start-states need to be captured. * @see #getAnimatableParent */ final ArrayMap<WindowContainer, ChangeInfo> mChanges = new ArrayMap<>(); Loading Loading @@ -417,8 +417,9 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { mSyncId, wc); // "snapshot" all parents (as potential promotion targets). Do this before checking // if this is already a participant in case it has since been re-parented. for (WindowContainer curr = wc.getParent(); curr != null && !mChanges.containsKey(curr); curr = curr.getParent()) { for (WindowContainer<?> curr = getAnimatableParent(wc); curr != null && !mChanges.containsKey(curr); curr = getAnimatableParent(curr)) { mChanges.put(curr, new ChangeInfo(curr)); if (isReadyGroup(curr)) { mReadyTracker.addGroup(curr); Loading Loading @@ -1299,6 +1300,16 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { return sb.toString(); } /** Returns the parent that the remote animator can animate or control. */ private static WindowContainer<?> getAnimatableParent(WindowContainer<?> wc) { WindowContainer<?> parent = wc.getParent(); while (parent != null && (!parent.canCreateRemoteAnimationTarget() && !parent.isOrganized())) { parent = parent.getParent(); } return parent; } private static boolean reportIfNotTop(WindowContainer wc) { // Organized tasks need to be reported anyways because Core won't show() their surfaces // and we can't rely on onTaskAppeared because it isn't in sync. Loading Loading @@ -1522,7 +1533,8 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { intermediates.clear(); boolean foundParentInTargets = false; // Collect the intermediate parents between target and top changed parent. for (WindowContainer<?> p = wc.getParent(); p != null; p = p.getParent()) { for (WindowContainer<?> p = getAnimatableParent(wc); p != null; p = getAnimatableParent(p)) { final ChangeInfo parentChange = changes.get(p); if (parentChange == null || !parentChange.hasChanged(p)) break; if (p.mRemoteToken == null) { Loading services/core/java/com/android/server/wm/WallpaperController.java +6 −17 Original line number Diff line number Diff line Loading @@ -113,12 +113,6 @@ class WallpaperController { private boolean mShouldUpdateZoom; /** * Temporary storage for taking a screenshot of the wallpaper. * @see #screenshotWallpaperLocked() */ private WindowState mTmpTopWallpaper; @Nullable private Point mLargestDisplaySize = null; private final FindWallpaperTargetResult mFindResults = new FindWallpaperTargetResult(); Loading Loading @@ -962,21 +956,16 @@ class WallpaperController { } WindowState getTopVisibleWallpaper() { mTmpTopWallpaper = null; for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { final WallpaperWindowToken token = mWallpaperTokens.get(curTokenNdx); token.forAllWindows(w -> { final WindowStateAnimator winAnim = w.mWinAnimator; if (winAnim != null && winAnim.getShown() && winAnim.mLastAlpha > 0f) { mTmpTopWallpaper = w; return true; for (int i = token.getChildCount() - 1; i >= 0; i--) { final WindowState w = token.getChildAt(i); if (w.mWinAnimator.getShown() && w.mWinAnimator.mLastAlpha > 0f) { return w; } return false; }, true /* traverseTopToBottom */); } return mTmpTopWallpaper; } return null; } /** Loading Loading
services/core/java/com/android/server/wm/DisplayArea.java +5 −1 Original line number Diff line number Diff line Loading @@ -341,7 +341,11 @@ public class DisplayArea<T extends WindowContainer> extends WindowContainer<T> { if (childArea == null) { continue; } pw.println(prefix + "* " + childArea.getName()); pw.print(prefix + "* " + childArea.getName()); if (childArea.isOrganized()) { pw.print(" (organized)"); } pw.println(); if (childArea.isTaskDisplayArea()) { // TaskDisplayArea can only contain task. And it is already printed by display. continue; Loading
services/core/java/com/android/server/wm/DisplayContent.java +3 −2 Original line number Diff line number Diff line Loading @@ -3458,9 +3458,8 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp @Override public void dump(PrintWriter pw, String prefix, boolean dumpAll) { super.dump(pw, prefix, dumpAll); pw.print(prefix); pw.println("Display: mDisplayId=" + mDisplayId + " rootTasks=" + getRootTaskCount()); pw.println("Display: mDisplayId=" + mDisplayId + (isOrganized() ? " (organized)" : "")); final String subPrefix = " " + prefix; pw.print(subPrefix); pw.print("init="); pw.print(mInitialDisplayWidth); pw.print("x"); pw.print(mInitialDisplayHeight); pw.print(" "); pw.print(mInitialDisplayDensity); Loading Loading @@ -3491,6 +3490,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp pw.println(" mTouchExcludeRegion=" + mTouchExcludeRegion); pw.println(); super.dump(pw, prefix, dumpAll); pw.print(prefix); pw.print("mLayoutSeq="); pw.println(mLayoutSeq); pw.print(" mCurrentFocus="); pw.println(mCurrentFocus); Loading Loading @@ -3582,6 +3582,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp pw.println(); mInsetsStateController.dump(prefix, pw); mDwpcHelper.dump(prefix, pw); pw.println(); } @Override Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +0 −1 Original line number Diff line number Diff line Loading @@ -3457,7 +3457,6 @@ class RootWindowContainer extends WindowContainer<DisplayContent> final DisplayContent display = getChildAt(i); display.dump(pw, prefix, dumpAll); } pw.println(); } /** Loading
services/core/java/com/android/server/wm/Transition.java +18 −6 Original line number Diff line number Diff line Loading @@ -167,9 +167,9 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { private SurfaceControl.Transaction mFinishTransaction = null; /** * Contains change infos for both participants and all ancestors. We have to track ancestors * because they are all promotion candidates and thus we need their start-states * to be captured. * Contains change infos for both participants and all remote-animatable ancestors. The * ancestors can be the promotion candidates so their start-states need to be captured. * @see #getAnimatableParent */ final ArrayMap<WindowContainer, ChangeInfo> mChanges = new ArrayMap<>(); Loading Loading @@ -417,8 +417,9 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { mSyncId, wc); // "snapshot" all parents (as potential promotion targets). Do this before checking // if this is already a participant in case it has since been re-parented. for (WindowContainer curr = wc.getParent(); curr != null && !mChanges.containsKey(curr); curr = curr.getParent()) { for (WindowContainer<?> curr = getAnimatableParent(wc); curr != null && !mChanges.containsKey(curr); curr = getAnimatableParent(curr)) { mChanges.put(curr, new ChangeInfo(curr)); if (isReadyGroup(curr)) { mReadyTracker.addGroup(curr); Loading Loading @@ -1299,6 +1300,16 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { return sb.toString(); } /** Returns the parent that the remote animator can animate or control. */ private static WindowContainer<?> getAnimatableParent(WindowContainer<?> wc) { WindowContainer<?> parent = wc.getParent(); while (parent != null && (!parent.canCreateRemoteAnimationTarget() && !parent.isOrganized())) { parent = parent.getParent(); } return parent; } private static boolean reportIfNotTop(WindowContainer wc) { // Organized tasks need to be reported anyways because Core won't show() their surfaces // and we can't rely on onTaskAppeared because it isn't in sync. Loading Loading @@ -1522,7 +1533,8 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { intermediates.clear(); boolean foundParentInTargets = false; // Collect the intermediate parents between target and top changed parent. for (WindowContainer<?> p = wc.getParent(); p != null; p = p.getParent()) { for (WindowContainer<?> p = getAnimatableParent(wc); p != null; p = getAnimatableParent(p)) { final ChangeInfo parentChange = changes.get(p); if (parentChange == null || !parentChange.hasChanged(p)) break; if (p.mRemoteToken == null) { Loading
services/core/java/com/android/server/wm/WallpaperController.java +6 −17 Original line number Diff line number Diff line Loading @@ -113,12 +113,6 @@ class WallpaperController { private boolean mShouldUpdateZoom; /** * Temporary storage for taking a screenshot of the wallpaper. * @see #screenshotWallpaperLocked() */ private WindowState mTmpTopWallpaper; @Nullable private Point mLargestDisplaySize = null; private final FindWallpaperTargetResult mFindResults = new FindWallpaperTargetResult(); Loading Loading @@ -962,21 +956,16 @@ class WallpaperController { } WindowState getTopVisibleWallpaper() { mTmpTopWallpaper = null; for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) { final WallpaperWindowToken token = mWallpaperTokens.get(curTokenNdx); token.forAllWindows(w -> { final WindowStateAnimator winAnim = w.mWinAnimator; if (winAnim != null && winAnim.getShown() && winAnim.mLastAlpha > 0f) { mTmpTopWallpaper = w; return true; for (int i = token.getChildCount() - 1; i >= 0; i--) { final WindowState w = token.getChildAt(i); if (w.mWinAnimator.getShown() && w.mWinAnimator.mLastAlpha > 0f) { return w; } return false; }, true /* traverseTopToBottom */); } return mTmpTopWallpaper; } return null; } /** Loading