Commit Graph

6415 Commits

Author SHA1 Message Date
Sergio Giro
80755a5a25 ZygoteInit: install AndroidKeyStoreProvider in the Zygote
Instead of in activity thread. That way, we can warm up (ie,
precompute cached values) this provider and AndroidBCWorkaroundProvider
(which are installed together) so that the computation doesn't
happen in the app. As a result, the time spent in the first call to
SSLSocketFactory.getDefault() decreases by ~5ms in angler userdebug.
Measured with an app calling SSLSocketFactory.getDefault in onCreate
and timed it with System.currentTimeMillis() .

(cherry picked from commit 69de32071c)

Bug: 28545496
Change-Id: Ic4e11d058fb404eaa92db925a3e765fc3bef7ae2
2016-05-23 11:24:34 +01:00
Alex Light
0a72ba7d3f Make fake libart for misbehaving apps be loaded.
Bug: 27775991
Change-Id: Ie4eba211e876ec0643ce6ecf6a110f3cb5e0f57e
(cherry picked from commit 20ed24fc0c)
2016-05-18 08:14:34 -07:00
Dimitry Ivanov
5d7d777fa6 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
2016-04-26 13:16:54 -07:00
Shuo Gao
1c7083cf85 Enable shader cache for applications that shared UID with multiple packages too
Frameworks supported a mature mechanism for shader cache per each package already,
but as a special case such as Settings APP, if there are several packages in this
application which means that multiple packages shared the same SharedUserID with it,
it won't initialize the graphics disk caches, thereby APP like Settings have to
rebuild and relink shader every time during launch, which cause a bad launching
performance, so here to enable the GFX and RS cache initialization for multiple
shared packages case too.

Change-Id: If0f927e3399b775804abf1d9a868887951f471c5
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
2016-03-21 11:32:06 +08:00
Tamas Berghammer
21bdaf14a2 [DO NOT MERGE] Add flag to "am start" to enable native debugging
[Backported form internal CL854980]

Specifying the new flag will enable several features in the runtime
required by the native debugger to debug Java and C++ code at the same
time.

The enabled features:
* Force JIT (never use the interpreter)
* Debug info generation
* Disable some optimizations

Change-Id: Iaf5ab649715a0c274bd1b0fc64e483705da53cd0
2016-03-14 11:48:40 +00:00
Calin Juravle
451ff5a8f3 Merge "Fix VMRuntime.registerAppInfo usage" 2016-03-09 11:57:24 +00:00
Calin Juravle
9036a97847 Fix VMRuntime.registerAppInfo usage
Partial cherry pick from git commit
d479b52d12

Change-Id: I1de6e7eda23e6029c87896d8c01e063b98e39f74
2016-03-08 15:49:13 +00:00
Dimitry Ivanov
0e29efd164 Merge "Create linker-namespace for the classloader"
am: c6b66d3fb7

* commit 'c6b66d3fb763f7ebb9c3946377a3008bad315bc3':
  Create linker-namespace for the classloader
2016-03-03 17:08:20 +00:00
Dimitry Ivanov
ea90281082 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
(cherry picked from commit a55c7f15a3)
2016-02-26 10:16:11 -08:00
Dimitry Ivanov
7f849c2cd2 Merge "Construct classloader for apps with no java code"
am: 33e7677665

* commit '33e7677665c38507e58245c92101acef01ff302d':
  Construct classloader for apps with no java code
2016-02-25 19:41:00 +00:00
Dimitry Ivanov
70b6130db7 Construct classloader for apps with no java code
The commit 6f06ad7df1
fixed a way to load native library for NativeActivity
by using classloader logic to find the library; which
also fixed the problem of native activity not working
when library is supposed to be opened directly from
the apk.

As a side effect it introduced regression - apps without
java code did not have correctly initialized classloader.
This change fixes this by constructing classloader with
empty dexpath but valid nativeLibrarySearchPath.

Bug: http://b/26015561
Bug: http://b/27250344
Change-Id: I50f1119f0976a95edd75d88efb9fcdedc57efbc3
(cherry picked from commit b9c9026bdd)
2016-02-23 16:09:24 -08:00
Colin Cross
bd45c08468 Merge "Add dumpsys meminfo --unreachable"
am: 916ea08119

