Adjust the wallpaper preview parallax according to the crop that will be saved.

To get the crop, the wallpaper is first scaled down as much as possible (i.e.
until either the width or height matches that of the device screen), then a
center crop is performed (the excess width or height is chopped off). The
preview's parallax was previously incorrect if the width was the victim of this
cropping, because in that case the parallax started and ended at a different
point than in the actual wallpaper. This is fixed by adjusting the parallax of
the preview to match the final crop.

The end result is that all wallpaper previews match the actual wallpaper upon
setting, except for the default wallpaper because it follows a different flow.

Bug: 23568800
Change-Id: I82b7ba506d51ee4b3812af5fbdf95d3303b37aef
4 files changed
tree: fb5b3c23c6a7bad27ce07d8715af8ea04e3390ed
  1. WallpaperPicker/