Skip to content
Commit 4ac03438 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Use parent frame to calculate wallpaper offset

Session#setWallpaperZoomOut may be called when display is rotated
(DisplayInfo is updated) but wallpaper window has stopped to update
frame (isVisibleRequested() of wallpaper window is false). In this
case, when the zoom request calls to WallpaperController#
updateWallpaperOffset, it calculates the offset with inconsistent
orientation that causes unexpected wallpaper shift.

Because wallpaper has no fit-insets, its parent frame should equal
to display size. The example of wallaper WindowFrame:
  containing=[0,0][1080,2160] parent=[0,0][1080,2160]
  display=[-10000,-10000][10000,10000] mFrame=[0,0][1763,2160]
So use the parent frame to ensure that the offset is computed from
the frames with the same orientation.

Bug: 183181781
Test: WallpaperControllerTests

Change-Id: Icf55e3570c260b963fab6dc85814f9e8e305163c
parent 80e87134
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