119603 Commits

Author SHA1 Message Date
Jeff Brown
07e6d1b9a5 Merge "Add a new "doze mode" based on Dream components." into klp-modular-dev 2014-02-20 21:43:43 +00:00
Jeff Brown
2687550272 Add a new "doze mode" based on Dream components.
When a doze component has been specified in a config.xml resource
overlay, the power manager will try to start a preconfigured dream
whenever it would have otherwise gone to sleep and turned the
screen off.  The dream should render whatever it intends to show
then call startDozing() to tell the power manager to put the display
into a low power "doze" state and allow the application processor
to be suspended.  The dream may wake up periodically using the
alarm manager or other features to update the contents of the display.

Added several new config.xml resources related to dreams and dozing.
In particular for dozing there are two new resources that pertain to
decoupling auto-suspend mode and interactive mode from the display
state.  This is a requirement to enable the application processor
and other components to be suspended while dozing.  Most devices
do not support these features today.

Consolidated the power manager's NAPPING and DREAMING states into one
to simplify the logic.  The NAPPING state was mostly superfluous
and simply indicated that the power manager should attempt to start
a new dream.  This state is now tracked in the mSandmanSummoned field.

Added a new DOZING state which is analoguous to DREAMING.  The normal
state transition is now: AWAKE -> DREAMING -> DOZING -> ASLEEP.
The PowerManager.goToSleep() method now enters the DOZING state instead
of immediately going to sleep.

While in the doze state, the screen remains on.  However, we actually
tell the rest of the system that the screen is off.  This is somewhat
unfortunate but much of the system makes inappropriate assumptions
about what it means for the screen to be on or off.  In particular,
screen on is usually taken to indicate an interactive state where
the user is present but that's not at all true for dozing (and is
only sometimes true while dreaming).  We will probably need to add
some more precise externally visible states at some point.

The DozeHardware interface encapsulates a generic microcontroller
interface to allow a doze dream for off-loading rendering or other
functions while dozing.  If the device possesses an MCU HAL for dozing
then it is exposed to the DreamService here.

Removed a number of catch blocks in DreamService that caught Throwable
and attempted to cause the dream to finish itself.  We actually just
want to let the process crash.  Cleanup will happen automatically if
needed.  Catching these exceptions results in mysterious undefined
behavior and broken dreams.

Bug: 12494706
Change-Id: Ie78336b37dde7250d1ce65b3d367879e3bfb2b8b
2014-02-20 13:39:13 -08:00
Baligh Uddin
ea17c6365f am 4292ce5d: (-s ours) am 810267c3: (-s ours) am 28009e81: (-s ours) Merge "Import translations. DO NOT MERGE" into klp-dev
* commit '4292ce5d0023551a6fa7a02b284bf9b02823b06b':
  Import translations. DO NOT MERGE
2014-02-20 18:39:46 +00:00
Baligh Uddin
701449e853 am c9443fc5: (-s ours) am 8ca432c7: (-s ours) am c2803d47: (-s ours) Merge "Import translations. DO NOT MERGE" into klp-dev
* commit 'c9443fc54caa789c4e3c64e7d9feaee8ac00506f':
  Import translations. DO NOT MERGE
2014-02-20 18:39:43 +00:00
Baligh Uddin
4292ce5d00 am 810267c3: (-s ours) am 28009e81: (-s ours) Merge "Import translations. DO NOT MERGE" into klp-dev
* commit '810267c309f018c5b58b0a2e787b8a6434faa0e0':
  Import translations. DO NOT MERGE
2014-02-20 18:36:38 +00:00
Baligh Uddin
c9443fc54c am 8ca432c7: (-s ours) am c2803d47: (-s ours) Merge "Import translations. DO NOT MERGE" into klp-dev
* commit '8ca432c7828d5d3d00c721b195a4ecb59564bbb7':
  Import translations. DO NOT MERGE
2014-02-20 18:36:35 +00:00
Baligh Uddin
810267c309 am 28009e81: (-s ours) Merge "Import translations. DO NOT MERGE" into klp-dev
* commit '28009e8102aa91294362cc2d7770cab73d02e640':
  Import translations. DO NOT MERGE
