OSDN Git Service

android-x86/frameworks-base.git
10 years agoMerge "Tethering: Skip link local addresses when enabling NAT"
Jeff Sharkey [Tue, 18 Feb 2014 17:11:09 +0000 (17:11 +0000)]
Merge "Tethering: Skip link local addresses when enabling NAT"

10 years agoMerge "Fix, MountService now only sends one onShutDownComplete"
Jeff Sharkey [Tue, 18 Feb 2014 17:10:02 +0000 (17:10 +0000)]
Merge "Fix, MountService now only sends one onShutDownComplete"

10 years agoMerge "Move Json{Reader,Writer} test to cts."
Narayan Kamath [Mon, 17 Feb 2014 18:20:33 +0000 (18:20 +0000)]
Merge "Move Json{Reader,Writer} test to cts."

10 years agoMove Json{Reader,Writer} test to cts.
Narayan Kamath [Mon, 17 Feb 2014 17:51:43 +0000 (17:51 +0000)]
Move Json{Reader,Writer} test to cts.

These tests aren't really run automatically (or perhaps
even manually) in their present location, and increasing
CTS coverage is never a bad thing.

Change-Id: I81cce1211021011dca551fde62e725e177ca4df0

10 years agoMerge "Extended locales in AAPT / AssetManager."
Narayan Kamath [Mon, 17 Feb 2014 11:00:29 +0000 (11:00 +0000)]
Merge "Extended locales in AAPT / AssetManager."

10 years agoMerge "AssetManager support for 3 letter lang/country codes."
Narayan Kamath [Mon, 17 Feb 2014 11:00:14 +0000 (11:00 +0000)]
Merge "AssetManager support for 3 letter lang/country codes."

10 years agoMerge "Fix destruction issues relating to AllocationAdapter."
Tim Murray [Fri, 14 Feb 2014 23:50:08 +0000 (23:50 +0000)]
Merge "Fix destruction issues relating to AllocationAdapter."

10 years agoFix destruction issues relating to AllocationAdapter.
Tim Murray [Wed, 12 Feb 2014 19:16:17 +0000 (11:16 -0800)]
Fix destruction issues relating to AllocationAdapter.

bug 12971201

Change-Id: I3d9f66f527a35837ac866a695bdcc41d908a2562

10 years agoMerge "Check the return value of listFiles on the ifw directory"
Ben Gruver [Fri, 14 Feb 2014 21:15:49 +0000 (21:15 +0000)]
Merge "Check the return value of listFiles on the ifw directory"

10 years agoCheck the return value of listFiles on the ifw directory
Ben Gruver [Tue, 1 Oct 2013 00:03:34 +0000 (17:03 -0700)]
Check the return value of listFiles on the ifw directory

listFiles can return null if the directory doesn't exist

Bug: 10497143
Change-Id: Ie4cbdf18a259a9641669a4e6b9bf49b4879acc67

10 years agoMerge "Add hidden minor version ID for support lib workarounds."
Tim Murray [Fri, 14 Feb 2014 20:47:33 +0000 (20:47 +0000)]
Merge "Add hidden minor version ID for support lib workarounds."

10 years agoExtended locales in AAPT / AssetManager.
Narayan Kamath [Tue, 21 Jan 2014 15:32:36 +0000 (15:32 +0000)]
Extended locales in AAPT / AssetManager.

Support 3 letter language codes, script codes &
variants. The bulk of the changes are related to
the implementation of command line filtering of
locales etc. The previous code assumed that the
value of each "axis" (locale, density, size etc.)
could be represented by a 4 byte type. This is
no longer the case.

This change introduces a new class, AaptLocaleValue
which holds a (normalized) locale parsed from a
directory name or a filter string. This class takes
responsibility for parsing locales as well as
writing them to ResTable_config structures, which is
their representation in the resource table.

This includes minor changes at the java / JNI level
for AssetManager. We now call locale.toLanguageTag()
to give the native layer a well formed BCP-47 tag.
I've removed some duplicated parsing code in
AssetManager.cpp and replaced them with functions on
ResTable_config. The native getLocales function has
been changed to return well formed BCP-47 locales as
well, so that the corresponding java function can use
Locale.forLanguageTag to construct a Locale object
out of it.

Finally, this change introduces default and copy
constructors for ResTable_config to prevent having
to memset() the associated memory to 0 on every
stack allocation.

(cherry-picked from commit 91447d88f2bdf9c2bf8d1a53570efef6172fba74)

Change-Id: I1b43086860661012f949fb8e5deb7df44519b854

