106015 Commits

Author SHA1 Message Date
Romain Guy
56af3176b9 Merge "Remove warning" 2013-05-03 00:50:50 +00:00
Romain Guy
1212c9dafe Remove warning
Change-Id: Ia1523d02dc2b7f58ca26a142a5aef710792a5f3d
2013-05-02 17:50:23 -07:00
Dianne Hackborn
8d044e8bc2 Start combining threads in system process.
This introduces four generic thread that services can
use in the system process:

- Background: part of the framework for all processes, for
work that is purely background (no timing constraint).
- UI: for time-critical display of UI.
- Foreground: normal foreground work.
- IO: performing IO operations.

I went through and moved services into these threads in the
places I felt relatively comfortable about understanding what
they are doing.  There are still a bunch more we need to look
at -- lots of networking stuff left, 3 or so different native
daemon connectors which I didn't know how much would block,
audio stuff, etc.

Also updated Watchdog to be aware of and check these new
threads, with a new API for other threads to also participate
in this checking.

Change-Id: Ie2f11061cebde5f018d7383b3a910fbbd11d5e11
2013-05-02 17:42:40 -07:00
Romain Guy
7655042e7f Merge "Wrap EGLImage with a C++ API" 2013-05-03 00:39:04 +00:00
Romain Guy
877cfe0e32 Wrap EGLImage with a C++ API
Change-Id: I0fa3282ea7e2ace3ba2aadd929b32232b3d41628
2013-05-02 17:36:28 -07:00
Mathias Agopian
b7446f9ddb Merge "simplify Surface{View} dirty rect handling" 2013-05-02 23:26:26 +00:00
Dianne Hackborn
0c8949db30 am 4c41f6cd: am 856a5a86: Merge "Fix issue #8768456: Settings > App Info under reports..." into jb-mr2-dev
* commit '4c41f6cd1852aaeeb067ad568c3b77a816769d64':
  Fix issue #8768456: Settings > App Info under reports...
2013-05-02 15:17:32 -07:00
Dianne Hackborn
4c41f6cd18 am 856a5a86: Merge "Fix issue #8768456: Settings > App Info under reports..." into jb-mr2-dev
* commit '856a5a860e11a85f8fbb1ad07f6ef444abeafbaf':
  Fix issue #8768456: Settings > App Info under reports...
2013-05-02 15:15:19 -07:00
Christopher Tate
b4997af5cf am 77a66f44: am b8453357: Merge "Send package-changed broadcasts to the correct users" into jb-mr2-dev
* commit '77a66f44590853cce7c58d643b6064ed5974cf03':
  Send package-changed broadcasts to the correct users
2013-05-02 15:14:06 -07:00
Christopher Tate
77a66f4459 am b8453357: Merge "Send package-changed broadcasts to the correct users" into jb-mr2-dev
* commit 'b84533575601133868bf414c526b5b30de3e62c6':
  Send package-changed broadcasts to the correct users
2013-05-02 15:11:52 -07:00
Dianne Hackborn
856a5a860e Merge "Fix issue #8768456: Settings > App Info under reports..." into jb-mr2-dev 2013-05-02 22:11:36 +00:00
Christopher Tate
b845335756 Merge "Send package-changed broadcasts to the correct users" into jb-mr2-dev 2013-05-02 22:08:18 +00:00
Christopher Tate
1e08f5c3b3 Send package-changed broadcasts to the correct users
Also be sure to drop any pending package-changed broadcasts
that are targeted to a now-removed user.

Bug 8594153

Change-Id: Ib14874b4a67b968bbf6ca12ee095c85383aff324
2013-05-02 14:18:51 -07:00
Romain Guy
3b748a44c6 Pack preloaded framework assets in a texture atlas
When the Android runtime starts, the system preloads a series of assets
in the Zygote process. These assets are shared across all processes.
Unfortunately, each one of these assets is later uploaded in its own
OpenGL texture, once per process. This wastes memory and generates
unnecessary OpenGL state changes.

This CL introduces an asset server that provides an atlas to all processes.

Note: bitmaps used by skia shaders are *not* sampled from the atlas.
It's an uncommon use case and would require extra texture transforms
in the GL shaders.

WHAT IS THE ASSETS ATLAS