2014-02-20 18:33:18 +00:00
Baligh Uddin
8ca432c782 am c2803d47: (-s ours) Merge "Import translations. DO NOT MERGE" into klp-dev
* commit 'c2803d473ad180fa70e5000f0607795c92c4035d':
  Import translations. DO NOT MERGE
2014-02-20 18:33:13 +00:00
Baligh Uddin
28009e8102 Merge "Import translations. DO NOT MERGE" into klp-dev 2014-02-20 18:31:03 +00:00
Baligh Uddin
c2803d473a Merge "Import translations. DO NOT MERGE" into klp-dev 2014-02-20 18:30:49 +00:00
Baligh Uddin
50d0afa43a am 2f5347ee: (-s ours) am 1af20cc5: (-s ours) am 554b43a0: (-s ours) Merge "Import translations. DO NOT MERGE" into klp-dev
* commit '2f5347ee46766134848586d67d2dd86bdc9d1952':
  Import translations. DO NOT MERGE
2014-02-20 18:10:15 +00:00
Baligh Uddin
2f5347ee46 am 1af20cc5: (-s ours) am 554b43a0: (-s ours) Merge "Import translations. DO NOT MERGE" into klp-dev
* commit '1af20cc5764a38d0713a292fd63bf6a628f2f5eb':
  Import translations. DO NOT MERGE
2014-02-20 18:07:02 +00:00
Baligh Uddin
749e6b9cf2 am 5da96060: (-s ours) am f887a67d: (-s ours) am aa20b274: (-s ours) Merge "Import translations. DO NOT MERGE" into klp-dev
* commit '5da96060e61c3076d0a5cbd87a3f17254414afeb':
  Import translations. DO NOT MERGE
2014-02-20 18:06:24 +00:00
Baligh Uddin
bf2226ec7f am 8b297fb6: (-s ours) am 8027100f: (-s ours) am e9adafd1: (-s ours) Merge "Import translations. DO NOT MERGE" into klp-dev
* commit '8b297fb6ef42650a1126287aa0b610aa9a503167':
  Import translations. DO NOT MERGE
2014-02-20 18:06:21 +00:00
Baligh Uddin
699991c8a2 am 08394af2: (-s ours) am e69b7b34: (-s ours) am 46a02249: (-s ours) Merge "Import translations. DO NOT MERGE" into klp-dev
* commit '08394af265b02db7a76c4f4f4ae16b9d238e7580':
  Import translations. DO NOT MERGE
2014-02-20 18:06:17 +00:00
Baligh Uddin
1af20cc576 am 554b43a0: (-s ours) Merge "Import translations. DO NOT MERGE" into klp-dev
* commit '554b43a066b6a084dbb9b7dba014de4b12ba1175':
  Import translations. DO NOT MERGE
2014-02-20 18:03:38 +00:00
Baligh Uddin
5da96060e6 am f887a67d: (-s ours) am aa20b274: (-s ours) Merge "Import translations. DO NOT MERGE" into klp-dev
* commit 'f887a67dbd1fd22c16cadc58b8f23bfd4eeba4ef':
  Import translations. DO NOT MERGE
2014-02-20 18:03:07 +00:00
Baligh Uddin
8b297fb6ef am 8027100f: (-s ours) am e9adafd1: (-s ours) Merge "Import translations. DO NOT MERGE" into klp-dev
* commit '8027100fdb13c046838f9af12ef7bf2bc3ad511f':
  Import translations. DO NOT MERGE
2014-02-20 18:03:05 +00:00
Baligh Uddin
08394af265 am e69b7b34: (-s ours) am 46a02249: (-s ours) Merge "Import translations. DO NOT MERGE" into klp-dev
* commit 'e69b7b3474c356438fbd65e43438e72ebda0bacb':
  Import translations. DO NOT MERGE
2014-02-20 18:03:02 +00:00
Baligh Uddin
f887a67dbd am aa20b274: (-s ours) Merge "Import translations. DO NOT MERGE" into klp-dev
* commit 'aa20b27472552ebc812dfbb3cbe260115ee43db1':
  Import translations. DO NOT MERGE
