1620 Commits

Author SHA1 Message Date
Adam Koch
be0b05a028 Merge "Doc fix: add more detail to BitmapFactory.Options.inPurgeable flag. Bug: 6064760" into klp-dev 2013-11-06 01:13:44 +00:00
John Spurlock
f68bb66c6e Fix recent regression in DrawableContainer.
Ensure optical insets are never null.

Bug:11537082
Change-Id: Ib75be83909fac612ae947f501835285cd8a79862
2013-11-05 19:15:41 -05:00
Adam Koch
e1693df494 Doc fix: add more detail to BitmapFactory.Options.inPurgeable flag.
Bug: 6064760

Change-Id: I3fd833a3205be451ff6548fab3555d170c9c570e
2013-11-05 16:00:09 -05:00
Fabrice Di Meglio
93c9093a32 am 641bac8e: am 073041c3: am f48bcd5b: Merge "Fix bug #11256076 Spinner text is too close from the opening triangle in RTL Locales" into klp-dev
* commit '641bac8e21673a2d526b9c0ccf28d5fd08bd6994':
  Fix bug #11256076 Spinner text is too close from the opening triangle in RTL Locales
2013-11-04 22:00:22 -08:00
Fabrice Di Meglio
641bac8e21 am 073041c3: am f48bcd5b: Merge "Fix bug #11256076 Spinner text is too close from the opening triangle in RTL Locales" into klp-dev
* commit '073041c3708b5856a027d32c93c6945e2266336e':
  Fix bug #11256076 Spinner text is too close from the opening triangle in RTL Locales
2013-11-04 21:55:31 -08:00
Alan Viverette
fadfbf1ae0 Merge "Add support for using ColorStateList as GradientDrawable's stroke" 2013-11-05 02:44:31 +00:00
Fabrice Di Meglio
f48bcd5b68 Merge "Fix bug #11256076 Spinner text is too close from the opening triangle in RTL Locales" into klp-dev 2013-11-05 00:46:19 +00:00
Alan Viverette
a211dd28b9 Add support for using ColorStateList as GradientDrawable's stroke
Refactors isOpaque() so that ColorStateList APIs previously added
on master branch are no longer needed.

Change-Id: I104c9a14ef81db6c4cf141e8fd0ebbd20bd52ee9
2013-11-04 13:46:29 -08:00
Newton Allen
ff236f5fc1 Fix some documentation typos.
Change-Id: I0360d468d54d970c87f313e24e50965245206f28
(cherry picked from commit c502744f2ddcc80a34f5197b5d2c0d701c7d6e71)
2013-11-01 02:38:01 +00:00
Newton Allen
52e3393afd Merge "Fix some documentation typos." 2013-11-01 02:37:22 +00:00
Svetoslav Ganov
78da147d42 Update the PdfDocument docs with unsupported operations.
The PDF generating canvas we use does not yet support all
drawing operations. This change adds docs which operations
are not yet supported.

Change-Id: I8d5ee8c1e2a473ba783b5e62f23ab90a54bbf106
(cherry picked from commit 8db45b844b5482cf61839404c0f6847e053de817)
2013-10-31 23:05:55 +00:00
Svetoslav Ganov
5b0e9797b1 am 8c33d89c: am 41dd5233: am 8856af5a: Merge "Update the PdfDocument docs with unsupported operations." into klp-dev
* commit '8c33d89cc7bf21883c2059497b9f296c389eb363':
  Update the PdfDocument docs with unsupported operations.
2013-10-31 08:59:34 -07:00
Svetoslav Ganov
8db45b844b Update the PdfDocument docs with unsupported operations.
The PDF generating canvas we use does not yet support all
drawing operations. This change adds docs which operations
are not yet supported.

Change-Id: I8d5ee8c1e2a473ba783b5e62f23ab90a54bbf106
2013-10-31 08:10:12 -07:00
Newton Allen
c502744f2d Fix some documentation typos.
Change-Id: I0360d468d54d970c87f313e24e50965245206f28
2013-10-30 16:18:21 -07:00
Alan Viverette
519494e207 Add support for using ColorStateList in GradientDrawable
BUG: 11373225
Change-Id: Ie62f1546e8694822aadafe9ef1e57ce458a363d6
2013-10-28 13:15:39 -07:00
Matthieu Delahaye
6a5875cf96 Adding operations to reflected Renderscript class
Renderscript expose its native types back to the Android
system through a set of classes defined within the renderscript
package. These classes provides no easy mean to manipulate
data they represent. It would be convinient to be able to manipulate
the data stored within an allocation via these classes directly
instead of having to marshall them into native Java objects.