The "assets atlas" is a single, shareable graphic buffer that contains
all the system's preloaded bitmap drawables (this includes 9-patches.)
The atlas is made of two distinct objects: the graphic buffer that
contains the actual pixels and the map which indicates where each
preloaded bitmap can be found in the atlas (essentially a pair of
x and y coordinates.)

HOW IS THE ASSETS ATLAS GENERATED

Because we need to support a wide variety of devices and because it
is easy to change the list of preloaded drawables, the atlas is
generated at runtime, during the startup phase of the system process.

There are several steps that lead to the atlas generation:

1. If the device is booting for the first time, or if the device was
updated, we need to find the best atlas configuration. To do so,
the atlas service tries a number of width, height and algorithm
variations that allows us to pack as many assets as possible while
using as little memory as possible. Once a best configuration is found,
it gets written to disk in /data/system/framework_atlas

2. Given a best configuration (algorithm variant, dimensions and
number of bitmaps that can be packed in the atlas), the atlas service
packs all the preloaded bitmaps into a single graphic buffer object.

3. The packing is done using Skia in a temporary native bitmap. The
Skia bitmap is then copied into the graphic buffer using OpenGL ES
to benefit from texture swizzling.

HOW PROCESSES USE THE ATLAS

Whenever a process' hardware renderer initializes its EGL context,
it queries the atlas service for the graphic buffer and the map.

It is important to remember that both the context and the map will
be valid for the lifetime of the hardware renderer (if the system
process goes down, all apps get killed as well.)

Every time the hardware renderer needs to render a bitmap, it first
checks whether the bitmap can be found in the assets atlas. When
the bitmap is part of the atlas, texture coordinates are remapped
appropriately before rendering.

Change-Id: I8eaecf53e7f6a33d90da3d0047c5ceec89ea3af0
2013-05-02 13:32:09 -07:00
Dianne Hackborn
ecc8d6f114 Fix issue #8768456: Settings > App Info under reports...
...app storage size for apps w/ .so files

The lib directories are tagged with the apk install number,
so must be explicitly passed down to installd.

Change-Id: Ic37b03726f9a7405eb05956703f8198223b22595
2013-05-02 11:17:15 -07:00
Mike Lockwoood
dd424cf079 Merge "Fix date fields in media database for screenshot files" 2013-05-02 17:28:28 +00:00
Mike Lockwoood
47611240bf Fix date fields in media database for screenshot files
Bug: 8770827
Change-Id: Ib0e8695ab00c58dc77505387a1e31ea693d416e2
2013-05-02 09:24:37 -07:00
Satoshi Kataoka
ed1cdb24ba Change the initial disabled state of disabled IMEs
Bug: 8365223

This change is a supplement for I77f01c70610d82ce9070d4a
The disabled state of disabled pre-installed imes should be changed
to ENABLED_STATE_DISABLED_UNTIL_USED on boot or user switch.

Change-Id: If8ff1b2b95c36d33148def2ab87bd006aa520cc0
2013-05-02 17:53:17 +09:00
Amith Yamasani
821b58a93d am f5a553a4: am 55a08c5a: Merge "Allow requiredForAllUsers to work on updates to system apps" into jb-mr2-dev
* commit 'f5a553a4278a68fda9795dea759840d4f93546d7':
  Allow requiredForAllUsers to work on updates to system apps
2013-05-01 21:28:18 -07:00
Amith Yamasani
f5a553a427 am 55a08c5a: Merge "Allow requiredForAllUsers to work on updates to system apps" into jb-mr2-dev
* commit '55a08c5ab91014eb42ecdc9e7039c7bae1f00058':
  Allow requiredForAllUsers to work on updates to system apps
2013-05-01 21:27:14 -07:00
Amith Yamasani
55a08c5ab9 Merge "Allow requiredForAllUsers to work on updates to system apps" into jb-mr2-dev 2013-05-02 04:26:01 +00:00
quddusc
e4fde740c5 docs: Added landing page for Google Play Games Platform Services.
cherrypick from jb-mr1-dev docs:  Play Games changes Change-Id: I5117db8511907e05ddc84005bf6903251de46f71

