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
findType did not support user-defined imports, so casting,
for example, of Foo<String> didn't recognize Foo or String.
This also will import java.lang.* by default.
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
Renamed Model* classes to Annotation*
Renamed Reflection* classes to Model*
Removed Class* classes -- they are no longer needed.
The names were confusing. I think this is better.
When reporting lint errors/warnings, reference the relevant
underlying rule. Also adds a few more lint rules, and removes a few
aggressive checks.
Change-Id: I1bdadf5fd4df9cd28bb7dfe1c7bb1f9055398315
Also create separate class to describe failures, which can be
consumed by other tools. Still offers to render itself for console
output by default.
Change-Id: Ib0555cc289ae08a0e446489509cc964c866c564e
ClassAnalyzer uses normal reflection. We intend to move
to an Annotation Processor and possibly an Android Studio
plugin version of type interaction as well. This abstracts
the type interaction to prepare.
Change-Id: I2b95ea9074bca7e3053aeadcd3692dffe93b41d6