4069 Commits

Author SHA1 Message Date
Andreas Gampe
2c596a5334 Merge "Frameworks/base: Consistency in core/jni" 2014-11-21 18:18:36 +00:00
Andreas Gampe
ed6b9dff56 Frameworks/base: Consistency in core/jni
Make consistent use of core_jni_helpers for registration.

Translate some #ifdefs into const bools.

Change-Id: I37639aa053dd50f003a552cbd8550dddecc811c5
2014-11-21 10:15:08 -08:00
Andreas Gampe
e042791e75 Merge "Frameworks/base: Remove unused header" 2014-11-21 17:38:07 +00:00
Andreas Gampe
c1b5483a60 Frameworks/base: Remove unused header
android_nfc.h is used nowhere.

Change-Id: I3009b3eb122674d3fe7ddb201bac18368b78bc02
2014-11-20 16:11:57 -08:00
Dan Albert
8e357bf541 Merge "Fix clang warnings in core/jni." 2014-11-20 22:58:47 +00:00
Dan Albert
6698749dd4 Add appropriate casts for char16_t.
C++11 defines a real char16_t, which is not implicitly convertible to
uint16_t (and by extension jchar). Add casts as needed.

Bug: 18300613
Change-Id: I00752002ef2e938bdb57f70947e8fd53ec103293
2014-11-20 11:47:40 -08:00
Dan Albert
46d8444631 Fix clang warnings in core/jni.
There are a few bugs in here too (mostly people expecting + to
concatenate C strings) :(

Change-Id: I0a243c05c4ea8b56e84896f37814d0fbea4c39d5
2014-11-20 11:47:00 -08:00
Mathieu Chartier
99f628286f Add zygote space to Dalvik Heap
Broken by
https://android-review.googlesource.com/#/c/115446/

This change fixes it by correctly putting the zygote in Dalvik Heap
instead of Dalvik Other.

Bug: 18447855

(cherry picked from commit 7fc9176c8a2102fb5be3668404bd15feb6878c89)

Change-Id: I9293e5d3f55ccfb2c93c6aacbf6abc164eacb10b
2014-11-19 13:54:00 -08:00
Andreas Gampe
c3507d1098 Merge "Frameworks/base: Replace LOG_FATAL_IF in core/jni" 2014-11-19 18:16:19 +00:00
Chih-hung Hsieh
b1e4e89b86 Merge "Fix incorrect usage of bool" 2014-11-19 18:01:20 +00:00
Andreas Gampe
987f79f60b Frameworks/base: Replace LOG_FATAL_IF in core/jni
Do not use LOG_FATAL_IF in JNI setup. This is one-time on startup
and important enough to always check.

Add a header with common helper definitions. Move to inlined functions
instead of macros to clean up the code.

Change-Id: Ib12d0eed61b110c45d748e80ec36c563e9dec7e5
2014-11-19 09:21:12 -08:00
Andreas Gampe
12c172a801 Merge "Frameworks/base: Compiled-classes support" 2014-11-18 22:49:13 +00:00
Andreas Gampe
f59fb28cb8 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
2014-11-18 14:48:31 -08:00
Andreas Gampe
8462913d0c Merge "Frameworks/base: Ignore unknown pragmas in core/jni" 2014-11-18 22:39:30 +00:00
Andreas Gampe
26109fd328 Frameworks/base: Ignore unknown pragmas in core/jni
Preparation for a switch to Clang.

Change-Id: Iabe1d79474a617bec66dd4bf58002b1a372f6d23
2014-11-18 14:38:00 -08:00
Chih-hung Hsieh
5609047223 Merge "Use standard initializers" 2014-11-18 18:04:29 +00:00
Bernhard Rosenkränzer
452efb218e Use standard initializers
Use standard initializers rather than GNU extension initializers to
prevent clang from spewing warnings about nonstandard code.

BUG: 18193625

Change-Id: I19bf7fe9c401534af82d5a08e68fbd486bec8351
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-17 23:30:44 +00:00
Chih-hung Hsieh
1615731d18 Merge "Fix check for PROC_QUOTES mode" 2014-11-17 22:38:55 +00:00
Bernhard Rosenkränzer
3b1e22e289 Fix check for PROC_QUOTES mode
Since != has priority over &, the "if ((mode&PROC_QUOTES != 0))" check
is the same as "if (mode & (PROC_QUOTES!=0))" - not what the code
intends.

Change-Id: I14840a887f26c28f2bd0aee8704c79cf353164ad
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-17 22:30:56 +01:00
Bernhard Rosenkränzer
92ddfcfff5 Fix incorrect usage of bool
A bool can't be < 0

Change-Id: Ie94ffadcb38c95214d1105c02610e59b4b2872b2
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-17 22:01:27 +01:00
Ying Wang
753eda5b39 Merge "Frameworks/base: AndroidRuntime standalone preloaded-classes" 2014-11-17 19:35:40 +00:00
Andreas Gampe
65ff8ee134 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
2014-11-17 10:57:57 -08:00
Marco Nelissen
97069dd4fd Update calls to IInterface::asBinder()
to use the new static version.

Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
2014-11-17 10:05:31 -08:00
Andreas Gampe
0f0b491966 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
2014-11-13 15:20:37 -08:00
Andreas Gampe
bfe6333c3c Frameworks/base: New GL bindings
Generated new bindings after glgen update.

Change-Id: I96f2e3eee99f1e12ad84aa10e8f7826a905e909c
2014-11-12 14:12:45 -08:00
Dan Albert
ff1d8a6635 Move frameworks/base over to libc++.
Bug: 15193147
Change-Id: I96109d2d383f0c8a4aaa611f29fcf887afb3c69e
2014-11-12 11:22:20 -08:00
Elliott Hughes
34acb4c8d4 Merge "Prevent resource leak in YuvToJpegEncoder" 2014-11-12 01:45:42 +00:00
Andreas Gampe
bc0b57f336 Merge "Frameworks/base: Right transform in DngCreator" 2014-11-12 01:44:30 +00:00
Andreas Gampe
db38706603 Merge "Frameworks/base: Fix FingerprintManager JNI" 2014-11-11 23:47:53 +00:00
Martin Wallgren
d865900425 Prevent resource leak in YuvToJpegEncoder
SkWStream is never deleted before going out of scope

Change-Id: Ifdb75c18336d095b012e73b64281ec6c2fc5c3fe
2014-11-11 12:37:29 +01:00
Andreas Gampe
2377cd319f Frameworks/base: Right transform in DngCreator
Use the right calibrationTransform.

Change-Id: Ibc633ff1e02d1e48a27ae2a72585d3de2222a2c1
2014-11-11 00:23:02 -08:00
Andreas Gampe
7c8201b61f Frameworks/base: Fix FingerprintManager JNI
Register the right method.

Change-Id: I0806c2fa8f29ddef75caaf94092f72e644ae6d06
2014-11-11 00:18:55 -08:00
Andreas Gampe
328126190b Frameworks/base: Fix AssetManager JNI
Register the right method.

Change-Id: Ib5f5c531b4c5863eed04fe3b13f8c2662055fa5e
2014-11-11 00:16:00 -08:00
Andreas Gampe
ba823cee8b Frameworks/base: Mask Skia warning in GraphicsJNI
Do not allow unused-parameter warnings from Skia includes.

Change-Id: Icc765cb0eaf10cd566a64892fbfe7380143ccb42
2014-11-10 21:01:06 -08:00
Yabin Cui
a31318620b Merge "kill HAVE_INOTIFY" 2014-11-11 00:10:12 +00:00
Yabin Cui
20a9cf4fe4 kill HAVE_INOTIFY
Bug: 18314841
Change-Id: I880a35bf51a1aecba2f111e7f6eae54c7d17a28d
2014-11-10 16:01:10 -08:00
Yabin Cui
a9235301ad Merge "kill HAVE_SCHED_SETSCHEDULER" 2014-11-10 22:12:28 +00:00
Yabin Cui
65b4a68669 kill HAVE_SCHED_SETSCHEDULER
Bug: 18300670

Change-Id: I3033c3542e83963e72d49a639db76501d12ad581
2014-11-10 12:21:57 -08:00
Derek Sollenberger
c793fcb026 Fix memory leak where we close the descriptor instead of the file.
(cherry pick of 5cb769d99952ef9fb4f576abba70423fe157342b.)

bug: 17541634
Change-Id: I9968f9df249e4cba24383239ce6130dd16fcd532
2014-11-10 08:44:46 -08:00
Vladimir Marko
548101cb96 am e5fe7f3f: Merge "Fix android_media_AudioSystem_getMasterMute return type."
* commit 'e5fe7f3f4069b176a0465617dceb630a52b710c0':
  Fix android_media_AudioSystem_getMasterMute return type.
2014-10-29 21:57:16 +00:00
Vladimir Marko
b4b5518c81 Fix android_media_AudioSystem_getMasterMute return type.
Caused FPU stack overflow on x86.

Bug: 18023418

(cherry picked from commit c1bcdbb75877d99972f1cd13a9c40126822621bc)

Change-Id: Ia1b5a1da52b20c2e0a84321e784cd795ec649e66
2014-10-29 21:18:00 +00:00
Calin Juravle
5d5e4b14f6 am 43a92646: Merge "Use native brige only if we have a private data directory."
* commit '43a9264619e08f464dd4f184e53441a440cca09f':
  Use native brige only if we have a private data directory.
2014-10-29 13:21:09 +00:00
Calin Juravle
6a4d2369e5 Use native brige only if we have a private data directory.
Bug: 18027433

Change-Id: I59b1b1cbe1d7d14b93d8bb6d4255c951d9e469b6
2014-10-29 12:40:03 +00:00
Calin Juravle
5d4deb8246 am f7d24d24: Merge "PreInitializeNativeBridge only if its Available"
* commit 'f7d24d244319599f62c22e29c3e6540d6cbadf49':
  PreInitializeNativeBridge only if its Available
2014-10-28 19:28:42 +00:00
Calin Juravle
79ec4c15ab PreInitializeNativeBridge only if its Available
Also, assert that we always have a private application directory for non
system_server case.

Change-Id: I8397d7f7b04cde0bf65b60ca415bf3f4b349783c
2014-10-27 14:45:33 +00:00
Neil Fuller
38b63f0ede am dfcf0655: am 09fd5a18: Merge "Replacing FloatMath native implementation with calls to Math"
* commit 'dfcf065505a12aa358af5cd2607fd355eee964c4':
  Replacing FloatMath native implementation with calls to Math
2014-10-20 10:16:08 +00:00
Nick Kralevich
7b3db39aa4 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
2014-10-20 09:24:11 +01:00
Elliott Hughes
5fc9f9c293 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"
2014-10-18 20:53:38 +00:00
Elliott Hughes
4cd671e4d2 Merge "Revert "Replacing FloatMath native implementation with calls to Math"" 2014-10-18 20:43:07 +00:00
Elliott Hughes
b3b68d0333 Revert "Replacing FloatMath native implementation with calls to Math"
This reverts commit 32b88b48daa7383880088246d7222dd93cf55285.

Change-Id: I40ea17f3a68f2b53eb013aebd3ba1becdc724f94
2014-10-18 20:41:27 +00:00