118092 Commits

Author SHA1 Message Date
Narayan Kamath
d35d3e5d39 Dual zygote cleanup.
- Use different process names for the 32 / 64 bit zygote.
- Pass command line arguments correctly. The first unmatched
  argument must be passed through to the java main class.

Change-Id: I952ebbdbba941f118d992354b9bd0ada2dade417
2014-04-10 12:15:39 +01: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
ecdf9b199a Merge "jni: liblog reading error API incorrect" 2014-04-09 16:07:48 +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
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
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
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
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
c420ce34ba Merge "Marquee text RTL improvements" 2014-04-03 15:50:29 +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
369a00574d Merge "Update ViewRootImpl for 64bit functor type." 2014-04-03 09:48:43 +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
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
b3cafa5620 Merge "Fix RenderScriptGL setSurfaceTexture problem" 2014-03-31 23:21:42 +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
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
ab561f5b40 Merge "Don't make isSafeMode a field on the Zygote class." 2014-03-31 12:32:50 +00:00
Narayan Kamath
d1a8d9f452 Don't make isSafeMode a field on the Zygote class.
This field is written and read exclusively by the system server,
and should therefore belong to the SystemServer class.

Change-Id: I2708a9a45c0c9cd1a6f563e8cc5844bd8c424bf7
2014-03-31 13:16:45 +01:00
Narayan Kamath
91bbb75c75 Merge "Cast CallMethod's size_t parameters to jint" 2014-03-31 09:37:32 +00:00
Xiaofei Wan
21e0af987d Fix RenderScriptGL setSurfaceTexture problem
rsnContextSetSurfaceTexture() has no implementation in rs-jni, use nContextSetSurface() in setSurfaceTexture().

Change-Id: I066432575c9e74f21ea3a3776628b572b6e31377
Signed-off-by: Xiaofei Wan <xiaofei.wan@intel.com>
2014-03-31 14:40:08 +08:00
Wink Saville
1e4cad8198 Merge "GlobalActions: Fix Airplane Mode on/off issue" 2014-03-30 00:15:22 +00:00
nagarw
c3b7e6fd44 GlobalActions: Fix Airplane Mode on/off issue
Issue: Unable to turn off Airplane mode from power button
       after phone reboot

Fix: Initialize mHasTelephony before the PhoneStateListener is
     registered to the TelephonyManager so that correct value
     of mHasTelephony is reflected when onServiceStateChanged
     callback is called.

Bug: 13697360
Change-Id: Ide8afd9c16ea90b98b5912dbff440c5fd67b178d
2014-03-28 16:54:58 -07:00
Jeff Hao
e9b4fd0718 Merge "Mark constructor as accessible in LayoutInflater." 2014-03-28 21:41:21 +00:00
Craig Mautner
d511bc17d6 Merge "[ActivityManager] Fix a bug: unable to start activity after starting activities during screen off." 2014-03-28 20:27:33 +00:00
Michael Wright
e328056ddc Merge "Add support for additional international keyboard mappings" 2014-03-28 20:26:08 +00:00
Craig Mautner
ff3362f0d8 Merge "DO NOT MERGE - [ActivityManager] Ensure consistency behavior when a background activity brings another existed activity to front." 2014-03-28 20:23:34 +00:00
Jeff Hao
e3abd2ccbe Mark constructor as accessible in LayoutInflater.
Needed to bypass new access checks for fields, methods, and
constructors.

Change-Id: I8ff0b44a6cb4f4af1c72734bca366d8b89528030
2014-03-28 11:33:53 -07:00
Anders Kristensen
49c061501d Merge "Remove duplicate call disconnect codes." 2014-03-28 17:19:57 +00:00
Robert Craig
172d38bcda Change when the SELinux relabel of /data/data occurs.
Perform the relabel of the /data/data/<pkg> directories
when the app is being scanned by the PMS. The impetus
for this change was that the data directories of forward
locked apps were receiving the wrong label during an
OTA. Because the PMS doesn't actually scan forward locked
apps til later in the boot process, the prior restorecon
call was actually applying the default label of
system_data_file for all such apps. By performing a
restorecon on each individual app as they are entered into
the PMS we can handle them correctly. This mechanism also
allows us to pass down the seinfo tag as part of the
restorecon call which drops our need to rely on the contents
of packages.list.

Change-Id: Ie440cba2c96f0907458086348197e1506d31c1b6
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2014-03-28 12:24:29 -04:00
Adam Lesinski
55a655091a Merge "Reduce warning verbosity in aapt" 2014-03-27 20:55:14 +00:00
Craig Mautner
a282441038 Merge "Do not show Home behind full screen activity" 2014-03-27 20:01:11 +00:00
Colin Cross
f0ffa8a38e Merge "app_process: use LOCAL_MULTILIB := both" 2014-03-27 17:26:08 +00:00
Colin Cross
f130f0aaea app_process: use LOCAL_MULTILIB := both
Use LOCAL_MULTILIB := both to build app_process64 instead of
duplicating the build rule.

Also causes PRODUCT_PACKAGES := app_process to install both
versions on 64-bit platforms, as the module names for both
app_process and app_process64 are now app_process.

Change-Id: Ia3c3265d15475771b0cae8bace53b8fbf351c186
2014-03-27 10:20:29 -07:00
Olivier Gay
d2923266ae Add support for additional international keyboard mappings
Add kcm mapping files for Arabic, Greek, Hebrew, Lithuanian
and Spanish (Latin).

Change-Id: I35cb2a4d6e016c6f565fba05710ba1626452fe68
Signed-off-by: Olivier Gay <ogay@logitech.com>
Signed-off-by: Manuel Carthoblaz <mcarthob@logitech.com>
Signed-off-by: Mathieu Meisser <mmeisser@logitech.com>
2014-03-27 17:49:52 +01:00