118319 Commits

Author SHA1 Message Date
Narayan Kamath
1d26a3f1ef am 09e13cc5: Merge "System services detect and register app CPU ABIs"
* commit '09e13cc5f9f98382376eb49bfa6ceb94a50d37a1':
  System services detect and register app CPU ABIs
2014-04-10 09:23:33 +00:00
Narayan Kamath
0fd40cb100 am 80413c9f: Merge "Re-implement native library search and copies."
* commit '80413c9fe10acf36eaecd139198c7fc17e8af2e6':
  Re-implement native library search and copies.
2014-04-10 09:23:30 +00:00
Narayan Kamath
09e13cc5f9 Merge "System services detect and register app CPU ABIs" 2014-04-10 09:20:22 +00:00
Narayan Kamath
80413c9fe1 Merge "Re-implement native library search and copies." 2014-04-10 09:19:38 +00:00
Ramin Zaghi
ff0c470833 System services detect and register app CPU ABIs
This patch uses the NativeLibraryHelper class to
match native libraries in an .apk package with
those listed in 'ro.cpu.abilist' property.
The result is stored in packages.xml and the
ApplicationInfo class.

This information will be used by the ActivityManager
to decide which zygote to use to launch the given
app.

Change-Id: I3ec3d050996d8f4621f286ca331b9ad47ea26fa0
2014-04-09 17:20:13 +01:00
Ramin Zaghi
1378aba7ae Re-implement native library search and copies.
We now use a two step approach :

- First we look through the list of shared libraries in an
  APK, and choose an ABI based on the (priority)  list of ABIs
  a given device supports.
- Then we look through the list of shared libraries and copy
  all shared libraries that match the ABI we've selected.

This fixes a long-standing bug where we would sometimes copy
a mixture of different ABIs to the device, and also allows us
to clearly pick an ABI to run an app with.

The code in NativeLibraryHelper has been refactored so that all
file name validation & matching logic is done in a single place
(NativeLibrariesIterator). This allows us to avoid a lot of
redundant logic and straightens out a few corner cases (for eg.
where the abi determination & copying logic do not agree on
what files to skip).

bug: https://code.google.com/p/android/issues/detail?id=65053
bug: 13647418

Change-Id: I34d08353f24115b0f6b800a7eda3ac427fa25fef
Co-Authored-By: Zhenghua Wang <zhenghua.wang0923@gmail.com>
Co-Authored-By: Ramin Zaghi <ramin.zaghi@arm.com>
Co-Authored-By: Narayan Kamath <narayan@google.com>
2014-04-09 17:16:40 +01:00
Mark Salyzyn
7a67c927e6 am ecdf9b19: Merge "jni: liblog reading error API incorrect"
* commit 'ecdf9b199ac9659c37c34c0b23084199acea80bf':
  jni: liblog reading error API incorrect
2014-04-09 16:11:04 +00:00
Mark Salyzyn
ecdf9b199a Merge "jni: liblog reading error API incorrect" 2014-04-09 16:07:48 +00:00
Narayan Kamath
b6ab8c17bd am a6f5e79d: Merge "Allow connections to multiple zygotes."
* commit 'a6f5e79dd182b05909fa53109e74638afcd7ee12':
  Allow connections to multiple zygotes.
2014-04-09 14:15:16 +00:00
Narayan Kamath
a6f5e79dd1 Merge "Allow connections to multiple zygotes." 2014-04-09 14:12:23 +00:00
Narayan Kamath
4444dcd0ad Allow connections to multiple zygotes.
Adds a new String argument "abi" to Process.start.
This method will now query the zygotes to
determine what ABIs the primary and the secondary
zygote support (the secondary is optional) and dispatch
a fork request over the right zygote connection.

Both zygotes are assumed to be active at all points.

Change-Id: I460319b4481ff1c1666e8172223691820658a35c
2014-04-09 15:07:10 +01:00
Narayan Kamath
05f980d42d am d4b64409: Merge "Make zygotes aware of their supported ABIs."
* commit 'd4b644092e8d2719d01ad297b080bd50b1fdf60d':
  Make zygotes aware of their supported ABIs.
2014-04-09 13:59:00 +00:00
Narayan Kamath
3856a219fa am cecfb94f: Merge "Clean up argc / argv processing for runtime args."
* commit 'cecfb94f3f1b2978ba66342d7920e83770c808e3':
  Clean up argc / argv processing for runtime args.
