252137 Commits

Author SHA1 Message Date
Treehugger Robot
5379f47d85 Merge "Fix issue that Overview key doesn't work at secondary user" 2016-09-09 21:46:04 +00:00
Treehugger Robot
077678590f Merge "char16 strings returned by JNIEnv::GetStringCritical are not '\0' terminated." 2016-09-09 15:47:44 +00:00
Andreas Huber
c84c5568a8 char16 strings returned by JNIEnv::GetStringCritical are not '\0' terminated.
Properly construct String16s from both pointer and length instead.

Bug: 31373735
Change-Id: Ia89df7840a48c4fce06e08fc3ae373e0fadfb44e
2016-09-08 13:52:36 -07:00
Tobias Thierer
63a07e80d6 Merge "Add Base64 from OpenJDK 8u60" 2016-09-08 13:10:15 +00:00
Sergio Giro
8445702920 Merge "java.security.Provider: port to jdk8u60 (second part)" 2016-09-08 12:18:43 +00:00
Paul Duffin
0bd7c54745 Merge "Fix SuppressWarnings typo." 2016-09-08 12:17:05 +00:00
Ian Rogers
e09ac05b35 Fix SuppressWarnings typo.
As Error Prone states:
Suppressing "deprecated" is probably a typo for "deprecation"
Bug: 27723540

(cherry picked from commit a7f834f1ce5ec52acdde5a8619d91a18f3376598)

Change-Id: I0c6a9fc0a160769955cccf97ec7decb1f2b9b8fb
2016-09-08 13:11:37 +01:00
Yi Kong
3bc37e9cf7 Merge "Track libcore change 76fa41aa4ac891670446592243b654fac7deb53f" 2016-09-08 09:59:54 +00:00
Treehugger Robot
efb7bec56a Merge "WifiManager: Remove unused methods" 2016-09-07 21:43:20 +00:00
Yi Kong
a4cc9028bf Track libcore change 76fa41aa4ac891670446592243b654fac7deb53f
Bug: 30992227
Change-Id: I33c25562468f5803e211910f50116b501b66fe56
2016-09-07 16:17:55 +00:00
dooyoung.hwang
b647984f04 Fix issue that Overview key doesn't work at secondary user
If user captures screenshot, screenshot process is started. Screenshot
process also starts services that is defined SERVICES_PER_USER.
As a result Recents class's object is unexpectedly constucted from
screenshot process, and cause to connect with system-user's SystemUI
with mUserToSystemServiceConnection. So, binder proxy from system-user's
SystemUI to secondary-user's SystemUI is replaced with proxy to
screenshot process. In this case Overview key doesn't work at all
until reboot.

Bug:30340532
Change-Id: I84b8b4a02ac3ff781e06d57be19cff56efa76521
2016-09-07 16:03:17 +00:00
Roshan Pius
c4856bd73c Merge "WifiEnterpriseConfig: Refactor set/get field values" 2016-09-07 15:47:40 +00:00
Sergio Giro
12d3d4bbba Merge "java.security.cert.X509CRL: add new method verify(PublicKey, Provider)" 2016-09-07 12:08:27 +00:00
Sergio Giro
6767fd28b1 Merge "java.security.PKCS12Attribute: port class from jdk8u60" 2016-09-07 12:07:13 +00:00
Sergio Giro
4c2df18a4d Merge "java.security.SecureRandom: add getInstanceStrong() method" 2016-09-07 12:05:35 +00:00
Sergio Giro
59c0fcf0c8 Merge "java.security: port DomainLoadStoreParameter from jdk8u60" 2016-09-07 12:04:21 +00:00
Yohann Roussel
15c6078f4d Merge "Add a test app for suppressed exceptions" 2016-09-07 09:52:50 +00:00
Etan Cohen
62419a0138 Merge changes from topic 'enable_nan'
* changes:
  Give WakeupMessage the ability to transport an object as well. [DO NOT MERGE]
  [NAN] Add transport type for NAN. [DO NOT MERGE]
2016-09-07 04:19:52 +00:00
Lorenzo Colitti
4171cdf303 Give WakeupMessage the ability to transport an object as well. [DO NOT MERGE]
(cherry-pick of commit eab17da5882e59caff25c73aa6bcd0587aca9dd4)

Bug: 23113288
Change-Id: Ic98e3bcb3ea8b0b28a309bd647fb4178311c46a3
2016-09-06 15:54:16 -07:00
Etan Cohen
bd9fdbe022 [NAN] Add transport type for NAN. [DO NOT MERGE]
Add TRANSPORT_WIFI_NAN - specifies a peer-to-peer Wi-Fi NAN data
connectivity request.

