10 Commits

Author SHA1 Message Date
Dan Sandler
02cd9f91a6 Use Context instead of Resources in Icon.createWithResource.
This works around situations where corrupted packages cause
Resources.getResourcePackageName to return something that
does't actually work.

Bug: 21144636
Change-Id: I271518599a8eb89d493f1ceda6cb2e47fb38a4ff
2015-05-14 13:23:12 -04:00
Dan Sandler
877d696c38 Icon API tuneups:
- Reorder parameters to loadDrawableAsync()
- New version of createWithResource that takes a package
  name instead of a Resources
- Add loadDrawableAsUser() for INTERACT_ACROSS_USERS clients
  like SystemUI
- Docs cleanups

Bug: 21089268
Bug: 21031774
Change-Id: I465d2b865e35e12094b564f994e59d55e522f65a
2015-05-13 13:15:46 -04:00
Dan Sandler
b9f7aac348 Icon: a clean, parcelable place for images.
Binder APIs which wish to consume Bitmaps *and* drawable
resources can now do so by using Icon, a kind of union type
that accommodates each of these. Icon also accepts byte
arrays holding compressed Bitmaps (PNG, JPEG, etc), which
saves clients the additional memory cost of decoding and
sending full uncompressed bitmaps through Binder interfaces.
Receiving clients can call loadDrawable{,Async} and then
getDrawable to start immediately using the image in an
ImageView or other Drawable-hosting container.

Bug: 19609468
Change-Id: Ic1343711c2ac0b15876b46f0b6008b0108a49470
2015-05-01 13:44:42 -04:00
Mike Klein
d0f379c197 Preserve fill type in Path.reset().
Bug: 10838355
Change-Id: I7bdecb945fc35dfed02d37745678ae7bda906628
2013-10-07 21:04:47 +00:00
Romain Guy
54999da4b6 Remove MipmapDrawable
It's a hidden API that nobody uses.

Change-Id: Ie0ecbc45cd191a595e53fe8765defe6f2aa7e3f6
2013-05-30 17:34:27 -07:00
Jesse Wilson
f7f9d9c39d Expose an API to get a bitmap's size in bytes.
Change-Id: I960c3b02b1ba8d3a8d92aaa98955a159e6f3a228
http://b/3184897
2011-02-16 17:50:43 -08:00
Brian Muramatsu
feb8ba4a5e Add MipmapDrawableTest
Move these tests from CTS, because Mipmap is now hidden.
Also remove all the XML inflation code, because that is currently
disabled.

Original change: f445b8a7
Deletion from CTS: Ibfd1b8a5

Change-Id: I816581062778a9cbe868e32c3c6975cc9a74af5b
2010-12-21 12:28:29 -08:00
Bjorn Bringert
627dc6e731 Test for decoding Bitmap from MemoryFile ParcelFileDescriptor
Bug: 2948227
Change-Id: I90de2f887e907fbd631dc06a1c483737acec0706
2010-08-26 14:04:40 +01:00
Brett Chabot
0dc59e78e1 More framework tests cleanup.
Move all tests for android.* classes from tests/AndroidTests and
tests/CoreTests into framework/base/<core|graphics>/tests.

Consolidate all tests for java.* classes to tests/CoreTests.
Eventually hopefully these will be moved to dalvik/ somewhere.

Remove tests/AndroidTests entirely.

Change-Id: I86584d086ab7bd045bb38a10b699907805298a95
2010-04-01 18:31:11 -07:00
Neal Nguyen
1a44d5dcab Phase 2 of test cleanup: moving test files from AndroidTests closer to their sources.
Most of these are file moves; a couple notable exceptions are the changes due to the move, and fixing up test code:
- database/DatabaseCursorTest.java
- database/DatabaseStatementTest.java
- net/UriTest.java
2010-01-29 13:35:51 -08:00