10 years agoAssetManager support for 3 letter lang/country codes.
Narayan Kamath [Mon, 20 Jan 2014 13:57:11 +0000 (13:57 +0000)]
AssetManager support for 3 letter lang/country codes.

- 3 letter codes are packed into the existing 32 bit locale
  field in ResTable_config
- We introduce new fields for script / variant information.

Note that we define a "match" between two ResTable_config
structures to be purely on the basis of their language &
country (disregarding the script and the variant). However,
configs with scripts and variants are considered to be more
specific than those without.

(cherry picked from commit 378c6775a62d9c461cde51f06c1b14bb014c78fd)

Change-Id: I7dce82a3fe2412834252723f458826ae41535a78

10 years agoMerge "AArch64: Use long for pointers in SurfaceSession class"
Narayan Kamath [Fri, 14 Feb 2014 13:10:43 +0000 (13:10 +0000)]
Merge "AArch64: Use long for pointers in SurfaceSession class"

10 years agoMerge "frameworks/base: move idmap from frameworks/native"
Dianne Hackborn [Fri, 14 Feb 2014 01:45:12 +0000 (01:45 +0000)]
Merge "frameworks/base: move idmap from frameworks/native"

10 years agoMerge "Telephony: Handle DATA_CALL_LIST in DCC."
Wink Saville [Thu, 13 Feb 2014 23:37:03 +0000 (23:37 +0000)]
Merge "Telephony: Handle DATA_CALL_LIST in DCC."

10 years agoMerge "Telephony API extension v2"
Wink Saville [Thu, 13 Feb 2014 04:26:33 +0000 (04:26 +0000)]
Merge "Telephony API extension v2"

10 years agoMerge "Convert all selinux_android_restorecon and _setfilecon calls to new API."
Nick Kralevich [Wed, 12 Feb 2014 23:09:37 +0000 (23:09 +0000)]
Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."

10 years agoMerge "Finish fixing Zygote descriptor leakage problem"
Dave Platt [Wed, 12 Feb 2014 23:03:48 +0000 (23:03 +0000)]
Merge "Finish fixing Zygote descriptor leakage problem"

10 years agoMerge "Fix build."
Narayan Kamath [Wed, 12 Feb 2014 17:26:57 +0000 (17:26 +0000)]
Merge "Fix build."

10 years agoMerge "Improve Parcel's handling of non-primitive arrays"
Paul Duffin [Wed, 12 Feb 2014 10:27:13 +0000 (10:27 +0000)]
Merge "Improve Parcel's handling of non-primitive arrays"

10 years agoFix build.
Dianne Hackborn [Tue, 11 Feb 2014 21:56:21 +0000 (13:56 -0800)]
Fix build.

At least part of what is broken.  Other stuff still seems to be.

(cherry picked from 32bb5fae353b5bb6275e75952e89c514c7369cee)

Change-Id: I280376645166fe772ff7a31ff2e8494dce2adbf8

10 years agoMerge "Use size_t* in AssetManager::createIdmap"
Narayan Kamath [Wed, 12 Feb 2014 09:32:16 +0000 (09:32 +0000)]
Merge "Use size_t* in AssetManager::createIdmap"

10 years agoframeworks/base: move idmap from frameworks/native
Colin Cross [Wed, 12 Feb 2014 02:04:44 +0000 (18:04 -0800)]
frameworks/base: move idmap from frameworks/native

idmap depends on libandroidfw, so it should go in frameworks/base.

Change-Id: I3c1db3baa355f53d6b523d60f4377e63eff00c30

10 years agoUse size_t* in AssetManager::createIdmap
Colin Cross [Wed, 12 Feb 2014 02:02:06 +0000 (18:02 -0800)]
Use size_t* in AssetManager::createIdmap

ResTable::createIdmap takes a size_t*, and the idmap command is
passing in a size_t*, make AssetManager::createIdmap take a
size_t*.  Should fix the mac build.

Change-Id: Idc16dedfe2aa7367c75f89a937a8242d494e8f8e

10 years agoMerge "Runtime resource overlay, iteration 2, test cases"
Dianne Hackborn [Tue, 11 Feb 2014 21:30:08 +0000 (21:30 +0000)]
Merge "Runtime resource overlay, iteration 2, test cases"

10 years agoMerge "Runtime resource overlay, iteration 2"
Dianne Hackborn [Tue, 11 Feb 2014 21:29:58 +0000 (21:29 +0000)]
Merge "Runtime resource overlay, iteration 2"

10 years agoMerge "New command line tool 'idmap'"
Dianne Hackborn [Tue, 11 Feb 2014 20:30:07 +0000 (20:30 +0000)]
Merge "New command line tool 'idmap'"

