summaryrefslogtreecommitdiffstats
path: root/WallpaperPicker/src
Commit message (Collapse)AuthorAgeFilesLines
* Handle OutOfMemoryException gracefully in WallpaperCropActivity.Tony Wickham2015-11-051-4/+10
| | | | | | | Now instead of crashing, it says "Couldn't load image." Bug: 25326319 Change-Id: I6918b7b34e0a9b40036b1405fc449c10c2e1d40a
* resolve merge conflicts of 4530aca912 to ub-launcher3-master.Tony Wickham2015-10-301-1/+1
|\ | | | | | | Change-Id: I55a0cd751cbcce8fcc8efa23a0a88a01ec08522b
| * Set parallax offset to be 0.5f for default wallpapers.Tony Wickham2015-10-301-1/+1
| | | | | | | | | | | | | | This ensures they are centered as they were without any offset. Bug: 25347076 Change-Id: Id773cd89463d47b350e60878c00e1112e0244414
* | Merge "Refactoring WallpaperOffsetInterpolator to a new file Removing some ↵Sunny Goyal2015-10-301-34/+0
|\ \ | | | | | | | | | us unused methods" into ub-launcher3-master
| * | Refactoring WallpaperOffsetInterpolator to a new fileSunny Goyal2015-10-161-34/+0
| | | | | | | | | | | | | | | | | | Removing some us unused methods Change-Id: Ife790e5ca6848fa13dc3fab1bba1e6220bf83743
* | | resolve merge conflicts of d5d7fa10af to ub-launcher3-master.Tony Wickham2015-10-211-0/+1
|\ \ \ | |/ / |/| / | |/ Change-Id: I324b1a9cd3c6dce1d5d3b14d3ef95f798e5bc243
| * Hide the "Set Wallpaper" action bar when clicked.Tony Wickham2015-10-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | This already happens everywhere except for the case where an external app such as Photos started the wallpaper picker. So not only is this more consistent, it also prevents crashes and other potential issues caused by clicking "Set Wallpaper" too many times. Bug: 25026717 Change-Id: I63c6a0ce68656e6e68094e88074a836d8c1034f9
* | am cb20e0bc: Merge "Inform users when "Set wallpaper" fails." into ↵Tony Wickham2015-09-251-2/+8
|\| | | | | | | | | | | | | ub-launcher3-burnaby-polish * commit 'cb20e0bc8eed5fb97ef49eda2c1a1ff514aa9e38': Inform users when "Set wallpaper" fails.
| * Inform users when "Set wallpaper" fails.Tony Wickham2015-09-251-2/+8
| | | | | | | | | | Bug: 23716897 Change-Id: I06cd63d9ee869235c6a4c3140e574bf4c710454e
* | Fixing merge into ub-launcher3-masterTony Wickham2015-09-221-0/+3
|\| | | | | | | Change-Id: Ifd9128c72f6e11855b1bb9272c6f193d688ba021
| * Merge "Show a spinner while wallpaper is being cropped." into ↵Tony Wickham2015-09-231-0/+3
| |\ | | | | | | | | | ub-launcher3-burnaby-polish
| | * Show a spinner while wallpaper is being cropped.Tony Wickham2015-09-221-0/+3
| | | | | | | | | | | | | | | | | | Bug: 23599411 Change-Id: I6c5f75554fd59b7caa3a61f1b11b4a2a6aa21e7c
* | | am ff9133f1: Adjust cropped bitmap bounds to correctly fit in original ↵Tony Wickham2015-09-231-10/+4
|\| | | | | | | | | | | | | | | | | | | | bitmap bounds. * commit 'ff9133f1125865f4e14a92d4b5e661f1ac92524d': Adjust cropped bitmap bounds to correctly fit in original bitmap bounds.
| * | Adjust cropped bitmap bounds to correctly fit in original bitmap bounds.Tony Wickham2015-09-231-10/+4
| |/ | | | | | | | | | | Bug: 22631531 Change-Id: Ia0c1bccf4b8af3a8b335b865974c5d08f9836689
| * Wallpaper preview parallax matches the actual wallpaper's.Tony Wickham2015-09-105-53/+107
| | | | | | | | | | | | | | | | | | | | | | Cherry picking the following changes from ub-launcher3-master: Change-Id: I41c5bbbfdabfeb4e20d77e9b5804842a03211edf Change-Id: I69afa3f8cc59c77e9c4c25e29e8db8c4beb87462 Change-Id: I82b7ba506d51ee4b3812af5fbdf95d3303b37aef Change-Id: Id7c2b5483c5535d59be2f8a459ce7788e3c8318a Bug: 23568800 Change-Id: I343169b9fdc5ceaab3d4b39044627d78b7267868
| * Fix typos caused by gerrit's inline editor.Tony Wickham2015-09-041-2/+2
| | | | | | | | | | Change-Id: Ie142f5c6b418ac775cc167787f8e372d5354b91a (cherry picked from commit 1ea392f0bc30134a800be224d8fbcf1af63bb80b)
| * Reuse existing temporary wallpaper tiles when selecting same photo.Tony Wickham2015-09-041-7/+27
| | | | | | | | | | | | | | | | | | | | Previously, if you selected a photo to set as the wallpaper multiple times, it kept adding temporary wallpaper tiles that were all identical. Now it reuses the same tile, updating the thumbnail and wallpaper if the Uri happens to point to a new image (such as if a photo is renamed). Change-Id: Ib05c9db4e1fd17226b503174f25add3368158b11 (cherry picked from commit f970ee5cdc0185fa5003ded178ef680813d8a259)
* | Fade from wallpaper picker activity back to homescreen.Tony Wickham2015-09-087-32/+56
| | | | | | | | | | | | | | | | | | If a wallpaper preview is going to look exactly the same as the actual wallpaper on the homescreen page that is being returned to, fading looks much nicer than the default activity exit animation. Bug: 23568800 Change-Id: Id7c2b5483c5535d59be2f8a459ce7788e3c8318a
* | Adjust the wallpaper preview parallax according to the crop that will be saved.Tony Wickham2015-09-044-18/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Change addParallaxOffset() to setParallaxOffset() in CropView.Tony Wickham2015-09-032-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Previews in the wallpaper picker are offset to match the homescreen parallax.Tony Wickham2015-09-025-14/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | When "Wallpapers" is selected from the overlay, the current wallpaper parallax offset is sent to the WallpaperPickerActivity as an Intent extra. The CropView then uses that offset when previewing new wallpapers to ensure the preview looks exactly the same as the actual wallpaper will when set. Note that this fix doesn't seem to work for DefaultWallpaperInfo - that will come in a future CL. Bug: 23568800 Change-Id: I41c5bbbfdabfeb4e20d77e9b5804842a03211edf
* | Merge "Loading default wallpaper on the background thread" into ↵Sunny Goyal2015-09-011-58/+53
|\ \ | | | | | | | | | ub-launcher3-master
| * | Loading default wallpaper on the background threadSunny Goyal2015-09-011-58/+53
| | | | | | | | | | | | | | | Bug: 23353784 Change-Id: Ia64cfd6b8065fb3d589e32af12e0e0bf5242a43a
* | | Fixing crash when picking an external imageSunny Goyal2015-09-011-10/+7
|/ / | | | | | | Change-Id: I98654000e82fd7e96152785ceafe857724fc417f
* | Moving getWallpaperArrayResourceId to a separate functions, so thatSunny Goyal2015-08-311-11/+24
| | | | | | | | | | | | it can be overriden by dependent projects Change-Id: I565d85d9126e41cec3dd2cdb8f2c75283bce4b13
* | Refactoring wallpaper picker activitySunny Goyal2015-08-3115-1222/+1140
| | | | | | | | | | | | | | | | > Moving different tiles to individual classes > Moving some utility methods to corresponding tile classes > No functionality change Change-Id: I493cf309f4e3d817a9300be004c475d208f8dadb
* | Fix typos caused by gerrit's inline editor.Tony Wickham2015-08-281-2/+2
| | | | | | | | Change-Id: Ie142f5c6b418ac775cc167787f8e372d5354b91a
* | Reuse existing temporary wallpaper tiles when selecting same photo.Tony Wickham2015-08-281-7/+27
| | | | | | | | | | | | | | | | | | Previously, if you selected a photo to set as the wallpaper multiple times, it kept adding temporary wallpaper tiles that were all identical. Now it reuses the same tile, updating the thumbnail and wallpaper if the Uri happens to point to a new image (such as if a photo is renamed). Change-Id: Ib05c9db4e1fd17226b503174f25add3368158b11
* | Merge "Refactor StylusEventHelper to provide onButtonPress/Release methods" ↵Mady Mellor2015-08-211-2/+3
|\ \ | | | | | | | | | into ub-launcher3-master
| * | Refactor StylusEventHelper to provide onButtonPress/Release methodsMady Mellor2015-08-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | This will enable an easier migration to the new M APIs for identifying button presses from stylus / other tools. Bug: 20430722 Change-Id: I41cfa6eff8d76bb83cf1bdaf6623ec1092ed554c
* | | Removing multi_process access to shared preferencesSunny Goyal2015-08-211-6/+5
|/ / | | | | | | Change-Id: If802245632c30d4f383013203fb2e0349ebc14fe
* | Removing some unused code in GLCanvasSunny Goyal2015-08-2010-954/+46
| | | | | | | | Change-Id: Icd421dd16c82275f0ac1a6881d1d86b9c1eaf1e8
* | Updating logic for setting wallpaper desired sizeSunny Goyal2015-08-191-26/+3
| | | | | | | | | | | | | | | | | | > Only setting desired size on wallpaper change for pre kitkat > Removing wallpaper change receiver from manifest > Removing multi-process wallpaper shared prefs for kitkat+ Bug: 23353784 Change-Id: Iba72d32871ee50b75807e2284a73a691bcddc472
* | Updating the ExifParsing codeSunny Goyal2015-08-1820-6133/+174
| | | | | | | | | | | | | | | | > Using system implementation of ExifInterface to read orientation > For inputstream, creating a temporary file with just the header since the system API only supports file input Change-Id: I19c94ff28e9d9bac14cd9b717de0ff165ba95595
* | resolved conflicts for merge of 9fc953b9 to ub-launcher3-masterSunny Goyal2015-08-172-8/+4
|\| | | | | | | Change-Id: Ia3e845a2e336c846cceefdc2d1e8c6786753f1b1
| * Version code cleanupSunny Goyal2015-08-172-8/+4
| | | | | | | | | | | | | | | | > Renaming Lmp to Lollipop > Lollipop_MR1 instead of directly using 22 > Using M APIs directly instead of reflection Change-Id: I10a307f46e3be15b3299f549a2fd7e0e215a6a1b
* | Removing some eclipse warningsSunny Goyal2015-08-171-2/+1
|/ | | | Change-Id: I160feaee81b262be02446885fae643c0be71b7af
* Ensure that crop view is loaded before applying a wallpaperSunny Goyal2015-08-121-1/+2
| | | | | Bug: 22293299 Change-Id: I64d5268cc263bbb6595a0b28bdd5ec73d540da41
* Preventing user from selecting any new time, when a tile is already being ↵Sunny Goyal2015-08-101-0/+4
| | | | | | | applied Bug: 22293299 Change-Id: I6b9bf2b777d33ca23f291c7872ce1f338d41e516
* Fix issue where scroll container shadow didn't fade outAdam Cohen2015-08-031-9/+11
| | | | Change-Id: I3b0104dea04009819db0375c381b8ff445b76baa
* Removing junit.framework.Assert from wallpaper picker codeSunny Goyal2015-06-263-8/+7
| | | | | Bug: 22124692 Change-Id: Ifd41727a2ce4af660818b4f0cd6b95110ffdeec4
* Avoid crashing if we don't have the READ_EXTERNAL_STORAGE permissionAdam Cohen2015-06-231-0/+13
| | | | | | issue 22019397 Change-Id: I7d556494569afaeac0ecdd641a089b78663b5563
* Read rotation setting correctly from the wallpaper picker.Rahul Chaturvedi2015-06-151-1/+1
| | | | | | | | | If reading the rotation setting without the multi-process flag, the WallpaperPickerActivity usually picks up a cached value. Specifying the multi-process flag during the read fixes this and the wallpaper picker always has the correct rotation setting. Change-Id: Ic3639f8cd694674e92c8940b753c6bc30486076d
* Merge "Stylus support: creating and setting listeners for stylus button ↵Mady Mellor2015-06-031-0/+10
|\ | | | | | | press" into ub-launcher3-burnaby
| * Stylus support: creating and setting listeners for stylus button pressMady Mellor2015-06-021-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates almost(*) all locations that use a long press listener to also set a custom touch listener that recognizes the stylus button press action. The stylus button press action is: when a stylus touches a view while the primary stylus button is pressed which may occur on a DOWN or MOVE event. *The location this is *not* enabled for is: Longpress to enter "overview" mode -- this isn't really a selection or drag n drop action; it is also easy to accidentally do this while using the stylus gesture to drag n drop items which is not an ideal interaction. Also not set for the "cling" that demonstrates this. Bug: 20430722 Change-Id: I9343f143261a7b4fada9afca28b8a11a60dbecca
* | Add the Allow Rotation setting to Launcher3.Rahul Chaturvedi2015-06-011-1/+6
|/ | | | | | | | | | | | This CL adds a Settings activity along with the code needed to provide a "Allow Rotation" setting to all phones and tablets. This setting is set to false for phones and true for tablets. On changing the setting from unlocked to locked, the launcher (and the Settings activity) will get locked to the orientation the user was in when he disabled "Allow Rotation". This is consistent with how the natural rotation feature of Android works. Change-Id: I8a1c59d1fa0bb9262530cad96e0a9bdbab0d9344
* Enabling setWallpaper button only if the image was loaded successfullySunny Goyal2015-05-212-4/+9
| | | | | Bug: 20187333 Change-Id: I1b738a06499d20facbc4bccb1e6247086a45b686
* Verify that an image can be rendered on a GL Surface before using itSunny Goyal2015-05-183-46/+45
| | | | | Bug: 20138883 Change-Id: I8de70eb971f31c2a4c07a7903e097a1586402282
* Various lint error fixes.Sunny Goyal2015-05-143-6/+12
| | | | | | | | > Fixing some RTL errors by specifying both marginStart and marginLeft > Moving all layout direction checks to Utilities > Explicitely adding @TargetApi before every method Change-Id: Ibe9c52b93b5a6adeadb27ace2b312770fd732ea0
* Merge "Revert "Revert "Disable setWallpaper button until the wallpaper is ↵Sunny Goyal2015-04-151-30/+41
|\ | | | | | | loaded" Will submit again after the drop" Actual fix" into ub-launcher3-burnaby