252102 Commits

Author SHA1 Message Date
Andreas Gampe
421c74f8e7 Merge changes from topic 'cherry_pms_installd'
* changes:
  Release mPackages lock earlier
  OtaDexopt: Special-case system app classpaths
  OtaDexoptService: Run dexopt on all apps
  Frameworks/base: Add compiler stats to Package Manager
  [RFC] Special case system apps for profile optimizations
  Compile core-apps according to their own "reason" for A/B
  Frameworks/base: Add new flow to OtaDexoptService
  Otadexopt: Expose progress percentage
  cp preopted files from B partition during PM init.
2016-09-06 21:02:55 +00:00
Todd Kennedy
94f9be2ee2 Release mPackages lock earlier
We cannot hold mPackages when calling into generatePackageDexopts().
This method takes Package Manager's mInstallLock. By holding mPackages,
we have lock inversion and hilarity ensues.

Change-Id: Ia11a158677051e3511702f38cde6780e75b256fb
Fixes: 30927731
(cherry picked from commit a8d4f489974f3ea8f73990cbabbce205343fb926)
2016-09-06 10:46:18 -07:00
Andreas Gampe
3f95d0bb6a OtaDexopt: Special-case system app classpaths
Specialize system apps' shared libraries so that classpath checks
are elided.

Bug: 30568568
Change-Id: Id1f2555ef43984b616e01f8596701ccba77895b3
(cherry picked from commit c7e02c1d2a53e0f738d2a8383e03658b39d91ce6)
2016-09-06 10:45:06 -07:00
Andreas Gampe
14186731f9 OtaDexoptService: Run dexopt on all apps
To avoid work after reboot, dexopt all apps. However, unimportant
apps are optimized with the first-boot reason (which is usually
interpret-only) for space reasons.

Bug: 30468718
Change-Id: Ia05d879957388967c69f9380e50d8a9834afe07d
(cherry picked from commit 115514b236ebe7cb3c90892891954b8c7ba69335)
2016-09-06 10:44:00 -07:00
Andreas Gampe
7e619a912c Frameworks/base: Add compiler stats to Package Manager
Add a simple class for storing compiler statistics. Capture compile
times for code paths from a package.

Bug: 29223204
Change-Id: I1b066de6a83a739470a42480eee0bfef88423eea
(cherry picked from commit 37e5fdc6b4963f3533caecdd92b129f79da69dd8)
2016-09-06 10:41:59 -07:00
Calin Juravle
08313b0d95 [RFC] Special case system apps for profile optimizations
If the OTA updates a system app which was previously preopted to a non-
preopted state the app might end up being verified at runtime. That's
because by default the apps are verify-profile but for preopted apps
there's no profile.

Do a hacky check to ensure that if we have no profiles (a reasonable
indication that before the OTA the app was preopted) system apps get
compiled with a non-profile filter (by default interpret-only).

Bug: 30032273
Test: Andreas "has verified that Calin's change to A/B works as expected
and promotes things like SystemUI to speed. From my side, that's
ready to be merged"

Change-Id: I7a052a8ea76cab7f649dc993237ea05534d6c4b9
(cherry picked from commit 0bd776207999ccba17e5adb163710bd7b16ac907)
2016-09-06 10:41:04 -07:00
Calin Juravle
9438528d99 Compile core-apps according to their own "reason" for A/B
If the core apps are not preopted in the B OTA, and REASON_AB_OTA is not
speed (by default is speed-profile) they will be interepreted/JITed.
This in itself is not a problem as we will end up doing profile guided
compilation. However, some core apps may be loaded by system server
which doesn't JIT and we need to make sure we don't interpret-only.

Bug: 30032273
Change-Id: Idb11b1c01c4c4ceba043feb3a9ccc6958035d3b7
(cherry picked from commit 565621328dd4fc2e179a34494d0f8b8dc1b1eae9)
2016-09-06 10:40:18 -07:00
Andreas Gampe
d15300cf38 Frameworks/base: Add new flow to OtaDexoptService
Add functionality to capture/intercept installd communication, and
use this to return the full communication for dexopt. These parameters
can be used to drive otapreopt_chroot directly.

Keep the old direct invocation alive until devices have transitioned
to a service that exposes this API.

