1. Remove unused modes - makes the class more manageable, and missing
modes can always be readded from the git history.
2. Reuse the existing BlendComposite instances where possible.
3. Fix incorrect alpha computation for multiply mode.
4. Change the alpha computation for all blend modes to compenstate for
the fact that the color filter image that we create extends beyond the
image it is inteded to be applied to.
Change-Id: Iedebf289a23325ee4c6d406dcad46a9edb1855c7
Added an overload of getSystemService() that takes a class instead of a
service name to eliminate the extra cast and provide more type safety.
Cleaned up docs.
Removed the default constructor of BatteryManager which should not have
existed.
Change-Id: I9da46b20641fc83ecd3342560e5b94cb721f289c
Throw a better error message when resolving a hexadecimal color value
but the user gave a Color State List. The two are easy to confuse since
the only way to distinguish between the two is to look at the
definition.
Bug: http://b.android.com/70110
Change-Id: Ic78962bd0674a92296a0fdd0de184cfe4d85a8e4
+ Added a session flag that avoids caching mImage. This is useful when
mImage is just a Graphics2D wrapper that might change at any time.
+ Make GcSnapshot aware of the clipping so it doesn't need to render the
whole area if not needed.
Change-Id: Ie0134c2bc2741b5fa6648313864c851bbac066cf
Incremental API parsing works on a single class at a time, which
greatly reduces memory pressure. For example, linting a typical
current.txt would use ~100MB before; now it only uses about ~15MB!
Change-Id: Id084b3dd2f6513d0e919790d5a5d629f80637ce8
When the display state is DOZE or DOZE_SUSPEND, assume this means
that the AP may go to sleep at any time so hold a wake lock for
a little while starting when traversals are scheduled to ensure
that the AP remains awake long enough to draw and post the frame
to the display hardware.
This patch is somewhat approximate but should be good enough for
most devices today.
Note that the implementation uses the window manager to ensure that
the window which wants to draw is actually visible before acquiring
the wake lock. There is a cost to this test (a round-trip) which
should not be significant today since we do not expect apps to draw
more than one frame or two while dozing. However, if we wanted to
support animations in general, we might want to optimize it or
eliminate the check altogether (since we can already account for
the app's use of the wake lock).
Another way to implement this functionality might be for the view
hierarchy to listen for the power manager to report that it has entered
a non-interactive power state before deciding to poke draw locks.
This would be somewhat more accurate than watching the display state.
Also, the draw lock timeout logic could be implemented more directly
instead of using an ordinary timed wake lock.
Bug: 18284212
Change-Id: I84b341c678303e8b7481bd1620e634fe82cc4350
Updated boolean set/get tests to handle isFoo() and hasFoo() style
methods.
When listeners are passed as method argument, they should come near
the end of the argument list.
Verify that resources are named consistently.
Slightly clearer message wording overall.
Change-Id: Id22947bd932d82222ce3e6c6e2012dade348fb56
When overloading methods, verify that common arguments always come
first and have consistent ordering.
When methods register listeners or callbacks (outside of the UI
toolkit), verify that an overload exists that takes a Handler to
deliver events through.
When a method accepts a Context argument, it must be the first
argument.
Change-Id: I6a6f94a3a0a8c48987835e47eb87564e569db2af