While NAN uses Wi-Fi L1 PHY and part of the MAC - it is a different
protocol and constitutes a different transport.

(cherry-pick of commit 7b84987a6acf2f0a950c334a17a6ee085db3ba4f)

Bug: 26564277
Change-Id: I975ebc72d8f97a592d18038b3d6465b7a40efa75
2016-09-06 15:54:10 -07:00
Treehugger Robot
9221c96ae0 Merge "WifiConfiguration: Fix isEnterprise" 2016-09-06 22:51:43 +00:00
Mathieu Chartier
a817838e8b Merge "Avoid profile guided compilation for vmSafeMode" 2016-09-06 22:19:03 +00:00
Treehugger Robot
1cd6248012 Merge "fixes mStartedUsers shoule be locked by mLock, not mVolumes" 2016-09-06 21:09:06 +00:00
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
Roshan Pius
6cfe668c80 WifiManager: Remove unused methods
Remove the unused hidden methods from WifiManager.

BUG: 29449615
TEST: Compiles, boots up.
Change-Id: Ie7e6f438b23a368e44d35390267d5505e12bb75e
2016-09-06 13:38:31 -07: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
Roshan Pius
29ce1dab5a WifiConfiguration: Fix isEnterprise
Add a check for the eap method in Enterpriseconfig associated with the
WifiConfiguration.

BUG: 31275240
Change-Id: I21aabb09bdd21e29a80d4b9c6ea0e2b1f0d7e2df
2016-09-06 10:13:40 -07:00
Roshan Pius
c8cd577c86 WifiEnterpriseConfig: Refactor set/get field values
WifiEnterpriseConfig has a few keys which are generated internally
have unquoted values. However, the public setFieldValue() always quotes
the value when set.  So, this causes a problem when restoring
these field values from config store. Since this is an internal
disctinction that only WifiEnterpriseConfig understands, add a list to
check if a particular field value needs to be quoted or not. Also,
remove any direct "mFields.put" invocations with |setFieldValue|.

While there,
Refactor the existing |setFieldValue| & |getFieldValue| methods.

BUG: 31246524
TEST: Unit tests
TEST: Integrated with config store and verified that a previous TLS EAP
connection failure is no longer seen.

Change-Id: Ib85f3bce378720a6a6c2ae1439837a8e866a088d
2016-09-06 10:05:02 -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
Sergio Giro
53f16c8db7 java.security.cert.X509CRL: add new method verify(PublicKey, Provider)
New method introduced in Java 8. This method has a "default" implementation
in order to avoid breaking providers who construct concrete subclasses.

Unfortunately this implementation always results in an infinite loop, and
has thus been changed by an UnsupportedMethodOperation, with a TODO note
as to improve the situation if possible.

java/security/cert/X509CRL: add "default" method
sun/security/x509/X509CRLImpl: add declaration for that particular
implementation

Also, cosmetic changes like:
- use of @code tags instead of <code>
- use of static fields using the class name instead of instance name

This completes the port of this package to jdk8u60.

Bug: 29631070
Bug: 31294527
Test: make droid docs; old-cts run cts --class libcore.java.security.cert.X509CRLTest
Change-Id: Iccdfa3625a9ff2e7b808c22bce59ff75ae903e8a
2016-09-06 14:13:57 +01:00
Tobias Thierer
d20952e238 Add Base64 from OpenJDK 8u60
Test: make update-api
Bug: 29935305

Change-Id: Idc1cfadd78553dd05a7cb1f9ebd02858a3675e51
2016-09-05 22:01:40 +01:00
yuanhuihui
efd1f1242b fixes mStartedUsers shoule be locked by mLock, not mVolumes
when create/delete multiple user, plug/unplug externel storage(such as sdcard) at the same time.
multiple threads run concurrency , the newly created user can not get state of externel storage.

https://code.google.com/p/android/issues/detail?id=215901

Change-Id: I097f5291108af89a430e12045376065d71d48175
Signed-off-by: yuanhuihui <yuanhuihui@xiaomi.com>
2016-09-05 13:54:00 +08:00
Treehugger Robot
f7c508ae09 Merge "Updated user document for Single-Source RenderScript" 2016-09-03 06:22:38 +00:00
Mathieu Chartier
41e4a376f1 Avoid profile guided compilation for vmSafeMode
Bug: 30688277
Bug: 30733908

Test: adb shell cmd package compile -m speed-profile comb.BBClient

Change-Id: I6783c80566b6b3b67025a3d258ebbdede0c7ca2d
2016-09-02 18:15:45 -07: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