Use display of activity to get rotation for recents
The rotation of WindowConfiguration in Configuration is non-public field. There is no guarantee that the information will be updated. E.g. a 180 degree rotation change won't make difference to the public configurations, so the Resources will keep the old one. The display rotation of activity is accurate to use for its content because even the activity is transformed to different rotation than the physical display, there is FixedRotationAdjustments to adjust the information which will be consistent as how the activity is laid out. Bug: 159877752 Test: 1. Enable auto rotation. 2. Launch some portrait activities. 3. Put device in reverse portrait (upside down). 4. Launch a landscape activity. 5. Swipe to another activity with full-sensor orientation. 6. Return to home and enter recents to check the task views of step 2 don't show upside down. Change-Id: I5e16e71d43b8892a394c06de9e76fb3d4ad55919
Loading
Please register or sign in to comment