Merge "Fix ActivityOption#setTaskOverlay can be covered by other activity." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
9a535ee8dd
@@ -8243,6 +8243,11 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
|||||||
return mTaskOverlay;
|
return mTaskOverlay;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAlwaysOnTop() {
|
||||||
|
return mTaskOverlay || super.isAlwaysOnTop();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean showToCurrentUser() {
|
boolean showToCurrentUser() {
|
||||||
return mShowForAllUsers || mWmService.isCurrentProfile(mUserId);
|
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.
|
// Figure-out min/max possible position depending on if child can show for current user.
|
||||||
int minPosition = (canShowChild) ? computeMinUserPosition(0, size) : 0;
|
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.
|
// Factor in always-on-top children in max possible position.
|
||||||
if (!wc.isAlwaysOnTop()) {
|
if (!wc.isAlwaysOnTop()) {
|
||||||
|
|
||||||
// We want to place all non-always-on-top containers below always-on-top ones.
|
// We want to place all non-always-on-top containers below always-on-top ones.
|
||||||
while (maxPosition > minPosition) {
|
while (maxPosition > minPosition) {
|
||||||
if (!mChildren.get(maxPosition - 1).isAlwaysOnTop()) break;
|
if (!mChildren.get(maxPosition - 1).isAlwaysOnTop()) break;
|
||||||
|
|||||||
Reference in New Issue
Block a user