2014-02-20 17:59:50 +00:00
Baligh Uddin
8027100fdb am e9adafd1: (-s ours) Merge "Import translations. DO NOT MERGE" into klp-dev
* commit 'e9adafd1b95a7934bb813cb168e33a85a762a504':
  Import translations. DO NOT MERGE
2014-02-20 17:59:47 +00:00
Baligh Uddin
e69b7b3474 am 46a02249: (-s ours) Merge "Import translations. DO NOT MERGE" into klp-dev
* commit '46a02249d7bde3fb88cc5312f88dab6d1690e20e':
  Import translations. DO NOT MERGE
2014-02-20 17:59:45 +00:00
Baligh Uddin
554b43a066 Merge "Import translations. DO NOT MERGE" into klp-dev 2014-02-20 17:59:40 +00:00
Baligh Uddin
aa20b27472 Merge "Import translations. DO NOT MERGE" into klp-dev 2014-02-20 17:55:33 +00:00
Baligh Uddin
e9adafd1b9 Merge "Import translations. DO NOT MERGE" into klp-dev 2014-02-20 17:55:23 +00:00
Baligh Uddin
46a02249d7 Merge "Import translations. DO NOT MERGE" into klp-dev 2014-02-20 17:55:13 +00:00
Xavier Ducrohet
9edf7a1159 am 2cb9147f: am 55542ee6: am 3e637042: Merge "Set default text style in layoutlib as NORMAL [DO NOT MERGE]" into klp-dev
* commit '2cb9147fc49e6474eaf30fd833e43df10e42b899':
  Set default text style in layoutlib as NORMAL [DO NOT MERGE]
2014-02-20 17:49:32 +00:00
Deepanshu Gupta
65521c3cf1 am ca4b9a77: am e92c8542: am 01825b7a: Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
* commit 'ca4b9a77e7d20703287b33b203b2582bd43f7792':
  Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
2014-02-20 17:49:27 +00:00
Xavier Ducrohet
2cb9147fc4 am 55542ee6: am 3e637042: Merge "Set default text style in layoutlib as NORMAL [DO NOT MERGE]" into klp-dev
* commit '55542ee6449bd580f61bc005726b5c87773fbe25':
  Set default text style in layoutlib as NORMAL [DO NOT MERGE]
2014-02-20 17:46:05 +00:00
Deepanshu Gupta
ca4b9a77e7 am e92c8542: am 01825b7a: Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
* commit 'e92c8542a5cf1160a1b701b9f176af64ba46d68d':
  Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
2014-02-20 17:46:02 +00:00
Xavier Ducrohet
55542ee644 am 3e637042: Merge "Set default text style in layoutlib as NORMAL [DO NOT MERGE]" into klp-dev
* commit '3e6370425ea3ac4e5d89ce042512913062212ccc':
  Set default text style in layoutlib as NORMAL [DO NOT MERGE]
2014-02-20 17:42:58 +00:00
Deepanshu Gupta
e92c8542a5 am 01825b7a: Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
* commit '01825b7aa3c864426c78c08c2f6004a8362c2b47':
  Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
2014-02-20 17:42:54 +00:00
Xavier Ducrohet
3e6370425e Merge "Set default text style in layoutlib as NORMAL [DO NOT MERGE]" into klp-dev 2014-02-20 17:41:08 +00:00
Justin Koh
744d3473f8 Merge "Add hardware feature describing a watch." into klp-modular-dev 2014-02-20 17:38:03 +00:00
Baligh Uddin
6fb89ba641 Import translations. DO NOT MERGE
Change-Id: I9accaa37043e730ad6ec4aa98901a48e0858b132
Auto-generated-cl: translation import
2014-02-19 22:16:02 -08:00
Baligh Uddin
dab7a9ed70 Import translations. DO NOT MERGE
Change-Id: I0c823200179a75e0444f6e86ecc6813a6e662fa0
Auto-generated-cl: translation import
2014-02-19 22:08:21 -08:00
Baligh Uddin
b3425a65aa Import translations. DO NOT MERGE
Change-Id: If9205c555286daf7dea68702d2da39752b59def4
Auto-generated-cl: translation import
2014-02-19 19:42:43 -08:00
Baligh Uddin
da799ef3a0 Import translations. DO NOT MERGE
Change-Id: I31e5b7b7aa453a0455fd31eca6a11520730a26a7
Auto-generated-cl: translation import
2014-02-19 18:54:52 -08:00
Baligh Uddin
69046bb06c Import translations. DO NOT MERGE
Change-Id: I3003f43c32943496e855ba2744a7492232dbd56b
Auto-generated-cl: translation import
2014-02-19 18:49:33 -08:00
Baligh Uddin
8807558c32 Import translations. DO NOT MERGE
Change-Id: I3300523019b91cffd6f36d02434c521ab7368f37
Auto-generated-cl: translation import
2014-02-19 18:45:30 -08:00
Scott Main
d43ad2f35a am 4c68c4ed: am 24a8e1d0: am af87e19b: Merge "update intent examples for maps bug: 12661490 bug: 12957723" into klp-docs
* commit '4c68c4ed463f7f83d05f86ed11046195829028ed':
  update intent examples for maps bug: 12661490 bug: 12957723
