Skip to content
Commit 00d586d8 authored by Bryce Lee's avatar Bryce Lee
Browse files

Allow foreground AppWindowToken to influence orientation.

It is possible for an activity to request an orientation after
finish has been called, causing the system orientation to be
re-evaluated. Since the activity is closing, it will no longer be
eligible to influence orientation. If another stack/task is brought
to the foreground, it will as well won't be able to participate
since it is not considered an opening app and won't be visible. As a
result, we set the orientation to unspecified, leading to the
foreground activity to be resumed in the wrong orientation.

This changelist addresses the issue by allowing an AppWindowToken to
participate in orientation calculations if it is not closing and is
on top of the wm hierarchy, regardless of its visibility.

Change-Id: I0f316d6d824398d084c7648cf2dc2c2d07b4410d
Fixes: 63982461
Fixes: 63513655
Test: bit FrameworksServicesTests:com.android.server.wm.AppWindowTokenTests#testGetOrientation
Test: go/wm-smoke
parent 3cace2a1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment