History log of /frameworks/base/core/jni/AndroidRuntime.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0997908c95151ce24609c10731990e648156b95d 19-Apr-2016 Dimitry Ivanov <dimitry@google.com> Move Vulkan layer path setup to ApplicationLoaders

ThreadedRenderer was never the right place for this anyway, and
ApplicationLoaders can provide both the full library search path (not
just the extracted native library dir) as well as the application loader
namespace.

Bug: 28213888
Change-Id: Ibcc0a9178da4dba6f3f3105932fdac1a1d0261af
/frameworks/base/core/jni/AndroidRuntime.cpp
b1ef62bb3834af6bdf8017e56b2cc614a566229e 20-Apr-2016 Dimitry Ivanov <dimitry@google.com> Extract pathclassloader initialization to a separate class

To be able to reuse this code when creating a classloader for
the system_server.

Bug: http://b/27245894
Bug: http://b/27702070
Change-Id: I928175a39a1beb0446d863a5b8f5edf94686e768
(cherry picked from commit 5d7d777fa6f47ade2097e77d3d9ddb52c26d77d6)
/frameworks/base/core/jni/AndroidRuntime.cpp
8d74de55464c885b602b34252ee8721a9e810dcf 27-Apr-2016 Calin Juravle <calin@google.com> Read -Xjittransitionweight from system properties.

Bug: 27865109
Change-Id: I4a752a68693ac7d764d006f1282398c2e95ef1d0
/frameworks/base/core/jni/AndroidRuntime.cpp
53a441ca8eda5a3e6209a952b1bbd32a39e19a1c 20-Apr-2016 Svet Ganov <svetoslavganov@google.com> Ensure local settings caches are not stale

We used the system proterties as a shared memory mechanism
to propagate information to local settings caches when the
content has changed and the cache should be cleared. The
system properties are unfortunately updated asynchronously
leading to cases where clients may read stale data.

This change adds a simple int array data structure backed
by shared memory which guarantees individual values are
atomically read and updated without memory tear. Multi-
index opearations are not synchronized between each other.

The settings provider is using the new data structure to
propagate the settings generation which drives when caches
are purged.

We have a single memory array keeping the generation for
different settings tables per user. Since memory array is
not a compact data structure and the user space exceeds
the memory array size we use an in-memory map from keys
to indices in the memory array where the generation id of
a key is stored. A key is derived by the setting type in
the 4 most significant bits and the user id in the 28 least
significant bits.

The mapping from a key to an index is cleared if the user is
removed and the corresponding index in the memory arry is
reset to make it available for other users. The size of the
memory array is derived from the max user count that can be
created at the same time.

bug:18826179

Change-Id: I64009cc5105309ef9aa83aba90b82afc8ad8c659
/frameworks/base/core/jni/AndroidRuntime.cpp
aa9ecac10b90af84ab8cb9fb40f42df3460a4eb3 12-Apr-2016 Calin Juravle <calin@google.com> Handle dalvik.vm.jitprithreadweight property

Bug: 28065407
Bug: 27865109
Change-Id: I8cebc22a9e072fd1d6d765427a0cd59ba2201bf6

(cherry picked from commit 0de80b9f550fc8ff1f46d5f95cf229745d71eb2a)
/frameworks/base/core/jni/AndroidRuntime.cpp
c7605b838bda61593e503924c6c86e3a33a6d64b 17-Mar-2016 Rubin Xu <rubinxu@google.com> Merge "Unifying method names and comments to security logging, not device logging" into nyc-dev
ac329d3e34e99e10243906d32cc4e36c626ac8ee 16-Mar-2016 Ashutosh Joshi <ashutoshj@google.com> Merge "Exposing Context Hub service." into nyc-dev
6235a94ffaed1d82cee2317481c18776f601da1b 15-Mar-2016 Michal Karpinski <mkarpinski@google.com> Unifying method names and comments to security logging, not device logging

Also move SecurityLog to android.app.admin package.

Bug: 27531824
Bug: 27532560
Bug: 27532564
Bug: 27532425
Change-Id: I2677afdb5685bc5d21e52c41b381b57a41e364b6
/frameworks/base/core/jni/AndroidRuntime.cpp
9ff7d2235427b211344fa58b608424805a21aa24 11-Feb-2016 Peng Xu <pengxu@google.com> Exposing Context Hub service.

Adding the Context hub service. This is the service that exposes
the context hub HAL to the system. The API exposed is a System API.

Change-Id: I854141714ecd21f6386e6b15b7bc9a997483ccf6
/frameworks/base/core/jni/AndroidRuntime.cpp
66f4831aa105f981ba1d5c21e3dcf8f1e0d76de8 13-Mar-2016 Brian Carlstrom <bdc@google.com> frameworks/base: Make Thread::run threadName argument required

Bug: 27557176
Change-Id: Icff15e51fb7c99387ac8317181d12749f343439a
/frameworks/base/core/jni/AndroidRuntime.cpp
4449ef5b6a85ef4e16dbd5d939db7b11eac0b586 26-Feb-2016 Dimitry Ivanov <dimitry@google.com> Display Toast with linker warnings after Activity.onStart()

Displays list of problems linker encountered with app's
native code including
1. Unauthorized access to private platform libraries.
2. Text relocations
3. Invalid DT_NEEDED entires

This change is intended only for preview/beta releases and to
be reverted before the first release build.

Bug: http://b/27365747
Change-Id: I08735472059248c901ef22042682d574fb2b0c92
/frameworks/base/core/jni/AndroidRuntime.cpp
a55c7f15a3c386ec643f21eeb2f4e9fd7b03ba70 23-Feb-2016 Dimitry Ivanov <dimitry@google.com> Create linker-namespace for the classloader

With this change ApplicationLoaders.getClassLoader()
creates linker-namespace for the classloader at the
construction time. Before this change the namespace
was created on first load of a jni library.

With this change we ensure that every classloader
has initialized namespace associated with it.

As an additional advantage we now can avoid storing
namespace-specific fields in the classloaders.

Bug: http://b/27189432
Bug: http://b/22548808
Change-Id: I3b160bd478a55171008682c40b2ebc13bdbd9882
/frameworks/base/core/jni/AndroidRuntime.cpp
f8754ac2127f8adf40bd4731f39b16340acdb2f7 12-Feb-2016 Polina Bondarenko <pbond@google.com> Added hardwareproperties SystemService

Add HardwarePropertiesManagerService which call native methods to
get CPU, GPU, battery temperatures, CPU usage info, fan speeds.
Restrict hardware properties retrieval only for device and profile
owners.

Bug: 26945055
Change-Id: I4d6b30b78e575532d5e9cfa59ef6cd81355439d4
/frameworks/base/core/jni/AndroidRuntime.cpp
766431aa57c16ece8842287a92b2e7208e3b8ac3 04-Feb-2016 Doris Liu <tianliu@google.com> Revert "Revert "VectorDrawable native rendering - Step 4 of MANY""

This reverts commit 5a11e8d0ba21624025b89ac63bbd18befa55be0e.

Change-Id: I7a48b59c4f930dad65ddc8590c25a12636244ea2
/frameworks/base/core/jni/AndroidRuntime.cpp
5a11e8d0ba21624025b89ac63bbd18befa55be0e 04-Feb-2016 Doris Liu <tianliu@google.com> Revert "VectorDrawable native rendering - Step 4 of MANY"

b/26949340 and b/26975469, b/26975079 as well

This reverts commit f276acd98457bcaabc9e79a17a736b3b484f005e.

Change-Id: I4b55177daf0d289bc03604c71fd4bf579f65073a
/frameworks/base/core/jni/AndroidRuntime.cpp
f276acd98457bcaabc9e79a17a736b3b484f005e 07-Jan-2016 Doris Liu <tianliu@google.com> VectorDrawable native rendering - Step 4 of MANY

This CL runs VectorDrawable animation on RenderThread. The changes in this CL
include:
- Convert all the animators in AnimatorSet for AVD into a set of RenderNodeAnimators.
- Hook up the new animators with RenderThread
- Add drawOp in RecordingCanvas for drawing VD so that during the animation
on RenderThread, all the property changes on VD can be reflected on the screen.

TODO:
- Implement reverse and reset for AVD.

Change-Id: I2df1d754f2db0ad098d9c15dde4bb2bdfafc2315
/frameworks/base/core/jni/AndroidRuntime.cpp
8b8b242985d3b12d21be11e8f0efb74d3236ea74 27-Jan-2016 Polina Bondarenko <pbond@google.com> Merge "HardwarePropertiesManager: Add API for hardware properties retrieval"
965ecbbb3eb19007690c333ab3aa05e380deb633 13-Nov-2015 Polina Bondarenko <pbond@google.com> HardwarePropertiesManager: Add API for hardware properties retrieval

Add serive "hardwareproperties" and methods getDeviceTemperatures,
getCpuUsages and getFanSpeeds to retrieve hardware properties:
device temperatures (CPU, GPU and battery), CPU usages and fan speeds.
This is a public API.

Bug: 22407109
Change-Id: If7efcbba7b160256d41704b60d93a7218dcc79d7
/frameworks/base/core/jni/AndroidRuntime.cpp
900fe2410ddfdaa7be71d41335b73dc2c1c7858e 20-Jan-2016 Rubin Xu <rubinxu@google.com> Merge "Add JNI bridge to the new logd security buffer."
7bdf3cff92d26f9a4a8b88f816f5313fe02d6a33 19-Jan-2016 Calin Juravle <calin@google.com> Merge "Enable profile guided compilation on the framework side"
db4a79a5d7d348e9d2286d95d4e5a59dd484456f 23-Dec-2015 Calin Juravle <calin@google.com> Enable profile guided compilation on the framework side

The background compilation service will trigger a profile based
compilation instead of a full one. If no profile information is
available the compilation is skipped (see installd).

Note that the end decision whether or not to compile a package is taken
by dext2oat. We can't make the decision here because this service runs
under system server which cannot read app's profile data.

Bug: 26080105
Change-Id: I457ea8dea0557839c1f7cdc241770055732b0a4a
/frameworks/base/core/jni/AndroidRuntime.cpp
75431fbe361e16cfdc43c16cc65b86b8dab39e82 07-Jan-2016 Rubin Xu <rubinxu@google.com> Add JNI bridge to the new logd security buffer.

Bug: 26127031
Bug: 22860162
Change-Id: I14e08850ece7d9c0229b7213ee2e25cd089defc1
/frameworks/base/core/jni/AndroidRuntime.cpp
775873a66a946fae2b0535abb51df9817bd1b20c 29-Dec-2015 Richard Uhler <ruhler@google.com> Use NativeAllocationRegistry for Paint, Canvas, and Bitmap

Bug: 23130675
Change-Id: I3fbd84ba417ac63df75f87ee2c56e3e7f3c9eb46
/frameworks/base/core/jni/AndroidRuntime.cpp
4bbc2931263b232fba61807fca00e127573eff42 02-Dec-2015 Doris Liu <tianliu@google.com> VectorDrawable native rendering - Step 3 of MANY

- Refactored VPathRenderer & VectorDrawableState
- Moved all the VD rendering into native
- Set up hooks for VD's property changes in JNI for animated VD

TODO: JNI calls can be further reduced when we convert the animation
in AVD to use RenderNodeAnimator, in which case animation will be
driven from native and therefore most of the JNI hooks for changing
VD's properties during animation will no longer be needed.

Change-Id: I52021f4d7bea057b83ace54085d870dd45acae0f
/frameworks/base/core/jni/AndroidRuntime.cpp
38c1a7e732660212687cf375f5e5ed354b91e431 30-Oct-2015 Pablo Ceballos <pceballos@google.com> Add GLES32 class and JNI

Change-Id: I05ff0c14a35f51c2015edbd762dc9e6fe43347b9
/frameworks/base/core/jni/AndroidRuntime.cpp
8a7c1606d88873c5a1b5764c16cb046b6f2275b2 03-Nov-2015 Przemyslaw Szczepaniak <pszczepaniak@google.com> Move StrictJarFile from libcore to framework

Bug: 25337946
Change-Id: Ib4fac6fa9f534b8654e5ca158bbaedb2393772ba
(cherrypicked from 43ea2cc2a81926a6b2ca13d41f4eab089640129e)
/frameworks/base/core/jni/AndroidRuntime.cpp
0faf1bc43cadc1c1ed0a5379573f260598dcf770 19-Nov-2015 Nicolas Geoffray <ngeoffray@google.com> Merge "Update framework code after new ART options." am: d7d2817ade am: 9da4055766
am: 5d5f055eb6

* commit '5d5f055eb6783dceb51cdb71630aac40feacfedd':
Update framework code after new ART options.
cdf1dfff8f850da7b1ae3a34b78de7313064f5e0 19-Nov-2015 Nicolas Geoffray <ngeoffray@google.com> Update framework code after new ART options.

Change-Id: I852a5975701653fe7e0cdd02e3c0b30a2b0b0b59
/frameworks/base/core/jni/AndroidRuntime.cpp
8d40c367b05f485cbf3492e8add7c00deba6809b 18-Nov-2015 Calin Juravle <calin@google.com> Merge "Remove obsolete profile handling from AndroidRuntime." am: 360e95a90d am: e20120031f
am: c3a70ce001

* commit 'c3a70ce0015e9117268040378c6adb6239ead897':
Remove obsolete profile handling from AndroidRuntime.
360e95a90dab2c2522aa3ba13c6b2a3df737e626 16-Nov-2015 Calin Juravle <calin@google.com> Merge "Remove obsolete profile handling from AndroidRuntime."
cdd23f9d45ea2974c3f295754b89f5462bdd2c0d 11-Nov-2015 Doris Liu <tianliu@google.com> Add hooks in JNI to start using native path parsing

Change-Id: Iaa0d3c2c1936c248146ed7f186a13e8e79be818e
/frameworks/base/core/jni/AndroidRuntime.cpp
9c99c7935d17115e94e183e040d97b818f0621b5 11-Nov-2015 Calin Juravle <calin@google.com> Merge "Parse method-trace properties only in debug builds." am: 8fa7e93050 am: 61abae774e
am: d75fdb6fe3

* commit 'd75fdb6fe3745805561dec630540e8449d97e2f8':
Parse method-trace properties only in debug builds.
92290b8963e55dac1be729dc2424b356794733e3 10-Nov-2015 Calin Juravle <calin@google.com> Parse method-trace properties only in debug builds.

Bug: 25612377
Change-Id: Ia1d8e6c5afbdd70486d5aa8c059e70e27b03367d
/frameworks/base/core/jni/AndroidRuntime.cpp
8e6714ba2bc136f2e40b8b6af5704dc87fcde58e 04-Nov-2015 Calin Juravle <calin@google.com> Remove obsolete profile handling from AndroidRuntime.

Bug: 24698874
Change-Id: I61193800e8b1f285b0a8edd05a0430a3c779e5b1
/frameworks/base/core/jni/AndroidRuntime.cpp
434a481b2191562582c79be29f24c2e0b5ca60d0 24-Sep-2015 Elliott Hughes <enh@google.com> am ea1831d2: am b57dd722: resolved conflicts for a884d81e to stage-aosp-master

* commit 'ea1831d211ea0e6b2d161c714bb0786369ef2df5':
constify JNINativeMethod function pointer tables
b57dd722f1dc0663417da37d3a82f8283ad3c982 24-Sep-2015 Elliott Hughes <enh@google.com> resolved conflicts for a884d81e to stage-aosp-master

Change-Id: Ice485967fa96f13786024b6939b826638e906ff0
76f6a86de25e1bf74717e047e55fd44b089673f3 19-Sep-2015 Daniel Micay <danielmicay@gmail.com> constify JNINativeMethod function pointer tables

Change-Id: I4036c924958221cbc644724f8eb01c5de3cd7954
/frameworks/base/core/jni/AndroidRuntime.cpp
6d444185e55315a0111162609b1f619ee268bf3a 02-Sep-2015 Yasuhiro Matsuda <mazda@google.com> resolved conflicts for merge of fcf9ab5a to master

Change-Id: I69ad6e525430c5c4fc3c274b8bf6ebf653716124
ebf9465d213336819b15e3b21d02afce64470d4f 02-Sep-2015 Yasuhiro Matsuda <mazda@google.com> resolved conflicts for merge of ef57e5e0 to stage-aosp-master

Change-Id: I1c31b38936dc74619dea27f0d5eecab43360bb8c
1ab43d5978813f56899dbd3115fd7d9f96b4fe55 30-Jun-2015 Yasuhiro Matsuda <mazda@google.com> Add trace code to system server.

- Add TRACE_TAG_SYSTEM_SERVER for tracing system server code.
- Add a few more tracing code to the code paths related to boot.

BUG: 21739901
BUG: 22207144
Change-Id: I08b424d2f83783f512c3818394099909cd55f327
/frameworks/base/core/jni/AndroidRuntime.cpp
5fa6c7424a041e78a8d4976ec52ef6f684fa3270 18-Aug-2015 Sebastien Hertz <shertz@google.com> am 60a2716f: am 3244dc22: am 677cd087: am e9de1b4c: am 9a010d0a: Merge "Allow debugging only for apps forked from zygote" into mnc-dev

* commit '60a2716f720e843a7de6e7209c2021d95538711e':
Allow debugging only for apps forked from zygote
60a2716f720e843a7de6e7209c2021d95538711e 18-Aug-2015 Sebastien Hertz <shertz@google.com> am 3244dc22: am 677cd087: am e9de1b4c: am 9a010d0a: Merge "Allow debugging only for apps forked from zygote" into mnc-dev

* commit '3244dc229af4d4c8b764bf9ca1e108b5cd933d90':
Allow debugging only for apps forked from zygote
e95386852e70995e3356177c7e0d507fd1d01b65 18-Aug-2015 Sebastien Hertz <shertz@google.com> am 9a010d0a: Merge "Allow debugging only for apps forked from zygote" into mnc-dev

* commit '9a010d0a4157f97870bc38bd3dd0a8f4fd18a172':
Allow debugging only for apps forked from zygote
9a010d0a4157f97870bc38bd3dd0a8f4fd18a172 18-Aug-2015 Sebastien Hertz <shertz@google.com> Merge "Allow debugging only for apps forked from zygote" into mnc-dev
ae61c26534a3dd3a71bc4c7ab3993e6923f1a201 12-Aug-2015 Narayan Kamath <narayan@google.com> am 0d2e3d3e: am c42acbdb: am 088c4155: am 86b6d204: am bf88205b: Fall back to persist.sys.language/country if locale isn\'t set.

* commit '0d2e3d3ea3cd1bd0f77b3fdd8da6b17261cdd799':
Fall back to persist.sys.language/country if locale isn't set.
0d2e3d3ea3cd1bd0f77b3fdd8da6b17261cdd799 12-Aug-2015 Narayan Kamath <narayan@google.com> am c42acbdb: am 088c4155: am 86b6d204: am bf88205b: Fall back to persist.sys.language/country if locale isn\'t set.

* commit 'c42acbdb65d89b1e5fc1cafde4cbe0996c104f7a':
Fall back to persist.sys.language/country if locale isn't set.
d29382aaf0dc68eb5a41621fedabeca4406efe06 12-Aug-2015 Narayan Kamath <narayan@google.com> am bf88205b: Fall back to persist.sys.language/country if locale isn\'t set.

* commit 'bf88205bef88f78ade5c6830e6203aa343387820':
Fall back to persist.sys.language/country if locale isn't set.
bf88205bef88f78ade5c6830e6203aa343387820 11-Aug-2015 Narayan Kamath <narayan@google.com> Fall back to persist.sys.language/country if locale isn't set.

This will prevent users from losing their language setting when they
take an OTA to M.

bug: 23021286
Change-Id: Ifb66f6bf6a940ab745edac709321f3009ec6eab4
/frameworks/base/core/jni/AndroidRuntime.cpp
7a09b8322cab26d6e3da1362d3c74964ae66b5d4 10-Aug-2015 Sebastien Hertz <shertz@google.com> Allow debugging only for apps forked from zygote

When starting the runtime from app_process, we only pass JDWP options
if starting zygote. It prevents from opening a JDWP connection in
non-zygote programs while Android apps (forked from zygote) remain
debuggable.

Bug: 23050463
Change-Id: If8ea719063a65db4cdeed69a838b52e87b078b08
/frameworks/base/core/jni/AndroidRuntime.cpp
112d9c7f116bec0a52badde81bd778e59e88cb63 07-Aug-2015 Roozbeh Pournader <roozbeh@google.com> Remove EmojiFactory and its mentions from frameworks.

Bug: 18134313
Bug: 20158206
Change-Id: If46cdbd9d558e6592280b2b95f00b87d04de70a2
/frameworks/base/core/jni/AndroidRuntime.cpp
1f105a6b27f7b4036a559482a2341ab85a4719a5 24-Jul-2015 Andreas Gampe <agampe@google.com> Frameworks/base: Hand fingerprint to ART

To allow ANR dumps to be symbolized easily, hand the build
fingerprint to the runtime.

Bug: 22693991

(cherry picked from commit e60825033fdde9eefaeec768a28b907e2d22f10c)

Change-Id: Ibd3d3b3bd65dce84acfb97a487807d6f280a9508
/frameworks/base/core/jni/AndroidRuntime.cpp
d1fffe1c898c2de3b78a82b504c739c60b1ce31a 25-Jul-2015 Andreas Gampe <agampe@google.com> am 505a252c: am 851f5185: am 08edf246: am 9a755e36: Merge "Frameworks/base: Hand fingerprint to ART" into mnc-dev

* commit '505a252cf7120dda0f1afb72f532bd99ada23baa':
Frameworks/base: Hand fingerprint to ART
7d33ecc147f0476fbe9c229faf06becabfb3e8fe 24-Jul-2015 Andreas Gampe <agampe@google.com> am 9a755e36: Merge "Frameworks/base: Hand fingerprint to ART" into mnc-dev

* commit '9a755e3650270439861f5ac1e0c51caa7c4a7d3d':
Frameworks/base: Hand fingerprint to ART
e60825033fdde9eefaeec768a28b907e2d22f10c 24-Jul-2015 Andreas Gampe <agampe@google.com> Frameworks/base: Hand fingerprint to ART

To allow ANR dumps to be symbolized easily, hand the build
fingerprint to the runtime.

Bug: 22693991
Change-Id: Ibd3d3b3bd65dce84acfb97a487807d6f280a9508
/frameworks/base/core/jni/AndroidRuntime.cpp
bef809c4ba9cbf4654faf2d6c1ebfbc0a38c56fe 04-Jul-2015 Narayan Kamath <narayan@google.com> am 4da086ee: am 6bcdf90e: Merge "Delete unused testing scripts and WithFramework."

* commit '4da086ee7f4eba64265b28cdc5df9f690d97a7ac':
Delete unused testing scripts and WithFramework.
c21dab9dcbfce40879b86d5a757b749e77f5b244 25-Jun-2015 Narayan Kamath <narayan@google.com> Delete unused testing scripts and WithFramework.

These scripts haven't worked in a long time now. run_core_test
uses VM options that aren't supported and WithFramework (which is
unmaintained) and run_junit.sh refers to an APK that doesn't
exist anymore.

If anyone wishes to run these tests individually, they can just
use vogar instead :
$ make vogar vogar.jar
$ vogar --mode=activity frameworks/base/tests/CoreTests/android/core/Sha1Test.java

This also allows us to delete the WithFramework class, which was
only referenced by these obsolete scripts.

bug: 22078684
Change-Id: I481f6721d51d50456421a1526c370b93aec9b351
/frameworks/base/core/jni/AndroidRuntime.cpp
cadcd51e0548b21adc4c3e6bd6e31d5e4ee591c1 23-Jun-2015 Andreas Gampe <agampe@google.com> Frameworks/base: Add tracing system properties

Add system properties to support zygote-started method tracing.
These are needed as the limit on system properties does not allow
the reuse of the runtime extra options system property.

Bug: 21760614

(cherry picked from commit 98f406f6f31660d0f5ee32113ffadc720b426dc6)

Change-Id: I3785cc5715acadbee81ef7b45081ed780f1351d3
/frameworks/base/core/jni/AndroidRuntime.cpp
98f406f6f31660d0f5ee32113ffadc720b426dc6 23-Jun-2015 Andreas Gampe <agampe@google.com> Frameworks/base: Add tracing system properties

Add system properties to support zygote-started method tracing.
These are needed as the limit on system properties does not allow
the reuse of the runtime extra options system property.

Bug: 21760614
Change-Id: I3785cc5715acadbee81ef7b45081ed780f1351d3
/frameworks/base/core/jni/AndroidRuntime.cpp
065075e1f993a68579ed7f8034ab09d96ec957a9 28-May-2015 David Srbecky <dsrbecky@google.com> Replace --include-cfi with --generate-debug-info.

This follows a change in dex2oat.

(cherry picked from commit f39477b592e6e17fe41ace2e18602a69b2dd1619)

Bug: 21924613
Change-Id: I46b61298ca00bee2e83080456b180d63efd95b8f
/frameworks/base/core/jni/AndroidRuntime.cpp
f39477b592e6e17fe41ace2e18602a69b2dd1619 28-May-2015 David Srbecky <dsrbecky@google.com> Replace --include-cfi with --generate-debug-info.

This follows a change in dex2oat.

Change-Id: I46b61298ca00bee2e83080456b180d63efd95b8f
/frameworks/base/core/jni/AndroidRuntime.cpp
27c39f1adeaf1a653fb41a5af64ee815b8048dd6 27-Apr-2015 Andreas Gampe <agampe@google.com> am b6d14a00: resolved conflicts for merge of c29791d5 to mnc-dev-plus-aosp

* commit 'b6d14a009e43a4d61ae2a4f98f6e3b914148d0a9':
Frameworks/base: Add debug.gencfi property

(cherry picked from commit a5b55a017a984608eacdf414bc1cbcd7615f1c13)
/frameworks/base/core/jni/AndroidRuntime.cpp
a876b35d485008b690578889d11e69b40d4e7170 25-Apr-2015 Andreas Gampe <agampe@google.com> Frameworks/base: Add debug.gencfi property

Add the debug.gencfi system property that forces generation of
CFI data.

Change-Id: Ida66f8c1567634d05cfdbba1a982be3684e94369
/frameworks/base/core/jni/AndroidRuntime.cpp
d95e58cb609228c4c4b231e00d6bb648e9dcaf71 07-Apr-2015 Dmitriy Ivanov <dimitry@google.com> Merge "Load libraries directly from apk"
dec4688f40b0018fbd1f00db05581966f531d88f 01-Oct-2014 Dmitriy Ivanov <dimitry@google.com> Load libraries directly from apk

Introduced new 'extractNativeLibs' attribute to manifest/application.
Setting it to false prevents installer from extracting library from apk.

The default value for extractNativeLibs is true.

Bug: 8076853
(cherry picked from commit ff193d642eea7128faad837d19e347cd25212c27)
Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
/frameworks/base/core/jni/AndroidRuntime.cpp
305b44b9488c4ad44d2a1b0749c8bd49835eb216 04-Apr-2015 Andreas Gampe <agampe@google.com> am f29be77f: am a4f39ed9: am f8cb672f: Merge "Frameworks/base: Pass variant and feature-set to runtime"

* commit 'f29be77f07084e88ae7104a375a1a54fd91de0dd':
Frameworks/base: Pass variant and feature-set to runtime
605cca1a985be74c00582853ee2c84b086cfade8 03-Apr-2015 Andreas Gampe <agampe@google.com> Frameworks/base: Pass variant and feature-set to runtime

This is required so we pick up the settings correctly when compiling
the boot image on device, or compile any dex files through a
DexClassLoader.

Bug: 20055104
Change-Id: Ia3ab2e48855060894b36f7fd360fe17b978e45a6
/frameworks/base/core/jni/AndroidRuntime.cpp
ac038f3b69724647e9ff7b115eea77d442c9d0f5 02-Apr-2015 Andreas Gampe <agampe@google.com> resolved conflicts for merge of 844e44c9 to master

Change-Id: I8f682da1a50151547f01b4d3a949852525fe6299
e324ba0e7cc1b831f86c5d2f0578c9b881a3130b 01-Apr-2015 Andreas Gampe <agampe@google.com> Frameworks/base: Use system property for cache prune counter

Expose ART's -Xzygote-max-boot-retry through a new system property
dalvik.vm.zygote.max-boot-retry.

Bug: 19983101
Change-Id: Ib88f807e0082d71292c14c7af38e02cca5a5602c
/frameworks/base/core/jni/AndroidRuntime.cpp
a60e809994664d62892b2722f0e8af440afc65ba 31-Mar-2015 Andreas Gampe <agampe@google.com> am abeba1ff: am c10fa20b: am 02c4bbb9: Merge "Frameworks/base: Support dex2oat threads system property"

* commit 'abeba1ff3306eab6ba6e58dce895cd2cf9117700':
Frameworks/base: Support dex2oat threads system property
e0352388238875ef7e7b31d914fc903b08ff0f6b 31-Mar-2015 Andreas Gampe <agampe@google.com> Frameworks/base: Support dex2oat threads system property

Check dalvik.vm.dex2oat-threads in AndroidRuntime and pass to ART
with "-j" as a compiler option, if found.

Check dalvik.vm.image-dex2oat-threads in AndroidRuntime and pass to
ART with "-j" as an image compiler option, if found.

Bug: 19992386
Change-Id: I5e7806cf560607d31a1d6901dffb14bee538c9cc
/frameworks/base/core/jni/AndroidRuntime.cpp
ff193d642eea7128faad837d19e347cd25212c27 01-Oct-2014 Dmitriy Ivanov <dimitry@google.com> Load libraries directly from apk

Introduced new 'extractNativeLibs' attribute to manifest/application.
Setting it to false prevents installer from extracting library from apk.

The default value for extractNativeLibs is true.

Bug: 8076853
Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
/frameworks/base/core/jni/AndroidRuntime.cpp
543a3578ad0a1d0214b9102ddec0fc26a0e5d63e 19-Mar-2015 Mathieu Chartier <mathieuc@google.com> am 05844d57: am b7d997a7: Merge "Revert "Change jit properties to be debug properties""

* commit '05844d573f33c77cd7bb608a118a998506a6996d':
Revert "Change jit properties to be debug properties"
1fb7aab9b235fa526a1b8e6e2efd71c7df66096d 19-Mar-2015 Mathieu Chartier <mathieuc@google.com> Revert "Change jit properties to be debug properties"

Bug: 19735273

This reverts commit 1ad10ef1e4b83ef9e845761a82e202bb57e2379d.

Change-Id: Iac930925ab6d5cd5947fa4077c8d93e2984927d5
/frameworks/base/core/jni/AndroidRuntime.cpp
6f6f825ebbea34255c69c0a6480f128348ec9bb6 17-Mar-2015 Mathieu Chartier <mathieuc@google.com> am 5ec7c78d: am 008ec61e: Merge "Change jit properties to be debug properties"

* commit '5ec7c78d52a5a01ed1755ad8b8e486e4c6f05a93':
Change jit properties to be debug properties
1ad10ef1e4b83ef9e845761a82e202bb57e2379d 17-Mar-2015 Mathieu Chartier <mathieuc@google.com> Change jit properties to be debug properties

Bug: 19735273
Change-Id: I266cf447a7af0595366bf89109d2823094f5cf41
/frameworks/base/core/jni/AndroidRuntime.cpp
633cb563f36001d6973b69291086cbdfe50612c5 06-Mar-2015 Eric Laurent <elaurent@google.com> broadcast radio JNI.

Initial implementation of broadcast radio JNI.

Change-Id: Ia01f567292295928fbf6d9c23de362867dc15314
/frameworks/base/core/jni/AndroidRuntime.cpp
c9070ebd13263a341511cf779087a46750021196 10-Mar-2015 Chris Craik <ccraik@google.com> Rename and simplify DisplayList Canvas classes

Change-Id: I49fd2ce02e01401209fe2a378e9f9547c7b27c61
/frameworks/base/core/jni/AndroidRuntime.cpp
5e3c29956b4c14afa25e9f354ee1443e71b72974 08-Mar-2015 Mathieu Chartier <mathieuc@google.com> am ea3d53f5: am 773bcfa7: am e59b7ce2: Merge "Add JIT system properties"

* commit 'ea3d53f5a8f8e396bf8918041087db4603d444e5':
Add JIT system properties
773bcfa7ecb1e06831e7f060ecc3c43d0cf1bf00 06-Mar-2015 Mathieu Chartier <mathieuc@google.com> am e59b7ce2: Merge "Add JIT system properties"

* commit 'e59b7ce2564a916240e561b36f4476f2d72a65c5':
Add JIT system properties
6909c0e1e7bbf6e8050330244bbe47bff9587225 06-Mar-2015 Mathieu Chartier <mathieuc@google.com> Add JIT system properties

Added the following runtime options.
"dalvik.vm.usejit" -> "-Xusejit:"
"dalvik.vm.jitcodecachesize" -> "-Xjitcodecachesize:"
"dalvik.vm.jitthreshold" -> "-Xjitthreshold:"

Bug: 17950037
Change-Id: I4996cdd1e34a1743d83c37069f545e6e09bccdb9
/frameworks/base/core/jni/AndroidRuntime.cpp
56bbefccf27d3c32029121fe23f0b02c01eba338 22-Jan-2015 Narayan Kamath <narayan@google.com> Merge "Add support for persist.sys.locale." automerge: dca2332 automerge: 117f161
automerge: 1194e75

* commit '1194e754a95e1fa5d4eba6d0bca109156dd4df94':
Add support for persist.sys.locale.
1194e754a95e1fa5d4eba6d0bca109156dd4df94 22-Jan-2015 Narayan Kamath <narayan@google.com> Merge "Add support for persist.sys.locale." automerge: dca2332
automerge: 117f161

* commit '117f161fee52dfa200f89282c487d58c29b41d4f':
Add support for persist.sys.locale.
d30dbb8ae12e6e83e3035f12dd291f92e1f22c18 15-Jan-2015 Narayan Kamath <narayan@google.com> Add support for persist.sys.locale.

AndroidRuntime has been changed to read "ro.product.locale" and
"persist.sys.locale" instead of "ro.product.locale.language" etc.
This is passed down as "-Duser.locale" to the runtime.

The system_server has been changed to write out persist.sys.locale
on locale changes.

bug: 17691569

Change-Id: I93360c8795c9620a133656dc491d13d7b6ed162e
/frameworks/base/core/jni/AndroidRuntime.cpp
177612335aa5df21d8c21125608413d02289a6b3 15-Jan-2015 Ben Wagner <bungeman@google.com> Remove last mention of SkFontHost.

SkFontHost is now almost removed from Skia, and nothing is left in it
which interests Android. Remove the last few references to it to aid
in final removal.

Change-Id: I7d59cf7e08bdd5b9c3923c9ffaf03b1cc2f9f7b4
/frameworks/base/core/jni/AndroidRuntime.cpp
555ea653bae019379eb8d1aa70dfcb86789c19d3 07-Jan-2015 Andreas Gampe <agampe@google.com> am ec64c0b6: am 022b1ba1: Merge "Core/jni: Disallow relocation for decryption"

* commit 'ec64c0b6e639b743398fb543218100fdaf9a7f69':
Core/jni: Disallow relocation for decryption
155118fee81f2761289438f4c4cd47d740ff8f88 07-Jan-2015 neo.chae <neo.chae@lge.com> Core/jni: Disallow relocation for decryption

When decrypting a device, a tmpfs is temporarily mounted as /data,
the size of which is usually small. When the zygote, system server
and necessary apps are brought up, they will be compiled into the
tmpfs.

If the system image contains prebuilts, they will be relocated instead
of compiled. This is unnecessary. In this special situation it is
acceptable to run out of the prebuilt oat files without relocation,
which can save space in the tmpfs.

This patch ensures that the boot image is not being relocated.

Change-Id: I42bfb7e3039574b7e4f2772e0d395f093d59ed1b
Signed-off-by: Hyangseok Chae <neo.chae@lge.com>
/frameworks/base/core/jni/AndroidRuntime.cpp
83cfb97323469e3370840c6cefb5689ab2059025 23-Dec-2014 Andreas Gampe <agampe@google.com> am 5470c169: am 2b20efa7: Merge "Core/jni: Remove Dalvik options from AndroidRuntime"

* commit '5470c1699121135f0f1c615d080359f0bc9cf1c4':
Core/jni: Remove Dalvik options from AndroidRuntime
08b2d585b11a07d1df12919467722d9c5c80a0f4 18-Dec-2014 Andreas Gampe <agampe@google.com> Core/jni: Remove Dalvik options from AndroidRuntime

Dalvik is dead. Remove old command-line options from AndroidRuntime.

Bug: 18833580
Bug: 18834205
Change-Id: If9a6f78cc0d74fc7a596b08065059b388a8d4b2f
/frameworks/base/core/jni/AndroidRuntime.cpp
e6f2f9db42632f581d221ece90e1824e114f2f12 18-Dec-2014 Elliott Hughes <enh@google.com> am 5cd79d07: Merge "Move the remaining ZygoteInit native code over to Java."
automerge: e37f3af

* commit 'e37f3af76dc0c876ea7169b9153f79175d0c703d':
Move the remaining ZygoteInit native code over to Java.
26b56e628bd77b1e77137b68aecb194791ec6cf6 17-Dec-2014 Elliott Hughes <enh@google.com> Move the remaining ZygoteInit native code over to Java.

Bug: 18719692
Change-Id: I5f9834edecdbcc065a33a9921c740a53441636a4
/frameworks/base/core/jni/AndroidRuntime.cpp
2e706eb5b7154044d1a22ed03738bba16867f745 18-Nov-2014 Andreas Gampe <agampe@google.com> am f1c84568: am 2a20f425: Merge "Frameworks/base: Compiled-classes support" into lmp-mr1-dev

* commit 'f1c84568bc48d51ace404452c9e18250c4d36de4':
Frameworks/base: Compiled-classes support
f59fb28cb818d0618ca0c83e80eba12e6ca081ef 18-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Compiled-classes support

Let AndroidRuntime check for /system/etc/compiled-classes and push
it to the runtime for boot image creation.

Bug: 18410571

(cherry picked from commit ca775941f3b7981aabf3a6a3b84d6c94f4f76aff)

Change-Id: I2510316381f2661166af24d7e14b013f4e045556
/frameworks/base/core/jni/AndroidRuntime.cpp
ca775941f3b7981aabf3a6a3b84d6c94f4f76aff 18-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Compiled-classes support

Let AndroidRuntime check for /system/etc/compiled-classes and push
it to the runtime for boot image creation.

Bug: 18410571
Change-Id: I2510316381f2661166af24d7e14b013f4e045556
/frameworks/base/core/jni/AndroidRuntime.cpp
e77a906653739c5d0b67bbffa5566956fddd8cc9 17-Nov-2014 Ying Wang <wangying@google.com> am bb637938: am 7f5fbe9e: Merge "Frameworks/base: AndroidRuntime standalone preloaded-classes" into lmp-mr1-dev

* commit 'bb637938d476e7927d2eed53255a3be7f5dd2d19':
Frameworks/base: AndroidRuntime standalone preloaded-classes
65ff8ee1344d5bd2a9f068348992c3b9c8496d31 15-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: AndroidRuntime standalone preloaded-classes

Change AndroidRuntime::startVM to give the new standalone
preloaded-classes file to the runtime for compilation of images.

Bug: 18305157

(cherry picked from commit 995c62d6abd4b7080e52a60d1bffa32ae4a798a3)

Change-Id: I32a13357893222b25fbce60bf2367c23fb36ab22
/frameworks/base/core/jni/AndroidRuntime.cpp
995c62d6abd4b7080e52a60d1bffa32ae4a798a3 15-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: AndroidRuntime standalone preloaded-classes

Change AndroidRuntime::startVM to give the new standalone
preloaded-classes file to the runtime for compilation of images.

Bug: 18305157
Change-Id: I32a13357893222b25fbce60bf2367c23fb36ab22
/frameworks/base/core/jni/AndroidRuntime.cpp
035a7b0235835e856f39623fc571668e2d6048da 14-Nov-2014 Andreas Gampe <agampe@google.com> am 0626ec58: Merge "Frameworks/base: Wall Werror in core/jni"

* commit '0626ec58243c9dc7f4812a453ef9456b1f7ff1f4':
Frameworks/base: Wall Werror in core/jni
0f0b4919667f418b249c497f5ad3e83fdf4437e5 12-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Wall Werror in core/jni

Turn on -Wall -Werror in core/jni. Fix warnings.

Clang TODO: For GCC we need to turn off Wunused-but-set-variable in
the GL bindings. However, Clang doesn't have that warning and thus
complains about an unknown pragma. It is necessary to make the
pragma #ifdef-ed on the compiler being GCC.

Change-Id: I14cab48d45c2771eef0432082356c47ed44a3d7f
/frameworks/base/core/jni/AndroidRuntime.cpp
92faa96a26728370b2e3d002a83482e7345bfd0c 31-Oct-2014 Dianne Hackborn <hackbod@google.com> am 8f53ad8e: am 7ef46316: Merge "Condense AndroidRuntime init log, include uid running under." into lmp-mr1-dev

* commit '8f53ad8e7335068b4dd96db10916c3889960de5a':
Condense AndroidRuntime init log, include uid running under.
8e5aafe57dd1f5e8ccd7ad1bf37e4487fbe8a110 28-Oct-2014 Dianne Hackborn <hackbod@google.com> Condense AndroidRuntime init log, include uid running under.

Change-Id: Ifda3001fdc25d759f07a93b8569c59da89a8bcfc
/frameworks/base/core/jni/AndroidRuntime.cpp
5cfbcd3b9e35f98b7e6eb4fc2774037ea343ec48 27-Aug-2014 Wei Jin <wejin@google.com> Fix the length of a profiler system property

This patch changes the profiler system property
"dalvik.vm.profile.max-stack-depth" to "dalvik.vm.profile.stack-depth"
so that the length of the option is less than PROP_NAME_MAX.

Bug: 17294224

(cherry picked from commit 4d033e1c44c1b94ea5311713b8cc8bfb56bdcdd2)

Change-Id: I10dd0b3bfa46b836def437a3822f6c48538167dd
/frameworks/base/core/jni/AndroidRuntime.cpp
1f2ad9eb7417045c0a08b49a3bdf48600627c57e 20-Oct-2014 Neil Fuller <nfuller@google.com> am dfcf0655: am 09fd5a18: Merge "Replacing FloatMath native implementation with calls to Math"

* commit 'dfcf065505a12aa358af5cd2607fd355eee964c4':
Replacing FloatMath native implementation with calls to Math
38b63f0edeaa856335ce8a047404bc4ca2ac6de7 20-Oct-2014 Neil Fuller <nfuller@google.com> am dfcf0655: am 09fd5a18: Merge "Replacing FloatMath native implementation with calls to Math"

* commit 'dfcf065505a12aa358af5cd2607fd355eee964c4':
Replacing FloatMath native implementation with calls to Math
7b3db39aa47108c87dad5e930b6fec2292219abe 18-Oct-2014 Nick Kralevich <nnk@google.com> Replacing FloatMath native implementation with calls to Math

On modern versions of Android running in AOT mode
FloatMath is slower than Math. Calls to Math.sqrt(),
etc. are replaced by intrinsics which can be as small
as a single CPU opcode.

When running in interpreted mode the new
implementation is unfortunately slower, but I'm
judging this acceptable and likely to be improved
over time. This change saves a small amount of native
code.

Example timings:

Mako AOSP AOT:

Method: Original / New / Direct call to Math
ceil: 596ns / 146.ns / 111ns
sqrt: 694ns / 56ns / 25ns

Mako AOSP interpreted:

Method: Original / New / Direct call to Math
ceil: 1900ns / 2307ns / 1485ns
sqrt: 1998ns / 2603ns / 1788ns

Other calls Mako AOT:

Method: Original / New
cos: 635ns / 270ns
exp: 566ns / 324ns
floor: 604ns / 150ns
hypot: 631ns / 232ns
pow: 936ns / 643ns
sin: 641ns / 299ns

The advice to use Math directly, in preference to
FloatMath, is still good. FloatMath will be deprecated
separately.

Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: If07fcbd78543d13bc6d75f9743f999860e8d58d7
/frameworks/base/core/jni/AndroidRuntime.cpp
870367567a1665dbb109e030f4a2828b60b454db 18-Oct-2014 Elliott Hughes <enh@google.com> am 84e6d466: am 4cd671e4: Merge "Revert "Replacing FloatMath native implementation with calls to Math""

* commit '84e6d466edc2aba711f90431a1cd209d11c0e70d':
Revert "Replacing FloatMath native implementation with calls to Math"
5fc9f9c293ecdcb98b243fcabca7d82f0cef078f 18-Oct-2014 Elliott Hughes <enh@google.com> am 84e6d466: am 4cd671e4: Merge "Revert "Replacing FloatMath native implementation with calls to Math""

* commit '84e6d466edc2aba711f90431a1cd209d11c0e70d':
Revert "Replacing FloatMath native implementation with calls to Math"
b3b68d03337274ada521199d507491bc756c4319 18-Oct-2014 Elliott Hughes <enh@google.com> Revert "Replacing FloatMath native implementation with calls to Math"

This reverts commit 32b88b48daa7383880088246d7222dd93cf55285.

Change-Id: I40ea17f3a68f2b53eb013aebd3ba1becdc724f94
/frameworks/base/core/jni/AndroidRuntime.cpp
06965cfd12854d8b1f783a847d4b979100da4551 16-Oct-2014 Neil Fuller <nfuller@google.com> am 8a3785ca: am fd2d41b7: Merge "Replacing FloatMath native implementation with calls to Math"

* commit '8a3785cafec4b47fe8d61614b04a0e193d616428':
Replacing FloatMath native implementation with calls to Math
4ef94035773757d13f611d409e51842505245221 16-Oct-2014 Neil Fuller <nfuller@google.com> am 8a3785ca: am fd2d41b7: Merge "Replacing FloatMath native implementation with calls to Math"

* commit '8a3785cafec4b47fe8d61614b04a0e193d616428':
Replacing FloatMath native implementation with calls to Math
32b88b48daa7383880088246d7222dd93cf55285 29-Sep-2014 Neil Fuller <nfuller@google.com> Replacing FloatMath native implementation with calls to Math

On modern versions of Android running in AOT mode
FloatMath is slower than Math. Calls to Math.sqrt(),
etc. are replaced by intrinsics which can be as small
as a single CPU opcode.

When running in interpreted mode the new
implementation is unfortunately slower, but I'm
judging this acceptable and likely to be improved
over time. This change saves a small amount of native
code.

Example timings:

Mako AOSP AOT:

Method: Original / New / Direct call to Math
ceil: 596ns / 146.ns / 111ns
sqrt: 694ns / 56ns / 25ns

Mako AOSP interpreted:

Method: Original / New / Direct call to Math
ceil: 1900ns / 2307ns / 1485ns
sqrt: 1998ns / 2603ns / 1788ns

Other calls Mako AOT:

Method: Original / New
cos: 635ns / 270ns
exp: 566ns / 324ns
floor: 604ns / 150ns
hypot: 631ns / 232ns
pow: 936ns / 643ns
sin: 641ns / 299ns

The advice to use Math directly, in preference to
FloatMath, is still good. FloatMath will be deprecated
separately.

Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: I8d1947d88b3c576643138b1df589fb9da7c1ab88
/frameworks/base/core/jni/AndroidRuntime.cpp
15b3c63386978f01d4c35913a7e894602ceabcea 19-Sep-2014 Mike Lockwood <lockwood@google.com> am b4b95714: am e996ea18: am ad421a8b: am 52e5e359: Merge "USB string descriptors are not UTF8, so it is not safe to treat them as such." into lmp-dev

* commit 'b4b957144368a23cd916b7d7f5656141b7cb0dae':
USB string descriptors are not UTF8, so it is not safe to treat them as such.
99f8f21c166cf262489633b2e6a8dbe5f1771a8d 19-Sep-2014 Mike Lockwood <lockwood@google.com> am d3d6ecdb: am 52e5e359: Merge "USB string descriptors are not UTF8, so it is not safe to treat them as such." into lmp-dev

* commit 'd3d6ecdb7a6b00347920c5e706275017854849af':
USB string descriptors are not UTF8, so it is not safe to treat them as such.
51938c205f41da95486b17ea645fd0ce2a73be82 19-Sep-2014 Mike Lockwood <lockwood@google.com> Merge "USB string descriptors are not UTF8, so it is not safe to treat them as such." into lmp-dev
c846e61639c3808889ac394366dd4db5379a3b88 12-Sep-2014 Jeff Brown <jeffbrown@google.com> am a38e59b1: am 683872af: Merge "Clean entire arg block when setting process name." into lmp-dev

* commit 'a38e59b1b4164a33c38fc522e56601d886c49833':
Clean entire arg block when setting process name.
00c0cd4a24bd0f040055f9e786e2df1fa3b7d2d3 11-Sep-2014 Jeff Brown <jeffbrown@google.com> Clean entire arg block when setting process name.

When Android processes fork from Zygote, we rewrite the command line
with a new name, eg. "system_server". When we do this, we should
fill the entire block with zeros to remove corrupted argument
information that may otherwise remain in the /proc/<pid>/cmdline buffer
and be seen in tools and stack dumps.

Fixed an issue where VM options could be overwritten after setting
the nice name if the name was too long.

Bug: 17474152
Change-Id: Ie6cf9ed7752a04300a340e26cd6812bb35c59e1b
/frameworks/base/core/jni/AndroidRuntime.cpp
87c8260341a54dbaa7a26eb81a40f65688c3ed36 10-Sep-2014 Svetoslav <svetoslavganov@google.com> am f1b72b86: am 3f49b128: Merge "Trim unnecessary pages when printing." into lmp-dev

* commit 'f1b72b86380b25b933be32c46d4f59a41699a546':
Trim unnecessary pages when printing.
62ce332c141cf7bc7200c4c87d63e395874fc3ec 05-Sep-2014 Svetoslav <svetoslavganov@google.com> Trim unnecessary pages when printing.

A user may request a subset of the document's pages to be printed.
In this case the expectation is that the resulting document does
not include not selected pages. While print serivices can do the
trimming themselves or the printer may do so, moving, potantually
many, redundant pages is inefficient. The real problem is when
saving to a PDF file where the saved file must not have the pages
the user did not select. This change adds shredding of undesired
pages from the PDF before saving it or passing it to a print service.
:
bug:17285994

Change-Id: I7deba535af99457bea3c118202314f0f3812e809
/frameworks/base/core/jni/AndroidRuntime.cpp
9ee5e7e17f7d65620f21d1a42865981e7bc56593 09-Sep-2014 Mike Lockwood <lockwood@google.com> USB string descriptors are not UTF8, so it is not safe to treat them as such.

Add AndroidRuntime::NewStringLatin1() to convert non-UTF8 strings to Java strings.

Bug: 17427781
Change-Id: I7df1d4e94a7beebc8b1a74c0c0a163b794025ae8
/frameworks/base/core/jni/AndroidRuntime.cpp
eee5254d783d80fd2b9bc5881b97931ec698a914 27-Aug-2014 Calin Juravle <calin@google.com> am d5f23f2e: am 2d3571cc: Merge "Fix the length of a profiler system property"

* commit 'd5f23f2ec0769248d00cfd6e9049cfa354492cce':
Fix the length of a profiler system property
2d3571cc17a5a6b1072951227d889ce14a3f88cf 27-Aug-2014 Calin Juravle <calin@google.com> Merge "Fix the length of a profiler system property"
4d033e1c44c1b94ea5311713b8cc8bfb56bdcdd2 27-Aug-2014 Wei Jin <wejin@google.com> Fix the length of a profiler system property

This patch changes the profiler system property
"dalvik.vm.profile.max-stack-depth" to "dalvik.vm.profile.stack-depth"
so that the length of the option is less than PROP_NAME_MAX.

Bug: 17294224
Change-Id: I5723883d7fa38dd5eaa276182e5d680d152cedad
/frameworks/base/core/jni/AndroidRuntime.cpp
d71de10c4207617a8462d8b3ba893416173016ed 27-Aug-2014 Calin Juravle <calin@google.com> Update the handling of the native bridge property.

ro.dalvik.vm.native.bridge is expected to be always be set. A value of
"0" means that the native bridge is disabled and that no value should be
passed to the runtime.

Bug: 17104449

(cherry picked from commit 831bd75b2bbc126f02578a967e925271b9cac6d3)

Change-Id: Ib483ac8e96bdc66af2725815807d4deb36fb36ab
/frameworks/base/core/jni/AndroidRuntime.cpp
9b5112c36b5163925cb303c0cd016bf4115c5800 27-Aug-2014 Calin Juravle <calin@google.com> Merge "Make native bridge property read-only."
be20ed41f7b8a8879da733c2b5bce85bcb30c76b 27-Aug-2014 Calin Juravle <calin@google.com> Update the handling of the native bridge property.

ro.dalvik.vm.native.bridge is expected to be always be set. A value of
"0" means that the native bridge is disabled and that no value should be
passed to the runtime.

Bug: 17104449
Change-Id: I94e60c68e732abdab18f14f960d3b80f32048a79
/frameworks/base/core/jni/AndroidRuntime.cpp
685a12b4466e67f944afd2a26ea11444fb528124 18-Aug-2014 Calin Juravle <calin@google.com> Make native bridge property read-only.

Bug: 17104449

(cherry picked from commit 53db6ae7819177abb9df156b269726a69a8c72df)

Change-Id: I926356f1e472a20d571e40c0c7dbb9c5a66a44a9
/frameworks/base/core/jni/AndroidRuntime.cpp
53db6ae7819177abb9df156b269726a69a8c72df 18-Aug-2014 Calin Juravle <calin@google.com> Make native bridge property read-only.

Bug: 17104449
Change-Id: If2e2a0c2cd1783883ef34d25a527ee93f9eadfa5
/frameworks/base/core/jni/AndroidRuntime.cpp
1567d2f0b71ccb3c9e0af3d2f4c258721624a8c1 15-Aug-2014 Brian Carlstrom <bdc@google.com> Disable verification based on vold.decrypt. [frameworks/base]

Bug: 15165413

(cherry picked from commit 6d05323e97e98022be7fc1a803115e2628f2d1f4)

Change-Id: I5454488a9db0fd70c64e8fc78b622c56ea96e6fd
/frameworks/base/core/jni/AndroidRuntime.cpp
261e240c05a32aec20022ae3f527dafea5f3f0d8 15-Aug-2014 Brian Carlstrom <bdc@google.com> Merge "Disable verification based on vold.decrypt. [frameworks/base]" into lmp-dev
df6c83fa7bbef0f69fe2ed0a338ac8a798c30f42 15-Aug-2014 Brian Carlstrom <bdc@google.com> Disable verification based on vold.decrypt. [frameworks/base]

Bug: 15165413
Change-Id: I7aff8e2a2890971fe97769d42121c207dc36aa7c
/frameworks/base/core/jni/AndroidRuntime.cpp
29564cd24589867f653cd22cabbaac6493cfc530 07-Aug-2014 Narayan Kamath <narayan@google.com> Remove system_server classes from the boot image.

We set the system_server classpath in the environment
(like we do with BOOTCLASSPATH). After the zygote forks
the system_server, we dexopt the classpath (if needed)
and then launch the system server with the correct
PathClassLoader. This needed several small / medium
refactorings :

- The logic for connecting to installd is now in a separate
class and belongs in the system_server.
- SystemService / SystemServiceManager have now moved to
classes.jar. They are only used from there, and since they
use Class.forName, we want them to be loaded by the
system_server classloader, and not the bootclassloader.
- BootReceiver now moves to frameworks.jar, because it is
used by ActivityThread and friends.

bug: 16555230

Change-Id: Ic84f0b2baf611eeedff6d123cb7191bb0259e600
/frameworks/base/core/jni/AndroidRuntime.cpp
2f4cf2cfd1125abfe928d6137f3d1553b0888f61 07-Aug-2014 Calin Juravle <calin@google.com> Pass the name of the native bridge library to the runtime

Bug: 16843953
Change-Id: Ia0f57a9b3e30a74fe4e93eb4453f841c1ef512eb
/frameworks/base/core/jni/AndroidRuntime.cpp
01db916970ece2382ebf9e06873a14aee9543a9d 07-Aug-2014 Calin Juravle <calin@google.com> Pass the name of the native bridge library to the runtime

Bug: 16843953

(cherry picked from commit 2f4cf2cfd1125abfe928d6137f3d1553b0888f61)

Change-Id: I223f9041e424be024265e46bcff19cd9dfd18dfc
/frameworks/base/core/jni/AndroidRuntime.cpp
ce5bbbea08e9dca963a208f5199aad699d4a854d 31-Jul-2014 Brian Carlstrom <bdc@google.com> Move image classes options from art to AndroidRuntime [frameworks/base]

Bug: 15165413

(cherry picked from commit 108166c749f0418d45f220419a9611c4afec1311)

Change-Id: Ib0d638ac3ca6668a5be04cdbdfd46740dabeceaa
/frameworks/base/core/jni/AndroidRuntime.cpp
0d8fb019633300a6636f1bf99f0716e8579dab35 30-Jul-2014 Brian Carlstrom <bdc@google.com> Disable compilation based on vold.decrypt. [frameworks/base]

Bug: 15165413

(cherry picked from commit 4fd561637a173c7fa6a1d71e9115db1db90514ff)

Change-Id: I2a13b63f9d4a7ffd69a8d21666c6dce84739c6ed
/frameworks/base/core/jni/AndroidRuntime.cpp
3fbfbb4adeec1dda1e149758ea302c386101f267 29-Jul-2014 Brian Carlstrom <bdc@google.com> Move from dalvik.vm.image-dex2oat-flags to dalvik.vm.dex2oat-filter [frameworks/base]

This will allow us to conditionally change the compiler-filter based on other properties.

Bug: 15165413

(cherry picked from commit f60d3a4702f6d00d7edb5d348c53b9b03ae16b76)

Change-Id: I293c81ba817e9abbf9c05b3fb554ef2f0ad0c4ed
/frameworks/base/core/jni/AndroidRuntime.cpp
108166c749f0418d45f220419a9611c4afec1311 31-Jul-2014 Brian Carlstrom <bdc@google.com> Move image classes options from art to AndroidRuntime [frameworks/base]

Bug: 15165413
Change-Id: I69c064b05f62a2e8a3801dc924f5b032dedc8e51
/frameworks/base/core/jni/AndroidRuntime.cpp
4fd561637a173c7fa6a1d71e9115db1db90514ff 30-Jul-2014 Brian Carlstrom <bdc@google.com> Disable compilation based on vold.decrypt. [frameworks/base]

Bug: 15165413
Change-Id: I1972c5af5f392c2ed247888ef33c03e9ffe4d588
/frameworks/base/core/jni/AndroidRuntime.cpp
f60d3a4702f6d00d7edb5d348c53b9b03ae16b76 29-Jul-2014 Brian Carlstrom <bdc@google.com> Move from dalvik.vm.image-dex2oat-flags to dalvik.vm.dex2oat-filter [frameworks/base]

This will allow us to conditionally change the compiler-filter based on other properties.

Bug: 15165413
Change-Id: I1676987c69a3cad4217dc4b56465ef3ae886122a
/frameworks/base/core/jni/AndroidRuntime.cpp
3b852e3489e995600fce19dfdbf3a5d769374d74 25-Jun-2014 Neil Fuller <nfuller@google.com> Rewriting android.text.format.Time without the native _tz functions

(cherry picked from commit d7f0849b8c053ccc6abf0dc7d5bc07da502782a4)
Bug: 15765976

Change-Id: I00f72bd1043ef20f22d25559206b2f741334ba9c
/frameworks/base/core/jni/AndroidRuntime.cpp
d7f0849b8c053ccc6abf0dc7d5bc07da502782a4 25-Jun-2014 Neil Fuller <nfuller@google.com> Rewriting android.text.format.Time without the native _tz functions

Bug: 15765976
Change-Id: I666b72ecf9da8a9dcfb97cc503006b415909a558
/frameworks/base/core/jni/AndroidRuntime.cpp
a4fa3b5aa53cf677b623fe346c585cb8a0c1ce26 09-Jul-2014 destradaa <destradaa@google.com> Add support in the platform for Activity Recognition Hardware.

Change-Id: I7c4fff3526583475a5edf1f4ba8fede4e9419ead
/frameworks/base/core/jni/AndroidRuntime.cpp
e1f57d6f44909a66c7ab0af33dbc5289287e823a 30-May-2014 Eino-Ville Talvala <etalvala@google.com> Camera2: Add CPU/GPU overhead measurement to legacy mode

Dumps GL and CPU processing duration and frame timestamps to a file,
whenever the device is closed or the stream configuration is changed.

- Add PerfMeasurement class to legacy mode
- Wire up minimal usage to SurfaceTextureRenderer

Change-Id: Ic9d74ca26f706780b746175aa615c7aae4ae52e7
/frameworks/base/core/jni/AndroidRuntime.cpp
6d77eb99bfc5471f9765e3fa7ea42022197aa9f5 08-Jul-2014 Brian Carlstrom <bdc@google.com> Make dex2oat heap size product configurable [frameworks/base]

Bug: 15919420
Change-Id: I9b7b4f60826fc9b0cc6bb3765ceaa36542425006
/frameworks/base/core/jni/AndroidRuntime.cpp
21949631815703ef2f04b304b4cedff3646a0d73 09-Jul-2014 Brian Carlstrom <bdc@google.com> am ce75618e: am 5aba0149: am b85afb38: Merge "Make dex2oat heap size product configurable [frameworks/base]"

* commit 'ce75618e12deebe302c551281ce56c0d60138e0f':
Make dex2oat heap size product configurable [frameworks/base]
3fa99ec77ee52164575375c7709923c94d9693a6 02-Jul-2014 Narayan Kamath <narayan@google.com> Merge "Remove bogus 2 char limit for locales and countries."
46b6a1b4d0c6c5850ca2407096df2b2eb75f6215 02-Jul-2014 Narayan Kamath <narayan@google.com> am c61a7575: am d62196cf: am 3fa99ec7: Merge "Remove bogus 2 char limit for locales and countries."

* commit 'c61a7575eb0e3d1788ce1946da81d6c5e6812b9c':
Remove bogus 2 char limit for locales and countries.
7de699fb68a5219f6801bf0c978fb9f739e54d3f 02-Jul-2014 Brian Carlstrom <bdc@google.com> am bd71bf18: am 8922ddba: am a6e06889: Merge "Add profiler type options"

* commit 'bd71bf1814ffa484e56aafc1f7c155148eda773f':
Add profiler type options
37151b5032c381391440019a76022ff8dd8196d0 01-Jul-2014 Narayan Kamath <narayan@google.com> Remove bogus 2 char limit for locales and countries.

Locale settings are persisted to system properties
and not to system settings, so the values read here
are used pretty much everywhere.

bug: 15873165
bug: 10090157

Change-Id: Ie7cda166439112c615afbd38253cf4fbb5791242
/frameworks/base/core/jni/AndroidRuntime.cpp
88b5b0be887fc5dc3b0b879b4179dde200d2e4d6 24-Jun-2014 Anish Athalye <aathalye@google.com> Implement line breaking using ICU break iterator

Change-Id: I4ad98757aa2eab5dbc2ae44c0391e900ef20c4d0
/frameworks/base/core/jni/AndroidRuntime.cpp
54fc18b925d0dbb0a5c9a1b21956e23b4eaaf31d 10-Jun-2014 Wei Jin <wejin@google.com> Add profiler type options

This is related to the CL that adds a new type of profile data.

Change-Id: I3e4e502da8e1b0dd9b32ddcbc5d11eca0d1ba2e5
/frameworks/base/core/jni/AndroidRuntime.cpp
fc0fa9abd2a155776f3682dc69163a3b9535724c 23-Jun-2014 Calin Juravle <calin@google.com> am ac777c82: am 3e836835: am a06f5fa6: Merge "Fix the initialization of some profile properties"

* commit 'ac777c821958e68a3be41d11d97aefa9182eab5a':
Fix the initialization of some profile properties
e279cd6d219de57cd56291e93a284c18d681edf0 19-Jun-2014 Calin Juravle <calin@google.com> Fix the initialization of some profile properties

Change-Id: I959cb53f262cfb9d1621e4cd99bec05514f7f11f
/frameworks/base/core/jni/AndroidRuntime.cpp
a7596147b43940cad3f76c53ed154ef088b9269b 07-Jun-2014 Jim Miller <jaggies@google.com> First pass at FingerprintService integration with HAL.
Move FingerprintService to framework services directory
Fix merge conflicts.

Tested: scanning, enrolling, removing.

Change-Id: I58b2b902cb671dc82cdaa54a195ba5f1a154622c
/frameworks/base/core/jni/AndroidRuntime.cpp
84ecb7e1aad92598cc675bf4dfb8516b70daa5e1 12-Jun-2014 Leon Scroggins <scroggo@google.com> Merge "remove call to (deprecated) SetDeviceConfig"
2216f9c2e57164bc9ac229081c8610fcedfe8df0 11-Jun-2014 Mike Reed <reed@google.com> remove call to (deprecated) SetDeviceConfig

this was ignored by all callers, in that they always specify a preferred config (8888).

This removal will allow skia to remove the api and its global.

Change-Id: Ic0a4c673ddd60d0078f75e0e482aba4c9b9cf682
/frameworks/base/core/jni/AndroidRuntime.cpp
9c9777da6839a22cd6cdeadbc48f02e1ef1f4f2b 11-Jun-2014 Calin Juravle <calin@google.com> am cdd1fd7a: am b0492d69: am 16719591: Merge "Shrink profiler.start-immediately to fit in the maximum property size"

* commit 'cdd1fd7a8f88e6d99e773b2fb867dbf1d6c64eb9':
Shrink profiler.start-immediately to fit in the maximum property size
a48a6fd1f2a359e8cb3fb4ca59a008370a950be6 11-Jun-2014 Calin Juravle <calin@google.com> am 5fc4e487: am b0f59cdc: am 2f84b69b: Merge "Improved profile.start-immediately comment"

* commit '5fc4e487420b7730c9eaf2623ff1efd2633daba7':
Improved profile.start-immediately comment
994cd28e723ecb6bf8ecab9809d9700e93a4b441 11-Jun-2014 Calin Juravle <calin@google.com> Shrink profiler.start-immediately to fit in the maximum property size

Change-Id: I25f24f5e5b128aa6a300bdc1008427451bd9cecf
/frameworks/base/core/jni/AndroidRuntime.cpp
3f967910d99254f166dea7e1439b6d5441f046d8 10-Jun-2014 Calin Juravle <calin@google.com> Improved profile.start-immediately comment

Change-Id: I41bda6a1cd99cb0a8230961e0462a41cb552887e
/frameworks/base/core/jni/AndroidRuntime.cpp
66e29d08c7a8bf5c2822505f8368eece481187ce 09-Jun-2014 Calin Juravle <calin@google.com> am ee20e16d: am 337f97be: am 97f7f24c: Merge "Fixed comments related to profile properties."

* commit 'ee20e16d7b7d9882054855e7ce2a2dbbd6849d2d':
Fixed comments related to profile properties.
de99f08f658c13ae8e0cd46f7bebc78311585bf2 06-Jun-2014 Calin Juravle <calin@google.com> Fixed comments related to profile properties.

Change-Id: Idd6de8fe2a193a36cf1ea6bcadacb3289973c5ab
/frameworks/base/core/jni/AndroidRuntime.cpp
c09722dc554a27b472c6f6264f9479d6d0639a28 06-Jun-2014 Calin Juravle <calin@google.com> am c88a5ac3: am d1d46d9d: am bbf849b1: Merge "Add missing profiler options."

* commit 'c88a5ac3ff0e3b3759c58279204bb8f6b8901669':
Add missing profiler options.
9828d067fb877d8c78b5b5f2f7c0a08649e50f59 02-Jun-2014 Calin Juravle <calin@google.com> Add missing profiler options.

Bug: 12877748

Change-Id: I311b8fb7e15d512e65631bc2a52c443a271d3d3f
/frameworks/base/core/jni/AndroidRuntime.cpp
5edb85c17dd7f2cb94ad0bd63816ef01efc71cc2 05-Jun-2014 Eric Laurent <elaurent@google.com> Merge "add sound trigger JNI"
60b62bc5c11c0bfcdf84ca8f5b2053e5747f86bc 19-Apr-2014 Eric Laurent <elaurent@google.com> add sound trigger JNI

Add JNI for sound trigger hardware native service.

Change-Id: Idd0ee42c7af5fe20e7d8295994211de3a517bd13
/frameworks/base/core/jni/AndroidRuntime.cpp
a578ab00c41e5ac6cc4b69ff4ba61d2c94c5e47c 04-Jun-2014 Leon Scroggins III <scroggo@google.com> Merge "Ignore inPurgeable and inInputShareable."
0aa39dc2dcfca20f4d9cbeb1699d48a4808f2c70 03-Jun-2014 Leon Scroggins III <scroggo@google.com> Ignore inPurgeable and inInputShareable.

These are discouraged anyway, due to the fact that using them may
result in decoding on the UI thread. Now that they are ignored, the
images will still be decoded; they just will never have their
memory purged, meaning there could be a RAM penalty. This is
acceptable, since apps are encouraged to instead use inBitmap to
manage bitmap memory.

This incidentally fixes BUG:15390468 by converting purgeable index8
(e.g. gif) images to non purgeable.

Change-Id: Ieaf3ab25d28d93fb94bdaea1eb3bd762f163b09a
/frameworks/base/core/jni/AndroidRuntime.cpp
84a4c887a07c1c2939443f4e0587d7f1ac109e4b 30-May-2014 John Reck <jreck@google.com> Remove GLRenderer

Change-Id: I180286417c1a354fc7eb1eadb1884ac6add0795c
/frameworks/base/core/jni/AndroidRuntime.cpp
5bc93866b089faa2feddf7b113afe915401d992f 28-May-2014 Brian Carlstrom <bdc@google.com> Move to dalvik.vm.lib.2 to force default to libart

Bug: 14298175

(cherry-picked from commit 2ef5abb8d534f016582d6023054cbe69d8114b6b)

Change-Id: Icd91982c09076e87092906106cbff4a81589e8de
/frameworks/base/core/jni/AndroidRuntime.cpp
3c1ff826e0abdffdd76129bf974abb96444dade8 28-May-2014 Brian Carlstrom <bdc@google.com> Move to dalvik.vm.lib.2 to force default to libart

Bug: 14298175
Change-Id: I8afa91bddfb6fec6b61c39286a16594eb947830e
/frameworks/base/core/jni/AndroidRuntime.cpp
b6079005ed0631c3972ff427f56e12523ec214a7 22-May-2014 Ruben Brunk <rubenbrunk@google.com> camera2: Move DngCreator to hardware/camera2.

Bug: 15091253
Change-Id: Ibe2ee376436e5c796e33c0b782ea68278589f2e6
/frameworks/base/core/jni/AndroidRuntime.cpp
94520c74608bfcd61ff987410a8018d87b75d734 22-May-2014 Ruben Brunk <rubenbrunk@google.com> Merge "camera2: Add HAL1 compatibility shim skeleton."
7ab63acdd0a257272512d0bcf5e06036fa0b9fdf 20-May-2014 Jesse Hall <jessehall@google.com> opengl: Add GLES31 and GLES31Ext classes

Bug: 15028495
Change-Id: Ie967c1938060edb42864dd48efa668ae7bf5cd76
/frameworks/base/core/jni/AndroidRuntime.cpp
feb50af361e4305a25758966b6b5df2738c00259 10-May-2014 Ruben Brunk <rubenbrunk@google.com> camera2: Add HAL1 compatibility shim skeleton.

This adds basic support for running the Camera2 API on a device running
a camera HAL version lower than CAMERA_MODULE_API_VERSION_2_0.

This CL includes support for:
- N-way preview output streams
- N-way jpeg output streams
- CameraDevice emulation at the binder interface
- Basic camera metadata querying in the CameraManager

Bug: 15117269
Bug: 15116722

Change-Id: I8322955034c91f34bb348d4b28c2b774dbef38f6
/frameworks/base/core/jni/AndroidRuntime.cpp
dbef65f1a170c8abd819a609aeb30797b2407c9a 15-May-2014 Svetoslav <svetoslavganov@google.com> Merge "Adding APIs to render PDF documents."
4c9355c35a0f62805739823a62ad41ca1cbc6502 07-May-2014 Mike Reed <reed@google.com> Frameworks changes to support latest Skia (r14729)

Required for a merge in external/skia
(I88b4d5cc81c357a8e223bd7860b1029590265200).

Includes two cherry-picks:

I456df543e1925b280f785c7b3bb81370157f9b09:
replace SkRasterizer* with NativeRasterizer* in JNI

I98adb200e023369d3ee75f21927fa98f23095a77:
Fix Paint.getFlags,setFlags wrt FILTER_BITMAP_FLAG

In Paint.setFlags(), turn FILTER_BITMAP_FLAG into a call to
SkPaint::setFilterLevel().

In Paint.getFlags(), read SkPaint::getFilterLevel() to determine
whether to include FILTER_BITMAP_FLAG in the result.

Fixes CTS tests with ToT Skia.

Change-Id: I2736f3f68683651574d79a169ff0ab563e0a469e
/frameworks/base/core/jni/AndroidRuntime.cpp
2836c4722a156ec78d7f4101b394885a354f5dd6 15-May-2014 Raph Levien <raph@google.com> Merge "Start of Minikin integration"
ddfe0c77b459ff4f5fe7ad1e2d930814c9a611a5 15-May-2014 Mathieu Chartier <mathieuc@google.com> am 760f0994: am c0f18b9d: am c4c77d63: Merge "Add property for background GC type"

* commit '760f0994db69b77d06814194beecaca1de330855':
Add property for background GC type
c01936a686ff75c872629b219898021e8ae49afa 15-May-2014 Mathieu Chartier <mathieuc@google.com> Add property for background GC type

To disable background compaction do:
adb shell setprop dalvik.vm.backgroundgctype CMS

To enable:
adb shell setprop dalvik.vm.backgroundgctype SS

Change-Id: I1d87b95fceaedac4df5ce6e718d7c14b35d524cc
/frameworks/base/core/jni/AndroidRuntime.cpp
2961769ea94f69c191a2dd785b2504666c7292d0 25-Apr-2014 Svetoslav <svetoslavganov@google.com> Adding APIs to render PDF documents.

We need to render PDF documents for two main use cases. First,
for print preview. Second, for resterizing the PDF document by
a print service before passing it to a printer which does not
natively support PDF (most consumer ones).

Adding PDF rendering APIs improves guarantees for print quality
as the same library is used for preview and rasterization. Also
print vendors do not have to license third-party rendering engines.
Last but not least as the platform uses PDF as its main print
format it should also be able to natively render it.

Change-Id: I57004a435db147663cafea40cf3296465aba7f99
/frameworks/base/core/jni/AndroidRuntime.cpp
315c329544d7c593d1072b071cbb92d9afe74021 10-May-2014 John Reck <jreck@google.com> Add TimeInterpolator support to RNA

Bug: 14678626

Change-Id: I6554e7fcd42c49fac3618ca792083bb68e358f55
/frameworks/base/core/jni/AndroidRuntime.cpp
1a73f732f91e97c9c66b808c245ddda36a10e987 31-Jan-2014 Raph Levien <raph@google.com> Start of Minikin integration

This is the current state of the Minikin integration. All changes are
hidden behind USE_MINIKIN #ifdef, so it should be safe to apply. To
play with the Minikin branch, set this in your BoardConfig.mk .

This change also merges in 64-bit changes that were happenening in
parallel.

Change-Id: Idd94553bcbe324c5875d0ff06495c966c3e95b7f
/frameworks/base/core/jni/AndroidRuntime.cpp
9fa4071c4768c63902c6a74a4b480b51a8b95d43 10-May-2014 John Reck <jreck@google.com> Refactor VirtualLightRefBase & JNI

Change-Id: I8e244e7109e59d5be96871b23bb9b1201c7f9eaa
/frameworks/base/core/jni/AndroidRuntime.cpp
52244fff29042926e21fa897ef5ab11148e35299 02-May-2014 John Reck <jreck@google.com> Add CanvasProperty for drawCircle

Change-Id: Icbcc030f5033d2094e567d7c519b9d672f2aac1c
/frameworks/base/core/jni/AndroidRuntime.cpp
e45b1fd03b524d2b57cc6c222d89076a31a08bea 15-Apr-2014 John Reck <jreck@google.com> RenderThread animator support

Change-Id: Icf29098edfdaf7ed550bbe9d49e9eaefb4167084
/frameworks/base/core/jni/AndroidRuntime.cpp
8ee0b48d607fd6afc5e75f56bdadce19272c60ff 09-Apr-2014 Narayan Kamath <narayan@google.com> am 97175deb: am 3856a219: am cecfb94f: Merge "Clean up argc / argv processing for runtime args."

* commit '97175deb446cdaca7f3910b71940cb443bda3cc4':
Clean up argc / argv processing for runtime args.
22ec1eefa4dc8e12f7da8e8750d4770144941526 07-Apr-2014 Narayan Kamath <narayan@google.com> Clean up argc / argv processing for runtime args.

- Make copies of argc, argv before argv is potentially
overwritten with the process name.
- Allow multiple command line arguments to be passed to
ZygoteInit (this is required for some of the 64 bit
zygote work).
- Add an explanatory comment about how these argments
are processed.

Change-Id: I752be69c5c0f97ed17d1a3dded19f46ee00929b0
/frameworks/base/core/jni/AndroidRuntime.cpp
c6f6ba3265d2b07649277682fd3ca0f9ce4d011a 03-Apr-2014 Narayan Kamath <narayan@google.com> am 71ae2bd4: am f87b3a25: am 374db6c3: Merge "Remove ProcessState::mArgc,mArgV,mArgLen"

* commit '71ae2bd42be21de6d25d1f8c52e3973c172462df':
Remove ProcessState::mArgc,mArgV,mArgLen
a23fcd7be8e40078a913b1a99222cdd89229e67b 28-Mar-2014 Narayan Kamath <narayan@google.com> Remove ProcessState::mArgc,mArgV,mArgLen

These look like historical oddities, and weren't really being
used for anything useful.

Process:setArgV0 was being called by android.util.Process, but
that functionality can be moved directly into the implementation
of that class.

bug: 13647418

Change-Id: I216c8f8a4c065f0cf3a61f19f9e32decd26f93f6
/frameworks/base/core/jni/AndroidRuntime.cpp
b69bb445585a083b8e4ff8a13a1a1a63e9c22a6a 02-Apr-2014 Narayan Kamath <narayan@google.com> resolved conflicts for merge of 71ab4f4f to master

Change-Id: I888c231f7579523e12fbd68f820f0775019e51e0
973b4663b0b5ee62006522bf4742af076096e548 31-Mar-2014 Narayan Kamath <narayan@google.com> Move zygote startup logic to the frameworks.

The Zygote class is now in com.android.internal.os. It is
responsible for the vast majority of work before and after
the call to fork(). It calls back into the Runtime via
the new dalvik.system.ZygoteHooks class to allow the Runtime
to perform pre fork cleanup and post fork initialization.

The native code in Zygote.cpp is a direct and straightforward
port of the existing code in art. Most differences are
superficial, for example :
- We use C style logging (ALOGE) instead of stream based
logging.
- We call env->FatalError() instead of using LOG(FATAL)

Change-Id: Ia101fb2af12d23894fe57e4134d2bc6d142e5059
/frameworks/base/core/jni/AndroidRuntime.cpp
0a6b0031f07f678e0ac1a24a6f2aa8bdf40c717f 17-Mar-2014 John Reck <jreck@google.com> Merge "Rename DisplayList->RenderNode"
f666ad7046c0b1b255835f75aeb7d1391067df93 15-Mar-2014 John Reck <jreck@google.com> Rename DisplayList->RenderNode

Change-Id: Idcca6f26ba6282594789962f5edb3ed53a290fef
/frameworks/base/core/jni/AndroidRuntime.cpp
e2d3f28e85e59f50bbab548d3c449de0b91be3ba 15-Mar-2014 John Reck <jreck@google.com> Merge "Revert "Rename DisplayList->RenderNode""
31f9458908691dd892c6ee8c5b240e4db634d8ee 15-Mar-2014 John Reck <jreck@google.com> Revert "Rename DisplayList->RenderNode"

Missed some test(s), reverting to fix build

This reverts commit ef09d8cf946443e7f4ac4541f843368ac4338c59.

Change-Id: Ifee6c694e5f4b962d03dee200ccbf8dc9662e666
/frameworks/base/core/jni/AndroidRuntime.cpp
759067f39a635b4c821fc17b56253bcd056ada47 15-Mar-2014 John Reck <jreck@google.com> Merge "Rename DisplayList->RenderNode"
ef09d8cf946443e7f4ac4541f843368ac4338c59 15-Mar-2014 John Reck <jreck@google.com> Rename DisplayList->RenderNode

Change-Id: I1628b6e802252c001ca09ba762f52453b68f4cad
/frameworks/base/core/jni/AndroidRuntime.cpp
dbcd5b70ca7e8d4b6c9c91ecb9445d078d39fd8e 14-Mar-2014 Dave Allison <dallison@google.com> am 273fe6a3: am 4a02e071: am 788fb96d: am 47653f2d: Merge "Move options buffers to top scope"

* commit '273fe6a327de8051ac075855ceb7b33a9422c7a7':
Move options buffers to top scope
07a1e2323b1e6765f220a045bd05783dd99b2914 14-Mar-2014 Dave Allison <dallison@google.com> Move options buffers to top scope

It is important that the char buffers for options do
not go out of scope as the mOptions.add() does not copy
the buffer. This moves all the buffers to the top
level scope of the function to prevent accidental
overwriting when they go out of scope.

Bug: 13448497
Change-Id: I5a97ddd32ff34f237915927906e1e1f833ff036e
/frameworks/base/core/jni/AndroidRuntime.cpp
549046038e6daf3c8ae71b5f2ab9e297a97d5a1b 11-Mar-2014 Narayan Kamath <narayan@google.com> am 4645c5ba: am a8706527: am b071a07d: am a79af364: Merge "Remove java.io.tmpdir assignment in AndroidRuntime (again)."

* commit '4645c5ba33e6b8c2623f8e3c86d4ed584f9708a9':
Remove java.io.tmpdir assignment in AndroidRuntime (again).
b3802a8e2360aaa0a88faa625e15c31b56eaf125 11-Mar-2014 Narayan Kamath <narayan@google.com> Remove java.io.tmpdir assignment in AndroidRuntime (again).

This was brought back by a bad merge conflict resolution
in change 0efbd9a463c848118c7685f4bfc8765a82caa761.

Change-Id: I0c7cbe8ee396293619eabf4d0a3c2f06c76bdd6e
/frameworks/base/core/jni/AndroidRuntime.cpp
02c7f9582b78c6150da7470ce68bbdcdb7635d56 10-Mar-2014 Brian Carlstrom <bdc@google.com> am 7b7d111b: am 9e736723: am ec4c7752: am ab97d617: Merge "Only pass -Xprofile-* options to ART"

* commit '7b7d111ba21c7c5ad161207a75f72948c427b1b0':
Only pass -Xprofile-* options to ART
98ba7bd5d1942edd7c2881cc6fd0e777ae8baa2e 10-Mar-2014 Brian Carlstrom <bdc@google.com> Only pass -Xprofile-* options to ART

Bug: 13391896
Change-Id: I5d6a3b900c9b20f02e1d4ccb73f712e9260c7dfd
/frameworks/base/core/jni/AndroidRuntime.cpp
2d3ddc2ba9f86d795e437ea90dccb59cf1ebfd11 08-Mar-2014 Dave Allison <dallison@google.com> am 199670c4: am 324aa693: am b94904ab: am 3fc3b9fd: Merge "ART profiler usage."

* commit '199670c46a9950bd2e06af43ea082427b542060a':
ART profiler usage.
0efbd9a463c848118c7685f4bfc8765a82caa761 30-Jan-2014 Dave Allison <dallison@google.com> ART profiler usage.

This is a change to add args to some of the profiler related
functions, including installd commands.

Also read properties and set command line options for the runtime
profiling parameters.

Changed calls to isDexOptNeeded() to isDexOptNeededInternal(). This
needs additional arguments passed for profiles.

Bug: 12877748
Change-Id: I1a426c9309d760bac0cf92daa298defee62287c1

Conflicts:
core/jni/AndroidRuntime.cpp
/frameworks/base/core/jni/AndroidRuntime.cpp
aa1d023bb9a9be36106423b567291b3f2174860f 05-Mar-2014 Brian Carlstrom <bdc@google.com> am 674fd6c4: am a258b4a9: am 485e3b45: am 5c126c3d: Merge "Add dex2oat-flags plumbing to AndroidRuntime"

* commit '674fd6c442cd3886b3ab12be1d36c5d05ef48cdb':
Add dex2oat-flags plumbing to AndroidRuntime
3beff1e023193b485c67a3003a7f363f105d96d4 01-Mar-2014 Brian Carlstrom <bdc@google.com> Add dex2oat-flags plumbing to AndroidRuntime

Change-Id: Idaa7e5351e146d76e1972cbe4d93af69f0b999a6
/frameworks/base/core/jni/AndroidRuntime.cpp
2b20f6db9c152b6ac89b0999a73894b3db047aa5 21-Feb-2014 Narayan Kamath <narayan@google.com> am a1aeac80: am 25c55ca9: am 911b2ce3: am 4a642ee5: Merge "Remove unused JNITest class"

* commit 'a1aeac80df09cf8d481474264b1ce78ed64e7464':
Remove unused JNITest class
42f06b0e22971dd2a2049012751c7cd1965a706b 15-Feb-2014 Ashok Bhat <ashok.bhat@arm.com> Remove unused JNITest class

JNITest class is no longer actively used. This patch
removes the class (java and jni) files.

JNI interfaces and calls are extensively tested in
the art unit tests (art/tests) and in cts (see
CtsJniTestCases).

Change-Id: I62f7c72deb5d206fa3f545ae39a9cb9011110d0a
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
/frameworks/base/core/jni/AndroidRuntime.cpp
dfc1ef92557be5565469a2fc8b075f46dc3b4948 19-Feb-2014 Narayan Kamath <narayan@google.com> am 29596ac2: am 41dd75f8: am 96ddea41: am 7c710936: Merge "Remove java.io.tmpdir assignment in AndroidRuntime."

* commit '29596ac2baef37de4cfed494cd740de8d1090899':
Remove java.io.tmpdir assignment in AndroidRuntime.
3d03e5b90d1ed0de9790ca814d55b454d37f6571 14-Feb-2014 Narayan Kamath <narayan@google.com> Remove java.io.tmpdir assignment in AndroidRuntime.

This value is overridden by the framework anyway
(see ActivityThread.handleBindApplication). Besides,
it doesn't seem like a great idea to let tools clutter
/sdcard/ with temp files.

Change-Id: I26c710cbea7397f89e6103e54a73044a87da95b1
/frameworks/base/core/jni/AndroidRuntime.cpp
d430354c6b6b3b39c35e8af90007414c325ccb2d 13-Feb-2014 Andreas Huber <andih@google.com> Merge "Revert "Split AndroidRuntime into AndroidRuntimeBase base-class and the rest.""
9ae000ca8c05ad6f700ad7bf119bbc92fb964b57 13-Feb-2014 Andreas Huber <andih@google.com> Revert "Split AndroidRuntime into AndroidRuntimeBase base-class and the rest."

This reverts commit 7825334929b098b36e1144872200e75ba6d24b13.

Change-Id: I1702eb3ff9d7192d64039c8bf4bc3fc5d8e458c4
/frameworks/base/core/jni/AndroidRuntime.cpp
04f0cab79d1499a5fe27330bb30dd94151b82880 13-Feb-2014 Andreas Huber <andih@google.com> Merge "Split AndroidRuntime into AndroidRuntimeBase base-class and the rest."
7825334929b098b36e1144872200e75ba6d24b13 07-Feb-2014 Andreas Huber <andih@google.com> Split AndroidRuntime into AndroidRuntimeBase base-class and the rest.

AndroidRuntimeBase (exported by libandroid_runtime_base.so) is all you need
to link against to gain the ability to do AndroidRuntimeBase::getJNIEnv()
thus minimizing build dependencies.

Change-Id: Ia7f0c94c8c02b974c068e0db34774827f96aa95b
/frameworks/base/core/jni/AndroidRuntime.cpp
04fc583c3dd3144bc6b718fcac4b3e1afdfdb067 06-Feb-2014 John Reck <jreck@google.com> Refactor HardwareLayer

Defer all the things!
Groundwork to allow hardware layers to work in a renderthread world

Change-Id: Ib3aa47525f393083621254a743dbaa6352f933bd
/frameworks/base/core/jni/AndroidRuntime.cpp
4f02bf4eef6af47f35c70c4dda5b7b9523d89ca0 04-Jan-2014 John Reck <jreck@google.com> Native-side proxy

Remove RemoteGLRenderer
Remove reflection-based control

Change-Id: If17c2bbb61c7141986d88c4763def77ed1074985
/frameworks/base/core/jni/AndroidRuntime.cpp
80a3a364fd0c7441dbee4de7dd441a6ce743f066 09-Jan-2014 Vinit Deshpande <vinitd@google.com> Merge "Revert "Revert "Move Wifi services to a new git project"""
3ffa1a899a6169600dabe39fb8528db9af522ba6 08-Jan-2014 Vinit Deshpande <vinitd@google.com> Revert "Revert "Move Wifi services to a new git project""

This reverts commit f1182c9c1abdb4e8f733632d0567410ab9fc1d3c.

Change-Id: Ic440cfa6502b651b2cc67faf73c7c9c49df42190
/frameworks/base/core/jni/AndroidRuntime.cpp
d9feaf49719d58cfc4fad203bd10e75253024fa9 08-Jan-2014 Vinit Deshpande <vinitd@google.com> Merge "Revert "Move Wifi services to a new git project""
f1182c9c1abdb4e8f733632d0567410ab9fc1d3c 08-Jan-2014 Vinit Deshpande <vinitd@google.com> Revert "Move Wifi services to a new git project"

This reverts commit 4a3f9cf099bbbe52dc0edb2a7e1d1c976bc335a3.

Change-Id: I6269a683e842a5d1cfdafea892be86972ae11c40
/frameworks/base/core/jni/AndroidRuntime.cpp
ed8ed0bc81864c802f25c54aeb896db6055a7c20 08-Jan-2014 Vinit Deshapnde <vinitd@google.com> Merge "Move Wifi services to a new git project"
23b797ab5151eb2474f3bdd679f2f07bfd723042 04-Jan-2014 John Reck <jreck@google.com> EGL migration to native

Move EGL state management to native side for RemoteGLRenderer

Change-Id: I12b0fed70246564d4caebf87374e8bbca655c572
/frameworks/base/core/jni/AndroidRuntime.cpp
4a3f9cf099bbbe52dc0edb2a7e1d1c976bc335a3 27-Dec-2013 Vinit Deshapnde <vinitd@google.com> Move Wifi services to a new git project

Bug: 12175455
Change-Id: I1fa07e29c6a9aae38d9e334d519a9f2445d15613
/frameworks/base/core/jni/AndroidRuntime.cpp
5438979e498750b6a28ada7974d4e9fe17fd8394 20-Dec-2013 Chris Craik <ccraik@google.com> Move GLES20DisplayList functionality into DisplayList

Removes unneeded indirection layer

Change-Id: I75d3e369eda2788cbc52a3575c4e1c521e842f59
/frameworks/base/core/jni/AndroidRuntime.cpp
cec24ae16e9a0a7c3075f1a8d9149bb7fb3813fc 05-Nov-2013 John Reck <jreck@google.com> RenderThread work

Hacky prototype needs a private API to enable

Change-Id: I21e0ddf3cdbd38a4036354b5d6012449e1a34849
/frameworks/base/core/jni/AndroidRuntime.cpp
ebcb32f58a6220802ca129ea33f47b4b69931a10 05-Dec-2013 The Android Open Source Project <initial-contribution@android.com> Merge commit 'bac61807d3bcfff957b358cb9ad77850bd373689' into HEAD

Change-Id: I29374270c8e0c2f2859efaf1d55af9f73da0f8d7
36c245ace557aeb569e546b82baec6fe1491d733 03-Dec-2013 Mathieu Chartier <mathieuc@google.com> am dae9f5a5: am f3a2430a: am 738fa2f6: Merge "Add dalvik.vm.gctype to enable switching between different GCs."

* commit 'dae9f5a5158257c65fae014b38bde08741b97e62':
Add dalvik.vm.gctype to enable switching between different GCs.
f3a2430a2b849f2c4041bcfba7fbefa9b2bb4d79 03-Dec-2013 Mathieu Chartier <mathieuc@google.com> am 738fa2f6: Merge "Add dalvik.vm.gctype to enable switching between different GCs."

* commit '738fa2f64e064f5c6d1003e528cde742e262312f':
Add dalvik.vm.gctype to enable switching between different GCs.
7e4fdec6f0ac6385c5f8aeaf0f2e12e162138ac3 03-Dec-2013 Mathieu Chartier <mathieuc@google.com> Add dalvik.vm.gctype to enable switching between different GCs.

The option passes the specified GC type into the Xgc runtime
option.

Currently the three different supported GC types are MS, CMS, SS
which represent mark-sweep, concurrent mark-sweep, mark-sweep +
semi-space hybrid.

Change-Id: I6ad95c8d12c0d1158f7c861ff0c3180761619172
/frameworks/base/core/jni/AndroidRuntime.cpp
3083579424785e55ca8f82856a6553ee983c3ffb 07-Nov-2013 John Reck <jreck@google.com> More refactoring

Merge GlRenderer and Gl20Renderer
Move GLRenderer to its own file
Move native methods from HardwareRenderer to GLRenderer

Change-Id: Ib4680b03dd98101b2a428062cc94774ff73baa75
/frameworks/base/core/jni/AndroidRuntime.cpp
db289e0ac752ea204cf88abd7c38bf9b27e294c9 18-Oct-2013 Jeff Sharkey <jsharkey@android.com> am 47938450: am 306bb90d: am 8f4c15d8: Merge "Plumb through physical device UUID and label." into klp-dev

* commit '47938450b4d19f60edf774c8f451d53aa110ea0b':
Plumb through physical device UUID and label.
5aca2b8dc4f4ff2d466a64587d06666c7bbd9749 17-Oct-2013 Jeff Sharkey <jsharkey@android.com> Plumb through physical device UUID and label.

vold now parse out UUID and label for inserted physical devices,
and reports them to framework. Add these to hidden StorageVolume
class for use by DocumentsUI and MediaProvider.

Remove last JNI method in FileUtils!

Bug: 11175082
Change-Id: I1cfcd1ade61767b103f693319ea2600008ee2e3c
/frameworks/base/core/jni/AndroidRuntime.cpp
32f2e6267481bd4b81b71061c539748143342fef 10-Oct-2013 Mike Lockwood <lockwood@google.com> Handle null thread name more gracefully in javaCreateThreadEtc()

Change-Id: I67bebb05736b717e0da60da36839985be08cf1d6
/frameworks/base/core/jni/AndroidRuntime.cpp
6811f4e92cbb64e72a0d13eb9b99b5894bd59c76 19-Sep-2013 Svetoslav <svetoslavganov@google.com> Move PdfDocument to android.graphics.pdf

1. Move PdfDocument to android.graphics.pdf.

2. Changed the PdfDocument as per API concil request.

3. Updated the documentation.

bug:10461180
bug:10552565
bug:10681585
bug:10552336

Change-Id: I08e15b34cf37bb064248c887e6f59808019cafe8
/frameworks/base/core/jni/AndroidRuntime.cpp
d0d7eaf129b48ea04c06902a11c2a4f74056d76c 06-Sep-2013 Leon Scroggins III <scroggo@google.com> Register jni objs in CreateJavaOutputStreamAdaptor

Write a registration function and call it in AndroidRuntime,
which calls FindClass/GetFieldID only once per class/method.
Use NewGlobalRef for classes that will be checked against later.

BUG:10612755
Change-Id: I25541da1b7bb1cd53a1579ea84c4620e1901310f
/frameworks/base/core/jni/AndroidRuntime.cpp
d7a90ca50c333008857c41118446cfc6b55735f9 21-Aug-2013 Elliott Hughes <enh@google.com> The VM handles blocking SIGPIPE.

We don't need this any more.

Bug: 10211309

(cherry picked from commit 437e76208d451e7954699ead8931d0fe147bb07d)

Change-Id: I97b3ab4f65a70eacca2fbe95cfb11b1cc85c4021
/frameworks/base/core/jni/AndroidRuntime.cpp
e6c2241f7a1e6bca3fd8d5d0c49abbbd348366b7 21-Aug-2013 Mathieu Chartier <mathieuc@google.com> Launch VM with -XX:LowMemoryMode if ro.config.low_ram is "true".

Bug: 10131789

Change-Id: Ib9962f7becdedd71f48123a4720dcce1d09abb9d
/frameworks/base/core/jni/AndroidRuntime.cpp
b93489270d41bbaf513f0018164ab8b6d6ca9519 19-Aug-2013 Elliott Hughes <enh@google.com> Merge "Remove a fixed-length buffer in the wifi code." into klp-dev
a11d574fc632158fe7d6cdd06bd3992c3817ca5c 09-Aug-2013 Elliott Hughes <enh@google.com> Remove a fixed-length buffer in the wifi code.

Also increase the size of the buffer we do need, simplify the code, and
fix some of the error checking.

(cherry-pick of 56968581ce77d3c0ee4286da6b0d5548874934b9.)

Bug: http://code.google.com/p/android/issues/detail?id=36193
Bug: 10363597
Change-Id: Iadd2ee25469a37ddf06c3292b675a4cbcc4ecfa3
/frameworks/base/core/jni/AndroidRuntime.cpp
da5a3e12f4f8f965c57d6f93c74190f43ea233f3 11-Aug-2013 Jeff Sharkey <jsharkey@android.com> Richer ParcelFileDescriptor close events.

When reading from the end of a pipe or socket, there is no way to
tell if the other end has finished successfully, encountered an error,
or outright crashed. To solve this, we create a second socketpair()
as a communication channel between the two ends of a pipe or
socket pair, sending a status code with details about why the
ParcelFileDescriptor was closed.

The writer end of a pipe or socket can closeWithError() to send a
message to the reader end. When the reader encounters EOF, they
call checkError() to detect if any error occured. This also detects
the case where the remote process died without sending a success
message.

This design is also extended to support regular files on disk, using
the communication channel above to detect various remote close events
or crashes, and delivering that event to a supplied OnCloseListener.

Replaces JNI with best-practice Libcore.os calls, and deprecates
some flags to match Context.

Bug: 10330121
Change-Id: I8cfa1e4fb6f57397667c7f785106193e0faccad3
/frameworks/base/core/jni/AndroidRuntime.cpp
2f1a2e423e0fbb64467d6fcfa4e82c6384f31210 26-Jul-2013 Eino-Ville Talvala <etalvala@google.com> Camera2 API: Rename package to android.hardware.camera2

Change-Id: I77b7939e199f9fe8e12a59393c24cff08097448c
/frameworks/base/core/jni/AndroidRuntime.cpp
2ca204e4c0ba805c8fa0db79eeac9608d01cf5b4 26-Jul-2013 Mathias Agopian <mathias@google.com> get rid of PixelFormatInfo and simplify things

Change-Id: I487d4eef7db0095ace4babf5bb100a8769711257
/frameworks/base/core/jni/AndroidRuntime.cpp
70725500dcf3b666b43d50563d64705aab58d2d3 25-Jun-2013 Igor Murashkin <iam@google.com> Initial camera device implementation

* Working streaming preview requests only
* Almost everything else returns empty objects that don't do anything

Bug: 9213377
Change-Id: Ie6f02a7c0952b0f5ebc41905425b15cae221f7d3
/frameworks/base/core/jni/AndroidRuntime.cpp
36483e9622b399ea1368fb84ed0c5a5495f65e42 25-Jun-2013 Igor Murashkin <iam@google.com> Revert "Initial camera device implementation"

This reverts commit 59bc67c732eab53b370b196066e8012d3f6bf09a.

Change-Id: I9e1ce3b9f4af4e2b9b98855c0ca533581c87ea7f
/frameworks/base/core/jni/AndroidRuntime.cpp
59bc67c732eab53b370b196066e8012d3f6bf09a 20-Jun-2013 Igor Murashkin <iam@google.com> Initial camera device implementation

* Working streaming preview requests only
* Almost everything else returns empty objects that don't do anything

Bug: 9213377
Change-Id: I183dd47ddd737ec2c3c374e5c3461542a97f09b0
/frameworks/base/core/jni/AndroidRuntime.cpp
b06accf34f53956a5ccd44cecc3604cc2d166cd7 21-Jun-2013 Svetoslav Ganov <svetoslavganov@google.com> Merge "Generate PDF from Canvas."
9f8203a159d46124a0907a0d9500e599533beed3 19-Jun-2013 Brian Carlstrom <bdc@google.com> Remove libdvm dependency

Change-Id: I7d37db4e72e9435ecd514340cf61a051dc272f04
/frameworks/base/core/jni/AndroidRuntime.cpp
ff4adde5737be08d3e2d03fbe588c591d27d4a74 10-Jun-2013 Svetoslav Ganov <svetoslavganov@google.com> Generate PDF from Canvas.

This change adds simple APIs that enable an Android application
to generate a PDF document by drawing content on a canvas.

Change-Id: Ibac93d7c37b01a376ce7c48238657d8c7698d588
/frameworks/base/core/jni/AndroidRuntime.cpp
b63de6de026b8ebe0b7d7b7f188afc30fff42411 24-May-2013 buzbee <buzbee@google.com> Process new system property for max JIT cache size

To allow low-memory devices to reduce (or eliminate entirely)
the RAM used by the JIT, dalvikvm has a new command-line
option to set the max size of the JIT's translation cache.
In this CL, we pass that new option based on a system property.

Change-Id: I2a01da4d19c1922b6ed52791ee513efef9caf3d4
/frameworks/base/core/jni/AndroidRuntime.cpp
1f5762e646bed2290934280464832782766ee68e 07-May-2013 Mathias Agopian <mathias@google.com> libutils clean-up

Change-Id: I11ee943da23a66828455a9770fc3c5ceb4bbcaa9
/frameworks/base/core/jni/AndroidRuntime.cpp
ce3fe5fd8a246b7eb96bb189fc58f63006d2e6c8 07-May-2013 Jesse Hall <jessehall@google.com> am 4d32a367: am 2787ba25: Merge "Register EGLExt JNI methods" into jb-mr2-dev

* commit '4d32a36759b619abdda9c895054f513aef3a3f03':
Register EGLExt JNI methods
237c2b871f66e06498ad03aaa92964f4434982c5 06-May-2013 Jesse Hall <jessehall@google.com> Register EGLExt JNI methods

Bug: 8678160
Change-Id: I8ecd2e6da2aee250b3433be18fff6af927b02994
/frameworks/base/core/jni/AndroidRuntime.cpp
3b748a44c6bd2ea05fe16839caf73dbe50bd7ae9 18-Apr-2013 Romain Guy <romainguy@google.com> 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
/frameworks/base/core/jni/AndroidRuntime.cpp
d877efe3b12afdd84f06c180369f9d7399858f6e 30-Apr-2013 Jesse Hall <jessehall@google.com> Fix GLES30 JNI registration

Bug: 8657863
Change-Id: I498f32480863b0716b2a8dfce467143087573cce
/frameworks/base/core/jni/AndroidRuntime.cpp
a44dd26a75e24cc021802288fb81f4761e47be6b 11-Apr-2013 Michael Wright <michaelwr@google.com> Rewrite input handling for native applications

Bug: 8473020
Change-Id: Ic4353d8924ab877bec21aff8c2dba9fe725bf906
/frameworks/base/core/jni/AndroidRuntime.cpp
c28867a1d67121ce5963de135e3ae2b1dbd9a33d 26-Mar-2013 Jeff Brown <jeffbrown@google.com> Use input transport for communications between app and IME.

The input method manager service now supplies an input channel for
communication while creating an IME session on behalf of the
application.

This change significanly reduces the overhead of IME event dispatch
by using a standard input channel to send input events rather than
using binder. This results in fewer thread context switches
and fewer object allocations.

What's more, the IME may perform additional batching of the motion
events that it receives which may help it catch up if it is
getting behind while processing them.

Bug: 7984576
Bug: 8473020
Change-Id: Ibe26311edd0060cdcae80194f1753482e635786f
/frameworks/base/core/jni/AndroidRuntime.cpp
58a1ca6642d404b67e5c9e75076b9bbe08e4076b 14-Feb-2013 Mathias Agopian <mathias@google.com> Merge "split Surface in two classes: SurfaceControl and Surface"
3866f0d581ceaa165710feeee9f37fe1b0d7067d 12-Feb-2013 Mathias Agopian <mathias@google.com> split Surface in two classes: SurfaceControl and Surface

SurfaceControl is the window manager side; it can
control the attributes of a surface but cannot push buffers
to it. Surface on the other hand is the application (producer)
side and is used to push buffers to the surface.

Change-Id: Ib6754c968924e87e8dd02a2073c7a447f729f4dd
/frameworks/base/core/jni/AndroidRuntime.cpp
9a2c2a6da90abbcc9a064c20e93ed885651f4ae1 15-Jan-2013 Jeff Sharkey <jsharkey@android.com> Parse network stats using native code.

Switch to parsing detailed network stats with native code, which
is 71% faster than ProcFileReader.

Change-Id: I2525aaee74d227ce187ba3a74dd08a2b06514deb
/frameworks/base/core/jni/AndroidRuntime.cpp
9197d170b770f2b87abd0cd0e13dcf71e5a181c2 07-Nov-2012 Elliott Hughes <enh@google.com> am fec5f611: Merge "It\'s 2012. We\'re always WITH_JIT."

* commit 'fec5f611fef4fc3b7afa5d7194f4f40d156157ac':
It's 2012. We're always WITH_JIT.
be8b47f6ce739739caa2e2b36d7b0b336ca9eebb 07-Nov-2012 Elliott Hughes <enh@google.com> It's 2012. We're always WITH_JIT.

Change-Id: Ia3d1a1b1df06816f2cfa3879ec669b34c62cf9b9
/frameworks/base/core/jni/AndroidRuntime.cpp
7fef2b8a3782a94e1ad6bfef98807167db300aab 01-Oct-2012 Ian Rogers <irogers@google.com> Fix target utilization property_get.

Copy and paste error where wrong compare meant the code thought a target
utilization option was specified even if there wasn't one.

b/7062303

Change-Id: Ibf1c6cf72743c5fbec7618a719d12d0373184754
/frameworks/base/core/jni/AndroidRuntime.cpp
5325010486a13553a8597aab92f90abc141a25e8 24-Sep-2012 Ian Rogers <irogers@google.com> Extra GC heap configuration parameters.

Allows parameters to increase the maximum free size. b/6606849

Change-Id: Ia74ccdbb8e32954820e3bd26f441b2c2fac889f4
/frameworks/base/core/jni/AndroidRuntime.cpp
cbad976b2a36a0895ca94510d5208a86f66cf596 05-Sep-2012 Jeff Brown <jeffbrown@google.com> Add support for Wifi display.

Change-Id: I99693786cf9d07d07d3400046c55eb4933730b80
/frameworks/base/core/jni/AndroidRuntime.cpp
64a55af0ac700baecb0877235eb42caac59a3560 26-Aug-2012 Jeff Brown <jeffbrown@google.com> Add plumbing for new surface flinger display API.

Cleaned up the implementation of Surface and SurfaceSession
to use more consistent naming and structure.

Added JNI for all of the new surface flinger display API calls.

Enforced the requirement that all Surfaces created by
the window manager be named.

Updated the display manager service to use the new methods.

Change-Id: I2a658f1bfd0437e1c6f9d22df8d4ffcce7284ca2
/frameworks/base/core/jni/AndroidRuntime.cpp
3f1e8b90b05e0fb39240f4c8924d94d8c11f50d1 16-Aug-2012 Kenny Root <kroot@google.com> Remove StatFs from AndroidRuntime JNI

Change-Id: I88039794cf3e4a959b37c29c67f16f2dc0751a5c
/frameworks/base/core/jni/AndroidRuntime.cpp
89db6a40afe59c30f0bcec5b08dc908cda98c594 16-Aug-2012 Kenny Root <kroot@google.com> Remove StatFs from AndroidRuntime JNI

Change-Id: I88039794cf3e4a959b37c29c67f16f2dc0751a5c
/frameworks/base/core/jni/AndroidRuntime.cpp
fa25bf5382467b1018bd9af7f1cb30a23d7d59f7 24-Jul-2012 Jeff Brown <jeffbrown@google.com> Add display manager skeleton.

The purpose of this change is to remove direct reliance on
SurfaceFlinger for describing the size and characteristics of
displays.

This patch also starts to make a distinction between logical displays
and physical display devices. Currently, the window manager owns
the concept of a logical display whereas the new display
manager owns the concept of a physical display device.

Change-Id: I7e0761f83f033be6c06fd1041280c21500bcabc0
/frameworks/base/core/jni/AndroidRuntime.cpp
313a2167098ce8498db3a50d70724f260e8169c0 18-Jan-2012 Jaikumar Ganesh <jaikumar@google.com> Delete various Bluetooth files for stack integration.
/frameworks/base/core/jni/AndroidRuntime.cpp
6b1e838fc16d397359f82c3a4f5700f1ed7dd910 03-Jul-2012 Thomas Tafertshofer <tafertth@google.com> EGL 1.4 bindings generated by glgen

Change-Id: I1c3da57101f4ea089a12f1796f25b72d6852141e
/frameworks/base/core/jni/AndroidRuntime.cpp
e38b1c4d156a569efc646e86a72ab3a3e3ccf6fc 08-Jun-2012 Kenny Root <kroot@google.com> resolved conflicts for merge of 9855f6e2 to jb-dev-plus-aosp

Change-Id: I012bd3b5946dedba3439285caa93739d44ebc60f
7304c343821309dd15f769b18f1de2fa43751573 12-May-2012 Jeff Brown <jeffbrown@google.com> Move power HAL interactions to PowerManagerService.

This refactoring sets the stage for a follow-on change that
will make use additional functions of the power HAL.

Moved functionality from android.os.Power into PowerManagerService.
None of these functions make sense being called outside of the
system server. Moving them to the PowerManagerService makes it
easier to ensure that the power HAL is initialized exactly once.

Similarly, moved ShutdownThread out of the policy package and into
the services package where it can tie into the PowerManagerService
as needed.

Bug: 6435382
Change-Id: I958241bb124fb4410d96f5d5eb00ed68d60b29e5
/frameworks/base/core/jni/AndroidRuntime.cpp
3f177d7c9a5c8ac727b0c6c3a5131e1e00ea52e8 13-Apr-2012 Elliott Hughes <enh@google.com> Bump the interpreter stack size for the main thread.

Bug: 6315322
Change-Id: I8d84e7c2e0eeb5314530b8a8b141f44014b8c646
/frameworks/base/core/jni/AndroidRuntime.cpp
9f25b7fdf216c9ef0bd2322cd223eeaf0d60f77f 10-Apr-2012 Jeff Brown <jeffbrown@google.com> Request key maps from input manager service.

Instead of each application loading the KeyCharacterMap from
the file system, get them from the input manager service as
part of the InputDevice object.

Refactored InputManager to be a proper singleton instead of
having a bunch of static methods.

InputManager now maintains a cache of all InputDevice objects
that it has loaded. Currently we never invalidate the cache
which can cause InputDevice to return stale motion ranges if
the device is reconfigured. This will be fixed in a future change.

Added a fake InputDevice with ID -1 to represent the virtual keyboard.

Change-Id: If7a695839ad0972317a5aab89e9d1e42ace28eb7
/frameworks/base/core/jni/AndroidRuntime.cpp
c07fca3831baf4d812dd724f506b4ed23dcc39e0 13-Jan-2012 Stephen Smalley <sds@tycho.nsa.gov> Add JNI bindings for some of the libselinux interfaces.

Change-Id: Ifcc68cb06f9f56a04f3bc64dd9906a9436fabc88
/frameworks/base/core/jni/AndroidRuntime.cpp
4280c4a93ea17f2e9d3f651e49d8c13dc3fb92aa 16-Mar-2012 Jeff Brown <jeffbrown@google.com> If an application calls System.exit() terminate it immediately.

There is no graceful way to kill Android application processes.
They typically have many threads running doing various things
When System.exit() is called, those threads just keep going
while the cleanup actions run until the process finally.

Performing shutdown actions can easily cause more harm than good.
For example, closing the Binder driver's file descriptor may
cause other threads waiting on Binder to wake up and then crash
in nasty ways after receiving EBADF.

So when an Android application exits, skip the cleanup and just
call _exit() to end it all.

Bug: 6168809
Change-Id: I29790c064426a0bf7dae7cdf444eea3eef1d5275
/frameworks/base/core/jni/AndroidRuntime.cpp
16f5f5cc9d4c480fac3dc7f176f3f1edfbd256f4 16-Mar-2012 Jeff Brown <jeffbrown@google.com> Delete useless JNI methods.

Change-Id: Ie7c7638c79fc9c6a43f45604ad9a40ebc58b93c7
/frameworks/base/core/jni/AndroidRuntime.cpp
a1cff5043d0fbd78fcf9c48e7658e56a5b0c2de3 21-Feb-2012 Chet Haase <chet@google.com> Handle view properties at the native level

Basic functionality of handling View properties (transforms,
left/right/top/bottom, and alpha) at the native DisplayList level.
This logic is disabled for now (via compile-time flags in View.java and
DisplayListRenderer.h) as we continue work on it (there is no advantage
to the new approach until we optimize invalidation and rendering paths
to use the new code path).

Change-Id: I370c8d21fbd291be415f55515ab8dced6f6d51a3
/frameworks/base/core/jni/AndroidRuntime.cpp
481c1570dc5cdf58265b53f657801709dd05d1df 09-Mar-2012 Jeff Brown <jeffbrown@google.com> Add Java wrappers for new atrace functionality.

Instrument a few parts of the input dispatcher and the
view hierarchy.

Change-Id: I49285c9fb3502253baa1ffed60f521b8c24fccaf
/frameworks/base/core/jni/AndroidRuntime.cpp
d84e1ce0b535128f03416145554fb405f9fade3e 07-Mar-2012 Jeff Sharkey <jsharkey@android.com> Split Parcel JNI details away from Binder.

This is purely a refactoring, with no change to the underlying
functionality.

Change-Id: I41b59f14e57d1cc144274a01f77658d99a1bfe02
/frameworks/base/core/jni/AndroidRuntime.cpp
b01e8bf57b7492b77e3445db51471edcbadda75e 30-Aug-2011 Mike Lockwood <lockwood@android.com> New Serial Manager API:

SerialManager: provides access to serial ports
SerialPort: for reading and writing data to and from serial ports

IO with both array based and direct ByteBuffers is supported.

Accessing serial ports requires android.permission.SERIAL_PORT permission

Each platform must configure list of supported serial ports in the
config_serialPorts resource overlay
(this is needed to prevent apps from accidentally accessing the bluetooth
or other system UARTs).

In addition, the platform uevent.rc file must set the owner to the
/dev/tty* files to "system" so the framework can access the port.

Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/jni/AndroidRuntime.cpp
c6aacce37191e1cc79cfeba13b39899f59c68c3b 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)

Change-Id: I1de629b4632a4b3187ca1a28d6416daccd35f924
/frameworks/base/core/jni/AndroidRuntime.cpp
a51f0e707f1f3142358aa919ea60ad2842803139 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF)

Change-Id: I8fbdfa7a7581f481968dbb65aa40f7042936d7cb
/frameworks/base/core/jni/AndroidRuntime.cpp
933e85615059b85a87747da57288384541cc56da 04-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF)

Change-Id: I26f76452ac49e2890b14d133c065493d8df0fb4a
/frameworks/base/core/jni/AndroidRuntime.cpp
1afd5bab4e0eaba8b5bc2ab5c7b556cd602cf2e7 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)

Change-Id: I44f267700356967dc51e8f85ebf457dc85cfb229
/frameworks/base/core/jni/AndroidRuntime.cpp
06ade6ae1bd015e8b8ad0685847911213c93cc5b 20-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF)

Change-Id: I5321ebd12e9c6248a108529e82c4e1af2a4405e3
/frameworks/base/core/jni/AndroidRuntime.cpp
e5360fbf3efe85427f7e7f59afe7bbeddb4949ac 01-Nov-2011 Jeff Brown <jeffbrown@google.com> Rewrite SQLite database wrappers.

The main theme of this change is encapsulation. This change
preserves all existing functionality but the implementation
is now much cleaner.

Instead of a "database lock", access to the database is treated
as a resource acquisition problem. If a thread's owns a database
connection, then it can access the database; otherwise, it must
acquire a database connection first, and potentially wait for other
threads to give up theirs. The SQLiteConnectionPool encapsulates
the details of how connections are created, configured, acquired,
released and disposed.

