3177 Commits

Author SHA1 Message Date
Deepanshu Gupta
6672afbe7d am 70775bed: am fb96187b: am 32dc37b7: am f2c1c096: am 6ed9b75a: am 72d75f8d: Merge "Correct PorterDuff filters." into lmp-dev
* commit '70775beddd3773a942084f5ef939da0a70065475':
  Correct PorterDuff filters.
2015-03-02 22:46:30 +00:00
Deepanshu Gupta
5ae7f103be am 6e64fabe: am 7c4ab9de: am 4e87709b: am 2022b0ff: am d003e813: am 369ad57b: Merge "Fix codestyle for switch statements." into lmp-dev
* commit '6e64fabecafcc4c367dc04cd071ff8ddc8bb3d85':
  Fix codestyle for switch statements.
2015-03-02 22:46:23 +00:00
Deepanshu Gupta
a104b1886b am 1fe1022d: am 4a194d3b: am 62500307: am aff0ec93: am 81449b2c: am 10d620ff: Merge "Better error msg for StateList/Hexadecimal Color." into lmp-dev
* commit '1fe1022dbd7642373e0e2d465d29ad3e1226a8b2':
  Better error msg for StateList/Hexadecimal Color.
2015-03-02 22:46:16 +00:00
Deepanshu Gupta
4c74da90db am c74295db: am bf815f49: am 7b4caab1: am 07d453fa: Merge "Add status bar time for 5.1" into lmp-mr1-dev
* commit 'c74295db3048d964679913f146511ce3ad838089':
  Add status bar time for 5.1
2015-03-02 22:45:57 +00:00
Deepanshu Gupta
70775beddd am fb96187b: am 32dc37b7: am f2c1c096: am 6ed9b75a: am 72d75f8d: Merge "Correct PorterDuff filters." into lmp-dev
* commit 'fb96187bb6004e5d0b22e4d942aa236a08d8913b':
  Correct PorterDuff filters.
2015-03-02 20:11:02 +00:00
Deepanshu Gupta
6e64fabeca am 7c4ab9de: am 4e87709b: am 2022b0ff: am d003e813: am 369ad57b: Merge "Fix codestyle for switch statements." into lmp-dev
* commit '7c4ab9deaaea0e0a273c7bdf37b6d9d1c8cbab07':
  Fix codestyle for switch statements.
2015-03-02 20:10:56 +00:00
Deepanshu Gupta
1fe1022dbd am 4a194d3b: am 62500307: am aff0ec93: am 81449b2c: am 10d620ff: Merge "Better error msg for StateList/Hexadecimal Color." into lmp-dev
* commit '4a194d3b7f3ea4aebc5a1a8f95ccaac248c1b89d':
  Better error msg for StateList/Hexadecimal Color.
2015-03-02 20:10:50 +00:00
Deepanshu Gupta
fb96187bb6 am 32dc37b7: am f2c1c096: am 6ed9b75a: am 72d75f8d: Merge "Correct PorterDuff filters." into lmp-dev
* commit '32dc37b72e787ca9323c01aa86e65694b6ff0cf7':
  Correct PorterDuff filters.
2015-03-02 20:03:37 +00:00
Deepanshu Gupta
7c4ab9deaa am 4e87709b: am 2022b0ff: am d003e813: am 369ad57b: Merge "Fix codestyle for switch statements." into lmp-dev
* commit '4e87709b8b41a12d6caf2bd1110beed20e5b88e5':
  Fix codestyle for switch statements.
2015-03-02 20:03:32 +00:00
Deepanshu Gupta
4a194d3b7f am 62500307: am aff0ec93: am 81449b2c: am 10d620ff: Merge "Better error msg for StateList/Hexadecimal Color." into lmp-dev
* commit '6250030736e3ea25bacc92eba4c269dc6a6ee3db':
  Better error msg for StateList/Hexadecimal Color.
2015-03-02 20:03:28 +00:00
Deepanshu Gupta
c74295db30 am bf815f49: am 7b4caab1: am 07d453fa: Merge "Add status bar time for 5.1" into lmp-mr1-dev
* commit 'bf815f495270b466e53bec20772b41ff4397ac83':
  Add status bar time for 5.1
2015-03-02 19:53:32 +00:00
Deepanshu Gupta
f2c1c09683 am 6ed9b75a: am 72d75f8d: Merge "Correct PorterDuff filters." into lmp-dev
* commit '6ed9b75a45ec4bc62b4a0fac2c86479d61918863':
  Correct PorterDuff filters.
2015-03-02 19:52:33 +00:00
Deepanshu Gupta
2022b0ffdd am d003e813: am 369ad57b: Merge "Fix codestyle for switch statements." into lmp-dev
* commit 'd003e8133167f2b6741f8eb925fdc9f77c2800a5':
  Fix codestyle for switch statements.