This commit adds such operations to the existing exposed vector types.

Change-Id: I1845df1368a82f0d39b36416c83938c7160f6a3f
2013-10-23 16:02:03 -05:00
Fabrice Di Meglio
600d7dd1c6 Fix bug #11256076 Spinner text is too close from the opening triangle in RTL Locales
Background Drawable padding was not taken into account in RTL Locales

- make sure the Drawables are resolved before resolving padding
- during padding resolution take care about background padding

Change-Id: Ib0c722adf5341ab4fa2182a0d0ac2ca639e85cfc
2013-10-18 11:26:48 -07:00
Eino-Ville Talvala
cd92588528 DO NOT MERGE: Hide new camera API.
Not yet ready.

Bug: 11141002

Change-Id: I4704bffb9ba36af47a66dc5b49cbba00be623aae
2013-10-11 19:26:08 +00:00
Jason Sams
ec44e5dc2f Utility API for creating types.
Change-Id: I3263cb4440ef3a60cd418f0559b8c5638a9b8bf3
2013-10-09 17:15:44 -07:00
Jason Sams
390ec00c66 Remove old hidden API.
This was never shipped and long since replaced by ioReceive().

Change-Id: Ieba7fd4305c2c561cc36154c57414783e4bf502b
2013-10-09 17:15:43 -07:00
Adam Powell
80da140cc4 am 266b3026: am 20ba658b: am 31049d76: Use SCREEN Xfermode for keyguard badges; update SeekBar
* commit '266b3026c42ed3ba0feedd9abe3e3bb6932c2f23':
  Use SCREEN Xfermode for keyguard badges; update SeekBar
2013-10-07 17:01:16 -07:00
Adam Powell
31049d76c5 Use SCREEN Xfermode for keyguard badges; update SeekBar
Plumb through the necessary API features through Drawables and
ImageView but leave it hidden for now pending future API review and
plumbing through the rest of the framework Drawable implementations.

Update SeekBar assets used for keyguard transport control.

Set selected status directly instead of finding views by id.

Bug 10531608
Bug 10784913

Change-Id: Ia38bd04ad1bc26e9e6da1dda8a374c9ba3ceccb3
2013-10-07 16:14:17 -07:00
Mike Klein
bd03b9f17f am 3dd81450: am aa24442e: am d0f379c1: Preserve fill type in Path.reset().
* commit '3dd81450be76ef4b1d8737ec4bce34e7415a60e3':
  Preserve fill type in Path.reset().
2013-10-07 15:16:03 -07:00
Mike Klein
d0f379c197 Preserve fill type in Path.reset().
Bug: 10838355
Change-Id: I7bdecb945fc35dfed02d37745678ae7bda906628
2013-10-07 21:04:47 +00:00
Jeff Sharkey
322594c4a4 am 6d7de848: am 1fc9eb78: am 16326f70: Merge "Fix animations, padding in RTL mode." into klp-dev
* commit '6d7de848d7c4f8c6556c05dab79eb532874a82b3':
  Fix animations, padding in RTL mode.
2013-10-02 09:44:16 -07:00
Jeff Sharkey
ee3e1603fd Fix animations, padding in RTL mode.
Show directory animations coming in from left-side when in RTL
language.  Also fix NinePatchDrawable to correctly mirror its padding
when auto-mirrored, and fix InsetDrawable to propagate the layout
direction to the wrapped Drawable.

Bug: 10987190, 11030793
Change-Id: I1213802a07d0c4ced93438df1e6ddf5aed3df677
2013-10-01 16:03:00 -07:00
Victoria Lease
8d86033298 am a4eb894a: Merge "clarify Paint flag docs" into klp-dev
* commit 'a4eb894a55b07eeddb05d47558e6b2838d56af08':
  clarify Paint flag docs
2013-09-30 14:11:32 -07:00
Victoria Lease
a4eb894a55 Merge "clarify Paint flag docs" into klp-dev 2013-09-26 21:40:55 +00:00
Victoria Lease
8dc7d5ea26 clarify Paint flag docs
Bug: 10460797
Change-Id: Iae622b302cad3dc788f512b472e3a59ec227a8d7
2013-09-26 13:40:47 -07:00
Leon Scroggins III
afbd777fda am ae1e8855: am 8e4b16d6: Merge "Update docs to state that mark is no longer called." into klp-dev
* commit 'ae1e88553fa628dbf22aa5ed2659f5ea2c12793a':
  Update docs to state that mark is no longer called.