10 years agoImprove Parcel's handling of non-primitive arrays
Paul Duffin [Mon, 3 Feb 2014 15:02:17 +0000 (15:02 +0000)]
Improve Parcel's handling of non-primitive arrays

Treat arrays other than actual Object arrays (i.e. those whose component type
is actually Object) and the primitive arrays already handled specially by
Parcel as Serializable's.

Issue: 64583
Change-Id: I3ff797f3262e77e4de27f35709bceee5410d1ed4

10 years agoMerge "Use long to store pointers in GLES_JNI/EGL classes"
Narayan Kamath [Tue, 11 Feb 2014 15:39:04 +0000 (15:39 +0000)]
Merge "Use long to store pointers in GLES_JNI/EGL classes"

10 years agoMerge "Fix in MediaMuxer's JNI code"
Narayan Kamath [Tue, 11 Feb 2014 14:33:38 +0000 (14:33 +0000)]
Merge "Fix in MediaMuxer's JNI code"

10 years agoMerge "Use long to store pointers in ConsumerIrService"
Narayan Kamath [Tue, 11 Feb 2014 14:29:09 +0000 (14:29 +0000)]
Merge "Use long to store pointers in ConsumerIrService"

10 years agoMerge "Use long for pointers in EmojiFactory and PdfDocument"
Narayan Kamath [Tue, 11 Feb 2014 14:07:16 +0000 (14:07 +0000)]
Merge "Use long for pointers in EmojiFactory and PdfDocument"

10 years agoMerge "Fix TinyHashMap to use generic hash_type instead of hash_t"
Narayan Kamath [Tue, 11 Feb 2014 13:40:37 +0000 (13:40 +0000)]
Merge "Fix TinyHashMap to use generic hash_type instead of hash_t"

10 years agoMerge "Generic object based data copy."
Tim Murray [Mon, 10 Feb 2014 23:27:05 +0000 (23:27 +0000)]
Merge "Generic object based data copy."

10 years agoGeneric object based data copy.
Jason Sams [Tue, 26 Nov 2013 02:28:33 +0000 (18:28 -0800)]
Generic object based data copy.

This change consolidates the copy paths to Object based.
The runtime now uses reflection to identify the type of
array present.  This adds support for long/double and reduces
the amount of code present.  We could also support arrays of vectors
or objects in the future with this mechanism.

Change-Id: I2297c1c01fbe6a64c375d6368f25d7db781ea788

10 years agoMerge "frameworks/base: fix errors inside ALOGV"
Colin Cross [Mon, 10 Feb 2014 22:02:50 +0000 (22:02 +0000)]
Merge "frameworks/base: fix errors inside ALOGV"

10 years agoFix, MountService now only sends one onShutDownComplete
Rickard Helldin [Fri, 7 Feb 2014 08:35:04 +0000 (09:35 +0100)]
Fix, MountService now only sends one onShutDownComplete

The event onShutDownComplete are sent only when all
volumes are shutdown. (Not one for every volume.)

Change-Id: I6af521ee8285ca581efac7d3c5f013dfbff3ee30

10 years agoMerge "AArch64: Use long for pointers in RS Java/JNI code"
Narayan Kamath [Mon, 10 Feb 2014 13:33:26 +0000 (13:33 +0000)]
Merge "AArch64: Use long for pointers in RS Java/JNI code"

10 years agoframeworks/base: fix errors inside ALOGV
Colin Cross [Fri, 7 Feb 2014 04:17:48 +0000 (20:17 -0800)]
frameworks/base: fix errors inside ALOGV

Fix errors exposed by adding compile-time checking to disabled ALOGVs.

Change-Id: I9beeb5d5df498c63d6bed49734ee80a8e0afcefc

10 years agoMerge "Use canonical path for /vendor/app"
Christopher Tate [Fri, 7 Feb 2014 23:30:23 +0000 (23:30 +0000)]
Merge "Use canonical path for /vendor/app"

10 years agoMerge "Example controller app for system ui demo mode."
John Spurlock [Fri, 7 Feb 2014 20:58:36 +0000 (20:58 +0000)]
Merge "Example controller app for system ui demo mode."

10 years agoExample controller app for system ui demo mode.
John Spurlock [Fri, 7 Feb 2014 19:47:47 +0000 (14:47 -0500)]
Example controller app for system ui demo mode.

Demo mode is protected behind a system setting.  To enable:
$ adb shell settings put global sysui_demo_allowed 1

Change-Id: I2248e27a253bf9eac176e8be9153a2b147cefa40

