• Home
  • History
  • Annotate
  • only in /frameworks/base/packages/WallpaperCropper/src/
History log of /frameworks/base/packages/WallpaperCropper/src/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
08c7116ab9cd04ad6dd3c04aa1017237e7f409ac 28-Feb-2015 John Spurlock <jspurlock@google.com> Remove unused imports in frameworks/base.

Change-Id: I031443de83f93eb57a98863001826671b18f3b17
om/android/wallpapercropper/WallpaperCropActivity.java
3b96bfb1034433fde57239de036eaa96be107f04 17-Oct-2014 Neil Fuller <nfuller@google.com> am 9b0109eb: am c7aa8fe6: Merge "Removing some more FloatMath references"

* commit '9b0109eb051fcf0a7ad801d03e73aa4e0bf2d7a7':
Removing some more FloatMath references
6de42dac4307a88fb99ced0a57293438600e3899 03-Oct-2014 Neil Fuller <nfuller@google.com> Removing some more FloatMath references

See frameworks/base commit 33253a4baa6279f81a73425b49dfb6abe5f5416e
for details.

Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: I46d4ee4c4be7972e3bcc6782fb50f024b6fff1ee
om/android/gallery3d/common/BitmapUtils.java
c2a0b4482d7144e8382346ea4c22c7b89368fec0 02-Oct-2014 Neil Fuller <nfuller@google.com> resolved conflicts for merge of ee665151 to lmp-mr1-dev-plus-aosp

Change-Id: I2588c65b7a9fa43f968151a206924a804f0595a7
33253a4baa6279f81a73425b49dfb6abe5f5416e 01-Oct-2014 Neil Fuller <nfuller@google.com> Switch from FloatMath -> Math and Math.hypot where possible

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
om/android/wallpapercropper/CropView.java
fabf1f23d64d717790e68b78ad75e1466426be65 23-Jul-2014 Sunny Goyal <sunnygoyal@google.com> Fixing memory leak in WallpaperCropActivity

issue: 15516788
Change-Id: I53a312addbb7ce17ecf02b2f14b9e991eab42be9
om/android/wallpapercropper/WallpaperCropActivity.java
0212c563c8b379f58d9e9a84be7bb300f99fa3d3 05-Jun-2014 Adam Skory <skory@google.com> Squash unreachable catch

The compiler warning distracts me often.

Change-Id: Ia96e6c82ce1c0f1ae58f7faadbf8769b36d1f810
om/android/photos/BitmapRegionTileSource.java
49fb8aeff5b1ee928f698860c1915b742a3adbf7 28-Mar-2014 Selim Cinek <cinek@google.com> am c3db8011: am 58e99f56: am b6e077dc: am 7718fc12: Fixed crash when setting wallpaper with built in rotation

* commit 'c3db8011d7f7a5bcb0a9e5ae2d20022c6e88d8f9':
Fixed crash when setting wallpaper with built in rotation
7718fc1291c73576417f0c25d88f5105f7ae7365 27-Mar-2014 Selim Cinek <cinek@google.com> Fixed crash when setting wallpaper with built in rotation

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
om/android/wallpapercropper/WallpaperCropActivity.java
92a87e302625c69c6a52c3cb595b9ecfacf29129 25-Mar-2014 Selim Cinek <cinek@google.com> am 50cd7c39: am f7805dd7: am 7290b56b: am 8ae8689d: am c41853ce: Fixed wallpaper bug where wrong size was taken when cropping

* commit '50cd7c39bb9f62d443a62d1f4af7f6ebc107f217':
Fixed wallpaper bug where wrong size was taken when cropping
c41853cee89b391cd2d4d93205ea69c746ccfa4c 24-Mar-2014 Selim Cinek <cinek@google.com> Fixed wallpaper bug where wrong size was taken when cropping

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
om/android/wallpapercropper/WallpaperCropActivity.java
ba126c09a5c00cb0a96da6ece0b4ab4d7ed2d8cb 21-Mar-2014 Selim Cinek <cinek@google.com> Disable Set Wallpaper button while loading image

Bug: 13534714
Change-Id: I45ff3436de40ea85fb22d776584d9f30f0795898
(cherry picked from commit 0fa6c1b146f7ed1aba335c30878e2c1b2bf2a8f1)
om/android/wallpapercropper/WallpaperCropActivity.java
fb40d78c57711585c9eaed467601bf3adb4f60f9 21-Mar-2014 Adam Cohen <adamcohen@google.com> Merge "Catch exceptions if Exif is malformed"
146af201d380cffa6a540fd0d52590bd9d30b614 21-Mar-2014 Adam Cohen <adamcohen@google.com> Merge "Catching security exception when activity destroyed"
a4c1ccf3e045accd321be4d4c7d2ba1941a49ab4 21-Mar-2014 Selim Cinek <cinek@google.com> Merge "Disable Set Wallpaper button while loading image"
5ab7d37d903f336c5a96f8caca9b36439e76bdb4 21-Mar-2014 Selim Cinek <cinek@google.com> Catch exceptions if Exif is malformed

