Merge "Fix ActivityOption#setTaskOverlay can be covered by other activity." into sc-dev am: 9a535ee8dd am: 60b5e400ef
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14271582 Change-Id: Id53f0de596051a03bf92925d985f0053a1a8e929
This commit is contained in:
@@ -8243,6 +8243,11 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
return mTaskOverlay;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAlwaysOnTop() {
|
||||
return mTaskOverlay || super.isAlwaysOnTop();
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean showToCurrentUser() {
|
||||
return mShowForAllUsers || mWmService.isCurrentProfile(mUserId);
|
||||
|
||||
@@ -3152,11 +3152,14 @@ class Task extends WindowContainer<WindowContainer> {
|
||||
|
||||
// Figure-out min/max possible position depending on if child can show for current user.
|
||||
int minPosition = (canShowChild) ? computeMinUserPosition(0, size) : 0;
|
||||
int maxPosition = (canShowChild) ? size : computeMaxUserPosition(size - 1);
|
||||
int maxPosition = (canShowChild) ? size - 1 : computeMaxUserPosition(size - 1);
|
||||
if (!hasChild(wc)) {
|
||||
// Increase the maxPosition because children size will grow once wc is added.
|
||||
++maxPosition;
|
||||
}
|
||||
|
||||
// Factor in always-on-top children in max possible position.
|
||||
if (!wc.isAlwaysOnTop()) {
|
||||
|
||||
// We want to place all non-always-on-top containers below always-on-top ones.
|
||||
while (maxPosition > minPosition) {
|
||||
if (!mChildren.get(maxPosition - 1).isAlwaysOnTop()) break;
|
||||
|
||||
Reference in New Issue
Block a user