2013-09-25 15:33:54 -07:00
Leon Scroggins III
321bc46b3c Update docs to state that mark is no longer called.
BUG:6493544

Change-Id: I97a4d90ce2efcd12f8f1cc5b545f822f8e5a5ab0
2013-09-25 18:02:32 -04:00
Jason Sams
3a1b8e4116 Remove hidden API setSurfaceTexture.
Change-Id: Ib6a3c5b84550932168f314375e74059507fc01ae
2013-09-24 15:18:52 -07:00
Svetoslav
6e1e8b17c5 am c0e1ae01: am facc08c7: Merge "Move PdfDocument to android.graphics.pdf" into klp-dev
* commit 'c0e1ae0176b2ce23ea1b19883507cd920712289a':
  Move PdfDocument to android.graphics.pdf
2013-09-20 11:21:05 -07:00
Svetoslav
6811f4e92c Move PdfDocument to android.graphics.pdf
1. Move PdfDocument to android.graphics.pdf.

2. Changed the PdfDocument as per API concil request.

3. Updated the documentation.

bug:10461180
bug:10552565
bug:10681585
bug:10552336

Change-Id: I08e15b34cf37bb064248c887e6f59808019cafe8
2013-09-19 17:12:47 -07:00
Leon Scroggins III
44f65cb5fd am 2e4e9889: am 3490228e: Merge "Use a native buffer for decoding images." into klp-dev
* commit '2e4e98895b17ef248f5071202a3610ac715eaf0e':
  Use a native buffer for decoding images.
2013-09-18 10:58:27 -07:00
Leon Scroggins III
7315f1baee Use a native buffer for decoding images.
Fixes BUG:10725383

Depends on https://googleplex-android-review.git.corp.google.com/#/c/357300/
in external/skia.