10 years agoFix TinyHashMap to use generic hash_type instead of hash_t
Ashok Bhat [Fri, 7 Feb 2014 16:31:41 +0000 (16:31 +0000)]
Fix TinyHashMap to use generic hash_type instead of hash_t

TinyHashMap used hash_t(key) to generate hashcode. This
would not work for 64-bit pointers as hash_t is declared as
an uint32_t.

Replaced the hash_t(key) call to more generic android::hash_type(key).
This function is a template function declared in TypeHelpers.h and
has a version available for all data types including pointers.

Change-Id: I612cf18b49ca7c30b63f9d6938df68fed7d80d08
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
10 years agoMerge "Fix a typo."
Jean-Luc Brouillet [Fri, 7 Feb 2014 19:08:36 +0000 (19:08 +0000)]
Merge "Fix a typo."

10 years agoFix a typo.
Jean-Luc Brouillet [Fri, 7 Feb 2014 19:04:26 +0000 (11:04 -0800)]
Fix a typo.

Change-Id: I770fe97ab0635de84d15393aca6bca57552f2f10

10 years agoUse long to store pointers in ConsumerIrService
Ashok Bhat [Fri, 7 Feb 2014 12:26:17 +0000 (12:26 +0000)]
Use long to store pointers in ConsumerIrService

Change-Id: I4e6562b7dc09f87ad80b1e862b614a370d37feb5
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
10 years agoFix in MediaMuxer's JNI code
Ashok Bhat [Fri, 7 Feb 2014 12:22:50 +0000 (12:22 +0000)]
Fix in MediaMuxer's JNI code

android_media_MediaMuxer_native_setup should return jlong. It was
incorrectly returning jint.

Change-Id: I31a475af0818f4d5dcbb39380b42612188cf3853
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
10 years agoMerge "Make sure to turn off led after pulse()"
Dan Sandler [Fri, 7 Feb 2014 15:59:08 +0000 (15:59 +0000)]
Merge "Make sure to turn off led after pulse()"

10 years agoConvert all selinux_android_restorecon and _setfilecon calls to new API.
Stephen Smalley [Fri, 7 Feb 2014 14:16:12 +0000 (09:16 -0500)]
Convert all selinux_android_restorecon and _setfilecon calls to new API.

libselinux selinux_android_restorecon API is changing to the more
general interface with flags and dropping the older variants.

Also get rid of the old, no longer used selinux_android_setfilecon API
and rename selinux_android_setfilecon2 to it as it is the only API in use.

Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
10 years agoAdd hidden minor version ID for support lib workarounds.
Tim Murray [Fri, 7 Feb 2014 00:39:38 +0000 (16:39 -0800)]
Add hidden minor version ID for support lib workarounds.

Change-Id: I7940e32c78caaab351fb28d92e5fadbea6292b27

10 years agoFinish fixing Zygote descriptor leakage problem
Dave Platt [Thu, 6 Feb 2014 01:06:42 +0000 (17:06 -0800)]
Finish fixing Zygote descriptor leakage problem

In order to prevent Zygote descriptors from leaking into the child
environment, they should be closed by the forked-off child process
before the child switches to the application UID.  These changes close
the descriptors via dup2(), substituting a descriptor open to
/dev/null in their place; this allows the Zygote Java code to close
the FileDescriptor objects cleanly.

This is a multi-project change: dalvik, art, libcore, frameworks/base,
and external/sepolicy are affected.  The CLs need to be approved
together, lest the build break or the software fail to boot.

Round 2: indent change

Bug: 12114500
Change-Id: I090402136a8a8b7d6aad6eb153026e85d7cf6ad3

10 years agoAArch64: Use long for pointers in SurfaceSession class
Ashok Bhat [Wed, 8 Jan 2014 15:34:15 +0000 (15:34 +0000)]
AArch64: Use long for pointers in SurfaceSession class

For storing pointers, long is used in SurfaceSession class,
as native pointers can be 64-bit.

Change-Id: I1535a488dfffaddd20e3beac57e558035d715cbf
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
10 years agoMerge "Fix for positioning of glyphs within a bitmap"
Chris Craik [Wed, 5 Feb 2014 21:36:42 +0000 (21:36 +0000)]
Merge "Fix for positioning of glyphs within a bitmap"

10 years agoAArch64: Use long for pointers in RS Java/JNI code
Ashok Bhat [Tue, 4 Feb 2014 14:57:58 +0000 (14:57 +0000)]
AArch64: Use long for pointers in RS Java/JNI code

Changes include
[x] Some JNI functions, with return type jlong, casts
    pointer to jint before returning it. This has been fixed.

[x] Minor JNI function prototype changes where
    formal paramter type has been changed to a JNI
    type (int to jint for example).