* commit '916ea081196a47ef3257910a71fa7a7ac609ddb1':
  Add dumpsys meminfo --unreachable
2016-02-19 06:14:50 +00:00
Colin Cross
916ea08119 Merge "Add dumpsys meminfo --unreachable" 2016-02-19 06:10:36 +00:00
Bill Yi
2528fcdfbd Merge commit '26ada7e78993241d702a908eae93d174cbb3c8b3' into HEAD
Change-Id: Ifc45930160cf01ee78ecfbfdc48697055f82e0a7
2016-02-17 11:38:55 -08:00
Elliott Hughes
3edfa8f67b The NDK samples moved a while back.
Change-Id: I10f419b0ad58f9c5417a3f06775e298c74f284dc
2016-02-09 16:12:02 -08:00
Colin Cross
84b1e3554b Add dumpsys meminfo --unreachable
dumpsys meminfo --unreachable will search the native heap for
allocations that are unreachable.

Change-Id: I40ab1c261cb222ca71d04ab8408f355bcb18ed94
2016-02-08 00:06:34 -08:00
Dimitry Ivanov
ee5a181371 Remove path to the apk from the permittedPath
Bug: http://b/26732624
Bug: http://b/22548808
Change-Id: Idc63550f9ab67d30aaa0a1fd1b2d19545c07d1b9
2016-01-22 13:20:29 -08:00
Neil Fuller
69c2907c63 Merge "Fix @code escapes"
am: b0d92f4717

* commit 'b0d92f4717af4e4736dc80b2a822dae8e5a52587':
  Fix @code escapes
2016-01-15 16:31:40 +00:00
Neil Fuller
9498e8a8d2 Fix @code escapes
The body of {@code} must not be HTML escaped. This is one of
several changes that fix the source in conjunction with a
doclava fix.

Bug: 25757239
(cherry-picked from commit 71fbb81b14)

Change-Id: I19dafddc6501be6fee362c396ac5bbdc934ae39d
2016-01-15 16:14:57 +00:00
Calin Juravle
435ad029a3 Merge "Create jit profile file during the app startup flow."
am: 5fac913d98

* commit '5fac913d98eb44269b53cd9cc6a011a4eef3c98d':
  Create jit profile file during the app startup flow.
2016-01-07 11:52:50 +00:00
Calin Juravle
690523969d Create jit profile file during the app startup flow.
ActivityThread has already all the needed information
(userId,sharedAppId) to create the profile file and set the correct
permissions on it. This avoids passing uids to the runtime which now
expects the profile file to be already created.

As part of this change:
- move the registration with the runtim in handleBindApplication
- register only if needed: we could properly setup a profile file and we
have at least one code path. Note that registration with the runtime is
done solely for profiling reasons.

Bug: 26080105
Change-Id: I72657e9ea0a0449a09734456b5f8b5da844cee62
2016-01-07 11:29:38 +00:00
Dimitry Ivanov
c53d159b3e Merge "Use shared namespace for bundled app classloader"
am: 76a9e55a8f

* commit '76a9e55a8fd751e747511a9c7d02dddca31964c3':
  Use shared namespace for bundled app classloader
2015-12-21 15:27:57 -08:00
Dimitry Ivanov
76a9e55a8f Merge "Use shared namespace for bundled app classloader" 2015-12-21 23:10:49 +00:00
Calin Juravle
7d7ab7ad3b Merge "Pass app\'s code paths to the runtime"
am: db73912471

* commit 'db73912471df39aa527971f2884f37295616d3a9':
  Pass app's code paths to the runtime
