4092 Commits

Author SHA1 Message Date
Andreas Gampe
022b1ba188 Merge "Core/jni: Disallow relocation for decryption" 2015-01-07 22:05:12 +00:00
neo.chae
155118fee8 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>
2015-01-07 13:28:36 -08:00
Vladimir Marko
7ab249a18e Check for OOM in BitmapFactory's getMimeTypeString().
Bug: 18909596
Change-Id: If65fe45f5fd569a99a0cae1d31117af262bca430
2015-01-06 18:40:08 +00:00
Narayan Kamath
024191b57f Merge "Fix comment. It should be 'or' not 'of'." 2015-01-06 09:46:17 +00:00
Narayan Kamath
bc2cc2f350 Remove hardcoded include paths.
ICU, zlib & openssl export them using LOCAL_EXPORT_C_INCLUDE_DIRS.
The dependency on libc/dns/include was bogus and can be removed
trivially.

bug: 18581021
Change-Id: I4b8047ff0df1050ab48b61c0c886888b3f2f0c18
2014-12-31 10:06:51 +00:00
Andreas Gampe
08b2d585b1 Core/jni: Remove Dalvik options from AndroidRuntime
Dalvik is dead. Remove old command-line options from AndroidRuntime.

Bug: 18833580
Bug: 18834205
Change-Id: If9a6f78cc0d74fc7a596b08065059b388a8d4b2f
2014-12-22 14:57:18 -08:00
Elliott Hughes
26b56e628b Move the remaining ZygoteInit native code over to Java.
Bug: 18719692
Change-Id: I5f9834edecdbcc065a33a9921c740a53441636a4
2014-12-17 12:28:29 -08:00
Elliott Hughes
894724be30 Rewrite selectReadable JNI in Java.
Bug: 18719692
Change-Id: Id4fa95a31f112c720f7a3ac47a3b6c95c3028438
2014-12-16 10:00:33 -08:00
Elliott Hughes
dac83f5e6a Reimplement reopenStdio in Java.
Bug: 18719692
Change-Id: I4ed984cd6148c5cba75d46a60f32a0687a5bcac3
2014-12-15 11:00:25 -08:00
Elliott Hughes
3fe595108f Lose some unnecessary JNI from the zygote.
Bug: 18719692
Change-Id: Ie2d50400f10f3c54cfbf94e54656f6d704eac267
2014-12-12 14:07:34 -08:00
Chih-hung Hsieh
4c23a0ec16 Merge "Adjust format strings to work on both 32-bit and 64-bit builds" 2014-12-11 20:49:30 +00:00
Mathieu Chartier
fb5c932dbb Merge "Add more -d dalvik details to dumpsys" 2014-12-09 02:05:45 +00:00
Mathieu Chartier
063028aa68 Add more -d dalvik details to dumpsys
Added .NonMoving for the non moving space.
Added .Zygote for the zygote.
Added .IndirectRef for indirect reference tables (jobjects).

Example:
 Dalvik Details
        .Heap     2264     2264        0        0
         .LOS       80       80        0        0
          .GC      144      144        0        0
      .Zygote      331      196        0     2428
   .NonMoving      540      540        0        0
 .IndirectRef       20       20        0        0

Bug: 18672069
Change-Id: Id14e5bc92ceb15fe7a17d9fb035f18aa2925e50c
(cherry picked from commit 25c5e2b12d5d5d06739e3f70a0da968d97935b46)
2014-12-08 17:33:56 -08:00
Bernhard Rosenkränzer
46c82b4cd2 Adjust format strings to work on both 32-bit and 64-bit builds
Adjust format strings to not produce Clang warnings in both 32-bit and
64-bit builds

Change-Id: I76c29d8d5d0fb4b5e9d9518077652370ffe9e871
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-12-05 16:14:07 -08:00
Adam Lesinski
e89a286541 Merge changes If2c7e09f,Ie21f227c
* changes:
  RRO idmap: pad with 0xffffffff, not 0x00000000
  RRO: reintroduce lost ResTable insert of assets
2014-12-02 22:52:37 +00:00
Jesse Hall
1ee377764a Merge "Avoid overwriting EGL14.EGL_NO_SURFACE" 2014-12-02 00:35:12 +00:00
Elliott Hughes
42c569224a We have POSIX clocks.
Change-Id: I70f82074f8c14a26c4ed7eb912ddf6d7da44c168
2014-11-25 15:11:59 -08:00
Sangkyu Lee
c56c7013e3 Avoid overwriting EGL14.EGL_NO_SURFACE
(This is an update after the generator update.)

Both EGL14 and EGLExt have the same initialization codes for
EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_CONTEXT and EGL14.EGL_NO_DISPLAY.
Since EGLExt is initialized later, they are overwritten by EGLExt's
initialization codes.
Therefore, EGL_NO_SURFACE returned by methods in EGL14 is not
actually EGL14.EGL_NO_SURFACE object and it makes several problems in
handling error cases.
For instance, "Let's fish" game application cannot be run on L.

To solve the problem, this patch makes EGL14.EGL_NO_SURFACE,
EGL14.EGL_NO_CONTEXT and EGL14.EGL_NO_DISPLAY initialized just once.

Change-Id: Icce878164ff0b715ad2b5a2cd038a9616c7cf1e9
2014-11-25 10:45:19 +09:00
Bernhard Rosenkränzer
4048a4bcb1 Remove unused variables and functions, don't warn about unused parameters
Remove unused variables and static functions clang complains about,
disable warnings about unused parameters (needed for clang and for gcc
with -Wextra enabled)

Change-Id: I76a22cd0158b3c7375c54e3d4d15bc1ac448591e
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-23 22:24:32 +01:00
Chih-hung Hsieh
fc4a7538a6 Merge "Revert "Frameworks/base: Mask Skia warning in GraphicsJNI"" 2014-11-22 00:24:39 +00:00
Chih-hung Hsieh
9ebffb40d8 Revert "Frameworks/base: Mask Skia warning in GraphicsJNI"
Should be unnecessary after c/115476.
This reverts commit ba823cee8bafff98640408a777fe105a72fcea0d.

Change-Id: I3ef4d3e04805e450038d469d9672dc064f729b0f
2014-11-21 18:54:15 +00:00
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