Change-Id: I0e5e2c69fc0d13b0637504e5fd3e76c1a91a0109
2013-05-01 18:27:39 -07:00
Jeff Sharkey
9cbe2ae3ae Merge "Unhide extra to fix docs build." 2013-05-02 01:15:25 +00:00
Jeff Sharkey
9ab3fd4565 Unhide extra to fix docs build.
Change-Id: Ib757b5d62e6ff7f4623680fb5faba337de46aa02
2013-05-01 18:14:16 -07:00
Jeff Brown
fed9c11a99 am f2930d78: am c3112608: Merge "Don\'t dump sql bindargs unless verbose mode is requested." into jb-mr2-dev
* commit 'f2930d783ac52d89cc8fc6db3bed7989544a9cbc':
  Don't dump sql bindargs unless verbose mode is requested.
2013-05-01 17:57:15 -07:00
Jeff Brown
f2930d783a am c3112608: Merge "Don\'t dump sql bindargs unless verbose mode is requested." into jb-mr2-dev
* commit 'c31126088fea61a9b5ba6cdb1fd2791e86800a8a':
  Don't dump sql bindargs unless verbose mode is requested.
2013-05-01 17:54:34 -07:00
Jeff Brown
c31126088f Merge "Don't dump sql bindargs unless verbose mode is requested." into jb-mr2-dev 2013-05-02 00:52:26 +00:00
Jeff Sharkey
037db6cfd0 Merge "External storage provider, document picker UI." 2013-05-02 00:46:46 +00:00
Jeff Sharkey
9e0036ed7d External storage provider, document picker UI.
Continuing to flesh out storage backends by adding an external
storage document backend.  Still rough, but it can traverse files
and directories.

Early pass at OPEN/CREATE_DOC picker UI, which offers to traverse
any known storage backends.  Supports opening subdirectories and
returning a picked file.

Change-Id: Idc3554036b3816a93d9b465ee8a620746859d2ae
2013-05-01 17:44:42 -07:00
Jeff Sharkey
863b117a3a Merge "Start fleshing out new storage APIs." 2013-05-02 00:22:10 +00:00
Jeff Sharkey
9ecfee03fa Start fleshing out new storage APIs.
Introduces new DocumentsContract which storage backends must
implement.  Backends surface a simple directory-like organizational
structure that enables a document to appear at multiple locations in
that hierarchy.  Querying a document or the contents of a directory
will return a Cursor populated with DocumentColumns, which includes
simple metadata.

Adds new OPEN_DOC and CREATE_DOC Intents, and permission to protect
storage backends.

Change-Id: Ib4984bc980182b2cedbe552908e5be94604ef085
2013-05-01 17:21:06 -07:00
Michael Wright
475fe218ea Merge "Dump system server stack trace on watchdog failure" 2013-05-02 00:18:13 +00:00
Michael Wright
56a6c66158 Dump system server stack trace on watchdog failure
Change-Id: Ia70b116b789a51c4fbdd31348f127685f20f7500
2013-05-01 17:15:56 -07:00
Craig Mautner
e418ecd129 Propagate the return-to-home flag to next task.
If a task is supposed to launch home when it finishes but then
launches another task and finishes itself, then the new task must
launch home when it finishes.

Fixes bug 8778263.

Change-Id: I6495f6c2e99a906217e73b7b6dcae8ecff435e5f
2013-05-01 17:02:29 -07:00
Christopher Tate
7abc275e80 am bd5fca23: am eed8411c: Merge "Bootstrap installed system apps only when the target user is running" into jb-mr2-dev
* commit 'bd5fca23e12f2a3491ea63e5761a5897f084d689':
  Bootstrap installed system apps only when the target user is running
2013-05-01 15:53:17 -07:00
Christopher Tate
bd5fca23e1 am eed8411c: Merge "Bootstrap installed system apps only when the target user is running" into jb-mr2-dev
* commit 'eed8411c8cc1f163ba06a928e3b4b6d3f1045282':
  Bootstrap installed system apps only when the target user is running
2013-05-01 15:50:42 -07:00
Christopher Tate
eed8411c8c Merge "Bootstrap installed system apps only when the target user is running" into jb-mr2-dev 2013-05-01 22:47:16 +00:00
Amith Yamasani
0d8750d771 Allow requiredForAllUsers to work on updates to system apps
Bug: 8736380