One new feature is that SQLiteConnectionPool can make scheduling
decisions about which thread should next acquire a database
connection when there is contention among threads. The factors
considered include wait queue ordering (fairness among peers),
whether the connection is needed for an interactive operation
(unfairness on behalf of the UI), and whether the primary connection
is needed or if any old connection will do. Thus one goal of the
new SQLiteConnectionPool is to improve the utilization of
database connections.

To emulate some quirks of the old "database lock," we introduce
the concept of the primary database connection. The primary
database connection is the one that is typically used to perform
write operations to the database. When a thread holds the primary
database connection, it effectively prevents other threads from
modifying the database (although they can still read). What's
more, those threads will block when they try to acquire the primary
connection, which provides the same kind of mutual exclusion
features that the old "database lock" had. (In truth, we
probably don't need to be requiring use of the primary database
connection in as many places as we do now, but we can seek to refine
that behavior in future patches.)

Another significant change is that native sqlite3_stmt objects
(prepared statements) are fully encapsulated by the SQLiteConnection
object that owns them. This ensures that the connection can
finalize (destroy) all extant statements that belong to a database
connection when the connection is closed. (In the original code,
this was very complicated because the sqlite3_stmt objects were
managed by SQLiteCompiledSql objects which had different lifetime
from the original SQLiteDatabase that created them. Worse, the
SQLiteCompiledSql finalizer method couldn't actually destroy the
sqlite3_stmt objects because it ran on the finalizer thread and
therefore could not guarantee that it could acquire the database
lock in order to do the work. This resulted in some rather
tortured logic involving a list of pending finalizable statements
and a high change of deadlocks or leaks.)

Because sqlite3_stmt objects never escape the confines of the
SQLiteConnection that owns them, we can also greatly simplify
the design of the SQLiteProgram, SQLiteQuery and SQLiteStatement
objects. They no longer have to wrangle a native sqlite3_stmt
object pointer and manage its lifecycle. So now all they do
is hold bind arguments and provide a fancy API.

All of the JNI glue related to managing database connections
and performing transactions is now bound to SQLiteConnection
(rather than being scattered everywhere). This makes sense because
SQLiteConnection owns the native sqlite3 object, so it is the
only class in the system that can interact with the native
SQLite database directly. Encapsulation for the win.

One particularly tricky part of this change is managing the
ownership of SQLiteConnection objects. At any given time,
a SQLiteConnection is either owned by a SQLiteConnectionPool
or by a SQLiteSession. SQLiteConnections should never be leaked,
but we handle that case too (and yell about it with CloseGuard).

A SQLiteSession object is responsible for acquiring and releasing
a SQLiteConnection object on behalf of a single thread as needed.
For example, the session acquires a connection when a transaction
begins and releases it when finished. If the session cannot
acquire a connection immediately, then the requested operation
blocks until a connection becomes available.