2015-03-02 19:52:29 +00:00
Deepanshu Gupta
aff0ec93f2 am 81449b2c: am 10d620ff: Merge "Better error msg for StateList/Hexadecimal Color." into lmp-dev
* commit '81449b2c4a63392bff22d77f331f4db52011884b':
  Better error msg for StateList/Hexadecimal Color.
2015-03-02 19:52:25 +00:00
Deepanshu Gupta
bf815f4952 am 7b4caab1: am 07d453fa: Merge "Add status bar time for 5.1" into lmp-mr1-dev
* commit '7b4caab1a87b659498d30af194ae511526c503ba':
  Add status bar time for 5.1
2015-03-02 19:47:29 +00:00
Deepanshu Gupta
6ed9b75a45 am 72d75f8d: Merge "Correct PorterDuff filters." into lmp-dev
* commit '72d75f8d9fb46c04f0458e1f36b064e2b8c3de71':
  Correct PorterDuff filters.
2015-03-02 19:44:51 +00:00
Deepanshu Gupta
d003e81331 am 369ad57b: Merge "Fix codestyle for switch statements." into lmp-dev
* commit '369ad57b00f1c94c80f0f80ef2e7063a23a94a84':
  Fix codestyle for switch statements.
2015-03-02 19:44:47 +00:00
Deepanshu Gupta
81449b2c4a am 10d620ff: Merge "Better error msg for StateList/Hexadecimal Color." into lmp-dev
* commit '10d620ff2c4770e926b693e833105e8dbbd5fa86':
  Better error msg for StateList/Hexadecimal Color.
2015-03-02 19:44:43 +00:00
Deepanshu Gupta
72d75f8d9f Merge "Correct PorterDuff filters." into lmp-dev 2015-03-02 19:40:14 +00:00
Deepanshu Gupta
369ad57b00 Merge "Fix codestyle for switch statements." into lmp-dev 2015-03-02 19:37:32 +00:00
Deepanshu Gupta
10d620ff2c Merge "Better error msg for StateList/Hexadecimal Color." into lmp-dev 2015-03-02 19:37:04 +00:00
Deepanshu Gupta
2045061aac Add status bar time for 5.1
Change-Id: I9469cdbbc5cbfe5cb99d9c4ee6f4e299246d409f
2015-02-26 19:35:54 -08:00
Deepanshu Gupta
1a10ca7e52 Correct PorterDuff filters.
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
2015-02-26 15:02:16 -08:00
Deepanshu Gupta
d68448a601 Fix codestyle for switch statements.
Fix intellij's codestyle settings for indenting switch/case statement.

Change-Id: I905231538fef0fcd7fa4e742f937b8da34f2e30f
2015-02-26 14:32:30 -08:00
Jeff Brown
6e53931f49 Add Context.getSystemService(Class<?>).
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
2015-02-25 17:04:13 -08:00
Jeff Sharkey
4f886d3911 Merge "Relax Handler lint check slightly." 2015-02-25 20:12:33 +00:00
Jeff Sharkey
047d7f0c6d Relax Handler lint check slightly.
This way we avoid yelling at support library APIs.

Change-Id: I20bab887fe8b1c7f4d197273ddedbcda48c5a429
2015-02-25 12:06:40 -08:00
Chad Jones
1fb5528643 resolved conflicts for merge of 57bb5f5c to master
Change-Id: Id5dfe7fc919305658312771a031c0764cef5515c
2015-02-23 21:19:58 -08:00
Deepanshu Gupta
a13ca400d1 am 01d5286f: am 8f022fd3: am 5ed4fc9e: am 99142d29: am 3f8e2b93: am 30a67cd1: Merge "Set forceFramework correctly for included layouts." into lmp-dev
* commit '01d5286f388303551a2eb8f57e210f6d7a690cb5':
  Set forceFramework correctly for included layouts.
2015-02-24 04:52:35 +00:00
Joe LaPenna
57bb5f5c8b am c0c39516: Merge "Hold a wake lock while dozing when display updates are pending." into lmp-mr1-modular-dev
* commit 'c0c395162ff14b83694158663470ad60e065d9a9':
  Hold a wake lock while dozing when display updates are pending.
2015-02-24 00:46:48 +00:00
Joe LaPenna
c0c395162f Merge "Hold a wake lock while dozing when display updates are pending." into lmp-mr1-modular-dev 2015-02-24 00:37:15 +00:00
Deepanshu Gupta
68501b87d2 Better error msg for StateList/Hexadecimal Color.
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
2015-02-23 12:00:38 -08:00
Deepanshu Gupta
01d5286f38 am 8f022fd3: am 5ed4fc9e: am 99142d29: am 3f8e2b93: am 30a67cd1: Merge "Set forceFramework correctly for included layouts." into lmp-dev
* commit '8f022fd323063f9cebb481be650db40cf5e486f3':
  Set forceFramework correctly for included layouts.