[x] long is used for ScriptC, Sampler, Font, ProgramStore
    handles as they can be 64-bit.

[x] A new hidden constructor ScriptC(long, RenderScript)
    has been added. This should eventually replace public
    API method ScriptC(int, RenderScript).

[x] Font and FileA3D use getNativeAsset instead of getAssetInt
    to get Asset Handles. The getAssetInt method will be
    deprecated in favor of getNativeAsset, as the former does
    not support 64-bit.

[x] rsnPathCreate method accepts loop as an int. This should
    be long as the underlying RS function assumes this to be
    a pointer.

Change-Id: I919d857e5933febe63966049da83de9f9adee6f5
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
10 years agoMerge "Add message to RS docs about application vs. library packaging."
Stephen Hines [Wed, 5 Feb 2014 01:52:31 +0000 (01:52 +0000)]
Merge "Add message to RS docs about application vs. library packaging."

10 years agoMerge "DO NOT MERGE: Mark new util type functions as @hide in AOSP."
Tim Murray [Mon, 3 Feb 2014 22:37:12 +0000 (22:37 +0000)]
Merge "DO NOT MERGE: Mark new util type functions as @hide in AOSP."

10 years agoMerge "Check that bound allocations are 1D"
Tim Murray [Mon, 3 Feb 2014 22:37:11 +0000 (22:37 +0000)]
Merge "Check that bound allocations are 1D"

10 years agoMerge "Fix debug context."
Tim Murray [Mon, 3 Feb 2014 22:37:06 +0000 (22:37 +0000)]
Merge "Fix debug context."

10 years agoMerge "Enable asynchronous destruction of BaseObjs."
Tim Murray [Mon, 3 Feb 2014 22:37:00 +0000 (22:37 +0000)]
Merge "Enable asynchronous destruction of BaseObjs."

10 years agoMerge "Fix most logging macros for context pointers."
Tim Murray [Mon, 3 Feb 2014 22:36:54 +0000 (22:36 +0000)]
Merge "Fix most logging macros for context pointers."

10 years agoMerge "Fix getBytesSize for YUV allocations."
Tim Murray [Mon, 3 Feb 2014 22:36:53 +0000 (22:36 +0000)]
Merge "Fix getBytesSize for YUV allocations."

10 years agoMerge "Move RenderScript from graphics/ to new fw/base subdirectory rs."
Tim Murray [Mon, 3 Feb 2014 22:36:50 +0000 (22:36 +0000)]
Merge "Move RenderScript from graphics/ to new fw/base subdirectory rs."

10 years agoMerge "Convert Java/JNI to 64-bit, part 2."
Tim Murray [Mon, 3 Feb 2014 22:36:45 +0000 (22:36 +0000)]
Merge "Convert Java/JNI to 64-bit, part 2."

10 years agoMerge changes If93a5d78,I1957f7ac
Tim Murray [Mon, 3 Feb 2014 22:36:37 +0000 (22:36 +0000)]
Merge changes If93a5d78,I1957f7ac

* changes:
  Convert Java/JNI to 64-bit, part 1.
  Add long/double read support.

10 years agoMerge "Use Object + type in place of specific array"
Tim Murray [Mon, 3 Feb 2014 22:36:36 +0000 (22:36 +0000)]
Merge "Use Object + type in place of specific array"

10 years agoMerge "Utility API for creating types."
Tim Murray [Mon, 3 Feb 2014 22:36:13 +0000 (22:36 +0000)]
Merge "Utility API for creating types."

10 years agoMerge "Remove old hidden API."
Tim Murray [Mon, 3 Feb 2014 22:36:05 +0000 (22:36 +0000)]
Merge "Remove old hidden API."

10 years agoMerge "Remove hidden API setSurfaceTexture."
Tim Murray [Mon, 3 Feb 2014 22:35:14 +0000 (22:35 +0000)]
Merge "Remove hidden API setSurfaceTexture."

10 years agoRuntime resource overlay, iteration 2, test cases
Mårten Kongstad [Fri, 31 Jan 2014 13:47:44 +0000 (14:47 +0100)]
Runtime resource overlay, iteration 2, test cases

Add automated test cases for runtime resource overlay, iteration 2.

The test cases are a mixture of 'adb shell' commands and regular
instrumentation tests. The device is rebooted between tests to setup
different overlay scenarios for framework-res.apk.

To verify Runtime resoure overlay, iteration 2, run
    $ frameworks/base/core/tests/overlaytests/testrunner.py

For a list of supported options, run
    $ frameworks/base/core/tests/overlaytests/testrunner.py --help