2014-02-20 02:23:52 +00:00
Scott Main
4c68c4ed46 am 24a8e1d0: am af87e19b: Merge "update intent examples for maps bug: 12661490 bug: 12957723" into klp-docs
* commit '24a8e1d0e9a32c571403bfc730ce18dd138a529c':
  update intent examples for maps bug: 12661490 bug: 12957723
2014-02-20 02:20:30 +00:00
Scott Main
24a8e1d0e9 am af87e19b: Merge "update intent examples for maps bug: 12661490 bug: 12957723" into klp-docs
* commit 'af87e19bdbf6b16240dcdbfd31fe4f33eca4e51d':
  update intent examples for maps bug: 12661490 bug: 12957723
2014-02-20 02:17:20 +00:00
Scott Main
af87e19bdb Merge "update intent examples for maps bug: 12661490 bug: 12957723" into klp-docs 2014-02-20 02:14:40 +00:00
Scott Main
8ad4275640 update intent examples for maps
bug: 12661490
bug: 12957723

Change-Id: Ice25ef430901b155c00d59402c5f9f50dcb48390
2014-02-19 18:08:33 -08:00
Deepanshu Gupta
01825b7aa3 Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
For these font families, text was always rendered as italic. This
changeset fixes the issue.

Bug: http://b.android.com/57221
Change-Id: Ic8a299bd1e555f5bb914cd3d2fe72917ec7f471a
(cherry picked from commit e327212adde1136807bbdf052e8cc3861f8a6aba)
2014-02-19 20:17:47 +00:00
Deepanshu Gupta
13aea18b34 Set default text style in layoutlib as NORMAL [DO NOT MERGE]
If a style doesn't specify text style (normal/bold/italic/bold-italic)
then default to normal instead of throwing an error.

Bug: http://b.android.com/61358
Change-Id: I0138c73807a5ff6e4d938a99ece3044333110aa1
(cherry picked from commit 0acfb16dcd95468fe032204f54618e86becfd1eb)
2014-02-19 20:17:00 +00:00
Adam Lesinski
4b07b26e86 Merge "Make UsbService optional" into klp-modular-dev 2014-02-19 19:38:34 +00:00
Adam Lesinski
6feaa267a5 Merge "Add fastpath for single signature comparison" into klp-modular-dev 2014-02-19 19:38:17 +00:00
Mike Lockwood
c62f918e0e UsbDeviceManager: Fix race condition entering USB accessory mode
When switching USB modes there are often spurious connect and disconnect events
that occur before reenumeration is complete.  There is currently a 1000ms timer
to "debounce" the disconnect events. But with some USB accessories, this timeout
is not long enough, which results in an endless cycle of attempts to enter
USB accessory mode when the phone is connected.

To fix this, we now wait up to 10 seconds for the host to successfully configure
the device when entering USB accessory mode before giving up.
This is separate from the existing debounce timer, so the behavior of the
USB state change broadcasts are not affected.

Bug: 12877769
Change-Id: I7aa61f8a618546d749a7ddfc97bf103029a73d03
2014-02-19 11:23:19 -08:00