SQLiteSessions are thread-local. A SQLiteDatabase assigns a
distinct session to each thread that performs database operations.
This is very very important. First, it prevents two threads
from trying to use the same SQLiteConnection at the same time
(because two threads can't share the same session).
Second, it prevents a single thread from trying to acquire two
SQLiteConnections simultaneously from the same database (because
a single thread can't have two sessions for the same database which,
in addition to being greedy, could result in a deadlock).

There is strict layering between the various database objects,
objects at lower layers are not aware of objects at higher layers.
Moreover, objects at higher layers generally own objects at lower
layers and are responsible for ensuring they are properly disposed
when no longer needed (good for the environment).

API layer: SQLiteDatabase, SQLiteProgram, SQLiteQuery, SQLiteStatement.
Session layer: SQLiteSession.
Connection layer: SQLiteConnectionPool, SQLiteConnection.
Native layer: JNI glue.

By avoiding cyclic dependencies between layers, we make the
architecture much more intelligible, maintainable and robust.

Finally, this change adds a great deal of new debugging information.
It is now possible to view a list of the most recent database
operations including how long they took to run using
"adb shell dumpsys dbinfo". (Because most of the interesting
work happens in SQLiteConnection, it is easy to add debugging
instrumentation to track all database operations in one place.)

Change-Id: Iffb4ce72d8bcf20b4e087d911da6aa84d2f15297
/frameworks/base/core/jni/AndroidRuntime.cpp
3762c311729fe9f3af085c14c5c1fb471d994c03 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
/frameworks/base/core/jni/AndroidRuntime.cpp
8564c8da817a845353d213acd8636b76f567b234 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
/frameworks/base/core/jni/AndroidRuntime.cpp
6215d3ff4b5dfa52a5d8b9a42e343051f31066a5 04-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
/frameworks/base/core/jni/AndroidRuntime.cpp
5baa3a62a97544669fba6d65a11c07f252e654dd 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
/frameworks/base/core/jni/AndroidRuntime.cpp
a356bf1cd81614a94ef6c720998792480ade4c84 14-Dec-2011 Nick Pelly <npelly@google.com> Rewrite NDEF parsing in Java, clean-up API.

o Lots of documentation fixes.
o Add NdefMessage(NdefRecord ... records) ctor
o Add NdefRecord.createMime()
o Add NdefRecord.createExternal()
o Add toString(), equals() and hashCode() implementations
o Deprecate NdefRecord(byte[]) and NdefRecord.toByteArray()
o Remove framework dependency on libnfc_ndef.so
o Remove NfcAdapter.getDefaultAdapter(), its been deprecated a while

next step:
o Attempt to move NdefMessage -> Intent conversion into NDEF, and
make it CTS tested. This will ensure consistent NDEF -> Intent
mapping across all Android devices.

Change-Id: Ifed4910caa9a1d6bad32dbf0a507ab22bca35e22
/frameworks/base/core/jni/AndroidRuntime.cpp
0a0a1248cfc03940174cbd9af677bafd7280a3bc 02-Dec-2011 Jeff Brown <jeffbrown@google.com> Add a new class to receive vsync events.

Change-Id: I4e384336d2813752a6d65fda6a77e86113a4510c
/frameworks/base/core/jni/AndroidRuntime.cpp
32cbc3855c2a971aa5a801fd339fb6a37db91a1a 01-Dec-2011 Jeff Brown <jeffbrown@google.com> Refactor InputQueue as InputEventReceiver.

This change simplifies the code associated with receiving input
events from input channels and makes it more robust. It also
does a better job of ensuring that input events are properly
recycled (sometimes we dropped them on the floor).

This change also adds a sequence number to all events, which is
handy for determining whether we are looking at the same event or a
new one, particularly when events are recycled.

Change-Id: I4ebd88f73b5f77f3e150778cd550e7f91956aac2
/frameworks/base/core/jni/AndroidRuntime.cpp
07c0fe4c4fdb13d8e743c80394eddd292631f735 11-Nov-2011 Romain Guy <romainguy@google.com> am f1062114: am a3cc20ff: Merge "Initialize egl_cache with an app writeable file" into ics-mr1

* commit 'f1062114874f1cf46de479031d9ad3ad3cae1131':
Initialize egl_cache with an app writeable file
a95826582773a194ed7fb66bc29c9b82fe9bb8d1 10-Nov-2011 Romain Guy <romainguy@google.com> Initialize egl_cache with an app writeable file

Change-Id: I5dda234feab0fedd6e4179a80715ae20dee1c833
/frameworks/base/core/jni/AndroidRuntime.cpp
71f2cf116aab893e224056c38ab146bd1538dd3e 20-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
/frameworks/base/core/jni/AndroidRuntime.cpp
98a4f7e7e12effb78b3d1035e5a670ccbbf5bca1 03-Sep-2011 JP Abgrall <jpa@google.com> NetworkManagement SocketTagger: Migrate QTagUid support to JNI.

* Instead of javaland trying to write commands to
/proc/net/xt_qtaguid/ctrl
use the libcutils/qtaguid.c support via JNI.
* Get rid of tagToKernel() handled by qtaguid library.

Requires libcutils changes from c/132538/

Change-Id: I9de5b3fa4a596c56835024c6d376769a0eea7db1
/frameworks/base/core/jni/AndroidRuntime.cpp
1ee60119c4fa51ebfa781cf5fdc33f192e8551b8 26-Jul-2011 Ted Bonkenburg <tedbo@google.com> Remove ParcelSurfaceTexture and update MediaPlayer

This removes the ParcelSurfaceTexture class since that functionality has been
folded into Surface.java. The change also updates the MediaPlayer to get rid
of setParcelSurfaceTexture() and modifies setTexture() to use the new Surface
functionality in order to simplify the code.

Change-Id: Iafa75ea3188263928128325d8a726786971b4de4
/frameworks/base/core/jni/AndroidRuntime.cpp
66269ea6f68f2f25888ce1080c94ac782742fafc 12-Jul-2011 Kenny Root <kroot@google.com> Move extract native libraries to JNI code

The built-in ZipFile class was quite a long time to find an unpack
libraries. Move everything to using the libutils ZipFileRO class that
goes quite a bit faster. Initial measurements are 6 times faster than
the Java code.

Also, read files off the disk and compare their CRC against the APK's
CRC to see if we need to write the new file to disk. This also cuts down
the bootup time by up to a second per APK that has native files.

Change-Id: Ic464a7969a17368fb6a6b81d026888c4136c7603
/frameworks/base/core/jni/AndroidRuntime.cpp
f9cf814440dad21dd1ef92bb4b93d1a6a4e6442c 18-Jul-2011 Elliott Hughes <enh@google.com> Stop attempting to call the removed -Xdeadlockpredict option.

Bug: 5038293
Change-Id: If834f07355c110eb02cc8a96e25b432c508462cd
/frameworks/base/core/jni/AndroidRuntime.cpp
f85ad937553d4476e3362dcf017dbc4a4919c946 16-Jul-2011 Romain Guy <romainguy@google.com> Don't break the build...

Change-Id: I9c77f3d22eb412dc92703167100d72496aefac9c
/frameworks/base/core/jni/AndroidRuntime.cpp
dafbf247ee4d0c14d501a23612115ab3a1306288 16-Jul-2011 Romain Guy <romainguy@google.com> Remove unused code

Change-Id: I7f7fc6bac03c92087037fc56b78fc43a1e93dae5
/frameworks/base/core/jni/AndroidRuntime.cpp
c1b9bbb21c8ad5109978a4e9e770cd18b0257434 13-Jul-2011 Mike Lockwood <lockwood@android.com> Remove some #ifdef HAVE_ANDROID_OS that were needed for the simulator build

Change-Id: I13d9f251f86c05ae5405f37adbf6b8e9660935ba
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/jni/AndroidRuntime.cpp
84e297238f53f83c9e7de499e711b997d09514e0 27-Jun-2011 Andy McFadden <fadden@android.com> Remove native EventRecurrence parser

Switch over to the new parser.

Bug 4575374

Change-Id: If78d8042fb266182900398f7fc464a048c779966
/frameworks/base/core/jni/AndroidRuntime.cpp
4532c5e49cc0d029c53a3aee3e0b1fdf8ffd2ec4 10-Jun-2011 Jamie Gennis <jgennis@google.com> Merge "Add ParcelSurfaceTexture Java class to enable ISurfaceTexture sharing via Binder."
050316184b01c0d1a01c46afae7429b89a27c31b 07-Jun-2011 tedbo <tedbo@google.com> Add ParcelSurfaceTexture Java class to enable ISurfaceTexture sharing via Binder.

This adds a new ParcelSurfaceTexture.java class that can be instantiated with
a SurfaceTexture and used to send the corresponding ISurfaceTexture interface
to another process via Binder. The ParcelSurfaceTexture java object can then
be used to create an ANativeWindow based on the SurfaceTextureClient interface.

Change-Id: Ie38ea948b866e52f36a6d0f6cde19b54a8546817
/frameworks/base/core/jni/AndroidRuntime.cpp
66e9af6c549b1f6ab4e3f26e2bab14b115ad3848 08-Jun-2011 Romain Guy <romainguy@google.com> Remove obsolete code.

Change-Id: I2f990528bdc0dc6127f367e55c55287d43dd29f9
/frameworks/base/core/jni/AndroidRuntime.cpp
ebed7d6e35f7f960e6e6add2b8ab7c7a31a511c3 17-May-2011 Jeff Brown <jeffbrown@google.com> Support wrapping app processes to inject debug instrumentation.
Bug: 4437846

Change-Id: I4552501c693716b14714afb5c5248edaca9547ab
/frameworks/base/core/jni/AndroidRuntime.cpp
4a627c71ff53a4fca1f961f4b1dcc0461df18a06 01-Apr-2011 Christopher Tate <ctate@google.com> Full local backup infrastructure

This is the basic infrastructure for pulling a full(*) backup of the
device's data over an adb(**) connection to the local device. The
basic process consists of these interacting pieces:

1. The framework's BackupManagerService, which coordinates the
collection of app data and routing to the destination.

2. A new framework-provided BackupAgent implementation called
FullBackupAgent, which is instantiated in the target applications'
processes in turn, and knows how to emit a datastream that contains
all of the app's saved data files.

3. A new shell-level program called "bu" that is used to bridge from
adb to the framework's Backup Manager.

4. adb itself, which now knows how to use 'bu' to kick off a backup
operation and pull the resulting data stream to the desktop host.

5. A system-provided application that verifies with the user that
an attempted backup/restore operation is in fact expected and to
be allowed.

The full agent implementation is not used during normal operation of
the delta-based app-customized remote backup process. Instead it's
used during user-confirmed *full* backup of applications and all their
data to a local destination, e.g. via the adb connection.

The output format is 'tar'. This makes it very easy for the end
user to examine the resulting dataset, e.g. for purpose of extracting
files for debug purposes; as well as making it easy to contemplate
adding things like a direct gzip stage to the data pipeline during
backup/restore. It also makes it convenient to construct and maintain
synthetic backup datasets for testing purposes.

Within the tar format, certain artificial conventions are used.
All files are stored within top-level directories according to
their semantic origin:

apps/pkgname/a/ : Application .apk file itself
apps/pkgname/obb/: The application's associated .obb containers
apps/pkgname/f/ : The subtree rooted at the getFilesDir() location
apps/pkgname/db/ : The subtree rooted at the getDatabasePath() parent
apps/pkgname/sp/ : The subtree rooted at the getSharedPrefsFile() parent
apps/pkgname/r/ : Files stored relative to the root of the app's file tree
apps/pkgname/c/ : Reserved for the app's getCacheDir() tree; not stored.

For each package, the first entry in the tar stream is a file called
"_manifest", nominally rooted at apps/pkgname. This file contains some
metadata about the package whose data is stored in the archive.

The contents of shared storage can optionally be included in the tar
stream. It is placed in the synthetic location:

shared/...

uid/gid are ignored; app uids are assigned at install time, and the
app's data is handled from within its own execution environment, so
will automatically have the app's correct uid.

Forward-locked .apk files are never backed up. System-partition
.apk files are not backed up unless they have been overridden by a
post-factory upgrade, in which case the current .apk *is* backed up --
i.e. the .apk that matches the on-disk data. The manifest preceding
each application's portion of the tar stream provides version numbers
and signature blocks for version checking, as well as an indication
of whether the restore logic should expect to install the .apk before
extracting the data.

System packages can designate their own full backup agents. This is
to manage things like the settings provider which (a) cannot be shut
down on the fly in order to do a clean snapshot of their file trees,
and (b) manage data that is not only irrelevant but actively hostile
to non-identical devices -- CDMA telephony settings would seriously
mess up a GSM device if emplaced there blind, for example.

When a full backup or restore is initiated from adb, the system will
present a confirmation UI that the user must explicitly respond to
within a short [~ 30 seconds] timeout. This is to avoid the
possibility of malicious desktop-side software secretly grabbing a copy
of all the user's data for nefarious purposes.

(*) The backup is not strictly a full mirror. In particular, the
settings database is not cloned; it is handled the same way that
it is in cloud backup/restore. This is because some settings
are actively destructive if cloned onto a different (or
especially a different-model) device: telephony settings and
AndroidID are good examples of this.

(**) On the framework side it doesn't care that it's adb; it just
sends the tar stream to a file descriptor. This can easily be
retargeted around whatever transport we might decide to use
in the future.

KNOWN ISSUES:

* the security UI is desperately ugly; no proper designs have yet
been done for it
* restore is not yet implemented
* shared storage backup is not yet implemented
* symlinks aren't yet handled, though some infrastructure for
dealing with them has been put in place.

Change-Id: Ia8347611e23b398af36ea22c36dff0a276b1ce91
/frameworks/base/core/jni/AndroidRuntime.cpp
c6cc0f8c19d9eccf408a443fa2bf668af261dcd0 12-Apr-2011 Joe Onorato <joeo@google.com> Rename ViewRoot to ViewAncestor.

ViewRoot is about to be a new public class for poking at ViewAncestor.

Change-Id: Ie95d707c6d8bbb48f78d093d7b2667851812a7d5
/frameworks/base/core/jni/AndroidRuntime.cpp
8f0095cd33558e9cc8a440047908e53b68906f5f 03-May-2011 Romain Guy <romainguy@google.com> Allows to render with an OpenGL context inside a TextureView.

Change-Id: I59453f7fc3997f0502a1c5d325d37fed376fabc7
/frameworks/base/core/jni/AndroidRuntime.cpp
2352b978a3c94cd88f41d0d908f961333fdac1e9 13-Apr-2011 Jeff Brown <jeffbrown@google.com> Initial checkin of spot presentation for touchpad gestures.

Added a new PointerIcon API (hidden for now) for loading
pointer icons.

Fixed a starvation problem in the native Looper's sendMessage
implementation which caused new messages to be posted ahead
of old messages sent with sendMessageDelayed.

Redesigned the touch pad gestures to be defined in terms of
more fluid finger / spot movements. The objective is to reinforce
the natural mapping between fingers and spots which means there
must not be any discontinuities in spot motion relative to
the fingers.

Removed the SpotController stub and folded its responsibilities
into PointerController.

Change-Id: I5126b1e69d95252fda7f2a684c9287e239a57163
/frameworks/base/core/jni/AndroidRuntime.cpp
d195e5ab401432ddac659791640a2927fc668699 14-Apr-2011 Elliott Hughes <enh@google.com> Replace a custom AndroidRuntime::findClass with a more targeted fix.

This seems simpler and more contained, and I think the comment explaining
why hoop-jumping is necessary is a bit clearer now.

Change-Id: Ief4afd7cbb42188ed835fce23e497520bdb753a8
/frameworks/base/core/jni/AndroidRuntime.cpp
46703b099516c383a6882815bcf9cd4df0ec538d 07-Apr-2011 Brian Carlstrom <bdc@google.com> Tolerate missing AccountManager resource, not just missing resource name

In addition to the primary change in the subject, also some minor cleanup of javadoc, typos, CloseGuard warning, etc found while working on a new AbstractAccountAuthenticator.

Change-Id: I73f3408773a43a0021a15f8d051fd3dbbdf898a5
/frameworks/base/core/jni/AndroidRuntime.cpp
aedc2a8fcc2841063b3324e09234eff03044a324 03-Apr-2011 Brian Carlstrom <bdc@google.com> Merge "Tracking merge of dalvik-dev to master"
08065b9f09ead8895d97b2971622af8c179e1768 02-Apr-2011 Brian Carlstrom <bdc@google.com> Tracking merge of dalvik-dev to master

git cherry-pick --no-commit a80febd83c8bf0b6717da2a7136179bdc906a5b7

git cherry-pick --no-commit 5e642b41cf44c5da7afdd95ab3d5e2bdbf7b31dd

git cherry-pick --no-commit 4886db14c9eee4b6fee69bd54c57c5af04709c4c

git cherry-pick --no-commit 560c685e448769904047507b9484ce8111967d7e

git cherry-pick --no-commit 63dde7a2fcfa53dc531558635b64cea613d3cdb4

git cherry-pick --no-commit 74e5cb91060a379d98dd3a333b5f231bfb4f502e

git cherry-pick --no-commit 1cc8c9708b555e2e338b7798d38887a2fefcfea6

git cherry-pick --no-commit 09625a21f5abe0c0db15757f58585d552d62c3d7

git cherry-pick --no-commit fcb02dfe0f5a2bb7c07e6d6fc69f756a484b5458

git cherry-pick --no-commit a68cb7fa3ab42854768b8145ff85231663770292

git cherry-pick --no-commit 716beb1c131dd2c6b805d4f681debaa20075010c

git cherry-pick --no-commit 8c29b1097a7afe3a77e27546a56e396f3620a4ec

git cherry-pick --no-commit 9c6a1a55d1c8086c1cc57464eea43725694ff70c

git cherry-pick --no-commit b14f5ea5c57acdd009ba5b51f1bbe430f3d353b8

Change-Id: I8cc94175441b009e23549762d6baee1dbace4881
/frameworks/base/core/jni/AndroidRuntime.cpp
9c1e23baf5bfbebd1aebbd6d9a18c225325567ce 24-Mar-2011 Chet Haase <chet@google.com> Add logging of graphics acceleration info to bugreports

Change-Id: I9fa4cda6ccf92df9d1c644ccdc0e7274a30106e0
/frameworks/base/core/jni/AndroidRuntime.cpp
2ed2462aa29c564f5231f317c27b3188da875e52 15-Mar-2011 Jeff Brown <jeffbrown@google.com> Improve VelocityTracker numerical stability.

Replaced VelocityTracker with a faster and more accurate
native implementation. This avoids the duplicate maintenance
overhead of having two implementations.

The new algorithm requires that the sample duration be at least
10ms in order to contribute to the velocity calculation. This
ensures that the velocity is not severely overestimated when
samples arrive in bursts.

The new algorithm computes the exponentially weighted moving
average using weights based on the relative duration of successive
sample periods.

The new algorithm is also more careful about how it handles
individual pointers going down or up and their effects on the
collected movement traces. The intent is to preserve the last
known velocity of pointers as they go up while also ensuring
that other motion samples do not count twice in that case.

Bug: 4086785
Change-Id: I2632321232c64d6b8faacdb929e33f60e64dcdd3
/frameworks/base/core/jni/AndroidRuntime.cpp
acc29cc91be634070c92a807df412ced97b9b375 11-Mar-2011 Mike Lockwood <lockwood@android.com> UsbDevice: Move IO related methods to new UsbDeviceConnection class

UsbDevice is now just an immutable parcelable object like UsbInterface and
UsbEndpoint.
All IO related functionality is now contained in UsbDeviceConnection
and UsbRequest.

Bug: 4067029

Change-Id: Ia84da0b512a697acc940eee0c3566711c62e1a68
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/jni/AndroidRuntime.cpp
929a1c219248b62778807cac8ea256c7ac0fda6a 02-Feb-2011 Brian Carlstrom <bdc@google.com> Removing android.security.MessageDigest

Bug: 3392028
Change-Id: I6b9732da17d086ba00c846c3ad1c7fb39baf9502
/frameworks/base/core/jni/AndroidRuntime.cpp
e7d511e148bc901ef41ac44d7b3593e5d803f72f 30-Dec-2010 Mike Lockwood <lockwood@android.com> New APIs for USB host support:

UsbManager:
- is now a service retrievable via Context.getSystemService(Context.USB_SERVICE).
- provides support for returning a list all connected USB devices
- broadcasts ACTION_USB_DEVICE_ATTACHED and USB_DEVICE_DETACHED when devices
are added and removed from the USB host bus

UsbDevice:
- represents an attached USB device.

UsbInterface:
- represents an interface on a USB device
- devices may have multiple interfaces if they provide multiple
sets of functionality (for example, android phones typically have interfaces
for both USB mass storage and adb)

UsbEndpoint:
- represents an endpoint on a USB interface
- endpoints are used for sending or receiving data
(only in one or the other direction)

UsbRequest:
- encapsulates a send or receive request to be sent over an endpoint

Change-Id: Ieef3e434c62760770ea839070cf5eba1a705967a
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/jni/AndroidRuntime.cpp
8cdf27c36a5b697396144925b3f61e4802dd3558 19-Jan-2011 Carl Shapiro <cshapiro@google.com> Add a property for specifying a dalvik heap growth limit.

Change-Id: I7334fb720277888df836414834ecf1e8d6b4b579
/frameworks/base/core/jni/AndroidRuntime.cpp
fbf097732137a32930d151f7ba6816a5b870c32a 16-Jan-2011 Jeff Brown <jeffbrown@google.com> Support non-rectangular input regions.

This enables the system bar to carve out a region through which
events will be sent to the IME behind it.

Bug: 3238092
Change-Id: I69b855a8d9b5b3ee525266c0861826e53e5b5028
/frameworks/base/core/jni/AndroidRuntime.cpp
aa0ce3396c096c97e3394c53e3912cb08b66fe20 07-Jan-2011 Jamie Gennis <jgennis@google.com> Add SurfaceTexture JNI registration.

Change-Id: I5441600b334e11e6ef88eb96ebb010df75080ad6
/frameworks/base/core/jni/AndroidRuntime.cpp
264f6cd0b9215f75dd5917252abea98e8fce6222 06-Jan-2011 Mike Lockwood <lockwood@android.com> Temporarily remove UsbManager support for USB host.

A new USB host API will be added in an upcoming commit

Change-Id: I5816c10c7acd236d31ab8ae255fc83c77121eea0
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/jni/AndroidRuntime.cpp
d07c9d5d920c261ef10efc825ee5225e83ad1c5b 29-Dec-2010 Mike Lockwood <lockwood@android.com> UsbManager: Add methods to convert between USB device names and IDs

Change-Id: I199a47805b629cc7b1714191d6af2fd70c2bda6d
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/jni/AndroidRuntime.cpp
0bd5243b751c9cad317758158f79b3347e7948af 14-Dec-2010 Brad Fitzpatrick <bradfitz@android.com> Framework-side support for Dalvik "isSensitiveThread" hook.

Used in lock contention stats.

Bug: 3226270
Change-Id: Ie6f58d130a29079a59bdefad40b80304d9bc3623
/frameworks/base/core/jni/AndroidRuntime.cpp
9e4c884e7a7acd6b75399b180dc339295cda5a43 08-Dec-2010 Carl Shapiro <cshapiro@google.com> Add a comment regarding the sizing of the Dalvik heap.

Change-Id: I07a3267531580f034e78b5316162bfb553f1f819
/frameworks/base/core/jni/AndroidRuntime.cpp
ca7e1ed81ce44090aac17c9599578b1c23db7863 08-Dec-2010 Carl Shapiro <cshapiro@google.com> Remove stale code and unneeded '\n' chars from findClass.

Change-Id: I496d56105a0889eb0a8c492985f8a324a200edc6
/frameworks/base/core/jni/AndroidRuntime.cpp
38cfa8ca8bc67f4342431cea7e35643ddf9254cc 08-Dec-2010 Carl Shapiro <cshapiro@google.com> Add a property to set the starting size of a VM.

Change-Id: I3c981417baadfef64990fd90b4a275ed706a0b5b
/frameworks/base/core/jni/AndroidRuntime.cpp
a8079bfb9a738a7f24f103cd640e5317c4fd2510 16-Nov-2010 Andreas Huber <andih@google.com> Apparently SystemProperties jni native support must now be registered before Binder's.

Change-Id: Ia7197f41052c4d47dbecec400a7c789317f743a0
/frameworks/base/core/jni/AndroidRuntime.cpp
6e0ecb4eed5cd2e1f15766d7028467129974a12d 04-Nov-2010 Chet Haase <chet@google.com> Adding JNI methods as a faster reflection mechanism

This approach is only for the common cases of void-return,
single-argument float/int methods.

Change-Id: Ifb31535a6f717b85417eced93c579be6e461e039
/frameworks/base/core/jni/AndroidRuntime.cpp
cd0e839a2448deea50f79bddeba782c546b33893 14-Oct-2010 Nick Pelly <npelly@google.com> NFC: Move NFC service implementation out of system_server.

NFC service is now an application service in packages/apps/Nfc.

NFC service is registered through ServiceManager.addService(), and the proxy
object NfcAdapter obtains a handle to it through ServiceManager.getService().

**Important** Had to add new symbols AID_NFC / NFC_UID / android.uid.nfc and
modify service_manager.c, Process.java and PackageManagerService.java in order
to force the com.android.nfc process to take a fixed uid, so that it can use
ServiceManager.addService().

Most of the JNI has moved to packages/apps/Nfc/jni. However NdefRecord and
NdefMessage require some in-process native code, so android_com_NdefMessage.cpp
and android_com_NdefRecord.cpp stay in frameworks/base/core/jni. They link to
a very small library libnfc_ndef.so that implements NDEF message parsing. This
has been added to core.mk so all devices (even without NFC hardware) can work
with NDEF data.

Bug: 3041259
Bug: 3097445
Change-Id: If7f00cd8f2053acfc9319ca366d4a9c02bd396e6
Signed-off-by: Nick Pelly <npelly@google.com>
/frameworks/base/core/jni/AndroidRuntime.cpp
4715bd91f5949a1919156a5a5cb50f0cccda645e 29-Sep-2010 Nick Pelly <npelly@google.com> resolved conflicts for merge of f4c3b7e9 to master

Change-Id: Idcdc521144f3072058b2bb6cb383e42c852e64f4
038cabe0247ee46df62f9363f1a303bc5b9c1028 24-Sep-2010 Nick Pelly <npelly@google.com> NFC integration

Source: Trusted_NFC_Device_Host_AA03.01e02_google.zip code drop (23-Sep-2010)

Conflicts:

core/java/android/app/ApplicationContext.java
core/java/android/provider/Settings.java
core/jni/Android.mk
core/jni/AndroidRuntime.cpp
core/res/AndroidManifest.xml
include/utils/Asset.h

Change-Id: I62c92f4c79f5ee65126c97602f6bc1c15794e573
Signed-off-by: Nick Pelly <npelly@google.com>
/frameworks/base/core/jni/AndroidRuntime.cpp
a23cdda0a5fad7798454ecb05a7855cb9211ea22 23-Sep-2010 Wei-Ta Chen <weita@google.com> am ac487f70: am 6b849e21: Unhide BitmapRegionDecoder.

Merge commit 'ac487f708f7b58dbd4f3021b520c6ed5975daebe'

* commit 'ac487f708f7b58dbd4f3021b520c6ed5975daebe':
Unhide BitmapRegionDecoder.
6b849e2123be98eb2a1a25b8abf0b13a279ce952 07-Sep-2010 Wei-Ta Chen <weita@google.com> Unhide BitmapRegionDecoder.

1. Rename LargeBitmap to BitmapRegionDecoder
2. Move the instantiations of BitmapRegionDecoder out of BitmapFactory.
3. Remove the use of MemoryFile in BitmapRegionDecoder, since MemoryFile's API had been modified in master. Otherwise, the change will break the master build.
4. Move AssetStreamAdaptor, AutoFDSeek and nullObjectReturn to Utils.h because BitmapFactory.cpp and BitmapRegionDecoder.cpp both need to use these utility functions.

Most of the modifications, except for (2) and (3), were reviewed in https://android-git.corp.google.com/g/#change,64716 .
However, that change broke the master build due to (3) and was reverted eventually.
So, instead of withdrawing this change and waiting for that change to be checked in again, I merge the two changes into one.

Change-Id: I2202c0fbbbd6d6676bbd9637e690023ea4099c40
/frameworks/base/core/jni/AndroidRuntime.cpp
3bf23a7b9f59e0ae38b728461f5f755b0be6883c 17-Sep-2010 Carl Shapiro <cshapiro@google.com> am b0abf3ea: am 4b164c1b: Kill off the remaining GC-specific system properties.

Merge commit 'b0abf3ea47b74296fd790843e789cfd101f58a00'

* commit 'b0abf3ea47b74296fd790843e789cfd101f58a00':
Kill off the remaining GC-specific system properties.
4b164c1bf3592d4d83d93a5de58bb09676f1462c 17-Sep-2010 Carl Shapiro <cshapiro@google.com> Kill off the remaining GC-specific system properties.

Change-Id: Ib09ef132c6fb99b9eb22ecfd75a910c9c0f01e25
/frameworks/base/core/jni/AndroidRuntime.cpp
7b29804ba2b0db1a627b680b3fe2c5036139513b 08-Sep-2010 Wei-Ta Chen <weita@google.com> am 8fc6f8b2: am 1b214be9: Merge "Revert "Rename LargeBitmap to BitmapRegionDecoder for having a better API."" into gingerbread

Merge commit '8fc6f8b2152564cab6ede025644f9bc3ee61ce16'

* commit '8fc6f8b2152564cab6ede025644f9bc3ee61ce16':
Revert "Rename LargeBitmap to BitmapRegionDecoder for having a better API."
340ce75b446f6a6afc12b0582be3fc34ac3a5364 08-Sep-2010 Wei-Ta Chen <weita@google.com> Revert "Rename LargeBitmap to BitmapRegionDecoder for having a better API."

This reverts commit 50ba3d2c09a9131f3578d271adf2bc8258ca1742.
/frameworks/base/core/jni/AndroidRuntime.cpp
50cb7dc458e65b75fb69a3a3fed972e7ed913703 08-Sep-2010 Wei-Ta Chen <weita@google.com> am a295a390: am b356f8ac: Merge "Rename LargeBitmap to BitmapRegionDecoder for having a better API." into gingerbread

Merge commit 'a295a3908befeb9dd30203c612d95411d68492ed'

* commit 'a295a3908befeb9dd30203c612d95411d68492ed':
Rename LargeBitmap to BitmapRegionDecoder for having a better API.
50ba3d2c09a9131f3578d271adf2bc8258ca1742 07-Sep-2010 Wei-Ta Chen <weita@google.com> Rename LargeBitmap to BitmapRegionDecoder for having a better API.

Move AssetStreamAdaptor, AutoFDSeek and nullObjectReturn to Utils.h because
BitmapFactory.cpp and BitmapRegionDecoder.cpp both need to use these utility functions.

Change-Id: I3e60c7fe4abd0289e1384e69a08fd20fe6fb0e10
/frameworks/base/core/jni/AndroidRuntime.cpp
949498de6630c22ee15821bd07ac816b9fe79702 02-Sep-2010 Dianne Hackborn <hackbod@google.com> am 14d56840: am bc5ec2f9: Merge "Improve messages when java process is starting." into gingerbread

Merge commit '14d56840eeec537c037bebaeaebf1b37f48d8dad'

* commit '14d56840eeec537c037bebaeaebf1b37f48d8dad':
Improve messages when java process is starting.
08e60f2a165d23b53f41993374aa074165bb5863 02-Sep-2010 Dianne Hackborn <hackbod@google.com> Improve messages when java process is starting.

Change-Id: I33e401eb240a454845987c10d44e3520e419721b
/frameworks/base/core/jni/AndroidRuntime.cpp
78448edcdddaff98cf738a4ae9663917d0397951 25-Aug-2010 Brian Carlstrom <bdc@google.com> resolved conflicts for merge of 50d35946 to master

Change-Id: Ia8c3312d626952c378fc4e7fec1d46119e2ccf42
171ea89fb99385146e159ef75849a87c49ffee76 25-Aug-2010 Brian Carlstrom <bdc@google.com> Update AndroidRuntime with dalvik-dev changes

This change is the result of three cherry-picks:

- Add dalvik.vm.gc.preverify dalvik.vm.gc.postverify properties.
git cherry-pick --no-commit 0ef82fcf

- Add the property dalvik.vm.gc.verifycardtable to set the -Xgc:-Xgc:verifycardtable option for the vm.
git cherry-pick --no-commit 8b4faf54

- Eliminate short JIT debugging properties
git cherry-pick --no-commit 57a673fc3db9d84908467ae6d245fd60d4637b2f

Change-Id: I5f8002ed1e431344570add02f58e2641c8fae549
/frameworks/base/core/jni/AndroidRuntime.cpp
1b10d3d23512f9f9a091e1f4c27bb3dc47806f6c 17-Aug-2010 Joseph Wen <josephwen@google.com> am 81dcea60: am f1f48bc7: Do JPEG tile-based decoding.

Merge commit '81dcea6093dfcdadd52982505249a5eacf47a81b'

* commit '81dcea6093dfcdadd52982505249a5eacf47a81b':
Do JPEG tile-based decoding.
f1f48bc7f200f54c76b22d845d8ba8419879b375 19-Jul-2010 Joseph Wen <josephwen@google.com> Do JPEG tile-based decoding.

Change-Id: I5c1b4ac3c02eb4350ef0ba9a7877b22cfd730cfb
/frameworks/base/core/jni/AndroidRuntime.cpp
7b6d0d99b6904b511996267efae215fe9cb5e98f 11-Aug-2010 Dianne Hackborn <hackbod@google.com> am 679ac09a: am a5ae50cd: Merge "More native work." into gingerbread

Merge commit '679ac09a5c22175354f3a04b28456b323839530e'

* commit '679ac09a5c22175354f3a04b28456b323839530e':
More native work.
08d5b8fad8d46ccb64db2fdcb4d66972ec87bf48 04-Aug-2010 Dianne Hackborn <hackbod@google.com> More native work.

Implement save/restore of state, and add native APIs for
configuration information.

Change-Id: I2a3ddc2ba605db58d7c8b2b31b9215fb323f90b5
/frameworks/base/core/jni/AndroidRuntime.cpp
163935113919a184122b8b3bd672ef08c8df65dc 08-Aug-2010 Romain Guy <romainguy@android.com> Make libhwui entirely optional.

The makefile variable USE_OPENGL_RENDERER must be set to true to compile
libhwui and the related code in the JNI layer.

This change also removes obsolete APIs from Canvas that must not be used
and would be confusing if left in. These APIs were remnants of our first
attempt at an OpenGL renderer for the view hierarchy and had not been
taken out before Android 1.0 was released.

Change-Id: I2475ff1307212bab26c926724f3c508681c7dae1
/frameworks/base/core/jni/AndroidRuntime.cpp
a8bc19901c4a48ad821f6bdd94ebbf7d145d573d 06-Aug-2010 Carl Shapiro <cshapiro@google.com> Remove overwritefree property. The underlying flag no longer exists.

Change-Id: Iecd1710887a7b16536cdbd52846952cc72cc0727
/frameworks/base/core/jni/AndroidRuntime.cpp
3c7c351a6217ac48b741740167c201a679a0ca65 05-Aug-2010 Brian Carlstrom <bdc@google.com> Tracking merge of dalvik-dev to gingerbread

git cherry-pick --no-commit f77cf7f0
git cherry-pick --no-commit c8f503b5285e30c1a881d0ba860ba9021f57d113
git cherry-pick --no-commit 570bb561
git cherry-pick --no-commit e2417541
git cherry-pick --no-commit e4d81f25bd4dc1a5c909b56ab56a56406290da30
git cherry-pick --no-commit 5e8a587d

Change-Id: I101a385d43f3e0f4ce5352217f92ef67a3908c88
/frameworks/base/core/jni/AndroidRuntime.cpp
e4d81f25bd4dc1a5c909b56ab56a56406290da30 15-Jul-2010 Andy McFadden <fadden@android.com> Add support for dalvik.vm.extra-opts property.

The goal here is to avoid the dalvik.vm.* property explosion by
having a single property that takes an arbitrary collection of Dalvik
command-line options. This is intended for testing of various
configurations by the Dalvik team, not industrial use.

Options should be separated by spaces, e.g.

adb shell setprop dalvik.vm.extra-opts "-showversion -Xmx4m"

will print the version banner and set the heap max to 4MB, which won't
get you very far.

The extra-opts options will appear last, which allows them to override
values set earlier (like the heap max).

Bug 2838629.

(cherry-pick from dalvik-dev branch)

Change-Id: Ibcbb1b62367cf2152798583e8722ef7e461ad19a
/frameworks/base/core/jni/AndroidRuntime.cpp
c242a5aa93466e7879036ff21652cf7040c932ea 20-Jul-2010 Danica Chang <danicachang@google.com> delete ScoSocket

Change-Id: Ib941ca2d817e0a788638a5e72f1eb2e1fc4739e9
/frameworks/base/core/jni/AndroidRuntime.cpp
fb4e1e24a93c7e6bc0fcdb3f5cfadfbc19503cd8 16-Jul-2010 Kenny Root <kroot@google.com> resolved conflicts for merge of 181bb0ab to master

Change-Id: I2284e7c671d127da0d124fbabae8d887727fd5bf
02c8730c1bf19daf48bec8c6995df676a00a73b1 01-Jul-2010 Kenny Root <kroot@google.com> Add API to call to vold for mounting OBBs

* Unhide StorageService class; hide all the USB-related items

* Add application-visible API to StorageManager for OBB files

* Add class for parceling OBB info across binders (ObbInfo)

* Add a JNI glue class to libutils/ObbFile (ObbScanner)

* Add API to MountService to deal with calling into vold and checking
permissions

Change-Id: I33ecf9606b8ff535f3a2ada83931da6bbef41cfd
/frameworks/base/core/jni/AndroidRuntime.cpp
81ea83d10883886013bc95eac2fe032acf1e7aa9 30-Jun-2010 Mike Lockwood <lockwood@android.com> Move MTP JNI code from libandroid_runtime to libmedia_jni

Signed-off-by: Mike Lockwood <lockwood@android.com>

Change-Id: I0c54bbe4e6146beba7d22e782e02ded420f50dbd
/frameworks/base/core/jni/AndroidRuntime.cpp
98ef64e4a89ced79094d4ff3dc0123c1989f9e10 29-Jun-2010 Mike Lockwood <lockwood@android.com> MTP: Add MtpServer Java class to wrap MTP device support.

Change-Id: I818c2d3b3f52ad5bb515acc4d3288b2b43e11908
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/jni/AndroidRuntime.cpp
f40e4928b9d8e1da4166c76dbd3f86a6bd2d3f72 29-Jun-2010 Chris Tate <ctate@android.com> am 96725326: am 31e0ffe8: Merge "Native input event dispatching." into gingerbread

Merge commit '96725326149687168937cf62f75364cf9cc3e96b'

* commit '96725326149687168937cf62f75364cf9cc3e96b':
Native input event dispatching.
349703effce5acc53ed96f7ed8556131f0c65e18 22-Jun-2010 Jeff Brown <jeffbrown@google.com> Native input event dispatching.

Target identification is now fully native.
Fixed a couple of minor issues related to input injection.
Native input enabled by default, can be disabled by setting
WindowManagerPolicy.ENABLE_NATIVE_INPUT_DISPATCH to false.

Change-Id: I7edf66ed3e987cc9306ad4743ac57a116af452ff
/frameworks/base/core/jni/AndroidRuntime.cpp
b09448e0a84a57bd15ea556f8bef27964128032a 23-Jun-2010 Mike Lockwood <lockwood@android.com> am dae19d7c: am aaf39f84: Merge "GPS: remove GpsEventThread from GpsLocationProvider" into gingerbread

Merge commit 'dae19d7c00455e500cc9731071557ea91f162a7d'

* commit 'dae19d7c00455e500cc9731071557ea91f162a7d':
GPS: remove GpsEventThread from GpsLocationProvider
f602d362ba4bb3adbf1eb4e38a794fb14274293a 20-Jun-2010 Mike Lockwood <lockwood@android.com> GPS: remove GpsEventThread from GpsLocationProvider

Rather than polling for events from the native code in an event thread,
we now require the GPS HAL libraries to call our callbacks from a thread
that is registered with the JVM to call directly into Java.
This eliminates a thread from our code and removes one step in the chain
of message passing from the GPS to the Location Manager client.

Change-Id: I2745a157690310ba9a699a8369f54a7366c6b1ba
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/jni/AndroidRuntime.cpp
e4d011201cea40d46cb2b2eef401db8fddc5c9c6 17-Jun-2010 Romain Guy <romainguy@google.com> Add libhwui, to hardware accelerate the Canvas API using OpenGL ES 2.0.

This is the initial checkin to setup the library and turn on OEGL ES 2.0
in ViewRoot, not a functional renderer.

Change-Id: I6655c54166e2967da2e21e7d6dcfba78bf113b44
/frameworks/base/core/jni/AndroidRuntime.cpp
8e03b7566c42621fda01186b66b019142eb84fbf 14-Jun-2010 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of 9e660c82 to master

Change-Id: Ic4bd85cbaa5b9a10dcb474a0dad46490bf967e43
46b9ac0ae2162309774a7478cd9d4e578747bfc2 23-Apr-2010 Jeff Brown <jeffbrown@google.com> Native input dispatch rewrite work in progress.

The old dispatch mechanism has been left in place and continues to
be used by default for now. To enable native input dispatch,
edit the ENABLE_NATIVE_DISPATCH constant in WindowManagerPolicy.

Includes part of the new input event NDK API. Some details TBD.

To wire up input dispatch, as the ViewRoot adds a window to the
window session it receives an InputChannel object as an output
argument. The InputChannel encapsulates the file descriptors for a
shared memory region and two pipe end-points. The ViewRoot then
provides the InputChannel to the InputQueue. Behind the
scenes, InputQueue simply attaches handlers to the native PollLoop object
that underlies the MessageQueue. This way MessageQueue doesn't need
to know anything about input dispatch per-se, it just exposes (in native
code) a PollLoop that other components can use to monitor file descriptor
state changes.

There can be zero or more targets for any given input event. Each
input target is specified by its input channel and some parameters
including flags, an X/Y coordinate offset, and the dispatch timeout.
An input target can request either synchronous dispatch (for foreground apps)
or asynchronous dispatch (fire-and-forget for wallpapers and "outside"
targets). Currently, finding the appropriate input targets for an event
requires a call back into the WindowManagerServer from native code.
In the future this will be refactored to avoid most of these callbacks
except as required to handle pending focus transitions.

End-to-end event dispatch mostly works!

To do: event injection, rate limiting, ANRs, testing, optimization, etc.

Change-Id: I8c36b2b9e0a2d27392040ecda0f51b636456de25
/frameworks/base/core/jni/AndroidRuntime.cpp
c6133285820bba23778906cd417ceb9114e928dc 11-Jun-2010 Romain Guy <romainguy@google.com> Fix native crash when enabling hardware acceleration.

This change also prevents hardware acceleration when the ViewRoot is in the
system process. This causes problem in EGL intialization because of having
both a SurfaceControl and a Surface. This is not needed and better to leave
it off anyway (so that preview windows don't get unnecessary hw acceleration.)

Change-Id: I1cc55d7fb9a4c1a9c4c59f11f49d3e44de78acef
/frameworks/base/core/jni/AndroidRuntime.cpp
7c5ded5d367078a7686872159229c998b558fac3 06-Jun-2010 Christopher Tate <ctate@google.com> am 8207e2fd: am a8ebe8b3: am df2e2eff: Merge "Watchdog now records kernel stacks when it fires" into froyo
a8ebe8b3f5aea0d3f09a62d6d255f99c1f911f7b 06-Jun-2010 Christopher Tate <ctate@google.com> am df2e2eff: Merge "Watchdog now records kernel stacks when it fires" into froyo

Merge commit 'df2e2eff9446c0220515fa7aab7857135e04e12e' into kraken

* commit 'df2e2eff9446c0220515fa7aab7857135e04e12e':
Watchdog now records kernel stacks when it fires
ecaa7b41ca49154ceaa9a7504eb0a86b89a96026 04-Jun-2010 Christopher Tate <ctate@google.com> Watchdog now records kernel stacks when it fires

The kernel threads are appended to the usual /data/anr/traces.txt file
and dropboxed along with the usual Dalvik stack dumps.

Change-Id: I120f1f5ee54c965efe9ac0c7f40fdef56385f1fa
NOTE: this change depends on the kernel publishing /proc/$PID/stack
/frameworks/base/core/jni/AndroidRuntime.cpp
755fd617258d3f1731b2829d681cab680db0fdd5 26-May-2010 Mike Lockwood <lockwood@android.com> Prototype Content Provider support for MTP/PTP devices.

At this point much of the plumbing is in place, but only a few simple queries
are supported.
This is enough to support a proof of concept sample program that navigates
the file hierarchy of a digital camera connected via USB.

Also removed obsolete ptptest host test program.

Change-Id: I17644344b9f0ce1ecc302bc0478c1f3d44a1647f
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/jni/AndroidRuntime.cpp
fa9e7c05c7be6891a6cf85a11dc635a6e6853078 06-May-2010 Christopher Tate <ctate@google.com> Sketch of Native input for MessageQueue / Looper / ViewRoot

MessageQueue now uses a socket for internal signalling, and is prepared
to also handle any number of event input pipes, once the plumbing is
set up with ViewRoot / Looper to tell it about them as appropriate.

Change-Id: If9eda174a6c26887dc51b12b14b390e724e73ab3
/frameworks/base/core/jni/AndroidRuntime.cpp
69969e48f2bca9339662dddfacff0bbf6374ed7f 04-May-2010 Dianne Hackborn <hackbod@google.com> First pass at NativeActivity.

This is a rough sketch of the new pure-native API, which you can
use through a NativeActivity in your manifest (no Java code in
the .apk needed!).

Intentionally no docs yet, the API is still being seriously
messed with. But it works.

Change-Id: I0e916d58a0d159ecaf3689e41834eb8dc681c0c0
/frameworks/base/core/jni/AndroidRuntime.cpp
dbc108a718a9a0d59b4697d0e780193503b4cf92 20-Apr-2010 Carl Shapiro <cshapiro@google.com> am 15feb4de: am 19275cb5: Merge "Remove code to pass the nonexistant lockprofsample flag to Dalvik." into froyo

Merge commit '15feb4defc61c7bded6fdd3ea1c3781f25666275' into kraken

* commit '15feb4defc61c7bded6fdd3ea1c3781f25666275':
Remove code to pass the nonexistant lockprofsample flag to Dalvik.
8ba73ac72cd7becc2158e2b1f98794173f9746bd 20-Apr-2010 Carl Shapiro <cshapiro@google.com> Remove code to pass the nonexistant lockprofsample flag to Dalvik.

Change-Id: If334e21d770bc21a9b7c4f04d0fb652f53359231
/frameworks/base/core/jni/AndroidRuntime.cpp
49ee271bba0972e865ab9def0ee293728263b488 16-Apr-2010 Carl Shapiro <cshapiro@google.com> am cb2906e4: am d5a873fb: Merge "Add command line flags to enable lock profiling." into froyo

Merge commit 'cb2906e4bbb96b0be83029572a78f97dc6763eca' into kraken

* commit 'cb2906e4bbb96b0be83029572a78f97dc6763eca':
Add command line flags to enable lock profiling.
d8f3ec6e8308400e9446b254fcca457f6e53ea13 13-Apr-2010 Carl Shapiro <cshapiro@google.com> Add command line flags to enable lock profiling.
/frameworks/base/core/jni/AndroidRuntime.cpp
a40b3a8d98ca7d3daa3ae7651263fe3c35b0b908 08-Apr-2010 Dan Egnor <egnor@google.com> am c1420832: am 5945579e: Merge "Change TrafficStats to a new JNI implementation." into froyo

Merge commit 'c1420832a8f9c7fa62b143ce63c71062b3969c1b' into kraken

* commit 'c1420832a8f9c7fa62b143ce63c71062b3969c1b':
Change TrafficStats to a new JNI implementation.
2b4abcd0c7c4361af8ab6d5d7b073fb75ac6d219 08-Apr-2010 Dan Egnor <egnor@google.com> Change TrafficStats to a new JNI implementation.

Also change phone's ConnectionStateTrackers to use it directly,
rather than through the INetStat binder interface.

Bug: 2578938
Change-Id: I8858e2609cbec3be845a0ce5178cb03f67e01b41
/frameworks/base/core/jni/AndroidRuntime.cpp
00b74270c9f136a8727c5f6cda0997a3a905f385 26-Mar-2010 Mike Lockwood <lockwood@android.com> Move files internal to LocationManagerService from framework.jar to services.jar

Change-Id: Iebbfc49b8300ab59730733efdf489ec87ea45a25
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/jni/AndroidRuntime.cpp
69c997a5c603c3cc56cbfdacd72cbe9993c5f053 25-Mar-2010 Ben Cheng <bccheng@android.com> Update a stale JIT option name.

Change-Id: I4b2f2c215a0258adf52861bac025e32df7f40b14
/frameworks/base/core/jni/AndroidRuntime.cpp
701d916a9c648f66d15b5c30943430176ae5b08c 01-Mar-2010 Andy McFadden <fadden@android.com> Tone down a log message.

Sometimes shell commands like "am" return before the framework stuff
really finishes initializing (e.g. if you give it no arguments so you
can see the usage info). The runtime used to print the dire and
uninformative message:

E/AndroidRuntime(): ERROR: thread attach failed

With this change it's a bit more subdued:

I/AndroidRuntime(): NOTE: attach of thread 'Binder Thread #2' failed

Ideally it wouldn't get logged at all when it's "expected", but that
requires actual code changes.
/frameworks/base/core/jni/AndroidRuntime.cpp
dae8e94cce0881f3e10ef5e34b881f512bb52a75 24-Feb-2010 Doug Felt <dougfelt@google.com> Add support for accessing native bidi implementation via jni.

Include a simple test to verify that the bidi code works.
/frameworks/base/core/jni/AndroidRuntime.cpp
870d81d038391d1d3896e7f2fa44801d1667f5bf 08-Feb-2010 Doug Zongker <dougz@android.com> remove android.os.Base64Utils

There are no more users of this code.

Change-Id: Ie0109ece2ea329aeb9607e9193eaf0808955eab9
/frameworks/base/core/jni/AndroidRuntime.cpp
c2b3217823444792b52d621b3cd024d64c3338e3 02-Feb-2010 Barry Hayes <bhayes@google.com> Add a "dalvik.vm.gc.overwritefree" property. When set to "true", the
VM will be given the "-Xgc:overwritefree" flag, and the GC will
clobber the memory of freed objects.
/frameworks/base/core/jni/AndroidRuntime.cpp
bca2d613e0d6d2630fedd302c0d779b7610adbcf 30-Nov-2009 Wei-Ta Chen <weita@google.com> Add a Java API that converts yuv data to a jpeg.

The compression is done in the native layer via calling libjpeg.

Bug: 2285598
/frameworks/base/core/jni/AndroidRuntime.cpp
726a570258828d85e401ab62fd4220812fe9344f 25-Nov-2009 Mike Lockwood <lockwood@android.com> resolved conflicts for merge of dfaf2e03 to master

Change-Id: I440d2042dd404a421789063e42102699fa33b7c0
3a32213c4029a03fe39486f3d6ebd0ea18928ee1 24-Nov-2009 Mike Lockwood <lockwood@android.com> Remove HardwareService and move vibrator support to VibratorService.

The lights support is only needed by PowerManagerService and NotificationManagerService, so we do not need a Binder API for it.
Move backlight and notification light support to new LightsService class.
The camera flash is now handled directly by the camera HAL, so the flash Hardware service flash support is obsolete.

Change-Id: I086d681f54668e7f7de3e8b90df3de19d59833c5
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/core/jni/AndroidRuntime.cpp
8914a04b16791cda98de88b5f94d9fee3acedfca 20-Nov-2009 Vasu Nori <vnori@google.com> am 483ae632: am 5a03f36e: maintain cache of statementids returned by sqlite upon compiling a sql stmnt

Merge commit '483ae6328701d29e9731af25c64b09b1e18bc2e7'

* commit '483ae6328701d29e9731af25c64b09b1e18bc2e7':
maintain cache of statementids returned by sqlite upon compiling a sql stmnt
5a03f36ef845f73eb4473193dbb0f93dd12a51af 21-Oct-2009 Vasu Nori <vnori@google.com> maintain cache of statementids returned by sqlite upon compiling a sql stmnt
/frameworks/base/core/jni/AndroidRuntime.cpp
560814f6b11abe83ff0c4ed18cac015c276b3181 19-Nov-2009 Jack Palevich <jackpal@google.com> Add a Java API for OpenGL ES 2.0.

Currently this API is hidden.

Add a test program.
/frameworks/base/core/jni/AndroidRuntime.cpp
acc56ec7d75a0ed09d0e03bc15f6c9e8ee75999b 11-Sep-2009 Ben Cheng <bccheng@android.com> Add support to suppress individual JIT optimizations.
/frameworks/base/core/jni/AndroidRuntime.cpp
bdcef70e15e86e592d725355c96c7fab0b85ac83 19-Aug-2009 Dianne Hackborn <hackbod@google.com> Fix issue #2010965: Increase process size on WVGA devices

This introduces a new system property to set the max vm size. The default
is still 16mb.
/frameworks/base/core/jni/AndroidRuntime.cpp
bd022f423a33f0794bb53e5b0720da2d67e4631c 15-Aug-2009 Nick Pelly <npelly@google.com> Bluetooth: API change.

Split BluetoothDevice into BluetoothDevice and BluetoothAdapter.

BluetoothAdapter: Represents the local BT adapter. Operations on the local
adapter (start a scan, etc).
BluetoothDevice: Represents a remote BT device. Operations on remote devices
(pair, connect, etc).

IBluetoothDevice.aidl -> Bluetooth.aidl
BluetoothDeviceService.java -> BluetoothDeviceService.java

TODO:
Javadoc
/frameworks/base/core/jni/AndroidRuntime.cpp
0e01fbf722bf58a0a46c5aef9333d9bae5e40097 18-Jul-2009 Ben Cheng <bccheng@android.com> Add an option to enable JIT trace profiling for app_process.
/frameworks/base/core/jni/AndroidRuntime.cpp
2df7c15aa0e8f5afc804fd20250316f9e50fdb59 26-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am b505ae41: Merge change 5459 into donut

Merge commit 'b505ae4195d9b8a93c71b1f9da6d7d8c3aaa3c08'

* commit 'b505ae4195d9b8a93c71b1f9da6d7d8c3aaa3c08':
Make the BackupHelperDispatcher properly handle multiple helpers.
4ababd922eac5931e0222862ff082dc29e012816 26-Jun-2009 Joe Onorato <joeo@android.com> Make the BackupHelperDispatcher properly handle multiple helpers.
/frameworks/base/core/jni/AndroidRuntime.cpp
4527acb0c39258792ae55604cb4d71006bf8d938 22-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 856dd8a6: Merge change 4952 into donut

Merge commit '856dd8a60a70a5b7dca2bf2114872ce063e2ad60'

* commit '856dd8a60a70a5b7dca2bf2114872ce063e2ad60':
Helper API cleanup. Allows multiple helpers to function,
06290a4bb9b280fa14a2bbeb2d3ceb09396a78c3 19-Jun-2009 Joe Onorato <joeo@android.com> Helper API cleanup. Allows multiple helpers to function,
because they'll always go in the same order, and this lets
us not have to write headers to keep them paired.
/frameworks/base/core/jni/AndroidRuntime.cpp
e090f3bc9efa052b5c69442633d24e67aa3387a1 20-Jun-2009 Ben Cheng <bccheng@android.com> Shorten the property name as there appears to be a length limit for it.
/frameworks/base/core/jni/AndroidRuntime.cpp
52b0e73443ff8da195fbf0df851a028e07a691b2 19-Jun-2009 Ben Cheng <bccheng@android.com> Process new property definitions for JIT-specific options for apps performance tuning and debugging.
/frameworks/base/core/jni/AndroidRuntime.cpp
1c14776a13546fc2642baa251c8f1b7c545b0272 19-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 16ce3504: Merge change 4708 into donut

Merge commit '16ce3504c5bf98d95d5c36001f755bb4b15253c9'

* commit '16ce3504c5bf98d95d5c36001f755bb4b15253c9':
Make RestoreHelper and friends also write out the snapshot state.
d2d9ceb7305d593c1b767bbb05de0082a9af4109 18-Jun-2009 Joe Onorato <joeo@android.com> Make RestoreHelper and friends also write out the snapshot state.
/frameworks/base/core/jni/AndroidRuntime.cpp
daf701fa6250ae89ad93e2e41127e0f676a322a5 15-Jun-2009 Christopher Tate <ctate@google.com> am 2fdd428e: Fix some backup reader/writer issues; make local transport do backup

Merge commit '2fdd428e0f18384160f7c38ce3a2cd9ba7e7b2c2'

* commit '2fdd428e0f18384160f7c38ce3a2cd9ba7e7b2c2':
Fix some backup reader/writer issues; make local transport do backup
Fix the jni initializer.
Add RestoreFileHelper, BackupDataInput, and add java wrappers for the methods on BackupDataOutput.
Fix bug #1812041: activity manager crash with bad args.
Journal backup requests so that they won't be lost in a crash
Fix data connection issues.
1cf587496fcb1d652bab9fc6792fb106b6fefaa4 12-Jun-2009 Joe Onorato <joeo@android.com> Add RestoreFileHelper, BackupDataInput, and add java wrappers for the methods on BackupDataOutput.
/frameworks/base/core/jni/AndroidRuntime.cpp
8ed6beb515460001a0f5ee91b874289fbb053768 05-Jun-2009 Mathias Agopian <mathias@google.com> rename string_array.h to StringArray.h and move the implementation from the header file to a new cpp file.

StringArray is used in two places in framework/base and in the Sim. Ideally we should get rid of it and use Vector<String8> instead of creating new code.
/frameworks/base/core/jni/AndroidRuntime.cpp
0b6955a48bad9aee01ae2f0c06d3f168ca603ab7 27-May-2009 Nick Pelly <npelly@google.com> New BluetoothSocket API.

Modeled on blocking java.net.Socket and java.net.ServerSocket library.

Public interface is:

public final class BluetoothSocket implements Closeable {
public static BluetoothSocket createRfcommSocket(String address, int port) throws IOException;
public static BluetoothSocket createInsecureRfcommSocket(String address, int port) throws IOException;

public void connect() throws IOException;
public void close() throws IOException;

public String getAddress();
public InputStream getInputStream() throws IOException;
public OutputStream getOutputStream() throws IOException;
}

public final class BluetoothServerSocket implements Closeable {
public static BluetoothServerSocket listenUsingRfcommOn(int port) throws IOException;
public static BluetoothServerSocket listenUsingUnsecureRfcommOn(int port) throws IOException;

public BluetoothSocket accept() throws IOException;
public BluetoothSocket accept(int timeout) throws IOException;
public void close() throws IOException;

}
/frameworks/base/core/jni/AndroidRuntime.cpp
f5e17310d19494834466f237367452dfe1bd51cb 20-May-2009 Nick Pelly <npelly@google.com> Remove Database.java API.

This provided SDP functionality to Java, but is not currently used by any Apps.

I will shortly be providing SDP functionality in a new API, but it will be
quite different to this one, and in the mean-time keeping this stale code
updated with other API changes is a pain.
/frameworks/base/core/jni/AndroidRuntime.cpp
0795272aa226f4e965968a03daddc53ce30b7cda 20-May-2009 Mathias Agopian <mathias@google.com> move libbinder's header files under includes/binder
/frameworks/base/core/jni/AndroidRuntime.cpp
bad962bf407bbb7a7ce296fb75f1883375afa832 20-May-2009 Android (Google) Code Review <android-gerrit@google.com> am e2914615: Merge change 2099 into donut

Merge commit 'e29146158b6048936671decc060d398a68333fc0'

* commit 'e29146158b6048936671decc060d398a68333fc0':
Hook up the backup data writer, and add a utility to read the backup data files.
d2110dbce071a236b6176de344ca797b737542eb 19-May-2009 Joe Onorato <joeo@android.com> Hook up the backup data writer, and add a utility to read the backup data files.
/frameworks/base/core/jni/AndroidRuntime.cpp
1a36071092c209ac763fdb48dcfe87043a2b2cf6 08-May-2009 The Android Open Source Project <initial-contribution@android.com> manual merge of 7ec32cc

Merge commit '7ec32cc'
b1a7ffef3a0007b6991b8338460f6aac8cbb11e8 07-May-2009 Joe Onorato <joeo@android.com> More backup tests
/frameworks/base/core/jni/AndroidRuntime.cpp
070d4c023a4b67e9e29d1c21a7bf9f25d7528c03 29-Apr-2009 Android (Google) Code Review <android-gerrit@google.com> am 3de05ff: Merge change 586 into donut

Merge commit '3de05ffb910b572f7816b838628567c760540f7d'

* commit '3de05ffb910b572f7816b838628567c760540f7d':
Manage imagecache ram budget
fc8db53eee11568b286e8d9c17e211bd6781fab6 27-Apr-2009 Mike Reed <reed@google.com> Manage imagecache ram budget

This code was lifted from the browser, and is now global since java clients may
also use this cache for decoded images
/frameworks/base/core/jni/AndroidRuntime.cpp
1c4907ee77392afb768c2f088e0dedbe4239f6fb 14-Apr-2009 Jack Palevich <jackpal@google.com> Manually merge 129, 174, and 233 from donut

This adds a static OpenGL ES API.

Here are the three commit messages for the original changes:

Clean up trivial Eclipse warnings and fix whitespace.

Added @Override to overridden methods.
Removed unused imports.
Converted tabs to spaces.
Removed \r characters from end-of-lines.
Add .gitignore file to ignore the .class files that are
generated when the "gen" script is run.

This is the 2nd commit message:

Improve glgen

+ gen script is really a bash script rather than a sh script,
so declare that to be true. (For example, it uses pushd,
which is a part of bash, but not a part of sh. Not sure
how this worked until now. Possibly gen was only run in
environments where /bin/sh was really bash.

+ Check the results of the java compile of the code generator,
and abort the script if the compile fails.

+ Turn on the bash shell option that guards against using
uninitialized variables in the script.

+ Remove the generated class files.

Refactor JniCodeEmitter into two classes: a general-purpose
JniCodeEmitter and a specific Jsr239CodeEmitter. The hope is
to use JniCodeEmitter as a base for emitting static OpenGL ES
bindings.

This is the 3rd commit message:

Add an Android-specific static OpenGL ES 1.1 Java API.

This change adds four new public classes that expose a static OpenGL ES 1.1 API:

android.opengl.GLES10
android.opengl.GLES10Ext
android.opengl.GLES11
android.opengl.GLES11Ext

Benefits:

+ The static API is slightly faster (1% to 4%) than the existing Interface based JSR239 API.
+ The static API is similar to the C API, which should make it easier to import C-based
example code.
+ The static API provides a clear path for adding new OpenGL ES 1.1 extensions
and OpenGL ES 2.0 APIs, neither of which currently have a JSR standard.

Example:

import static android.opengl.GLES10.*;

...

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

Note that it is possible to mix-and-match calls to both the static and JSR239 APIs.
This works because neither API maintains state. They both call through to the same underlying
C OpenGL ES APIs.

Implementation details:

This change enhances the "glgen" "gen" script to generate both the original JSR239 and
new static OpenGL ES APIs. The contents of the generated JSR239 classes remained the same as before,
so there is no need to check in new versions of the generated JSR239 classes.

As part of this work the gen script was updated to be somewhat more robust, and to
work with git instead of perforce. The script prints out commands to git add the generated files,
but leaves it up to the script runner to actually execute those commands.
/frameworks/base/core/jni/AndroidRuntime.cpp
27f8002e591b5c579f75b2580183b5d1c4219cd4 16-Apr-2009 Jack Palevich <jackpal@google.com> Add an Android-specific static OpenGL ES 1.1 Java API.

This change adds four new public classes that expose a static OpenGL ES 1.1 API:

android.opengl.GLES10
android.opengl.GLES10Ext
android.opengl.GLES11
android.opengl.GLES11Ext

Benefits:

+ The static API is slightly faster (1% to 4%) than the existing Interface based JSR239 API.
+ The static API is similar to the C API, which should make it easier to import C-based
example code.
+ The static API provides a clear path for adding new OpenGL ES 1.1 extensions
and OpenGL ES 2.0 APIs, neither of which currently have a JSR standard.

Example:

import static android.opengl.GLES10.*;

...

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

Note that it is possible to mix-and-match calls to both the static and JSR239 APIs.
This works because neither API maintains state. They both call through to the same underlying
C OpenGL ES APIs.

Implementation details:

This change enhances the "glgen" "gen" script to generate both the original JSR239 and
new static OpenGL ES APIs. The contents of the generated JSR239 classes remained the same as before,
so there is no need to check in new versions of the generated JSR239 classes.

As part of this work the gen script was updated to be somewhat more robust, and to
work with git instead of perforce. The script prints out commands to git add the generated files,
but leaves it up to the script runner to actually execute those commands.
/frameworks/base/core/jni/AndroidRuntime.cpp
e2b23e11a5475e5c35eb07ba883cb05eca18796f 03-Apr-2009 Andy McFadden <> AI 144469: Added test for dalvik.vm.check-dex-sum property.
Enables -Xcheckdexsum argument, which causes the VM to test checksums
when loading optimized DEX files.
BUG=1749836

Automated import of CL 144469
/frameworks/base/core/jni/AndroidRuntime.cpp
84d8d693bd79082069d1781284213030006841b7 02-Apr-2009 Jack Palevich <> AI 144129: Remove hidden class android.os.Exec.
Change BugReportService to use java.os.ProcessBuilder instead.
Remove unused import from DumpStateReceiver.
An earlier change list created a private copy of this class for Term.
BUG=1750582

Automated import of CL 144129
/frameworks/base/core/jni/AndroidRuntime.cpp
f70188aa4716625781d9952c6b883180528d4644 01-Apr-2009 Andy McFadden <> AI 143840: Split VM initialization out into a separate function.
This makes the code marginally more readable, and cuts about 500 bytes
off the size of the main thread's stack.

Automated import of CL 143840
/frameworks/base/core/jni/AndroidRuntime.cpp
7b0b1ed979aa665175bf3952c8902ce13c763ab8 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import //branches/master/...@140412
/frameworks/base/core/jni/AndroidRuntime.cpp
c39a6e0c51e182338deb8b63d07933b585134929 11-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137873
/frameworks/base/core/jni/AndroidRuntime.cpp
b2a3dd88a53cc8c6d19f6dc8ec4f3d6c4abd9b54 09-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137197
/frameworks/base/core/jni/AndroidRuntime.cpp
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/jni/AndroidRuntime.cpp
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/jni/AndroidRuntime.cpp
d24b8183b93e781080b2c16c487e60d51c12da31 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/frameworks/base/core/jni/AndroidRuntime.cpp
b798689749c64baba81f02e10cf2157c747d6b46 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
/frameworks/base/core/jni/AndroidRuntime.cpp
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/core/jni/AndroidRuntime.cpp
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/jni/AndroidRuntime.cpp