diff options
author | Tony Wickham <twickham@google.com> | 2015-09-03 09:52:55 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2015-09-03 09:52:55 -0700 |
commit | 4dbaef024676469e60654814e7f8ee46e2943638 (patch) | |
tree | 59c510e47fb120c54c2342b947e19df9603efbf4 /WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java | |
parent | c75917f12956734fbe93615f5ee27ecad1a46c63 (diff) | |
download | android_packages_apps_Trebuchet-4dbaef024676469e60654814e7f8ee46e2943638.tar.gz android_packages_apps_Trebuchet-4dbaef024676469e60654814e7f8ee46e2943638.tar.bz2 android_packages_apps_Trebuchet-4dbaef024676469e60654814e7f8ee46e2943638.zip |
Change addParallaxOffset() to setParallaxOffset() in CropView.
This is less prone to error, because calling setParallaxOffset() multiple times
will always lead to the same result. Plus, this works regardless of whether
moveToLeft() was called first.
While the parallax offset ensures that previews of built-in wallpapers match
the actual wallpaper you get upon saving, it does not work in all cases.
Specifically, it does not work for a couple (1 or 2 on the devices I've tested)
of the larger built-in wallpapers. However, this seems to be due to a mismatch
between the size of the preview wallpaper and the actual wallpaper (the latter
is larger). This sounds like a separate bug.
Bug: 23568800
Change-Id: I69afa3f8cc59c77e9c4c25e29e8db8c4beb87462
Diffstat (limited to 'WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java')
-rw-r--r-- | WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java b/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java index b3a81aedc..871eef20c 100644 --- a/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java +++ b/WallpaperPicker/src/com/android/launcher3/WallpaperCropActivity.java @@ -251,7 +251,7 @@ public class WallpaperCropActivity extends BaseActivity implements Handler.Callb } if (req.scaleAndOffsetProvider != null) { mCropView.setScale(req.scaleAndOffsetProvider.getScale(req.result)); - mCropView.addParallaxOffset(req.scaleAndOffsetProvider.getParallaxOffset()); + mCropView.setParallaxOffset(req.scaleAndOffsetProvider.getParallaxOffset()); } // Free last image |