Change-Id: I692aa1a7ad073efd116b24f9ec7f197dfd65dfef

10 years agoRuntime resource overlay, iteration 2
Mårten Kongstad [Fri, 31 Jan 2014 13:43:27 +0000 (14:43 +0100)]
Runtime resource overlay, iteration 2

Support any number of overlay packages. Support any target package.

UPDATED PACKAGE MATCHING
------------------------
In Runtime resource overlay, iteration 1, only a single overlay package
was considered. Package matching was based on file paths:
/vendor/overlay/system/framework-res.apk corresponded to
/system/framework-res.apk. Introduce a more flexible matching scheme
where any package is an overlay package if its manifest includes

    <overlay targetPackage="com.target.package"/>

For security reasons, an overlay package must fulfill certain criteria
to take effect: see below.

THE IDMAP TOOL AND IDMAP FILES
------------------------------
Idmap files are created by the 'idmap' binary; idmap files must be
present when loading packages. For the Android system, Zygote calls
'idmap' as part of the resource pre-loading. For application packages,
'idmap' is invoked via 'installd' during package installation (similar
to 'dexopt').

UPDATED FLOW
------------
The following is an outline of the start-up sequences for the Android
system and Android apps. Steps marked with '+' are introduced by this
commit.

Zygote initialization
   Initial AssetManager object created
+    idmap --scan creates idmaps for overlays targeting 'android', \
           stores list of overlays in /data/resource-cache/overlays.list
   AssetManager caches framework-res.apk
+  AssetManager caches overlay packages listed in overlays.list

Android boot
   New AssetManager's ResTable acquired
     AssetManager re-uses cached framework-res.apk
+    AssetManager re-uses cached 'android' overlays (if any)

App boot
   ActivityThread prepares AssetManager to load app.apk
+  ActivityThread prepares AssetManager to load app overlays (if any)
   New AssetManager's ResTable acquired as per Android boot

SECURITY
--------
Overlay packages are required to be pre-loaded (in /vendor/overlay).
These packages are trusted by definition. A future iteration of runtime
resource overlay may add support for downloaded overlays, which would
likely require target and overlay signatures match for the overlay to
be trusted.

LOOKUP PRIORITY
---------------
During resource lookup, packages are sequentially queried to provide a
best match, given the constraints of the current configuration. If any
package provide a better match than what has been found so far, it
replaces the previous match. The target package is always queried last.

When loading a package with more than one overlay, the order in which
the overlays are added become significant if several packages overlay
the same resource.

Had downloaded overlays been supported, the install time could have been
used to determine the load order. Regardless, for pre-installed
overlays, the install time is randomly determined by the order in which
the Package Manager locates the packages during initial boot. To support
a well-defined order, pre-installed overlay packages are expected to
define an additional 'priority' attribute in their <overlay> tags:

    <overlay targetPackage="com.target.package" priority="1234"/>

Pre-installed overlays are loaded in order of their priority attributes,
sorted in ascending order.

Assigning the same priority to several overlays targeting the same base
package leads to undefined behaviour. It is the responsibility of the
vendor to avoid this.

The following example shows the ResTable and PackageGroups after loading
an application and two overlays. The resource lookup framework will
query the packages in the order C, B, A.

        +------+------+-     -+------+------+
        | 0x01 |      |  ...  |      | 0x7f |
        +------+------+-     -+------+------+
            |                           |
        "android"                Target package A
                                        |
                       Pre-installed overlay B (priority 1)
                                        |
                       Pre-installed overlay C (priority 2)

Change-Id: If49c963149369b1957f7d2303b3dd27f669ed24e

10 years agoNew command line tool 'idmap'
Mårten Kongstad [Fri, 31 Jan 2014 13:01:52 +0000 (14:01 +0100)]
New command line tool 'idmap'

Introduce a new tool 'idmap' to handle generation and verification of
idmap files. The tool is modelled on 'dexopt', and is intended to be
used similarly, notably by 'installd'.
See cmds/idmap/idmap.cpp for further documentation on 'idmap'.

Note: this commit is interdependent on a commit in project build/ to add
'idmap' to PRODUCT_PACKAGES.

Note: the changes to androidfw are only stubs. The actual implementation
will be provided in Runtime resource overlay, iteration 2.

Change-Id: I7131b74ece1e46c8a9c0a31d103e686aa07da2bb

10 years agoMerge "Remove DRLCertFactory"
Kenny Root [Fri, 31 Jan 2014 22:54:44 +0000 (22:54 +0000)]
Merge "Remove DRLCertFactory"

10 years agoRemove DRLCertFactory
Kenny Root [Fri, 31 Jan 2014 22:10:01 +0000 (14:10 -0800)]
Remove DRLCertFactory

