Merge "Clear preferred top focusable root task" into sc-dev am: ba19c63b66
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14514106 Change-Id: I896838e5d1260f2ea9f45602d86f3d26c3f29939
This commit is contained in:
@@ -3071,6 +3071,11 @@ class Task extends WindowContainer<WindowContainer> {
|
|||||||
focusableTask = mRootWindowContainer.getNextFocusableRootTask(this, !allowFocusSelf);
|
focusableTask = mRootWindowContainer.getNextFocusableRootTask(this, !allowFocusSelf);
|
||||||
}
|
}
|
||||||
if (focusableTask == null) {
|
if (focusableTask == null) {
|
||||||
|
final TaskDisplayArea taskDisplayArea = getDisplayArea();
|
||||||
|
if (taskDisplayArea != null) {
|
||||||
|
// Clear the recorded task since there is no next focusable task.
|
||||||
|
taskDisplayArea.clearPreferredTopFocusableRootTask();
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> {
|
|||||||
* unable to resume target root task properly when there are other focusable always-on-top
|
* unable to resume target root task properly when there are other focusable always-on-top
|
||||||
* root tasks.
|
* root tasks.
|
||||||
*/
|
*/
|
||||||
|
@VisibleForTesting
|
||||||
Task mPreferredTopFocusableRootTask;
|
Task mPreferredTopFocusableRootTask;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2130,6 +2131,10 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> {
|
|||||||
&& mDisplayContent.getOrientationRequestingTaskDisplayArea() == this;
|
&& mDisplayContent.getOrientationRequestingTaskDisplayArea() == this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clearPreferredTopFocusableRootTask() {
|
||||||
|
mPreferredTopFocusableRootTask = null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean isTaskDisplayArea() {
|
boolean isTaskDisplayArea() {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user