2014-04-09 13:58:57 +00:00
Narayan Kamath
d4b644092e Merge "Make zygotes aware of their supported ABIs." 2014-04-09 13:55:58 +00:00
Narayan Kamath
cecfb94f3f Merge "Clean up argc / argv processing for runtime args." 2014-04-09 13:55:54 +00:00
Narayan Kamath
c41638cb75 Make zygotes aware of their supported ABIs.
Query system properties for the list of ABIs and pass
it as a command line argument to ZygoteInit.

Also add a new Zygote command that returns this list of
ABIs to peers.

Change-Id: I68034c6f63fa626911122579a011a0a25a8cda94
2014-04-09 13:41:15 +01:00
Narayan Kamath
22ec1eefa4 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
2014-04-09 13:39:41 +01:00
Narayan Kamath
00cfbe82fa am a5608acb: Merge "Don\'t allow MemoryFiles of negative length."
* commit 'a5608acbd7647e0fd9aa87e5319715b0cbd6b0c0':
  Don't allow MemoryFiles of negative length.
2014-04-09 09:09:58 +00:00
Narayan Kamath
a5608acbd7 Merge "Don't allow MemoryFiles of negative length." 2014-04-09 09:07:29 +00:00
Mark Salyzyn
b519aeca47 jni: liblog reading error API incorrect
- return value contains -errno on error.

Bug: 13907124
Change-Id: I91f12db5749fac2ae8ed5b0f033d4eaf83e666f5
2014-04-08 16:17:51 -07:00
Narayan Kamath
f626ca2c96 Don't allow MemoryFiles of negative length.
Prevents us from converting a (signed) jint into an
(unsigned) size_t and having horrible things happen.

Change-Id: I0f04e2eb9852ae7fc49b435fd0974f56e86751a4
2014-04-08 16:14:10 +01:00
Craig Mautner
228cefa83d am 3fb2b713: Merge "[ActivityManager] Reduce report ANR on wrong activity."
* commit '3fb2b7132b64c65163e7c6cd948e45f703e93687':
  [ActivityManager] Reduce report ANR on wrong activity.
2014-04-07 22:14:56 +00:00
Craig Mautner
3fb2b7132b Merge "[ActivityManager] Reduce report ANR on wrong activity." 2014-04-07 22:10:47 +00:00
riddle_hsu
309ca5d947 [ActivityManager] Reduce report ANR on wrong activity.
Symptom: ANR report on wrong activity.

Root Cause:
  KK changed resume behavior that will not update focus when only resume,
if the activity blocked, it may report ANR on previous focus.
  By original concept, it will try to correct the ANR target,
but the stack of waiting(waitingVisible=true) activity may
different with current top stack.
  If it gets key dispatch timeout, mResumedActivity and mPausingActivity
of its stack will be null becuase it is not top stack.
Then it is unable to change ANR target to the real no response activity.

Solution:
 Use focused stack to get the real culprit.

Reproduce steps:
1.Launch an Activity X from launcher, press home key.
2.Launch X from launcher again, X blocks(sleeps 15sec) in onResume, press back key in the beginning of blocking duration.
3.ANR dialog shows launcher is no response.

Change-Id: I99416ad91e349096f995990f2240a97616fbaf28
2014-04-08 02:44:03 +08:00
Nick Kralevich
4ed27328b5 am dc97144b: Merge "Always call super.onCreate(). Always."
* commit 'dc97144b3f83bf6dae90493a6631afc6523dfce2':
  Always call super.onCreate().  Always.
2014-04-04 23:25:52 +00:00
Nick Kralevich
dc97144b3f Merge "Always call super.onCreate(). Always." 2014-04-04 23:18:46 +00:00
Christopher Tate
5eab368c4d Always call super.onCreate(). Always.
Bug 12991134

(cherrypick of commit 9d6376a1d88ab5b3a41ee4400e3aaa4c4ee69e2a)

Change-Id: Ife16ef93408253e3318a06dc0206ab4b88c7f367
2014-04-04 23:06:13 +00:00
Raph Levien
24a2f20fe6 am c420ce34: Merge "Marquee text RTL improvements"
* commit 'c420ce34ba177cd959cbb9432e9597d377e6cee6':
  Marquee text RTL improvements
2014-04-03 15:55:22 +00:00
Raph Levien
c420ce34ba Merge "Marquee text RTL improvements" 2014-04-03 15:50:29 +00:00
Narayan Kamath
f87b3a25b9 am 374db6c3: Merge "Remove ProcessState::mArgc,mArgV,mArgLen"
* commit '374db6c3792e9ed56230e09fee4742632ce8159a':
  Remove ProcessState::mArgc,mArgV,mArgLen