No longer needed since Conscrypt is the main provider.

Change-Id: Iee741ef376af2de52db79df07e96057438778bc6

10 years agoDO NOT MERGE: Mark new util type functions as @hide in AOSP.
Tim Murray [Fri, 31 Jan 2014 20:57:20 +0000 (12:57 -0800)]
DO NOT MERGE: Mark new util type functions as @hide in AOSP.

Change-Id: I834e07aef142aa79ed1603535689d0b833357f6c

10 years agoCheck that bound allocations are 1D
Jason Sams [Wed, 15 Jan 2014 00:18:14 +0000 (16:18 -0800)]
Check that bound allocations are 1D

We do not support higher order bound allocations. The
stride is not available to the script so they cannot
walk the allocation correctly.

Change-Id: I9447a5d43c3ae1b88fc9522628a17bd5a317ffc6

10 years agoFix debug context.
Tim Murray [Fri, 10 Jan 2014 19:25:52 +0000 (11:25 -0800)]
Fix debug context.

bug 12477551

Change-Id: Icac28abc3dabce31834faa1942b596c2f207f29e

10 years agoEnable asynchronous destruction of BaseObjs.
Tim Murray [Tue, 7 Jan 2014 19:13:56 +0000 (11:13 -0800)]
Enable asynchronous destruction of BaseObjs.

Change-Id: Iaddf8041a3c870a986ec8999e6ccc3aede38fc4c

Conflicts:
rs/java/android/renderscript/BaseObj.java

10 years agoFix most logging macros for context pointers.
Tim Murray [Tue, 7 Jan 2014 23:36:19 +0000 (15:36 -0800)]
Fix most logging macros for context pointers.

Change-Id: I7f4a8db4f3a52c368cc32ce0428f8001df8a4166

10 years agoFix getBytesSize for YUV allocations.
Tim Murray [Wed, 18 Dec 2013 01:15:25 +0000 (17:15 -0800)]
Fix getBytesSize for YUV allocations.

bug 12134914

Change-Id: I128e75b756a5bd129077177e254f1db6c94182f1

10 years agoMove RenderScript from graphics/ to new fw/base subdirectory rs.
Tim Murray [Tue, 17 Dec 2013 21:28:17 +0000 (13:28 -0800)]
Move RenderScript from graphics/ to new fw/base subdirectory rs.

Change-Id: I30b6633578f063840e1bdbcc9ba513b727912a6d

10 years agoConvert Java/JNI to 64-bit, part 2.
Tim Murray [Tue, 19 Nov 2013 20:45:54 +0000 (12:45 -0800)]
Convert Java/JNI to 64-bit, part 2.

This changes BaseObj to support 64-bit IDs. There are a few caveats:

1. Since it is deprecated, RSG will not support 64-bit.
2. Currently, methods that pass arrays of IDs to the driver are not supported in 64-bit. This will be fixed in a later CL.

bug 11332320

Change-Id: If0dbecc8b285e260f767e441e05088b6a1b749a2

10 years agoConvert Java/JNI to 64-bit, part 1.
Tim Murray [Fri, 15 Nov 2013 21:08:30 +0000 (13:08 -0800)]
Convert Java/JNI to 64-bit, part 1.

This converts context and device storage to use long instead of int.

bug 11332320

Change-Id: If93a5d78385d3004d5e709762b78bd1d3538088d

10 years agoAdd long/double read support.
Jason Sams [Wed, 6 Nov 2013 23:08:07 +0000 (15:08 -0800)]
Add long/double read support.

Change-Id: I1957f7ac18262a3004a4adcb7c31055212e483c2

10 years agoUse Object + type in place of specific array
Jason Sams [Wed, 6 Nov 2013 19:22:02 +0000 (11:22 -0800)]
Use Object + type in place of specific array

Changed to avoid the explosion of entry points in the JNI layer.

Change-Id: I7d6cc565c8853b06560eb891fdd5e8acf05c9779

10 years agoUtility API for creating types.
Jason Sams [Thu, 10 Oct 2013 00:15:36 +0000 (17:15 -0700)]
Utility API for creating types.

Change-Id: I3263cb4440ef3a60cd418f0559b8c5638a9b8bf3

10 years agoRemove old hidden API.
Jason Sams [Thu, 26 Sep 2013 19:13:20 +0000 (12:13 -0700)]
Remove old hidden API.

This was never shipped and long since replaced by ioReceive().

Change-Id: Ieba7fd4305c2c561cc36154c57414783e4bf502b

