Override the fillsParent() on TaskFragment
The default implementation of fillsParent() on TaskFragment which results in the system can not get the specified orientation from the activity in TaskFragment when traversing the windowContainers with getOrientation(). Move the implementation of fillsParent() from Task to TaskFragment. Report the taskFragment fills the parent in a full screen window or matches the parents' bounds. So, we can get the orientation from activity successfully. Bug: 207605841 Test: Launch wallpaper picker and check the orientation when rotate Change-Id: Ieb7e7e009fcfb337b2c7def1b892831d09d98951
This commit is contained in:
@@ -3140,14 +3140,6 @@ class Task extends TaskFragment {
|
||||
|| activityType == ACTIVITY_TYPE_ASSISTANT;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean fillsParent() {
|
||||
// From the perspective of policy, we still want to report that this task fills parent
|
||||
// in fullscreen windowing mode even it doesn't match parent bounds because there will be
|
||||
// letterbox around its real content.
|
||||
return getWindowingMode() == WINDOWING_MODE_FULLSCREEN || matchParentBounds();
|
||||
}
|
||||
|
||||
@Override
|
||||
void forAllLeafTasks(Consumer<Task> callback, boolean traverseTopToBottom) {
|
||||
final int count = mChildren.size();
|
||||
|
||||
@@ -2346,6 +2346,14 @@ class TaskFragment extends WindowContainer<WindowContainer> {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean fillsParent() {
|
||||
// From the perspective of policy, we still want to report that this task fills parent
|
||||
// in fullscreen windowing mode even it doesn't match parent bounds because there will be
|
||||
// letterbox around its real content.
|
||||
return getWindowingMode() == WINDOWING_MODE_FULLSCREEN || matchParentBounds();
|
||||
}
|
||||
|
||||
boolean dump(String prefix, FileDescriptor fd, PrintWriter pw, boolean dumpAll,
|
||||
boolean dumpClient, String dumpPackage, final boolean needSep, Runnable header) {
|
||||
boolean printed = false;
|
||||
|
||||
Reference in New Issue
Block a user