In preparation for renaming of A/B OTA artifacts to include target
slot names.

Bug: 25612095
Bug: 28069686
Change-Id: I14728ee1266f3882cada8f08dd21891ed5f7a0cb
(cherry picked from commit cc241a580cb9b753d0dde0cea578feb74ad517e7)
2016-09-06 10:39:56 -07:00
Andreas Gampe
ff8ab4c9fa Otadexopt: Expose progress percentage
To be able to report progress of an A/B OTA dexopt, expose a
progress function that the script can query.

Bug: 25612095
Bug: 29223204
Change-Id: Ie8162946d18f6fa78649a40ad5d3949d31a181cd
(cherry picked from commit bf06232f4d440ced8230662a77ca0e8ece6383ca)
2016-09-06 10:39:20 -07:00
Alex Light
2b6fc4c92d cp preopted files from B partition during PM init.
This allows us to save space on the system partition while still
having access to the preopted files.

We do this on first boot when the "ro.cp_system_other_odex" property
is set to 1. We do this during package manager initialization before
scanning the system to see which apks need to be optimized again.

Note that a separate script, run by init, is actually responsible for
finding and copying the files. We simply request that it runs.

Bug: 29278988

Change-Id: I8d7c790ad35b32a0ce1d87939f043419bae4d88a
(cherry picked from commit 3dafee6c1820bf0946bab04b290c5a757112d3e7)
2016-09-06 08:53:00 -07:00
Treehugger Robot
f7c508ae09 Merge "Updated user document for Single-Source RenderScript" 2016-09-03 06:22:38 +00:00
Yang Ni
60617373a5 Updated user document for Single-Source RenderScript
Bug: 29875503
Bug: 29879448

Added a section introducing the new single-source feature.

Local staging:
http://yangni.mtv.corp.google.com/guide/topics/renderscript/compute.html

This updates
https://developer.android.com/guide/topics/renderscript/compute.html

Change-Id: I62dda3ab60b1678a9580fd2873f64f33d9696e13
(cherry picked from commit c069ed7f8c3d307c9fed2c8d1a81e28152190b5a)
2016-09-02 17:25:49 -07:00
Roshan Pius
13886253be Merge "WifiEnterpriseConfig: Fix copy constructor" 2016-09-02 21:10:10 +00:00
Roshan Pius
9709b8b372 WifiEnterpriseConfig: Fix copy constructor
Add missing elements from WifiEnterpriseConfig copy
constructor.

BUG: 31245222
TEST: Ran ACTS WifiEnterpriseTest suite.
Change-Id: Ia6f95fca4131ad9a1facca8f9c4c856dff868058
2016-09-02 14:08:50 -07:00
Iliyan Malchev
6902285a44 Merge changes from topic 'java_hidl_support'
* changes:
  Move Status to libhidl (DO NOT MERGE)
  Adds framework support for hidl-gen Java backend. (to support structs) (DO NOT MERGE)
  Add Bool* APIs to HwParcel (DO NOT MERGE)
  Link against libhidl for HidlSupport/svcmgr (DO NOT MERGE)
  Support one-way methods in java support for hardware binder (DO NOT MERGE)
  Initial commit of Java support for hardware binder (DO NOT MERGE)
2016-09-02 20:09:26 +00:00
Martijn Coenen
aa2c32f92b Move Status to libhidl (DO NOT MERGE)
Bug: 31226252