10 years agoRemove hidden API setSurfaceTexture.
Jason Sams [Tue, 24 Sep 2013 22:18:52 +0000 (15:18 -0700)]
Remove hidden API setSurfaceTexture.

Change-Id: Ib6a3c5b84550932168f314375e74059507fc01ae

10 years agoUse long to store pointers in GLES_JNI/EGL classes
Ashok Bhat [Mon, 27 Jan 2014 16:58:46 +0000 (16:58 +0000)]
Use long to store pointers in GLES_JNI/EGL classes

Change-Id: I43b32f2a85c07b3f59c57e28e3d03e8d1cabcd8b
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
10 years agoMerge "AArch64: Make AssetManager and related classes 64-bit compatible"
Narayan Kamath [Fri, 31 Jan 2014 14:35:13 +0000 (14:35 +0000)]
Merge "AArch64: Make AssetManager and related classes 64-bit compatible"

10 years agoAArch64: Make AssetManager and related classes 64-bit compatible
Ashok Bhat [Fri, 17 Jan 2014 16:02:38 +0000 (16:02 +0000)]
AArch64: Make AssetManager and related classes 64-bit compatible

Following changes have been done:

[x] Long is used to store native pointers as pointers can be
    64-bit.

[x] AssetManager openAsset native function returned -1 if
    file name was empty and java function considered any
    non-zero value as success. This has been fixed by native
    function throwing Illegal Argument Exception as well.

[x] AssetManager incRefsLocked and decRefsLocked now accept
    long as input to support 64-bit native references.

[x] AssetManager incRefsLocked method incorrecly used
    'this.hashCode()' instead of the passed parameter id.
    This has been fixed.

[x] Some minor changes have been done to conform with
    standard JNI practice (e.g. use of jint instead of int
    in JNI function prototypes)

Change-Id: I095b9f900d49e51f43ad6afc47cbc23116a6a64a
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
10 years agoMerge "Change ResourceType cookies to int32_t."
Narayan Kamath [Fri, 31 Jan 2014 14:13:47 +0000 (14:13 +0000)]
Merge "Change ResourceType cookies to int32_t."

10 years agoChange ResourceType cookies to int32_t.
Narayan Kamath [Mon, 27 Jan 2014 17:32:37 +0000 (17:32 +0000)]
Change ResourceType cookies to int32_t.

Also change the order of parameters in ResTable constructors
to avoid ambiguity.

(cherry picked from commit 00b314436f4fdfada4bbf1e79ec12e9fa38aeaf1)

Change-Id: I874c5d03c134dc3c331fba423b5280366296287c

10 years agoMerge "Fixed cancel() not working correctly"
Narayan Kamath [Fri, 31 Jan 2014 13:20:58 +0000 (13:20 +0000)]
Merge "Fixed cancel() not working correctly"

10 years agoUse long for pointers in EmojiFactory and PdfDocument
Ashok Bhat [Thu, 23 Jan 2014 15:29:55 +0000 (15:29 +0000)]
Use long for pointers in EmojiFactory and PdfDocument

Change-Id: I275c9ce390dd9e01f772e2044c74cebdb0701de6
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
10 years agoAdd message to RS docs about application vs. library packaging.
Stephen Hines [Fri, 31 Jan 2014 03:43:20 +0000 (19:43 -0800)]
Add message to RS docs about application vs. library packaging.

Change-Id: I49b694629ded066e5ee9c1af29970c59cb637fdd

10 years agoMerge "EGL14.eglCreateWindowSurface should set producerControlledByApp"
Igor Murashkin [Fri, 31 Jan 2014 01:26:14 +0000 (01:26 +0000)]
Merge "EGL14.eglCreateWindowSurface should set producerControlledByApp"

10 years agoMerge "Release locked buffer when it fails to acquire graphics buffer"
Zhijun He [Thu, 30 Jan 2014 23:01:20 +0000 (23:01 +0000)]
Merge "Release locked buffer when it fails to acquire graphics buffer"

10 years agoMerge "frameworks/base: Rename persist.sys.dalvik.vm.lib to allow new default"
Brian Carlstrom [Thu, 30 Jan 2014 21:50:57 +0000 (21:50 +0000)]
Merge "frameworks/base: Rename persist.sys.dalvik.vm.lib to allow new default"

10 years agoframeworks/base: Rename persist.sys.dalvik.vm.lib to allow new default
Brian Carlstrom [Thu, 30 Jan 2014 21:14:01 +0000 (13:14 -0800)]
frameworks/base: Rename persist.sys.dalvik.vm.lib to allow new default

Bug: 12798969
Change-Id: Ibb7ed86867e4dca53ad7fe33326b08e6f5e664c4