Skip to content

Commit 30eec83

Browse files
Dianne Hackbornandroid code review
authored andcommitted
Merge "Transparent activity orientation problem when previous landsacpe fullscreen activity not yet destroyed."
2 parents fd862e9 + 0445bc6 commit 30eec83

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

services/java/com/android/server/wm/WindowManagerService.java

100644100755
Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3359,17 +3359,7 @@ public int getOrientationFromAppTokensLocked() {
33593359
continue;
33603360
}
33613361

3362-
if (!haveGroup) {
3363-
// We ignore any hidden applications on the top.
3364-
if (wtoken.hiddenRequested || wtoken.willBeHidden) {
3365-
if (DEBUG_ORIENTATION) Slog.v(TAG, "Skipping " + wtoken
3366-
+ " -- hidden on top");
3367-
continue;
3368-
}
3369-
haveGroup = true;
3370-
curGroup = wtoken.groupId;
3371-
lastOrientation = wtoken.requestedOrientation;
3372-
} else if (curGroup != wtoken.groupId) {
3362+
if (haveGroup == true && curGroup != wtoken.groupId) {
33733363
// If we have hit a new application group, and the bottom
33743364
// of the previous group didn't explicitly say to use
33753365
// the orientation behind it, and the last app was
@@ -3382,6 +3372,20 @@ public int getOrientationFromAppTokensLocked() {
33823372
return lastOrientation;
33833373
}
33843374
}
3375+
3376+
// We ignore any hidden applications on the top.
3377+
if (wtoken.hiddenRequested || wtoken.willBeHidden) {
3378+
if (DEBUG_ORIENTATION) Slog.v(TAG, "Skipping " + wtoken
3379+
+ " -- hidden on top");
3380+
continue;
3381+
}
3382+
3383+
if (!haveGroup) {
3384+
haveGroup = true;
3385+
curGroup = wtoken.groupId;
3386+
lastOrientation = wtoken.requestedOrientation;
3387+
}
3388+
33853389
int or = wtoken.requestedOrientation;
33863390
// If this application is fullscreen, and didn't explicitly say
33873391
// to use the orientation behind it, then just take whatever

0 commit comments

Comments
 (0)