Change-Id: Ieb0adcf1fa71d6859324c2d83841685d1e1a22f8
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-02 06:28:14 -07:00
Andreas Huber
9266f9928d Adds framework support for hidl-gen Java backend. (to support structs) (DO NOT MERGE)
Bug: 30575790
Change-Id: Ida30d8fe7a1b210e98f1a0ea5d429a0112f9ef3f
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-02 06:28:14 -07:00
Andreas Huber
86635bb45e Add Bool* APIs to HwParcel (DO NOT MERGE)
Bug: 31045584
Change-Id: I202c4aa7caf92a4cd7e3a45ef6784638e41facc8
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-02 06:28:14 -07:00
Martijn Coenen
242030ddad Link against libhidl for HidlSupport/svcmgr (DO NOT MERGE)
Bug: 30839546
Change-Id: I52609576aa7f10da608725ef4ea78b778f127eef
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-02 06:28:14 -07:00
Andreas Huber
90349b3e11 Support one-way methods in java support for hardware binder (DO NOT MERGE)
Bug: 30922538
Change-Id: I5ff93126a29f6bff42dee3f9868fa794ca7c077f
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-02 06:28:14 -07:00
Andreas Huber
dab5fc65b9 Initial commit of Java support for hardware binder (DO NOT MERGE)
Change-Id: If1098ab921a11bae8eca2a70a3c3070e4daa0ea2
2016-09-02 06:28:14 -07:00
Treehugger Robot
3f3ed243fd Merge "NetworkSelectionStatus: Fix copy constructor" 2016-09-02 05:14:41 +00:00
Roshan Pius
d2d667275d NetworkSelectionStatus: Fix copy constructor
Add one more missing element from NetworkSelectionStatus copy constructor.

BUG: 31102798
Change-Id: Iae18f944e7ef722b280b20a51f128f90b2ff45c7
2016-09-01 15:08:44 -07:00
Chih-hung Hsieh
a6b6252d8b Merge "Fix google-explicit-constructor warnings." 2016-09-01 17:33:42 +00:00
Neil Fuller
47784a790b Merge "Track exposure of new j.l.reflect methods" 2016-09-01 13:15:52 +00:00
Treehugger Robot
227a176508 Merge "Fix missing dependency on R.java" 2016-09-01 05:32:48 +00:00
Colin Cross
c558dd9597 Fix missing dependency on R.java
Compiling frameworks source is missing a dependency on the R.stamp file
generated by the frameworks-res aapt rule, likely caused by the switch
to jack.  Use LOCAL_ADDITONAL_DEPENDENCIES to insert the dependency
instead of directly using build system internals.

Change-Id: Ifb830da18b3607f87ae283cea04f7d276d4bfde9
2016-08-31 18:01:06 -07:00
Jakub Pawlowski
5f87c4539a Merge "Separate advertiser from GATT client (1/4)" 2016-08-31 18:05:27 +00:00
Chih-hung Hsieh
7207562ff7 Merge "Fix google-explicit-constructor warnings in libs/hwui." 2016-08-31 17:18:56 +00:00
Chih-hung Hsieh
2cace65f71 Merge "Fix google-explicit-constructor warnings in media/mca." 2016-08-31 17:18:29 +00:00
Neil Fuller
7a9c0cd854 Merge "Fix receive timeout on LocalSocket" 2016-08-31 16:28:17 +00:00
Sergio Giro
0c8c4a5d98 Merge "java.security.Principal: add default method Principal#implies" 2016-08-31 13:51:37 +00:00
Sergio Giro
c7bd0d0adc Merge "java.security.SecretKey: now extends from Destroyable" 2016-08-31 13:50:23 +00:00
Sergio Giro
d53ae2c285 Merge "java.security: update java.security.KeyStore to jdk8u60" 2016-08-31 12:24:48 +00:00
Jakub Pawlowski
a480f7fe28 Separate advertiser from GATT client (1/4)
Bug: 30622771
Change-Id: I08c0498f8a1ea04423d3e864e9a60c7c78f1dbad
2016-08-31 03:36:53 -07:00
Neil Fuller
a8280a5d34 Fix receive timeout on LocalSocket
The receive timeout stopped being set incorrect due to commit
c80af6d8. There is an associated CTS regression test in cts/.

Test: Ran CTS test android.net.cts.LocalSocketTest
Bug: 31205169
Change-Id: I99808478946f8eae502c49d2cb83465648b9c904
2016-08-31 11:32:17 +01:00
Sergio Giro
9484bff017 Merge "java.security.cert: update classes in java.security.cert (part 2)" 2016-08-31 08:18:57 +00:00
Chih-hung Hsieh
17f1fc6c76 Merge "Fix google-explicit-constructor warnings in soundpool."
am: feee33ce2c

Change-Id: Id3cf418900b7eb3ac2e3d94f674f4ed6f624ba27
2016-08-30 22:29:05 +00:00
Chih-hung Hsieh
feee33ce2c Merge "Fix google-explicit-constructor warnings in soundpool." 2016-08-30 22:21:34 +00:00
Chih-Hung Hsieh
ed4b31f9e1 Merge "Fix google-explicit-constructor warnings in core/jni."
am: cfc9f5d03d