Also set the default type as the constructor docs imply in RestrictionEntry.

Change-Id: I446504fad8822804d68f09b45ef62f6d79c4b8df
2013-05-01 15:31:49 -07:00
Jeff Brown
cefeb29d53 Don't dump sql bindargs unless verbose mode is requested.
Bug: 8780126
Change-Id: I88e238f9d684cc76731207e75370cbb2e0e476c5
2013-05-01 15:28:37 -07:00
Jeff Brown
fc0ebd7d37 Really make Surface thread-safe.
There were many places where the native object was being
accessed improperly.  Also some places where CloseGuard might
not be acquired or released correctly or where the generation
count might not be updated.

Fixed them all.

That said, Surface isn't intended to be used concurrently
so please don't do it.  This is only intended to make
hard to find crashes less likely.

Bug: 8328715
Change-Id: I981ef33425823e0fd7ad6b64443f2ec9b0c8335e
2013-05-01 15:28:01 -07:00
Jeff Tinker
e0eb0e9063 am 9ba564c7: am 48f2b548: Merge "MediaDrm API: Add two exceptions to handle error path scenarios" into jb-mr2-dev
* commit '9ba564c7e205c4b278be61eec773a90a94451251':
  MediaDrm API: Add two exceptions to handle error path scenarios
2013-05-01 15:04:36 -07:00
Jeff Tinker
9ba564c7e2 am 48f2b548: Merge "MediaDrm API: Add two exceptions to handle error path scenarios" into jb-mr2-dev
* commit '48f2b548edf8e276cc89d2c4c2d2936cde46fc95':
  MediaDrm API: Add two exceptions to handle error path scenarios
2013-05-01 15:03:20 -07:00
Jeff Tinker
48f2b548ed Merge "MediaDrm API: Add two exceptions to handle error path scenarios" into jb-mr2-dev 2013-05-01 22:01:16 +00:00
Elliott Hughes
c3bc1b671e am c255800f: am 6d82f86f: Merge "Show CJK dates as all-numeric in the DatePicker."
* commit 'c255800fb0f46ea5f68d2c145605ac7dcd3a89b6':
  Show CJK dates as all-numeric in the DatePicker.
2013-05-01 14:56:59 -07:00
Elliott Hughes
c255800fb0 am 6d82f86f: Merge "Show CJK dates as all-numeric in the DatePicker."
* commit '6d82f86fa01800ee0523743366e0dc1113178fd9':
  Show CJK dates as all-numeric in the DatePicker.
2013-05-01 14:53:28 -07:00
Scott Main
0c44bab3a4 am f7ae746a: am b9e757c8: am 66623196: am 95fa4428: am 1fbbf8ca: am 4bc82dea: am 47dcb666: dashboard update for 5/1
* commit 'f7ae746a157b65dbc3003f0b18679f1acd9e740f':
  dashboard update for 5/1
2013-05-01 14:37:08 -07:00
Scott Main
f7ae746a15 am b9e757c8: am 66623196: am 95fa4428: am 1fbbf8ca: am 4bc82dea: am 47dcb666: dashboard update for 5/1
* commit 'b9e757c8044697c6675a969859940beb5dae6358':
  dashboard update for 5/1
2013-05-01 14:35:05 -07:00
Scott Main
b9e757c804 am 66623196: am 95fa4428: am 1fbbf8ca: am 4bc82dea: am 47dcb666: dashboard update for 5/1
* commit '66623196159ec4509e617cd440199499b483367a':
  dashboard update for 5/1
2013-05-01 14:31:44 -07:00
Scott Main
6662319615 am 95fa4428: am 1fbbf8ca: am 4bc82dea: am 47dcb666: dashboard update for 5/1
* commit '95fa4428172ae6c0435c20bf8ab49734e95c9eb8':
  dashboard update for 5/1
2013-05-01 14:30:33 -07:00
Scott Main
95fa442817 am 1fbbf8ca: am 4bc82dea: am 47dcb666: dashboard update for 5/1
* commit '1fbbf8caaf5bb3c796fa2acacedfb7a3be4d0c73':
  dashboard update for 5/1
2013-05-01 14:28:40 -07:00