2015-12-21 09:52:40 +00:00
Dimitry Ivanov
44fadb21e0 Use shared namespace for bundled app classloader
Allow bundled apps to reference platform native libraries
located in subdirectories of the default library path
(/system/lib/hw/* for example).

In addition to this bundled apps need to share native
libraries with default namespace. Added parameter to
ApplicationLoaders.createClassLoader() to do just that.

Bug: 26165097
Bug: 26164393
(cherry picked from commit 75b10ecccd)

Change-Id: I836e5fed4713f2a605a5de673c40970ef6d988dd
2015-12-20 14:12:45 -08:00
Calin Juravle
f19c9638dd Pass app's code paths to the runtime
The runtime needs the application's main code paths so it know for which
dex files to record the profile.

Bug:26080105
Change-Id: I5f2cb5c140aa6893ac78bc0d5897e33764569e5b
2015-12-17 12:38:27 +02:00
Ian Pedowitz
19937f924e Merge "DO NOT MERGE Remove more extras during notification lightening." into mnc-dr1.5-dev am: cf07154e71
am: 911dfe8861

* commit '911dfe8861c7d67aab738cf42455837c8a9aefa7':
  DO NOT MERGE Remove more extras during notification lightening.
2015-12-11 17:18:51 -08:00
Dan Sandler
ddb52fb1f5 DO NOT MERGE Remove more extras during notification lightening.
Basically anything Parcelable needs to go since it might be
quite large. Note that this includes additional extras such as
those contributed by WearableExtender.

Cherry-picked from 5012853de2

Bug: 26038546
Change-Id: I00eadd2b23dfc4fccf42332df658373bb05b8a45
2015-12-12 01:05:25 +00:00
Dimitry Ivanov
e3ca5ac40d Merge "Use nativeloader to load NativeActivity"
am: 317456bc52

* commit '317456bc520549cbc1ac4ad102df8b0d22b22a99':
  Use nativeloader to load NativeActivity
2015-12-11 12:41:22 -08:00
Dmitriy Ivanov
6f06ad7df1 Use nativeloader to load NativeActivity
System apps are the exception and they can
access internal platform libraries (this
is needed for bundled apps to work correctly).

Also fix the way NativeActivity loads the native
library to correspond to the way BaseDexClassloader
does it.

Bug: http://b/22548808
Bub: http://b/25777936
Change-Id: Idc94cdded182ea2cb1cbebc76c336cc3394c7ebe
2015-12-11 10:44:16 -08:00
Daniel Koulomzin
c549b4fbc4 Merge "ActivityView gets its own thread pool." into cw-e-dev am: 1090acc958
am: 102e66152a

* commit '102e66152a51e28920da23e2991281f51f2439ee':
  ActivityView gets its own thread pool.
2015-11-11 23:37:13 +00:00
Daniel Koulomzin
71c012e001 ActivityView gets its own thread pool.
Bug: 24316798

Change-Id: I4278fa792cec8d2710f2f41eed02ba4a14af7052
2015-11-11 18:21:57 -05:00
Riley Andrews
132bb1e4b1 Merge "Convert ashmem bitmap thresholds to constants." into mnc-dr-dev am: c8bb39d98d am: 2c740f1dcf
am: 6c1144dc0f

* commit '6c1144dc0f8b2452ca2a204ca471e2d23339d5a3':
  Convert ashmem bitmap thresholds to constants.
2015-11-04 20:37:18 +00:00
Riley Andrews
2c740f1dcf Merge "Convert ashmem bitmap thresholds to constants." into mnc-dr-dev
am: c8bb39d98d

* commit 'c8bb39d98d7c2a07f1a5c745f6e89e379e4a25f0':
  Convert ashmem bitmap thresholds to constants.
2015-11-04 20:24:36 +00:00
Riley Andrews
0394a0c399 Convert ashmem bitmap thresholds to constants.
Bug 25256717

Change-Id: I23e2795ef8798d83bf60dcbd6ff2e7093fcaa9b0
Signed-off-by: Riley Andrews <riandrews@google.com>
2015-11-03 23:52:17 -08:00
Ian Pedowitz
87455c7397 Merge "Limit persistent ashmem backed fds to a minimum of 128kB." into mnc-dr-dev am: 966d6040c6 am: 95fc53b029
am: d6f3e38738

* commit 'd6f3e38738c88821b28b2571d034fc1b189a35de':
  Limit persistent ashmem backed fds to a minimum of 128kB.
2015-11-03 22:21:48 +00:00
Ian Pedowitz
95fc53b029 Merge "Limit persistent ashmem backed fds to a minimum of 128kB." into mnc-dr-dev
am: 966d6040c6

* commit '966d6040c6b171c75e9fb0ca942e84f9cf4d0dff':
  Limit persistent ashmem backed fds to a minimum of 128kB.
2015-11-03 22:05:23 +00:00
Ian Pedowitz
966d6040c6 Merge "Limit persistent ashmem backed fds to a minimum of 128kB." into mnc-dr-dev 2015-11-03 21:58:30 +00:00
Dianne Hackborn
3aee38c86e Merge "Fix issue #25357209: Could not send SMS or MMS messages, had to reboot" into mnc-dr-dev am: 71e4984505 am: 9a13cc6992
am: a09ac2d998

* commit 'a09ac2d998fdc901fb65b57a061cc445922e081f':
  Fix issue #25357209: Could not send SMS or MMS messages, had to reboot
2015-11-03 19:40:43 +00:00
Dianne Hackborn
9a13cc6992 Merge "Fix issue #25357209: Could not send SMS or MMS messages, had to reboot" into mnc-dr-dev
am: 71e4984505

* commit '71e49845054a3a7dacc51efc4fe658818caec048':
  Fix issue #25357209: Could not send SMS or MMS messages, had to reboot
2015-11-03 18:27:18 +00:00
Riley Andrews
8cee7c1711 Limit persistent ashmem backed fds to a minimum of 128kB.
Bug 25256717

Change-Id: Ieb356006df0a6545b89de44d3d8fd4b46312b3b8
Signed-off-by: Riley Andrews <riandrews@google.com>
2015-11-03 17:46:15 +00:00
Dianne Hackborn
fcc95a6d2c Fix issue #25357209: Could not send SMS or MMS messages, had to reboot
I think what probably happened is that since we only report an app
going in to the "interaction" state as an interaction event to usage
stats, apps that sit around in that state forever will only see one
interaction at the start and never again.  So usage stats could start
thinking they are idle.

Fix this by having the activity manager report an interaction event
for such long running applications at least once a day.

Also, because it is correct and for paranoia by protected us another
way, system uids should never go in to standby.

Change-Id: I8a3805bfca86cbe78560488a649ecd07427da99a
2015-11-02 16:15:35 -08:00
Todd Kennedy
186fcb8b64 Merge "Retain fragment loaders" into mnc-dr-dev am: ad968cf4e5 am: 6320767fb1
am: 02940eb47f

* commit '02940eb47fc1bdb3b069e42190bf8a70a9b916bf':
  Retain fragment loaders
2015-10-20 14:58:40 +00:00
Todd Kennedy
6320767fb1 Merge "Retain fragment loaders" into mnc-dr-dev
am: ad968cf4e5

* commit 'ad968cf4e55afdd897ea84a44b7450442aea1e1d':
  Retain fragment loaders
2015-10-20 14:41:23 +00:00
Todd Kennedy
ad968cf4e5 Merge "Retain fragment loaders" into mnc-dr-dev 2015-10-20 14:36:00 +00:00
Todd Kennedy
eede174f7b Merge "Set host when restoring a fragment" into mnc-dr-dev am: 986d4b482d am: d419d86952
am: e9c7512147

* commit 'e9c751214715f3d136ae07fe9f553c488d01f352':
  Set host when restoring a fragment
2015-10-19 23:52:37 +00:00
Svetoslav Ganov
7fdc5d95ad Merge "Don\'t allow concurrent permission requests." into mnc-dr-dev am: e199016a82 am: aebff7f1ad
am: 2a95159d2c

* commit '2a95159d2cce4321205ca7f40027a97acc2fb77e':
  Don't allow concurrent permission requests.
2015-10-19 23:50:28 +00:00
Todd Kennedy
2ee19c7f46 Retain fragment loaders
Remove the partial fix [it did not work for child fragment managers]
and replace with a more general fix that works with all fragments.

Bug: 23838271
Change-Id: I88b465f6a06a6ad627b9651b9e2eea41fae08972
2015-10-19 16:40:03 -07:00
Todd Kennedy
d419d86952 Merge "Set host when restoring a fragment" into mnc-dr-dev
am: 986d4b482d

* commit '986d4b482da952cd07e329b3bd11c935edd7ec01':
  Set host when restoring a fragment
2015-10-19 23:22:57 +00:00
Svetoslav Ganov
aebff7f1ad Merge "Don\'t allow concurrent permission requests." into mnc-dr-dev
am: e199016a82

* commit 'e199016a82329b645a86db345c2d39322c8ad03a':
  Don't allow concurrent permission requests.
2015-10-19 23:13:46 +00:00