History log of /frameworks/base/graphics/java/android/graphics/drawable/Icon.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c7fd3462a2699f73d5f2ba6d863d8be4ddd570a9 14-Jul-2015 Julia Reynolds <juliacr@google.com> Retrieve resources for apps, even if not installed for current user.

Bug: 21448052
Change-Id: Id5db428a6faca4a905684088c47e070752ac2899
/frameworks/base/graphics/java/android/graphics/drawable/Icon.java
346872d5387fe66d13ea962abe031830abf40648 24-Jun-2015 Dan Sandler <dsandler@android.com> Merge "Allow an icon to carry a tint with it, wherever it goes." into mnc-dev
a0d58ae574a3a69145512e0cd92e7842f0fbf83d 03-Jun-2015 Jorim Jaggi <jjaggi@google.com> Use ashmem backed bitmaps for passing around notifications

Avoids many copies during IPC and duplicate Java heap consumption in
system_server, SystemUI, etc.

Bug: 18386420
Change-Id: Id5ac9406062d472f7848009d65f12131f5f4dac9
/frameworks/base/graphics/java/android/graphics/drawable/Icon.java
24f11b1871f9def5d802d107897658c4b2b66ab5 03-Jun-2015 Dan Sandler <dsandler@android.com> Allow an icon to carry a tint with it, wherever it goes.

Bug: 21031774
Change-Id: I2d06c7288e0c0a06bf6ff147dfbfdea5a46fd288
/frameworks/base/graphics/java/android/graphics/drawable/Icon.java
4e78706f439d318ae7a78927d98f734351a89f64 17-Jun-2015 Dan Sandler <dsandler@android.com> Patch up certain kinds of broken notifications.

Notifications in which the icon resource ID is changed after
Builder.build() is called (even, and particularly, as the
last step in the current implementation of
setLatestEventInfo()) were not having their icons properly
parceled. In these cases we now attempt to catch this at
parcel time and construct the necessary Icon object.

But wait! Parceling does not require a Context. So we don't
actually know which package to load the resource from.
Therefore we now allow an Icon to be constructed with an
empty ("") package name, which allows us to complete this
parceling task despite the fact that a Notification does not
know its own package name. (In case you attempt to load a
drawable for such an Icon, loadDrawable will spot the ""
package and instead substitute the Context from its
parameters to try to load the resource.)

As it happens, even though the Notification does not know
its own package name, BaseStatusBar does, because it was
provided at NM.notify() time and is therefore included in
the StatusBarNotification structure. So we can actually
patch up the Icon (if it is TYPE_RESOURCE) and be sure to
get the icon loaded out of the correct package.

While we've got the hood open, this change fixes a couple of
related problems:

• Foreground service notifications synthetically
constructed for naughty icon==0 notifications (which we
are still allowing...FOR NOW) were losing the
FLAG_FOREGROUND_SERVICE flag (because we're
re-build()-ing them from scratch rather than rewriting
the provided Notification object). Now we set the flag
and hang onto the new notification for next time
setForeground() is called.

• We now allow media notifications to avoid getting bumped
to the top of the notification list if they're
PRIORITY_MIN. You might want to do that, I guess?

Bug: 21333763
Change-Id: Ia5d1f1acb594c7677bcc75ee3d624da4ffca671f
/frameworks/base/graphics/java/android/graphics/drawable/Icon.java
d63f9321e62064660d426efd5abbd885c4a24652 06-May-2015 Dan Sandler <dsandler@android.com> Icon support comes to Notification.

And you may ask yourself: what is that beautiful icon?
And you may ask yourself: where does that API go to?
And you may ask yourself: is it a resource? is it a Bitmap?
And you may say to yourself: my god, what have I done

(This patch fixes a number of bugs in the initial
implementation, but other than that, it's the same as it
ever was.)

Bug: 18568715
Bug: 21141842
Change-Id: I1d3f9427abd7f0bb57e533fcfac708851ff644b6
/frameworks/base/graphics/java/android/graphics/drawable/Icon.java
aee0c2ce39fe92716bb76d33d6f8cc8789467cf6 15-May-2015 Dan Sandler <dsandler@android.com> Merge "Use Context instead of Resources in Icon.createWithResource." into mnc-dev
220239e37110bf7d97aa92270be5a12ab0cf5e24 15-May-2015 Yorke Lee <yorkelee@google.com> Fix missing break in Icon class

This causes RuntimeExceptions to fall through to the next
case statement.

Bug: 21168985
Change-Id: Ie69610b22c6caf9f6536ebd48673067880cb75a2
/frameworks/base/graphics/java/android/graphics/drawable/Icon.java
02cd9f91a6bd6d06d6d1237f8b978a0ab0b8ea32 14-May-2015 Dan Sandler <dsandler@android.com> 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
/frameworks/base/graphics/java/android/graphics/drawable/Icon.java
09e51a739f3e408567f0eefafcc5fedb01bc3401 14-May-2015 Daniel Sandler <dsandler@android.com> Revert "Icon support comes to Notification."

This reverts commit 08a04c15245c970856022d0779aa27d4d63cdee3.
This also reverts commit 5bcbf857d129f4513e562801a4e88077b2655ade.

Change-Id: Ia0b0a5339d523581c877822a3a1feec97ae4b73d
/frameworks/base/graphics/java/android/graphics/drawable/Icon.java
08a04c15245c970856022d0779aa27d4d63cdee3 06-May-2015 Dan Sandler <dsandler@android.com> Icon support comes to Notification.

And you may ask yourself: what is that beautiful icon?
And you may ask yourself: where does that API go to?
And you may ask yourself: is it a resource? is it a Bitmap?
And you may say to yourself: my god, what have I done

Bug: 18568715
Change-Id: I4377b311c538bd1cf36b3fba22326bae81af40c9
/frameworks/base/graphics/java/android/graphics/drawable/Icon.java
cad84a2070b68093ab31b05389685fdbcd0d9f85 13-May-2015 Santos Cordon <santoscordon@google.com> [1/4] Use new Icon class in PhoneAccount.

Bug: 21088522
Change-Id: Ia03171d4861f758701e89733f4082863587e8c11
/frameworks/base/graphics/java/android/graphics/drawable/Icon.java
877d696c382ecb8a97972450c8819536641a963c 13-May-2015 Dan Sandler <dsandler@android.com> 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
/frameworks/base/graphics/java/android/graphics/drawable/Icon.java
b9f7aac3488873677377b36c57338d758098f78e 04-Mar-2015 Dan Sandler <dsandler@android.com> 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
/frameworks/base/graphics/java/android/graphics/drawable/Icon.java