105947 Commits

Author SHA1 Message Date
Romain Guy
877cfe0e32 Wrap EGLImage with a C++ API
Change-Id: I0fa3282ea7e2ace3ba2aadd929b32232b3d41628
2013-05-02 17:36:28 -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
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
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
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
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 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
Scott Main
1fbbf8caaf am 4bc82dea: am 47dcb666: dashboard update for 5/1
* commit '4bc82dea43c3e60ce6ad244fdd6b8e61396b1118':
  dashboard update for 5/1
2013-05-01 14:27:12 -07:00
Scott Main
4bc82dea43 am 47dcb666: dashboard update for 5/1
* commit '47dcb66610fbe9284f83f73a06a5c23515e17fbd':
  dashboard update for 5/1
2013-05-01 14:26:05 -07:00
Christopher Tate
3335644f7a Bootstrap installed system apps only when the target user is running
I.e. don't bother trying to send a BOOT_COMPLETED broadcast to the
newly-installed/enabled system app when its host user isn't live.

Also use the static isSystemApp()-type helpers instead of duplicating
those tests locally.

Bug 8594153

Change-Id: I4bd0b86351d67f72c44eae8d1afce6a98f034d31
2013-05-01 14:25:26 -07:00
Tsu Chiang Chuang
85c5f084e5 am e325f13c: am 4e0ae8d6: Merge "Make sure the app is still app after launching. Bug:8755950" into jb-mr2-dev
* commit 'e325f13cf0a06b98e2a638784cd75c0c04f90956':
  Make sure the app is still app after launching. Bug:8755950
2013-05-01 14:18:51 -07:00
Tsu Chiang Chuang
e325f13cf0 am 4e0ae8d6: Merge "Make sure the app is still app after launching. Bug:8755950" into jb-mr2-dev
* commit '4e0ae8d6fdc4646a90949ddf95fd8d1f7a22055a':
  Make sure the app is still app after launching. Bug:8755950
2013-05-01 14:14:01 -07:00
Elliott Hughes
6d82f86fa0 Merge "Show CJK dates as all-numeric in the DatePicker." 2013-05-01 21:12:38 +00:00
Tsu Chiang Chuang
4e0ae8d6fd Merge "Make sure the app is still app after launching. Bug:8755950" into jb-mr2-dev 2013-05-01 21:12:31 +00:00
Elliott Hughes
949e9df25b Show CJK dates as all-numeric in the DatePicker.
Before, we'd have something like 2006 4月12. After, we have 2006 4 12.
The alternative would require using custom NumberPicker.Formatter instances
for the year and day fields in these locales, and that seems significantly
more disruptive.

Bug: 8766552
Change-Id: I568578aae2f80f2acfc53cd277ef3beae6743472
2013-05-01 14:12:05 -07:00
Mike J. Chen
1d507f7b9b am 94264d52: am 2f4cc8ea: Merge "Fix a crash case" into jb-mr2-dev
* commit '94264d522efcc21ac749a6444fbea90916f575c9':
  Fix a crash case
2013-05-01 14:04:59 -07:00
Dmitry Shmidt
3bb591abb7 Merge "framework: When turn off of SoftAp immediately call turning ON SoftAp" 2013-05-01 21:02:36 +00:00
Mike J. Chen
94264d522e am 2f4cc8ea: Merge "Fix a crash case" into jb-mr2-dev
* commit '2f4cc8eacfe819a4f54aa4b0318ad1d31ecc2a40':
  Fix a crash case
2013-05-01 14:02:32 -07:00
Mike J. Chen
2f4cc8eacf Merge "Fix a crash case" into jb-mr2-dev 2013-05-01 20:59:12 +00:00
Adam Koch
155c095502 am 2046a8f1: am 7521541c: am 53e8587b: am 58a6e5c0: am 4f221669: am 1d71751f: am bbed0513: Contacts Provider Training - fix minor code snippet typos.
* commit '2046a8f1572df95bbb46a47d96dab06666d743de':
  Contacts Provider Training - fix minor code snippet typos.
2013-05-01 13:30:50 -07:00
Adam Koch
2046a8f157 am 7521541c: am 53e8587b: am 58a6e5c0: am 4f221669: am 1d71751f: am bbed0513: Contacts Provider Training - fix minor code snippet typos.
* commit '7521541c2a26d29c28c6b1bd60fc4550e5eb5c49':
  Contacts Provider Training - fix minor code snippet typos.
2013-05-01 13:28:37 -07:00
Adam Koch
7521541c2a am 53e8587b: am 58a6e5c0: am 4f221669: am 1d71751f: am bbed0513: Contacts Provider Training - fix minor code snippet typos.
* commit '53e8587bedda3beef34e060f7256261d53f30697':
  Contacts Provider Training - fix minor code snippet typos.
2013-05-01 13:24:40 -07:00
Adam Koch
53e8587bed am 58a6e5c0: am 4f221669: am 1d71751f: am bbed0513: Contacts Provider Training - fix minor code snippet typos.
* commit '58a6e5c0d1406cab6c70b397b0b4252e5da66743':
  Contacts Provider Training - fix minor code snippet typos.
2013-05-01 13:20:21 -07:00
Adam Koch
58a6e5c0d1 am 4f221669: am 1d71751f: am bbed0513: Contacts Provider Training - fix minor code snippet typos.
* commit '4f2216691a3df241977f39102b7eafc68556f477':
  Contacts Provider Training - fix minor code snippet typos.
2013-05-01 13:14:49 -07:00