Bug: 11650650
Change-Id: Ie1680220fdb235a166a0eaa0a2309729f861865c
om/android/photos/BitmapRegionTileSource.java
om/android/wallpapercropper/WallpaperCropActivity.java
d6901a95d8aabc25fdd108d3605b34f848ab10e0 21-Mar-2014 Selim Cinek <cinek@google.com> Catching security exception when activity destroyed

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
om/android/wallpapercropper/WallpaperCropActivity.java
0fa6c1b146f7ed1aba335c30878e2c1b2bf2a8f1 21-Mar-2014 Selim Cinek <cinek@google.com> Disable Set Wallpaper button while loading image

Bug: 13534714
Change-Id: I45ff3436de40ea85fb22d776584d9f30f0795898
om/android/wallpapercropper/WallpaperCropActivity.java
55b523cc3fac7fd008094b690a0fa8c5527d569c 19-Mar-2014 Adam Cohen <adamcohen@google.com> Merge "[DO NOT MERGE] Fix wallpaper cropping bugs" into klp-dev
929e75e8d0c258ca134093413ed0d8ffb3ead1d4 14-Jan-2014 Michael Jurka <mikejurka@google.com> [DO NOT MERGE] Centering the crop by default in system wallpaper cropper

Bug: 12034934

Change-Id: Ice1b1140bd6e351dd4e520f555f245d84a645aac
(cherry picked from commit 2ab14daebac46307d2364733481edc3115bbf98c)
om/android/wallpapercropper/WallpaperCropActivity.java
c82618c660bbb76df05c11c548cc01724f5e5fc9 03-Dec-2013 Michael Jurka <mikejurka@google.com> [DO NOT MERGE] Fix wallpaper cropping bugs

- 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
om/android/wallpapercropper/CropView.java
om/android/wallpapercropper/WallpaperCropActivity.java
eb95e74e21a0e910704ca2fd67e074ab640bfba3 14-Mar-2014 Selim Cinek <cinek@google.com> DO NOT MERGE - Fixed crash for odd image width/height

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
om/android/wallpapercropper/WallpaperCropActivity.java
912e0df89ce798a5922f87fd65b87bb99f8b4813 14-Mar-2014 Selim Cinek <cinek@google.com> Fixed a crash when an image with an odd width/height was selected

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
om/android/wallpapercropper/WallpaperCropActivity.java
01f7cc17c8359f5f2028bb7f22953d31bda02018 29-Jan-2014 Michael Jurka <mikejurka@google.com> Don't set suggested wallpaper dimensions in default wallpaper cropper

suggestWallpaperDimensions is deprecated/ignored now anyway

Bug: 12118434
om/android/wallpapercropper/WallpaperCropActivity.java
2ab14daebac46307d2364733481edc3115bbf98c 14-Jan-2014 Michael Jurka <mikejurka@google.com> Centering the crop by default in system wallpaper cropper

Bug: 12034934

Change-Id: Ice1b1140bd6e351dd4e520f555f245d84a645aac
om/android/wallpapercropper/WallpaperCropActivity.java
35f922d1d038d14f94b584baae324513610f7813 14-Jan-2014 Michael Jurka <mikejurka@google.com> Update system wallpaper cropper with latest changes from Launcher3 cropper
om/android/wallpapercropper/WallpaperCropActivity.java
e39c9a953ca11319b747b3aa79f4ccd082b775b7 03-Dec-2013 Michael Jurka <mikejurka@google.com> Fix wallpaper cropping bugs

- 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
om/android/wallpapercropper/CropView.java
om/android/wallpapercropper/WallpaperCropActivity.java
6090995951c6e2e4dcf38102f01793f8a94166e1 19-Nov-2013 John Spurlock <jspurlock@google.com> Remove unused imports from frameworks/base.

Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
om/android/gallery3d/exif/ExifModifier.java
om/android/gallery3d/glrenderer/GLCanvas.java
om/android/photos/BitmapRegionTileSource.java
eed96a0b9088dcce121ffee476b4d7fa72686e77 06-Nov-2013 Michael Jurka <mikejurka@google.com> Fix calculation of default wallpaper size

Bug: 11324470
om/android/wallpapercropper/WallpaperCropActivity.java
b2552648cec772c896ff31a7aa52ae48380459c0 31-Oct-2013 Michael Jurka <mikejurka@google.com> Fix crashes for images that are not PNG or JPEG

