Merge "Fix getAnimationTargets so that it returns valid animation target" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b99646f240
@@ -7627,6 +7627,11 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
|||||||
record.mStartBounds);
|
record.mStartBounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
boolean canCreateRemoteAnimationTarget() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
void getAnimationFrames(Rect outFrame, Rect outInsets, Rect outStableInsets,
|
void getAnimationFrames(Rect outFrame, Rect outInsets, Rect outStableInsets,
|
||||||
Rect outSurfaceInsets) {
|
Rect outSurfaceInsets) {
|
||||||
|
|||||||
@@ -446,7 +446,7 @@ public class AppTransitionController {
|
|||||||
siblings.add(current);
|
siblings.add(current);
|
||||||
boolean canPromote = true;
|
boolean canPromote = true;
|
||||||
|
|
||||||
if (parent == null) {
|
if (parent == null || !parent.canCreateRemoteAnimationTarget()) {
|
||||||
canPromote = false;
|
canPromote = false;
|
||||||
} else {
|
} else {
|
||||||
// In case a descendant of the parent belongs to the other group, we cannot promote
|
// In case a descendant of the parent belongs to the other group, we cannot promote
|
||||||
|
|||||||
@@ -3121,6 +3121,11 @@ class Task extends WindowContainer<WindowContainer> {
|
|||||||
return activity != null ? activity.createRemoteAnimationTarget(record) : null;
|
return activity != null ? activity.createRemoteAnimationTarget(record) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
boolean canCreateRemoteAnimationTarget() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
WindowState getTopVisibleAppMainWindow() {
|
WindowState getTopVisibleAppMainWindow() {
|
||||||
final ActivityRecord activity = getTopVisibleActivity();
|
final ActivityRecord activity = getTopVisibleActivity();
|
||||||
return activity != null ? activity.findMainWindow() : null;
|
return activity != null ? activity.findMainWindow() : null;
|
||||||
|
|||||||
@@ -2196,6 +2196,10 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean canCreateRemoteAnimationTarget() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
boolean okToDisplay() {
|
boolean okToDisplay() {
|
||||||
final DisplayContent dc = getDisplayContent();
|
final DisplayContent dc = getDisplayContent();
|
||||||
return dc != null && dc.okToDisplay();
|
return dc != null && dc.okToDisplay();
|
||||||
|
|||||||
Reference in New Issue
Block a user