Change-Id: Ia0378869ca5896734d5dfbdddf937b2b6dc25dbf
2016-08-30 20:37:41 +00:00
Treehugger Robot
cfc9f5d03d Merge "Fix google-explicit-constructor warnings in core/jni." 2016-08-30 20:30:46 +00:00
Sergio Giro
71b95041d6 java.security: update java.security.KeyStore to jdk8u60
Pulling upstream changes from OpenJDK version jdk8u60 for
java.security.KeyStore.

- New method getAttributes in KeyStore.Entry
- New interface Attribute in KeyStore.Entry
- New constructor specifying protection algorithm and protection parameters in
KeyStore.PasswordProtection.
- New getters for protection algorithm and protection parameters in
KeyStore.PasswordProtection
- In PrivateKeyEntry, SecretKeyEntry and TrustedCertificateEntry, new
constructor allowing to specify attributes, and corresponding getter
getAttributes.

This commit also contains cosmetic JavaDoc changes like
- Use of @code in place of <code> tags.
- Tidied up casts/generics.

This completes the port to jdk8u60 for this class.

Change-Id: Ifec9d07b8f6c367a6fa2672fd5c43747057336ad
Test: make droid docs, vogar KS*{Entry,Password}*.java
Bug: 29631070
2016-08-30 19:57:43 +00:00
Sergio Giro
6f285fa91e java.security.Principal: add default method Principal#implies
Given a Subject, Principal#implies returns true iff the principal
is one of the subject's principals.

Bug: 29631070
Test: make droid docs, vogar PrincipalTest.java
Change-Id: Ic24ca4bc26e29abdb67481af8255b8b1683a6f3a
2016-08-30 19:26:17 +01:00
Sergio Giro
7cdfa7499a java.security.SecretKey: now extends from Destroyable
Also:
- added comments
- replace <code> by @code tags

This completes the port of SecretKey to jdk8u60.

Bug: 29631070
Test: make droid docs
Change-Id: Id3604c1e62855d9fa9bf02a704c79c6d2131b006
2016-08-30 18:44:11 +01:00
Neil Fuller
671d9ce289 Track exposure of new j.l.reflect methods
Modifier.parameterModifiers() and Class.toGenericString().

Bug: 28666126
Change-Id: Idd230540e15aa5c298739a7ba72ed3e47159d037
2016-08-30 15:51:07 +01:00
Neil Fuller
033101bb99 Merge "Track libcore java.lang.reflect API changes"
am: cff3f7001c

Change-Id: Ie68db07c1211f161d7757186ff5ffadd506deef6
2016-08-30 14:33:29 +00:00
Neil Fuller
cff3f7001c Merge "Track libcore java.lang.reflect API changes" 2016-08-30 14:26:34 +00:00
Neil Fuller
2cc1eed174 Track libcore java.lang.reflect API changes
The modifications to Class / Field affect the .txt file
for no good reason: the use of a different generic
variable name results in changes because the tools think
methods have been added / removed when they haven't.

The only interface change from upstream included is adding
"extends AnnotatedElement" to GenericDeclaration. All (platform)
subclasses already did implement this interface. App classes may
be affected but only if they do not currently implement those
methods and they are somehow called.

Bug: 28666126
Test: cts ran for libcore (libcore, harmony_java_lang, org)
Change-Id: Ice5afb80834d7f7a4d23dade21a1590c6b323ed8
2016-08-30 12:08:10 +01:00
Mitchell Wills
6a80a4b05a DO NOT MERGE Revert "Add Bluetooth toggle prompts - framework"
This reverts commit 6bc2a92a5983e971ab9a04301fe4070e5b1f9179.

Change-Id: Ib576085fe190942891480524eb367a94a387a11c
2016-08-29 20:15:59 -07:00
Mitchell Wills
8efb84e3e0 DO NOT MERGE Revert "Add WiFi toggle prompts - framework"
This reverts commit 40f8b9251831c5f009fd476b1a3d216e126d3ef0.

Change-Id: I23e8b6ac97d8853c271429fc13fbfa313717a95a
2016-08-29 20:15:48 -07:00