Merge "Do not preload recents activity if it will be visible" into sc-v2-dev

This commit is contained in:
Chris Li
2021-07-21 17:29:07 +00:00
committed by Android (Google) Code Review
4 changed files with 19 additions and 2 deletions

View File

@@ -3139,6 +3139,12 @@
"group": "WM_DEBUG_WINDOW_TRANSITIONS", "group": "WM_DEBUG_WINDOW_TRANSITIONS",
"at": "com\/android\/server\/wm\/Transition.java" "at": "com\/android\/server\/wm\/Transition.java"
}, },
"1494644409": {
"message": " Rejecting as detached: %s",
"level": "VERBOSE",
"group": "WM_DEBUG_WINDOW_TRANSITIONS",
"at": "com\/android\/server\/wm\/Transition.java"
},
"1495525537": { "1495525537": {
"message": "createWallpaperAnimations()", "message": "createWallpaperAnimations()",
"level": "DEBUG", "level": "DEBUG",

View File

@@ -125,6 +125,11 @@ class RecentsAnimation implements RecentsAnimationCallbacks, OnRootTaskOrderChan
ProtoLog.d(WM_DEBUG_RECENTS_ANIMATIONS, "Updated config=%s", ProtoLog.d(WM_DEBUG_RECENTS_ANIMATIONS, "Updated config=%s",
targetActivity.getConfiguration()); targetActivity.getConfiguration());
} }
} else if (mDefaultTaskDisplayArea.getActivity(
ActivityRecord::occludesParent, false /* traverseTopToBottom */) == null) {
// Skip because none of above activities can occlude the target activity. The preload
// should be done silently in background without being visible.
return;
} else { } else {
// Create the activity record. Because the activity is invisible, this doesn't really // Create the activity record. Because the activity is invisible, this doesn't really
// start the client. // start the client.

View File

@@ -3691,6 +3691,8 @@ class Task extends TaskFragment {
} }
sb.append(" visible="); sb.append(" visible=");
sb.append(shouldBeVisible(null /* starting */)); sb.append(shouldBeVisible(null /* starting */));
sb.append(" visibleRequested=");
sb.append(isVisibleRequested());
sb.append(" mode="); sb.append(" mode=");
sb.append(windowingModeToString(getWindowingMode())); sb.append(windowingModeToString(getWindowingMode()));
sb.append(" translucent="); sb.append(" translucent=");

View File

@@ -352,7 +352,7 @@ class Transition extends Binder implements BLASTSyncEngine.TransactionReadyListe
final WallpaperWindowToken wt = mParticipants.valueAt(i).asWallpaperToken(); final WallpaperWindowToken wt = mParticipants.valueAt(i).asWallpaperToken();
if (wt != null && !wt.isVisibleRequested()) { if (wt != null && !wt.isVisibleRequested()) {
ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS, ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS,
" Commit wallpaper becoming invisible: %s", ar); " Commit wallpaper becoming invisible: %s", wt);
wt.commitVisibility(false /* visible */); wt.commitVisibility(false /* visible */);
} }
} }
@@ -808,7 +808,11 @@ class Transition extends Binder implements BLASTSyncEngine.TransactionReadyListe
// of participants that should always be reported even if they aren't top. // of participants that should always be reported even if they aren't top.
for (WindowContainer wc : participants) { for (WindowContainer wc : participants) {
// Don't include detached windows. // Don't include detached windows.
if (!wc.isAttached()) continue; if (!wc.isAttached()) {
ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS,
" Rejecting as detached: %s", wc);
continue;
}
final ChangeInfo changeInfo = changes.get(wc); final ChangeInfo changeInfo = changes.get(wc);