2015-02-23 19:29:31 +00:00
Deepanshu Gupta
99142d2982 am 3f8e2b93: am 30a67cd1: Merge "Set forceFramework correctly for included layouts." into lmp-dev
* commit '3f8e2b9302fba0ace67fb0459d6ffb0884c4d80b':
  Set forceFramework correctly for included layouts.
2015-02-23 19:09:14 +00:00
Deepanshu Gupta
3f8e2b9302 am 30a67cd1: Merge "Set forceFramework correctly for included layouts." into lmp-dev
* commit '30a67cd17af03e53b8be5638f7f70d2989a7cd78':
  Set forceFramework correctly for included layouts.
2015-02-23 19:03:29 +00:00
Deepanshu Gupta
33c1c07796 Set forceFramework correctly for included layouts.
Bug: http://b.android.com/151326
Change-Id: I759f6e1a7a1c83bbbb771ddbb92843a105acffa4
2015-02-23 17:26:12 +00:00
Diego Perez
2c5e85b303 Avoid caching mImage on the main render loop and use clipping.
+ 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
2015-02-23 09:56:01 +00:00
Jeff Sharkey
a18a2e3428 Switch to incremental API parsing.
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
2015-02-22 16:00:19 -08:00
Jeff Brown
c2932a1be3 Hold a wake lock while dozing when display updates are pending.
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
2015-02-20 10:54:09 -08:00
Jeff Sharkey
e76432d715 Merge "Even more lint tests." 2015-02-19 00:49:38 +00:00
Jeff Sharkey
90b547bb50 Even more lint tests.
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
2015-02-18 16:45:58 -08:00
Jeff Sharkey
fb19a6533c Merge "More lint tests." 2015-02-18 01:22:48 +00:00
Jeff Sharkey
b46a9690d5 More lint tests.
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
2015-02-17 17:19:45 -08:00
Deepanshu Gupta
dc630c64be am 0a300b89: am ad879adb: Merge "Add Asset management support for fonts." into lmp-dev automerge: 0684991 automerge: c2fa5e2
automerge: 7bf58d0

* commit '7bf58d0c5523a9b76ab1d570acb92514e8fff8ba':
  Add Asset management support for fonts.
2015-02-17 23:40:11 +00:00
Diego Perez
dde889111f am a0fb87a3: am 98c3461a: Merge "Do not paint shadow if outside of the clip area" into lmp-dev automerge: a912fed automerge: d66f2eb
automerge: 412e643

* commit '412e6439b2d372565f14cc1dce0ff25f106975af':
  Do not paint shadow if outside of the clip area
2015-02-17 23:38:48 +00:00
Deepanshu Gupta
7b78e8373e am 221d7320: am 12c9e498: Merge "Changes made by intelliJ 14.1" into lmp-dev automerge: 4e47416 automerge: f12d023
automerge: 5cc0e76

* commit '5cc0e76464f170d987370bb7bf9c04d746795f12':
  Changes made by intelliJ 14.1
2015-02-17 23:37:13 +00:00
Deepanshu Gupta
7bf58d0c55 am 0a300b89: am ad879adb: Merge "Add Asset management support for fonts." into lmp-dev automerge: 0684991
automerge: c2fa5e2

* commit 'c2fa5e205e617df6b622cb54fac77738e82e6320':
  Add Asset management support for fonts.
2015-02-17 22:39:48 +00:00
Diego Perez
412e6439b2 am a0fb87a3: am 98c3461a: Merge "Do not paint shadow if outside of the clip area" into lmp-dev automerge: a912fed
automerge: d66f2eb

* commit 'd66f2eb241ba8676ef01f4efd23be5ae62d3a7aa':
  Do not paint shadow if outside of the clip area
2015-02-17 22:38:37 +00:00
Deepanshu Gupta
5cc0e76464 am 221d7320: am 12c9e498: Merge "Changes made by intelliJ 14.1" into lmp-dev automerge: 4e47416
automerge: f12d023

* commit 'f12d02339fefc4111b62715d5c0fb2e58570c34b':
  Changes made by intelliJ 14.1
2015-02-17 22:36:59 +00:00
Deepanshu Gupta
0a300b8977 am ad879adb: Merge "Add Asset management support for fonts." into lmp-dev
automerge: 0684991

* commit '068499111c173fdd9869e7dbe5b9de857aca1c2d':
  Add Asset management support for fonts.
2015-02-17 22:21:11 +00:00