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
Loading
Please register or sign in to comment