2014-04-03 14:05:28 +00:00
Narayan Kamath
374db6c379 Merge "Remove ProcessState::mArgc,mArgV,mArgLen" 2014-04-03 13:59:38 +00:00
Narayan Kamath
a23fcd7be8 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
2014-04-03 12:29:07 +00:00
Ben Murdoch
14424043b9 am 369a0057: Merge "Update ViewRootImpl for 64bit functor type."
* commit '369a00574da218975718ce07ffe6abba5c17bf92':
  Update ViewRootImpl for 64bit functor type.
2014-04-03 09:54:33 +00:00
Ben Murdoch
369a00574d Merge "Update ViewRootImpl for 64bit functor type." 2014-04-03 09:48:43 +00:00
Ben Cheng
b386bfd791 am 89dddcc9: Merge "Use default visibility for Snapshot::getLocalClip."
* commit '89dddcc948cb3e826bfddeefae73066849aba0fc':
  Use default visibility for Snapshot::getLocalClip.
2014-04-02 20:54:47 +00:00
Ben Cheng
89dddcc948 Merge "Use default visibility for Snapshot::getLocalClip." 2014-04-02 20:51:00 +00:00
Ben Cheng
65ba94f79d Use default visibility for Snapshot::getLocalClip.
The method is in libhwui.so but used by libandroid_runtime.so
(via android_view_GLES20Canvas.cpp). If the compiler decides not to
inline this method, the linker won't be able to resolve the dependency
when it has hidden visibility.

The problem is found when testing GCC 4.9.

Change-Id: I3b4d096c7767f0bef0796886dfb2c5ba2ecff48c
2014-04-02 13:26:33 -07:00
Ben Murdoch
cf61c9b71f Update ViewRootImpl for 64bit functor type.
Change-Id: Ie9020f0276c58ebf0977e4aef725fbc26aaf67b2
2014-04-02 14:41:41 +01:00
Narayan Kamath
ea9e5ecac1 am 17b1b8fe: Merge "Move zygote startup logic to the frameworks."
* commit '17b1b8fe8c0c8f05f2077acc82428881bf591a78':
  Move zygote startup logic to the frameworks.
2014-04-02 10:35:38 +00:00
Narayan Kamath
17b1b8fe8c Merge "Move zygote startup logic to the frameworks." 2014-04-02 10:29:55 +00:00
Narayan Kamath
973b4663b0 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
2014-04-02 10:18:43 +01:00
Jason Sams
095ece1009 am b3cafa56: Merge "Fix RenderScriptGL setSurfaceTexture problem"
* commit 'b3cafa56205942343930e4fbb0a3d50d6e33a046':
  Fix RenderScriptGL setSurfaceTexture problem
2014-04-01 00:10:55 +00:00
Jason Sams
b3cafa5620 Merge "Fix RenderScriptGL setSurfaceTexture problem" 2014-03-31 23:21:42 +00:00
Nick Kralevich
e531e2ec6b am 3b2a9d22: Merge "Change when the SELinux relabel of /data/data occurs."
* commit '3b2a9d22794cb9f1c2a28884b5c3ba92ecc6ff96':
  Change when the SELinux relabel of /data/data occurs.
2014-03-31 20:14:37 +00:00
Nick Kralevich
3b2a9d2279 Merge "Change when the SELinux relabel of /data/data occurs." 2014-03-31 20:09:31 +00:00
Brian Carlstrom
b11952d6f6 am e3434fc4: Merge "Improve detail message for X509TrustManagerExtensions argument validation"
* commit 'e3434fc4fb164b66e529e675dfc31652a4c69cb5':
  Improve detail message for X509TrustManagerExtensions argument validation
2014-03-31 19:55:16 +00:00
Brian Carlstrom
e3434fc4fb Merge "Improve detail message for X509TrustManagerExtensions argument validation" 2014-03-31 19:49:35 +00:00
Brian Carlstrom
ff9ca781d0 Improve detail message for X509TrustManagerExtensions argument validation
Bug: 13728564
Change-Id: I03d08babcdc0d11baff5e76a339b4285e92edee8
2014-03-31 11:22:34 -07:00
Narayan Kamath
439145f0e7 am ab561f5b: Merge "Don\'t make isSafeMode a field on the Zygote class."
* commit 'ab561f5b4073055c414866ff3dbe8372263474a7':
  Don't make isSafeMode a field on the Zygote class.
2014-03-31 12:42:14 +00:00
Narayan Kamath
ab561f5b40 Merge "Don't make isSafeMode a field on the Zygote class." 2014-03-31 12:32:50 +00:00