In the previous fix for BUG:8432093 and BUG:6493544
(https://googleplex-android-review.googlesource.com/#/c/346191/),
instead of calling mark on the provided input stream, we
copied the entire stream in native code (except in one case;
more details below), allowing rewind no matter how much of
the stream had been read. This was because two decoders
may rewind after reading an arbitrary amount of the stream:
SkImageDecoder_wbmp and SkImageDecoder_libjpeg.

It turns out that the jpeg decoder does not need this rewind
after arbitrary length (it is a failure recovery case, and
libjpeg has a default recovery we can use - the above referenced
CL in Skia uses the default).

Although the wbmp decoder could read any amount given a
stream with the "right" data, and then return false, such a
stream would not be a valid stream of another format, so it
is okay for this rewind to fail.

Further, the previous fix was inefficient in the common case
where the caller decodes just the bounds, resets, then decodes
the entire image (since we have copied the entire stream twice).
The copy also resulted in the crashes seen in BUG:10725383.

In this CL, buffer only the amount of input needed by
SkImageDecoder::Factory to determine the type of image decoder
needed. Do not mark the input stream provided by the caller,
so their mark (if any) can remain in tact. The new Skia class
SkFrontBufferedStream allows buffering just the beginning
of the stream.

core/jni/android/graphics/BitmapFactory.cpp:
Instead of calling GetRewindableStream (which has been removed),
call CreateJavaInputStreamAdaptor. Then wrap it in an
SkFrontBufferedStream, with a large enough buffer to determine
which type of image is used.

core/jni/android/graphics/CreateJavaOutputStreamAdaptor.h:
core/jni/android/graphics/CreateJavaOutputStreamAdaptor.cpp:
Remove mark, markSupported, and rewind. CreateJavaInputStreamAdaptor
now turns an SkStream which is not rewindable. If the caller
needs rewind that needs to be handled differently (for example,
by using SkFrontBufferedStream, as is done in BitmapFactory and
Movie.
Remove RewindableJavaStream and GetRewindableStream.
Remove code specific to ByteArrayInputStream, which makes slow
JNI calls. Instead, depend on the caller to buffer the input
in the general case. There is no reason to special case this
stream (especially since we already have decodeByteArray).
Remove CheckForAssetStream, which is now always special cased
in Java.

core/jni/android/graphics/Movie.cpp:
Call CreateJavaInputStreamAdaptor and use an SkFrontBufferedStream.
Add a native function for decoding an Asset, and remove old
call to CheckForAssetStream.

graphics/java/android/graphics/BitmapFactory.java:
Write a helper function for decoding a stream to consolidate
common code.
Buffer enough of the input so that SkImageDecoder::Factory
can rewind after having read enough to determine the type.
Unlike the old code, do NOT mark the caller's stream. This is
handled in native code. The caller's mark (if any) is left alone.

graphics/java/android/graphics/Movie.java:
Check for an Asset stream before passing to native, and
call a native function for handling the asset directly.

BUG:6493544
BUG:8432093
BUG:10725383

Change-Id: Ide74d3606ff4bb2a8c6cdbf11bae3f96696f331a
2013-09-18 12:01:20 -04:00
Tor Norbye
b6a3ef1834 Merge "Add typedefs and nullness annotations." 2013-09-12 22:22:06 +00:00
Igor Murashkin
33069f40e5 am 47869404: am 2cad64c0: Merge "Surface: Change OutOfResourcesException to be a runtime exception" into klp-dev
* commit '47869404cb8233c536a0a5d2c5ce4d0089e39882':
  Surface: Change OutOfResourcesException to be a runtime exception
2013-09-11 17:22:40 -07:00
Tor Norbye
d9273d6f28 Add typedefs and nullness annotations.
This changeset adds in typedef annotations (custom annotations
marked with @IntDef) for various int parameters and return values
in the API. It also adds nullness annotations for cases where the
documentation explicitly mentioned null policy, or where it was
blindingly obvious from the context. Also fixed some typos in the
documentation.

Change-Id: Ica27c01368895818e26237544edd8483007155bb
2013-09-11 14:55:38 -07:00
Igor Murashkin
2cad64c0fb Merge "Surface: Change OutOfResourcesException to be a runtime exception" into klp-dev 2013-09-11 18:28:07 +00:00
John Reck
4669a5d278 am 8eb3ece8: am 1d2daa78: Merge "Remove FD optimization case for decodeStream" into klp-dev
* commit '8eb3ece8eeaea4dc06c5b3854d8fd9efea4ef5fc':
  Remove FD optimization case for decodeStream
2013-09-10 09:31:04 -07:00
John Reck
1d2daa7809 Merge "Remove FD optimization case for decodeStream" into klp-dev 2013-09-10 16:25:14 +00:00
Stephen Hines
319cc55c02 am 9b448989: am e3d0f022: Merge "Don\'t set Allocation mSize when we have no Type." into klp-dev
* commit '9b4489897974db2a7a6d9e19b4de2817bbb4755a':
  Don't set Allocation mSize when we have no Type.
2013-09-09 22:26:58 -07:00
Stephen Hines
e3d0f02282 Merge "Don't set Allocation mSize when we have no Type." into klp-dev 2013-09-10 05:23:15 +00:00
Igor Murashkin
a86ab640f7 Surface: Change OutOfResourcesException to be a runtime exception
- Deprecates SurfaceTexture.OutOfResourcesException, it wasn't used
- Make all JNI code throw only Surface.OutOfResourcesException
- Get rid of redundant SurfaceControl.OutOfResourcesException

Bug: 10566539
Change-Id: I58126260771b9ccff6a69c672ce7719b9f98138d
2013-09-09 21:53:59 -07:00
Stephen Hines
88990da58d Don't set Allocation mSize when we have no Type.
Bug: 10667740

A3D creates Allocations before knowing the underlying Type (and thus size).
Moving the mSize calculation to be conditional for concrete Allocations
eliminates the bug. In the future, we could let A3D dynamically update the
Allocation size if it is necessary to improve heap behavior.

Change-Id: I520246806b6ead0387a1a41372dade1a6e7c2271
2013-09-09 17:56:07 -07:00
Tim Murray
86ebf2876d am 9163b1d9: am 23ae1461: Merge "Add flags word to initialization." into klp-dev
* commit '9163b1d9ceeca3e956218dda1ca19a748dc48d8d':
  Add flags word to initialization.
2013-09-09 16:58:12 -07:00
John Reck
5835157d76 Remove FD optimization case for decodeStream
Bug: 10677727
 The problem is that the FileInputStream may be wrapping a pipe or
 AssetFileDescriptor which fails if handed to decodeFileDescriptor.
 The problem is that AFDs can start in the middle of a file, whereas
 decodeFileDescriptor assumes it can mmap() the FD and start at
 the beginning.

Change-Id: I98a3c5f789865145e25a99b32d205e290808c1cf
2013-09-09 23:41:20 +00:00
Tim Murray
23ae1461d2 Merge "Add flags word to initialization." into klp-dev 2013-09-09 23:34:38 +00:00
Tim Murray
9578e64240 Add flags word to initialization.
bug 10427951

Change-Id: I1356b9b96315ead44aa3898de5604d75f9bb8be5
2013-09-09 16:23:27 -07:00