Bug: 11342816

Change-Id: Ib8bbd30c1cc2d4f984af889895fb78412a1ab004
om/android/photos/BitmapRegionTileSource.java
om/android/wallpapercropper/WallpaperCropActivity.java
7b215cb92288aa0a21bc773511ddd537b8fbb459 30-Oct-2013 Michael Jurka <mikejurka@google.com> Make wallpaper cropper more robust

- don't crash if image passed to wallpaper picker
is invalid
- close input streams correctly

Bug: 11413915
Bug: 11380658
Bug: 11362731
om/android/photos/BitmapRegionTileSource.java
om/android/wallpapercropper/WallpaperCropActivity.java
5271ea16c1989f99c0db7ab80b2b321441f60023 28-Oct-2013 Michael Jurka <mikejurka@google.com> Load wallpaper images on a bg thread

Bug: 11134758
om/android/photos/BitmapRegionTileSource.java
om/android/wallpapercropper/WallpaperCropActivity.java
69784065ea78550944b7eddb559c0dac952e20e8 14-Oct-2013 Michael Jurka <mikejurka@google.com> Add EXIF rotation support to system wallpaper cropper

Bug: 11137824
om/android/photos/views/TiledImageView.java
om/android/wallpapercropper/CropView.java
om/android/wallpapercropper/WallpaperCropActivity.java
33c493e653c898b6697870ddb6be538ccd6103f9 08-Oct-2013 Michael Jurka <mikejurka@google.com> Wallpaper cropper should inherit translucent theme

Change-Id: Icd13130d6250759c71ef016f62d10d7359cf067e
om/android/wallpapercropper/TranslucentDecor.java
om/android/wallpapercropper/WallpaperCropActivity.java
e72aa7f0a64ff55f747751b7972ccb8acebab7da 08-Oct-2013 Michael Jurka <mikejurka@google.com> Fix crash in built-in wallpaper cropper

Also, sync to latest version of WallpaperCropActivity

Bug: 10950237
om/android/wallpapercropper/CropView.java
om/android/wallpapercropper/TranslucentDecor.java
om/android/wallpapercropper/WallpaperCropActivity.java
8b4836085b928f0ada3b3e6e1d1fd0530ffd6d57 20-Sep-2013 Michael Jurka <mikejurka@google.com> Fix default wallpaper dimensions

Bug: 10834711
om/android/wallpapercropper/WallpaperCropActivity.java
e8d1bf7a439450b9979701909164a6baffbe8bae 09-Sep-2013 Michael Jurka <mikejurka@google.com> Add new intent/method for cropping and setting wallpapers

Also, create a system fallback WallpaperCropper

Bug: 4225598

Change-Id: I6bc6d5a3bb3df1dc00f3db701978aa172020c568
om/android/gallery3d/common/BitmapUtils.java
om/android/gallery3d/common/Utils.java
om/android/gallery3d/exif/ByteBufferInputStream.java
om/android/gallery3d/exif/CountedDataInputStream.java
om/android/gallery3d/exif/ExifData.java
om/android/gallery3d/exif/ExifInterface.java
om/android/gallery3d/exif/ExifInvalidFormatException.java
om/android/gallery3d/exif/ExifModifier.java
om/android/gallery3d/exif/ExifOutputStream.java
om/android/gallery3d/exif/ExifParser.java
om/android/gallery3d/exif/ExifReader.java
om/android/gallery3d/exif/ExifTag.java
om/android/gallery3d/exif/IfdData.java
om/android/gallery3d/exif/IfdId.java
om/android/gallery3d/exif/JpegHeader.java
om/android/gallery3d/exif/OrderedDataOutputStream.java
om/android/gallery3d/exif/Rational.java
om/android/gallery3d/glrenderer/BasicTexture.java
om/android/gallery3d/glrenderer/BitmapTexture.java
om/android/gallery3d/glrenderer/GLCanvas.java
om/android/gallery3d/glrenderer/GLES20Canvas.java
om/android/gallery3d/glrenderer/GLES20IdImpl.java
om/android/gallery3d/glrenderer/GLId.java
om/android/gallery3d/glrenderer/GLPaint.java
om/android/gallery3d/glrenderer/RawTexture.java
om/android/gallery3d/glrenderer/Texture.java
om/android/gallery3d/glrenderer/UploadedTexture.java
om/android/gallery3d/util/IntArray.java
om/android/photos/BitmapRegionTileSource.java
om/android/photos/views/BlockingGLTextureView.java
om/android/photos/views/TiledImageRenderer.java
om/android/photos/views/TiledImageView.java
om/android/wallpapercropper/CropView.java
om/android/wallpapercropper/WallpaperCropActivity.java