summaryrefslogtreecommitdiffstats
path: root/packages/WallpaperCropper/src
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused imports in frameworks/base.John Spurlock2015-02-281-1/+0
| | | | Change-Id: I031443de83f93eb57a98863001826671b18f3b17
* am 9b0109eb: am c7aa8fe6: Merge "Removing some more FloatMath references"Neil Fuller2014-10-171-4/+3
|\ | | | | | | | | * commit '9b0109eb051fcf0a7ad801d03e73aa4e0bf2d7a7': Removing some more FloatMath references
| * Removing some more FloatMath referencesNeil Fuller2014-10-151-4/+3
| | | | | | | | | | | | | | | | See frameworks/base commit 33253a4baa6279f81a73425b49dfb6abe5f5416e for details. Bug: https://code.google.com/p/android/issues/detail?id=36199 Change-Id: I46d4ee4c4be7972e3bcc6782fb50f024b6fff1ee
* | resolved conflicts for merge of ee665151 to lmp-mr1-dev-plus-aospNeil Fuller2014-10-021-3/+2
|\ \ | |/ | | | | Change-Id: I2588c65b7a9fa43f968151a206924a804f0595a7
| * Switch from FloatMath -> Math and Math.hypot where possibleNeil Fuller2014-10-011-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation is an API change: FloatMath is going to be deprecated and/or removed. Performance is not the goal of this change. That said... Math is faster than FloatMath with AOT compilation. While making the change, occurances of: {Float}Math.sqrt(x * x + y * y) and {Float}Math.sqrt({Float}Math.pow(x, 2) + {Float}Math.pow(y, 2)) have been replaced with: {(float)} Math.hypot(x, y) Right now there is no runtime intrinsic for hypot so is not faster in all cases for AOT compilation: Math.sqrt(x * x + y * y) is faster than Math.hypot(x, y) with AOT, but all other combinations of FloatMath, use of pow() etc. are slower than hypot(). hypot() has the advantage of being self documenting and could be optimized in future. None of the behavior differences around NaN and rounding appear to be important for the cases looked at: they all assume results and arguments are in range and usually the results are cast to float. Different implementations measured on hammerhead / L: AOT compiled: [FloatMath.hypot(x, y)] benchmark=Hypot_FloatMathHypot} 633.85 ns; σ=0.32 ns @ 3 trials [FloatMath.sqrt(x*x + y*y)] benchmark=Hypot_FloatMathSqrtMult} 684.17 ns; σ=4.83 ns @ 3 trials [FloatMath.sqrt(FloatMath.pow(x, 2) + FloatMath.pow(y, 2))] benchmark=Hypot_FloatMathSqrtPow} 1270.65 ns; σ=12.20 ns @ 6 trials [(float) Math.hypot(x, y)] benchmark=Hypot_MathHypot} 96.80 ns; σ=0.05 ns @ 3 trials [(float) Math.sqrt(x*x + y*y)] benchmark=Hypot_MathSqrtMult} 23.97 ns; σ=0.01 ns @ 3 trials [(float) Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))] benchmark=Hypot_MathSqrtPow} 156.19 ns; σ=0.12 ns @ 3 trials Interpreter: benchmark=Hypot_FloatMathHypot} 1180.54 ns; σ=5.13 ns @ 3 trials benchmark=Hypot_FloatMathSqrtMult} 1121.05 ns; σ=3.80 ns @ 3 trials benchmark=Hypot_FloatMathSqrtPow} 3327.14 ns; σ=7.33 ns @ 3 trials benchmark=Hypot_MathHypot} 856.57 ns; σ=1.41 ns @ 3 trials benchmark=Hypot_MathSqrtMult} 1028.92 ns; σ=9.11 ns @ 3 trials benchmark=Hypot_MathSqrtPow} 2539.47 ns; σ=24.44 ns @ 3 trials Bug: https://code.google.com/p/android/issues/detail?id=36199 Change-Id: I06c91f682095e627cb547d60d936ef87941be692
* | Fixing memory leak in WallpaperCropActivitySunny Goyal2014-07-231-0/+8
| | | | | | | | | | issue: 15516788 Change-Id: I53a312addbb7ce17ecf02b2f14b9e991eab42be9
* | Squash unreachable catchAdam Skory2014-06-051-3/+0
| | | | | | | | | | | | The compiler warning distracts me often. Change-Id: Ia96e6c82ce1c0f1ae58f7faadbf8769b36d1f810
* | am c3db8011: am 58e99f56: am b6e077dc: am 7718fc12: Fixed crash when setting ↵Selim Cinek2014-03-271-6/+7
|\ \ | | | | | | | | | | | | | | | | | | wallpaper with built in rotation * commit 'c3db8011d7f7a5bcb0a9e5ae2d20022c6e88d8f9': Fixed crash when setting wallpaper with built in rotation
| * | Fixed crash when setting wallpaper with built in rotationSelim Cinek2014-03-271-6/+7
| |/ | | | | | | | | | | | | | | If an image had a built in rotation, a crash could occur, when setting it. An example was a panorama image which had a rotation of 90 degrees Change-Id: Iede8226dac3a40f08d39a69162eb388e6aba97ec Bug: 13507421
* | am 50cd7c39: am f7805dd7: am 7290b56b: am 8ae8689d: am c41853ce: Fixed ↵Selim Cinek2014-03-251-3/+4
|\ \ | |/ | | | | | | | | | | wallpaper bug where wrong size was taken when cropping * commit '50cd7c39bb9f62d443a62d1f4af7f6ebc107f217': Fixed wallpaper bug where wrong size was taken when cropping
| * Fixed wallpaper bug where wrong size was taken when croppingSelim Cinek2014-03-241-3/+4
| | | | | | | | | | | | | | | | When cropping, the selected area of the image was incorrectly cropped to the size of the view instead of the size of the image Bug: 13617446 Change-Id: If54a0891fa2cdeee70ba63752874f1543d401701
| * Disable Set Wallpaper button while loading imageSelim Cinek2014-03-211-0/+5
| | | | | | | | | | | | Bug: 13534714 Change-Id: I45ff3436de40ea85fb22d776584d9f30f0795898 (cherry picked from commit 0fa6c1b146f7ed1aba335c30878e2c1b2bf2a8f1)
| * Merge "[DO NOT MERGE] Fix wallpaper cropping bugs" into klp-devAdam Cohen2014-03-192-5/+34
| |\
| | * [DO NOT MERGE] Fix wallpaper cropping bugsMichael Jurka2014-03-192-5/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - take into account that image decoder might not respect inSampleSize - check rounded values so we don't have crop rects that lie outside a bitmap's dimensions - correctly set initial scale on bitmaps that are larger than the screen size - switch to using asynctask when setting wallpaper dimensions (cherry picked from commit e39c9a953ca11319b747b3aa79f4ccd082b775b7) Change-Id: I43372f0bff37f139c8bc83f9956a967d0b4a8708
| * | [DO NOT MERGE] Centering the crop by default in system wallpaper cropperMichael Jurka2014-03-191-5/+15
| |/ | | | | | | | | | | Bug: 12034934 Change-Id: Ice1b1140bd6e351dd4e520f555f245d84a645aac (cherry picked from commit 2ab14daebac46307d2364733481edc3115bbf98c)
| * DO NOT MERGE - Fixed crash for odd image width/heightSelim Cinek2014-03-141-0/+7
| | | | | | | | | | | | | | | | | | Due to an internal rounding in the renderer, the calculations for the cropping area could be slightly offset, getting out of the image boundaries. I sanitized the rect by ensuring they are inside the image. Bug: 12174629 Change-Id: Icc37790732ddd479631b898b23c05501d2dcd5be
* | Merge "Catch exceptions if Exif is malformed"Adam Cohen2014-03-212-0/+9
|\ \
| * | Catch exceptions if Exif is malformedSelim Cinek2014-03-212-0/+9
| | | | | | | | | | | | | | | Bug: 11650650 Change-Id: Ie1680220fdb235a166a0eaa0a2309729f861865c
* | | Merge "Catching security exception when activity destroyed"Adam Cohen2014-03-211-1/+15
|\ \ \
| * | | Catching security exception when activity destroyedSelim Cinek2014-03-211-1/+15
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Fixed a bug where an asynctask tried to load an image even after the activity was destroyed leading to a security exception since the permission could not be granted anymore. Bug: 12760267 Change-Id: Ieffb10b1007f349371647512ffe4fe72433344e7
* | | Merge "Disable Set Wallpaper button while loading image"Selim Cinek2014-03-211-0/+5
|\ \ \
| * | | Disable Set Wallpaper button while loading imageSelim Cinek2014-03-211-0/+5
| |/ / | | | | | | | | | | | | Bug: 13534714 Change-Id: I45ff3436de40ea85fb22d776584d9f30f0795898
* | | Fixed a crash when an image with an odd width/height was selectedSelim Cinek2014-03-141-0/+7
|/ / | | | | | | | | | | | | | | | | | | Due to an internal rounding in the renderer, the calculations for the cropping area could be slightly offset, getting out of the image boundaries. I sanitized the rect by ensuring they are inside the image. Bug: 12174629 Change-Id: Icc37790732ddd479631b898b23c05501d2dcd5be
* | Don't set suggested wallpaper dimensions in default wallpaper cropperMichael Jurka2014-01-291-36/+0
| | | | | | | | | | | | suggestWallpaperDimensions is deprecated/ignored now anyway Bug: 12118434
* | Centering the crop by default in system wallpaper cropperMichael Jurka2014-01-141-5/+15
| | | | | | | | | | Bug: 12034934 Change-Id: Ice1b1140bd6e351dd4e520f555f245d84a645aac
* | Update system wallpaper cropper with latest changes from Launcher3 cropperMichael Jurka2014-01-141-34/+35
| |
* | Fix wallpaper cropping bugsMichael Jurka2013-12-022-5/+34
| | | | | | | | | | | | | | | | | | | | - take into account that image decoder might not respect inSampleSize - check rounded values so we don't have crop rects that lie outside a bitmap's dimensions - correctly set initial scale on bitmaps that are larger than the screen size - switch to using asynctask when setting wallpaper dimensions
* | Remove unused imports from frameworks/base.John Spurlock2013-11-203-5/+0
|/ | | | Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
* Fix calculation of default wallpaper sizeMichael Jurka2013-11-061-33/+8
| | | Bug: 11324470
* Fix crashes for images that are not PNG or JPEGMichael Jurka2013-11-012-18/+49
| | | | | | Bug: 11342816 Change-Id: Ib8bbd30c1cc2d4f984af889895fb78412a1ab004
* Make wallpaper cropper more robust Michael Jurka2013-10-302-87/+235
| | | | | | | | | - don't crash if image passed to wallpaper picker is invalid - close input streams correctly Bug: 11413915 Bug: 11380658 Bug: 11362731
* Load wallpaper images on a bg threadMichael Jurka2013-10-282-60/+222
| | | | Bug: 11134758
* Add EXIF rotation support to system wallpaper cropperMichael Jurka2013-10-143-60/+233
| | | | Bug: 11137824
* Wallpaper cropper should inherit translucent themeMichael Jurka2013-10-082-84/+2
| | | Change-Id: Icd13130d6250759c71ef016f62d10d7359cf067e
* Fix crash in built-in wallpaper cropperMichael Jurka2013-10-073-53/+145
| | | | | Also, sync to latest version of WallpaperCropActivity Bug: 10950237
* Fix default wallpaper dimensionsMichael Jurka2013-09-201-1/+2
| | | Bug: 10834711
* Add new intent/method for cropping and setting wallpapersMichael Jurka2013-09-1334-0/+11542
Also, create a system fallback WallpaperCropper Bug: 4225598 Change-Id: I6bc6d5a3bb3df1dc00f3db701978aa172020c568