OSDN Git Service

android-x86/frameworks-base.git
7 years agoMerge "java.security.cert.X509CRL: add new method verify(PublicKey, Provider)"
Sergio Giro [Wed, 7 Sep 2016 12:08:27 +0000 (12:08 +0000)]
Merge "java.security.cert.X509CRL: add new method verify(PublicKey, Provider)"

7 years agoMerge "java.security.PKCS12Attribute: port class from jdk8u60"
Sergio Giro [Wed, 7 Sep 2016 12:07:13 +0000 (12:07 +0000)]
Merge "java.security.PKCS12Attribute: port class from jdk8u60"

7 years agoMerge "java.security.SecureRandom: add getInstanceStrong() method"
Sergio Giro [Wed, 7 Sep 2016 12:05:35 +0000 (12:05 +0000)]
Merge "java.security.SecureRandom: add getInstanceStrong() method"

7 years agoMerge "java.security: port DomainLoadStoreParameter from jdk8u60"
Sergio Giro [Wed, 7 Sep 2016 12:04:20 +0000 (12:04 +0000)]
Merge "java.security: port DomainLoadStoreParameter from jdk8u60"

7 years agoMerge "Add a test app for suppressed exceptions"
Yohann Roussel [Wed, 7 Sep 2016 09:52:49 +0000 (09:52 +0000)]
Merge "Add a test app for suppressed exceptions"

7 years agoMerge changes from topic 'enable_nan'
Etan Cohen [Wed, 7 Sep 2016 04:19:51 +0000 (04:19 +0000)]
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]

7 years agoGive WakeupMessage the ability to transport an object as well. [DO NOT MERGE]
Lorenzo Colitti [Tue, 7 Jun 2016 07:27:10 +0000 (16:27 +0900)]
Give WakeupMessage the ability to transport an object as well. [DO NOT MERGE]

(cherry-pick of commit eab17da5882e59caff25c73aa6bcd0587aca9dd4)

Bug: 23113288
Change-Id: Ic98e3bcb3ea8b0b28a309bd647fb4178311c46a3

7 years ago[NAN] Add transport type for NAN. [DO NOT MERGE]
Etan Cohen [Mon, 20 Jun 2016 16:27:12 +0000 (09:27 -0700)]
[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

7 years agoMerge "WifiConfiguration: Fix isEnterprise"
Treehugger Robot [Tue, 6 Sep 2016 22:51:42 +0000 (22:51 +0000)]
Merge "WifiConfiguration: Fix isEnterprise"

7 years agoMerge "Avoid profile guided compilation for vmSafeMode"
Mathieu Chartier [Tue, 6 Sep 2016 22:19:03 +0000 (22:19 +0000)]
Merge "Avoid profile guided compilation for vmSafeMode"

7 years agoMerge "fixes mStartedUsers shoule be locked by mLock, not mVolumes"
Treehugger Robot [Tue, 6 Sep 2016 21:09:05 +0000 (21:09 +0000)]
Merge "fixes mStartedUsers shoule be locked by mLock, not mVolumes"

7 years agoMerge changes from topic 'cherry_pms_installd'
Andreas Gampe [Tue, 6 Sep 2016 21:02:53 +0000 (21:02 +0000)]
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.

7 years agoRelease mPackages lock earlier
Todd Kennedy [Thu, 18 Aug 2016 18:22:52 +0000 (11:22 -0700)]
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)

7 years agoOtaDexopt: Special-case system app classpaths
Andreas Gampe [Tue, 2 Aug 2016 05:08:26 +0000 (22:08 -0700)]
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)

7 years agoOtaDexoptService: Run dexopt on all apps
Andreas Gampe [Thu, 28 Jul 2016 23:54:41 +0000 (16:54 -0700)]
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)

7 years agoFrameworks/base: Add compiler stats to Package Manager
Andreas Gampe [Wed, 13 Jul 2016 05:42:41 +0000 (22:42 -0700)]
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)

7 years ago[RFC] Special case system apps for profile optimizations
Calin Juravle [Tue, 12 Jul 2016 14:56:41 +0000 (15:56 +0100)]
[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)

7 years agoCompile core-apps according to their own "reason" for A/B
Calin Juravle [Tue, 12 Jul 2016 12:56:34 +0000 (13:56 +0100)]
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)

7 years agoFrameworks/base: Add new flow to OtaDexoptService
Andreas Gampe [Fri, 24 Jun 2016 03:27:12 +0000 (20:27 -0700)]
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)

7 years agoOtadexopt: Expose progress percentage
Andreas Gampe [Fri, 10 Jun 2016 22:21:39 +0000 (15:21 -0700)]
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)

7 years agoWifiConfiguration: Fix isEnterprise
Roshan Pius [Tue, 6 Sep 2016 17:13:40 +0000 (10:13 -0700)]
WifiConfiguration: Fix isEnterprise

Add a check for the eap method in Enterpriseconfig associated with the
WifiConfiguration.

BUG: 31275240
Change-Id: I21aabb09bdd21e29a80d4b9c6ea0e2b1f0d7e2df

7 years agocp preopted files from B partition during PM init.
Alex Light [Thu, 23 Jun 2016 00:56:37 +0000 (17:56 -0700)]
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)

7 years agojava.security.cert.X509CRL: add new method verify(PublicKey, Provider)
Sergio Giro [Tue, 6 Sep 2016 13:09:41 +0000 (14:09 +0100)]
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

7 years agofixes mStartedUsers shoule be locked by mLock, not mVolumes
yuanhuihui [Wed, 13 Jul 2016 13:21:03 +0000 (21:21 +0800)]
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>
7 years agoMerge "Updated user document for Single-Source RenderScript"
Treehugger Robot [Sat, 3 Sep 2016 06:22:38 +0000 (06:22 +0000)]
Merge "Updated user document for Single-Source RenderScript"

7 years agoAvoid profile guided compilation for vmSafeMode
Mathieu Chartier [Fri, 2 Sep 2016 23:36:42 +0000 (16:36 -0700)]
Avoid profile guided compilation for vmSafeMode

Bug: 30688277
Bug: 30733908

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

Change-Id: I6783c80566b6b3b67025a3d258ebbdede0c7ca2d

7 years agoUpdated user document for Single-Source RenderScript
Yang Ni [Wed, 29 Jun 2016 19:44:06 +0000 (12:44 -0700)]
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)

7 years agoMerge "WifiEnterpriseConfig: Fix copy constructor"
Roshan Pius [Fri, 2 Sep 2016 21:10:10 +0000 (21:10 +0000)]
Merge "WifiEnterpriseConfig: Fix copy constructor"

7 years agoWifiEnterpriseConfig: Fix copy constructor
Roshan Pius [Thu, 1 Sep 2016 20:46:40 +0000 (13:46 -0700)]
WifiEnterpriseConfig: Fix copy constructor

Add missing elements from WifiEnterpriseConfig copy
constructor.

BUG: 31245222
TEST: Ran ACTS WifiEnterpriseTest suite.
Change-Id: Ia6f95fca4131ad9a1facca8f9c4c856dff868058

7 years agoMerge changes from topic 'java_hidl_support'
Iliyan Malchev [Fri, 2 Sep 2016 20:09:25 +0000 (20:09 +0000)]
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)

7 years agoMove Status to libhidl (DO NOT MERGE)
Martijn Coenen [Wed, 31 Aug 2016 23:37:05 +0000 (01:37 +0200)]
Move Status to libhidl (DO NOT MERGE)

Bug: 31226252

Change-Id: Ieb0adcf1fa71d6859324c2d83841685d1e1a22f8
Signed-off-by: Iliyan Malchev <malchev@google.com>
7 years agoAdds framework support for hidl-gen Java backend. (to support structs) (DO NOT MERGE)
Andreas Huber [Thu, 25 Aug 2016 18:21:21 +0000 (11:21 -0700)]
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>
7 years agoAdd Bool* APIs to HwParcel (DO NOT MERGE)
Andreas Huber [Wed, 24 Aug 2016 23:19:03 +0000 (16:19 -0700)]
Add Bool* APIs to HwParcel (DO NOT MERGE)

Bug: 31045584
Change-Id: I202c4aa7caf92a4cd7e3a45ef6784638e41facc8
Signed-off-by: Iliyan Malchev <malchev@google.com>
7 years agoLink against libhidl for HidlSupport/svcmgr (DO NOT MERGE)
Martijn Coenen [Fri, 19 Aug 2016 12:23:42 +0000 (14:23 +0200)]
Link against libhidl for HidlSupport/svcmgr (DO NOT MERGE)

Bug: 30839546
Change-Id: I52609576aa7f10da608725ef4ea78b778f127eef
Signed-off-by: Iliyan Malchev <malchev@google.com>
7 years agoSupport one-way methods in java support for hardware binder (DO NOT MERGE)
Andreas Huber [Thu, 18 Aug 2016 21:29:40 +0000 (14:29 -0700)]
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>
7 years agoInitial commit of Java support for hardware binder (DO NOT MERGE)
Andreas Huber [Mon, 15 Aug 2016 16:25:02 +0000 (09:25 -0700)]
Initial commit of Java support for hardware binder (DO NOT MERGE)

Change-Id: If1098ab921a11bae8eca2a70a3c3070e4daa0ea2

7 years agoMerge "NetworkSelectionStatus: Fix copy constructor"
Treehugger Robot [Fri, 2 Sep 2016 05:14:41 +0000 (05:14 +0000)]
Merge "NetworkSelectionStatus: Fix copy constructor"

7 years agoNetworkSelectionStatus: Fix copy constructor
Roshan Pius [Tue, 30 Aug 2016 16:48:47 +0000 (09:48 -0700)]
NetworkSelectionStatus: Fix copy constructor

Add one more missing element from NetworkSelectionStatus copy constructor.

BUG: 31102798
Change-Id: Iae18f944e7ef722b280b20a51f128f90b2ff45c7

7 years agoMerge "Fix google-explicit-constructor warnings."
Chih-hung Hsieh [Thu, 1 Sep 2016 17:33:42 +0000 (17:33 +0000)]
Merge "Fix google-explicit-constructor warnings."

7 years agojava.security.SecureRandom: add getInstanceStrong() method
Sergio Giro [Tue, 30 Aug 2016 15:53:53 +0000 (16:53 +0100)]
java.security.SecureRandom: add getInstanceStrong() method

Port SecureRandom to jdk8u60.

The method getInstanceStrong returns a strong random number
generator. In Android this is assumed to be the one from
OpenSSLProvider.

This commit also contains cosmetic JavaDoc changes like
- Use of @code in place of <code> tags and use of a package-info.java in
place of a package.html file.
- Added comments.
- Uses of java.security.util.Debug (commented-out as that
debugging mechanism is not available in Android).
- Added braces in control flow blocks.

Test: make droid docs, vogar SecureRandomTest
Bug: 29631070
Change-Id: I9080fbd5e9292d7cb3eaa234f7c5849411336fac

7 years agoMerge "Track exposure of new j.l.reflect methods"
Neil Fuller [Thu, 1 Sep 2016 13:15:52 +0000 (13:15 +0000)]
Merge "Track exposure of new j.l.reflect methods"

7 years agojava.security.PKCS12Attribute: port class from jdk8u60
Sergio Giro [Wed, 31 Aug 2016 19:00:41 +0000 (20:00 +0100)]
java.security.PKCS12Attribute: port class from jdk8u60

This class provides facilities to deal with attributes in entries for
PKCS12 keystores.

Test: check-ojluni-files, make droid docs, vogar PKCS12AttributeTest
Bug: 29631070
Change-Id: I8d40fe126f189d503d6df7bfa45c4763bb7cb0d1

7 years agoMerge "Fix missing dependency on R.java"
Treehugger Robot [Thu, 1 Sep 2016 05:32:48 +0000 (05:32 +0000)]
Merge "Fix missing dependency on R.java"

7 years agoFix missing dependency on R.java
Colin Cross [Thu, 1 Sep 2016 01:01:06 +0000 (18:01 -0700)]
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

7 years agoMerge "Separate advertiser from GATT client (1/4)"
Jakub Pawlowski [Wed, 31 Aug 2016 18:05:26 +0000 (18:05 +0000)]
Merge "Separate advertiser from GATT client (1/4)"

7 years agoMerge "Fix google-explicit-constructor warnings in libs/hwui."
Chih-hung Hsieh [Wed, 31 Aug 2016 17:18:56 +0000 (17:18 +0000)]
Merge "Fix google-explicit-constructor warnings in libs/hwui."

7 years agoMerge "Fix google-explicit-constructor warnings in media/mca."
Chih-hung Hsieh [Wed, 31 Aug 2016 17:18:29 +0000 (17:18 +0000)]
Merge "Fix google-explicit-constructor warnings in media/mca."

7 years agoMerge "Fix receive timeout on LocalSocket"
Neil Fuller [Wed, 31 Aug 2016 16:28:16 +0000 (16:28 +0000)]
Merge "Fix receive timeout on LocalSocket"

7 years agoMerge "java.security.Principal: add default method Principal#implies"
Sergio Giro [Wed, 31 Aug 2016 13:51:37 +0000 (13:51 +0000)]
Merge "java.security.Principal: add default method Principal#implies"

7 years agoMerge "java.security.SecretKey: now extends from Destroyable"
Sergio Giro [Wed, 31 Aug 2016 13:50:22 +0000 (13:50 +0000)]
Merge "java.security.SecretKey: now extends from Destroyable"

7 years agoMerge "java.security: update java.security.KeyStore to jdk8u60"
Sergio Giro [Wed, 31 Aug 2016 12:24:48 +0000 (12:24 +0000)]
Merge "java.security: update java.security.KeyStore to jdk8u60"

7 years agoSeparate advertiser from GATT client (1/4)
Jakub Pawlowski [Fri, 5 Aug 2016 13:40:31 +0000 (06:40 -0700)]
Separate advertiser from GATT client (1/4)

Bug: 30622771
Change-Id: I08c0498f8a1ea04423d3e864e9a60c7c78f1dbad

7 years agoFix receive timeout on LocalSocket
Neil Fuller [Wed, 31 Aug 2016 10:32:17 +0000 (11:32 +0100)]
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

7 years agoMerge "java.security.cert: update classes in java.security.cert (part 2)"
Sergio Giro [Wed, 31 Aug 2016 08:18:57 +0000 (08:18 +0000)]
Merge "java.security.cert: update classes in java.security.cert (part 2)"

7 years agoMerge "Fix google-explicit-constructor warnings in soundpool."
Chih-hung Hsieh [Tue, 30 Aug 2016 22:29:05 +0000 (22:29 +0000)]
Merge "Fix google-explicit-constructor warnings in soundpool."
am: feee33ce2c

Change-Id: Id3cf418900b7eb3ac2e3d94f674f4ed6f624ba27

7 years agoMerge "Fix google-explicit-constructor warnings in soundpool."
Chih-hung Hsieh [Tue, 30 Aug 2016 22:21:34 +0000 (22:21 +0000)]
Merge "Fix google-explicit-constructor warnings in soundpool."

7 years agoMerge "Fix google-explicit-constructor warnings in core/jni."
Chih-Hung Hsieh [Tue, 30 Aug 2016 20:37:41 +0000 (20:37 +0000)]
Merge "Fix google-explicit-constructor warnings in core/jni."
am: cfc9f5d03d

Change-Id: Ia0378869ca5896734d5dfbdddf937b2b6dc25dbf

7 years agoMerge "Fix google-explicit-constructor warnings in core/jni."
Treehugger Robot [Tue, 30 Aug 2016 20:30:46 +0000 (20:30 +0000)]
Merge "Fix google-explicit-constructor warnings in core/jni."

7 years agojava.security: update java.security.KeyStore to jdk8u60
Sergio Giro [Thu, 25 Aug 2016 14:06:25 +0000 (15:06 +0100)]
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

7 years agojava.security.Principal: add default method Principal#implies
Sergio Giro [Tue, 30 Aug 2016 18:26:17 +0000 (19:26 +0100)]
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

7 years agojava.security.SecretKey: now extends from Destroyable
Sergio Giro [Tue, 30 Aug 2016 17:44:11 +0000 (18:44 +0100)]
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

7 years agoTrack exposure of new j.l.reflect methods
Neil Fuller [Tue, 23 Aug 2016 16:06:12 +0000 (17:06 +0100)]
Track exposure of new j.l.reflect methods

Modifier.parameterModifiers() and Class.toGenericString().

Bug: 28666126
Change-Id: Idd230540e15aa5c298739a7ba72ed3e47159d037

7 years agoMerge "Track libcore java.lang.reflect API changes"
Neil Fuller [Tue, 30 Aug 2016 14:33:29 +0000 (14:33 +0000)]
Merge "Track libcore java.lang.reflect API changes"
am: cff3f7001c

Change-Id: Ie68db07c1211f161d7757186ff5ffadd506deef6

7 years agoMerge "Track libcore java.lang.reflect API changes"
Neil Fuller [Tue, 30 Aug 2016 14:26:34 +0000 (14:26 +0000)]
Merge "Track libcore java.lang.reflect API changes"

7 years agoTrack libcore java.lang.reflect API changes
Neil Fuller [Mon, 22 Aug 2016 17:41:52 +0000 (18:41 +0100)]
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

7 years agoDO NOT MERGE Revert "Add Bluetooth toggle prompts - framework"
Mitchell Wills [Tue, 30 Aug 2016 03:02:50 +0000 (20:02 -0700)]
DO NOT MERGE Revert "Add Bluetooth toggle prompts - framework"

This reverts commit 6bc2a92a5983e971ab9a04301fe4070e5b1f9179.

Change-Id: Ib576085fe190942891480524eb367a94a387a11c

7 years agoDO NOT MERGE Revert "Add WiFi toggle prompts - framework"
Mitchell Wills [Tue, 30 Aug 2016 03:02:26 +0000 (20:02 -0700)]
DO NOT MERGE Revert "Add WiFi toggle prompts - framework"

This reverts commit 40f8b9251831c5f009fd476b1a3d216e126d3ef0.

Change-Id: I23e8b6ac97d8853c271429fc13fbfa313717a95a

7 years agoFix google-explicit-constructor warnings in libs/hwui.
Chih-Hung Hsieh [Mon, 29 Aug 2016 21:52:43 +0000 (14:52 -0700)]
Fix google-explicit-constructor warnings in libs/hwui.

* Add explicit keyword to conversion constructors,
  or add NOLINT for implicit converters.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: Id8ca42433a4fc3652e4cb13787c4cb169f20d9a9

7 years agoFix google-explicit-constructor warnings in soundpool.
Chih-Hung Hsieh [Mon, 29 Aug 2016 21:53:50 +0000 (14:53 -0700)]
Fix google-explicit-constructor warnings in soundpool.

* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: Id1183b2929242cdf1fd0a1558d0e70194a1de9bb

7 years agoFix google-explicit-constructor warnings.
Chih-Hung Hsieh [Mon, 29 Aug 2016 21:51:31 +0000 (14:51 -0700)]
Fix google-explicit-constructor warnings.

* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: Ic550902559b0800bdcfc0b1d301313a909434eed

7 years agoFix google-explicit-constructor warnings in media/mca.
Chih-Hung Hsieh [Mon, 29 Aug 2016 21:47:52 +0000 (14:47 -0700)]
Fix google-explicit-constructor warnings in media/mca.

* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: Ia820e0a82df4bf74e5846917f6148849aed6ddc0

7 years agoFix google-explicit-constructor warnings in core/jni.
Chih-Hung Hsieh [Mon, 29 Aug 2016 21:46:35 +0000 (14:46 -0700)]
Fix google-explicit-constructor warnings in core/jni.

* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: I6125b7b761cb26831d42aabf10870ed68f0bf092

7 years agoMerge changes from topic 'wifi-aosp-master' into stage-aosp-master
Mitchell Wills [Mon, 29 Aug 2016 20:02:48 +0000 (20:02 +0000)]
Merge changes from topic 'wifi-aosp-master' into stage-aosp-master

* changes:
  NetworkSelectionStatus: Fix copy constructor
  Deprecate QNS network disable reason BAD_LINK
  [NAN] API changes/fixes addressing apilint issues
  [NAN] Add method to ConfigRequest to determine if non-default
  [NAN] Simplify publish/subscribe configuration - merge match filters
  [NAN] Udpate NAN API documentation, clean-up visibility
  [NAN] Do not expose WifiManager.isNanSupported as new API
  [NAN] Update finalize to check and warn user if resources not freed
  [NAN] Fix bad merge use rethrowFromSystemServer
  Add Log.wtf when transitionTo is used improperly
  Ensure BSSIDs are correctly aged out in settings view
  [NAN] Provide calling package name to service
  Add WiFi toggle prompts - framework
  Reenable the unit tests for StateMachine
  Remove WiFi related methods from NetworkManagementService
  Don't pull in external/junit through mockito
  WifiConfiguration: Expose NetworkSelectionStatus strings
  Add Bluetooth toggle prompts - framework
  [NAN] Add LV utilities (TLV with T size of 0).
  [NAN] Fix TlvElement member names - reflect public access.
  TetherUtil: Use ConnectivityManager for tethering
  [NAN] TLV utilities iterator - throw correct exception
  [NAN] Modify arguments from "array, length" to "array"
  [NAN] NAN System Api: RTT
  Properly disable WiFi tethering
  [NAN] Provide inteface MAC address to app.
  [NAN] Add (T)LV validation testing
  Add IPv6 tethering coordinator
  Stop listening for WiFi interface status changes
  [NAN] Add validity checks for service name
  [NAN] Fix assumption about Strings containing single-byte characters.
  [NAN] NAN data-path API: network specifier
  DO NOT MERGE StateMachine: remove final from SendMessage
  wifi: allow config of default+verbose ring buffers
  Don't save the anonymous identity for EAP-SIM/AKA/AKA-Prime
  Add a WifiScanner API to listener for ongoing scans
  Fix invitation request from persistent GC
  SettingsBackupAgent: Remove redundant size parameter
  WifiConfiguration: Make NetworkSelectionStatus public
  Use WifiManager for wifi backup/restore
  Fix race conditions between Tethering and TetherInterfaceStateMachine
  WifiManager: Add new API to restore old backup data
  Tethering: Own WiFi tethering state and lifetime
  IpConfigStore: Changes for parsing old wifi backup
  WifiManager: Add new API's for backup/restore
  XmlUtils: Add missing readThisByteArrayXml method
  Use an ArrayMap instead of HashMap to track tether interfaces
  Consolidate cleanup logic in TetherInterfaceSM.TetheredState
  Annotate TetherInterfaceStateMachineTest for APCT
  Rely on Tethering mutex for TetherInterfaceSM
  Rename TetherInterfaceSM to TetherInterfaceStateMachine
  [NAN] Add retry count for transmitting L2 NAN messages
  Remove dead code from TetherInterfaceSM
  Remove transient StartingState from TetherInterfaceSM
  Expand test coverage of TetherInterfaceSM
  Add demonstration unittest for TetherInterfaceSM
  Extract TetherInterfaceSM to its own class.
  Make Tethering.TetherInterfaceSM more self contained
  WifiManager: add WIFI_MODE_NO_LOCKS_HELD
  Create frameworks-base-testutils lib
  Clean up class members in Tethering.TetherInterfaceSM
  Move android.net.util.IpUtilsTest into a util/ directory
  Fix trivial warnings in Tethering.java
  Fix some trivial warnings in WifiP2pDevice.java
  [NAN] Add support for NAN RTT.
  [NAN] Remove OnNanDown notification from API
  Remove unused method from NetworkManagementService
  WifiConfiguration: Add new selection disable reasons
  [NAN] Add type and nullability annotations. Update hide annotation.
  [NAN] Add master switch to enable/disable usage of NAN APIs.
  [NAN] Re-factor connect/config flow
  [NAN] Refactor session lifecycle to clarify API & eliminate race conditions
  [NAN] Removed NAN event registration - dispatch all callbacks.
  [NAN] Consolidate publish/subscribe callback sets into single set
  [NAN] Replace session callback configuration control
  [NAN] Expose match style configuration as public API.
  [NAN] API cleanup - rename FLAGS.
  [NAN] Renamed listeners to callback per API guidelines
  [NAN]: API update - consolidate Puslish|Subscribe Data+Subscribe -> Config
  NAN: Support multiple instantiation per UID - introduce a client ID.

7 years agoMerge "Fixed statuses on Battery Saver column."
Felipe Leme [Mon, 29 Aug 2016 18:44:28 +0000 (18:44 +0000)]
Merge "Fixed statuses on Battery Saver column."
am: 21e0701f76

Change-Id: I4125ff3ad049ef2717fe12ba7ca62d99bf9bd3c5

7 years agoMerge "Fixed statuses on Battery Saver column."
Felipe Leme [Mon, 29 Aug 2016 18:32:27 +0000 (18:32 +0000)]
Merge "Fixed statuses on Battery Saver column."

7 years agoFixed statuses on Battery Saver column.
Felipe Leme [Thu, 14 Jul 2016 18:04:49 +0000 (11:04 -0700)]
Fixed statuses on Battery Saver column.

BUG: 30139400

Change-Id: I1798607af13c9be5e1f21212fd7078f7152562bd
(cherry picked from commit 9e325706f42a1dc48abe80a24323fae4579ab033)

7 years agoNetworkSelectionStatus: Fix copy constructor
Roshan Pius [Fri, 26 Aug 2016 02:47:06 +0000 (19:47 -0700)]
NetworkSelectionStatus: Fix copy constructor

Add couple of missing elements in the NetworkSelectionStatus copy constructor.

BUG: 31102798
Change-Id: Ie5f3719b94acf021d4ae2756afd635388640168c
(cherry picked from commit 699680b6b4fb923e4129d678013e3fbbc0421eaa)

7 years agoDeprecate QNS network disable reason BAD_LINK
Randy Pan [Wed, 27 Jul 2016 20:20:51 +0000 (13:20 -0700)]
Deprecate QNS network disable reason BAD_LINK

WifiNetworkAgent#unwanted no longer disables the network.

Bug: 28558417
Change-Id: I2e7ed99ae4cb952f124c673376d967eeee2b4ece
(cherry picked from commit 4156d615707a7aa27ecaf55c889824fd025a75b5)

7 years ago[NAN] API changes/fixes addressing apilint issues
Etan Cohen [Mon, 22 Aug 2016 18:27:57 +0000 (11:27 -0700)]
[NAN] API changes/fixes addressing apilint issues

Bug: 30983968
Change-Id: I2189442755380ad5d04f80bcb5978ca0c28e6420
(cherry picked from commit 9825309424cab3a3efabac0bde79b3c1419f9be9)

7 years ago[NAN] Add method to ConfigRequest to determine if non-default
Etan Cohen [Thu, 18 Aug 2016 23:51:50 +0000 (16:51 -0700)]
[NAN] Add method to ConfigRequest to determine if non-default

To be used in permission check.

Bug: 27696149
Change-Id: I5be5aed93c556cf24b596bd2a7c5672502f84d74
(cherry picked from commit 8266b3f876e6b96ac0f18216b2011b03a0504a23)

7 years ago[NAN] Simplify publish/subscribe configuration - merge match filters
Etan Cohen [Thu, 18 Aug 2016 22:38:29 +0000 (15:38 -0700)]
[NAN] Simplify publish/subscribe configuration - merge match filters

Merge Tx/Rx match filters into single Match filter configuration. Only
a single filter can be used at a time (either Tx or Rx).

Bug: 30948496
Change-Id: I32a9a0306dfd08295bc63145bccfe3739862f17d
(cherry picked from commit 6007681b19510d2a739ab45c1754d869f8f15e72)

7 years ago[NAN] Udpate NAN API documentation, clean-up visibility
Etan Cohen [Thu, 18 Aug 2016 16:55:31 +0000 (09:55 -0700)]
[NAN] Udpate NAN API documentation, clean-up visibility

Change-Id: I951340eebab35c10efe98dab86b58fe8efada169
(cherry picked from commit 2e37b06dde2dff019b9143fc6b61021dab79bda3)

7 years ago[NAN] Do not expose WifiManager.isNanSupported as new API
Etan Cohen [Tue, 19 Apr 2016 17:55:56 +0000 (10:55 -0700)]
[NAN] Do not expose WifiManager.isNanSupported as new API

The WifiManager.isXxxSupported() only functions if HAL is enabled
and seems to be a duplicate of:

PackageManager.hasSystemFeature(PackageManager.FEATURE_WIFI_NAN)

Bug: 28251988
Change-Id: I8f410def6f0bd3d3fc0926072ab66acce52a0e14
(cherry picked from commit a3264c4e3d08d38b08ab0c1c92341cb9cc8f29f8)

7 years ago[NAN] Update finalize to check and warn user if resources not freed
Etan Cohen [Thu, 11 Aug 2016 21:23:23 +0000 (14:23 -0700)]
[NAN] Update finalize to check and warn user if resources not freed

Use CloseGuard to check that disconnect() is called to free the resources
allocated by connect(). finalize() will still call disconnect() but now
also print out errors (if StrictMode enabled for feature).

Bug: 28068773
Change-Id: I5f5847c0261ef9f79a21fdb935509a85761591cc
(cherry picked from commit 9d55649613f6ea9926c6e6222965178e91cb501b)

7 years ago[NAN] Fix bad merge use rethrowFromSystemServer
Etan Cohen [Tue, 16 Aug 2016 18:54:49 +0000 (11:54 -0700)]
[NAN] Fix bad merge use rethrowFromSystemServer

Added 'throw' to the 'e.rethrowXXX()'. Not needed but seems
to be the accepted style.

Change-Id: I75e42d68ee6092699a55e26ee05151373139606d
(cherry picked from commit cb34ec8f3a8dd40f7c49181b008de7314735ca66)

7 years agoAdd Log.wtf when transitionTo is used improperly
Mitchell Wills [Thu, 11 Aug 2016 18:05:03 +0000 (11:05 -0700)]
Add Log.wtf when transitionTo is used improperly

Using transitionTo in exit/enter (except in the terminal state) is
documented as undefined behavior and may cause unexpected results.
The current implementation appears to finish the current transition and
then transition to the new target state.

TEST=flash and play with the phone, no sign of immediate WTFs

Change-Id: I38a34b85c43d53c51514339587fc1269a069a454
(cherry picked from commit 8d3ed21583a8d83047cee1735cf669e131809e73)

7 years agoEnsure BSSIDs are correctly aged out in settings view
Mitchell Wills [Wed, 10 Aug 2016 20:49:21 +0000 (13:49 -0700)]
Ensure BSSIDs are correctly aged out in settings view

When verbose logging is on, recent BSSIDs are displayed under the
network. This ensures that the BSSIDs are aged out after a period of
time instead of based on a fixed size LRU cache. This prevents BSSIDs
that are no longer present from appearing in the results.

FIXED=30711015
TEST=setup two APs, observe both BSSIDs in settings, turn off one,
     observe it disappearing after a short period of time.

Change-Id: Id2b2ccd0899eae8d4e2e1c2b3ae9409136a8c948
(cherry picked from commit b744d6e865e4141cd19cdf279f75f30c3d6590af)

7 years ago[NAN] Provide calling package name to service
Etan Cohen [Thu, 11 Aug 2016 16:31:21 +0000 (09:31 -0700)]
[NAN] Provide calling package name to service

Useful for permission checks.

Bug: 30000323
Change-Id: I8c7f06cff346437aa24ca5da9822cbd7b20c59c4
(cherry picked from commit 7531a28e2611039a8120305c14a96b8c61fff563)

7 years agoAdd WiFi toggle prompts - framework
Svetoslav Ganov [Wed, 27 Jul 2016 01:23:01 +0000 (18:23 -0700)]
Add WiFi toggle prompts - framework

If permission review is enabled toggling WiFi on or off
results in a user prompt to collect a consent. This applies
only to legacy apps, i.e. ones that don't support runtime
permissions as they target SDK 22.

bug:28715749

Change-Id: I020601e208c0736005bcabc7b7b77b96eee45b03
(cherry picked from commit d3663c04a721e0848dd3e9179c84ba585d91839d)

7 years agoReenable the unit tests for StateMachine
Mitchell Wills [Tue, 9 Aug 2016 20:33:20 +0000 (13:33 -0700)]
Reenable the unit tests for StateMachine

In order to make the tests run a few methods must be made public so that
they can be called from a class loaded by a different class loader.

Fixed: 28217358
Change-Id: I98ce1e952a78528ae6ebd3a0e843c9ddfe937337
(cherry picked from commit 36afe5b5cc000620d77150437ba21503c44c87eb)

7 years agoRemove WiFi related methods from NetworkManagementService
Christopher Wiley [Tue, 2 Aug 2016 18:38:57 +0000 (11:38 -0700)]
Remove WiFi related methods from NetworkManagementService

These are no longer necessary, since WiFi manages its own details.

Bug: 30041228
Change-Id: Ia3824da43367ae74d3f3a204318cfe5470d74957
Test: Compiles
(cherry picked from commit 212b95f587f4af637fb2429f29f7d0add1bd251f)

7 years agoDon't pull in external/junit through mockito
Mitchell Wills [Fri, 29 Jul 2016 00:04:38 +0000 (17:04 -0700)]
Don't pull in external/junit through mockito

android-support-test provides a different version of junit

FIXED=30481239

Change-Id: I6d8f52d5f82b4c9905da8cc4a6ca79216eba9e26
(cherry picked from commit d3868cfc63cd814e43367586f5706f39ec1cd5a9)

7 years agoWifiConfiguration: Expose NetworkSelectionStatus strings
Roshan Pius [Thu, 28 Jul 2016 17:13:21 +0000 (10:13 -0700)]
WifiConfiguration: Expose NetworkSelectionStatus strings

Make the status/disable reason string arrays public to be used in
XmlUtil for restoring of data.

BUG: 30448209
Change-Id: If8201df9397edcc4251e5b6aa4d613212fb576ad
TEST: Unit tests
(cherry picked from commit 23173a2efa45e5159a9b958e31cf345f8f0c2347)

7 years agoAdd Bluetooth toggle prompts - framework
Svetoslav Ganov [Thu, 30 Jun 2016 00:31:44 +0000 (17:31 -0700)]
Add Bluetooth toggle prompts - framework

If permission review is enabled toggling bluetoth on or off
results in a user prompt to collect consent. This applies
only to legacy apps, i.e. ones that don't support runtime
permissions as they target SDK 22.

Also added a configuration resource which controls whether
permission review mode is enabled. By default it is not and
an OEM can change this via an overlay. For now we also keep
the old mechanism to toggle review mode via a build property
which is still used and will be removed when clients have
transitioned.

bug:28715749

Partial cherry-pick of core/res/res/values/{config,symbols}.xml only
Change-Id: I94c5828ad6c8aa6b363622a26ff9da4fc2e2fac7
(cherry picked from commit ac69be543f89ea6e9a27204492e0a170d9b3450e)

7 years ago[NAN] Add LV utilities (TLV with T size of 0).
Etan Cohen [Mon, 18 Jul 2016 20:43:17 +0000 (13:43 -0700)]
[NAN] Add LV utilities (TLV with T size of 0).

NAN uses LV (not TLV). Expose an LV variant of TLV to make API
cleaner.

Bug: 30096512
Change-Id: I74b4c514d50f1df5750b521bd68a5e2d832d92c3
(cherry picked from commit 009b1fcb85ab8f8eb4ab5f3e125127b449df77cb)

7 years ago[NAN] Fix TlvElement member names - reflect public access.
Etan Cohen [Mon, 18 Jul 2016 18:39:28 +0000 (11:39 -0700)]
[NAN] Fix TlvElement member names - reflect public access.

Bug: 30096512
Change-Id: Ic2ab61e891bead6f6e8f13d9ac311ead8fecba5b
(cherry picked from commit e40b4d344e7e4529016fefe9f06f478504949706)

7 years agoTetherUtil: Use ConnectivityManager for tethering
Christopher Wiley [Thu, 14 Jul 2016 02:36:03 +0000 (19:36 -0700)]
TetherUtil: Use ConnectivityManager for tethering

In the past, enabling the SoftAP would cause tethering to happen because
of some unfortunate side effects.  This is no longer the case, and
using WifiManager for this purpose is not a good idea.

Bug: 30147602
Test: Can toggle tethering on/off via all of settings, quick settings,
      and quick quick settings.

Change-Id: Iebbfc6c48b3e8e3fa52d235594ded3502f5801a3
(cherry picked from commit 26bd4efcaaad4a866310d6421909645e81167d1f)

7 years ago[NAN] TLV utilities iterator - throw correct exception
Etan Cohen [Mon, 18 Jul 2016 17:37:20 +0000 (10:37 -0700)]
[NAN] TLV utilities iterator - throw correct exception

Make sure that iterator.next() validates that next element exists -
otherwise throw the exception specified by the interface.

Bug: 30096512
Change-Id: I327da433e3f1181e272c81ee503cbe8aab323f7e
(cherry picked from commit 3e5ac12302a78216e706be239dceb5175646bea0)

7 years ago[NAN] Modify arguments from "array, length" to "array"
Etan Cohen [Fri, 15 Jul 2016 22:28:39 +0000 (15:28 -0700)]
[NAN] Modify arguments from "array, length" to "array"

Arrays carry their own lengths. There's no need to provide mechanism
to 'shave' the array - could be done explicitly by caller if needed.

Bug: 29617160
Change-Id: Ib135aa04145f400163cd1a8908dfca4590b4480d
(cherry picked from commit 0a5b7efcb20d2a57c990f11469580edb41a976d6)

7 years ago[NAN] NAN System Api: RTT
Etan Cohen [Thu, 14 Jul 2016 20:27:58 +0000 (13:27 -0700)]
[NAN] NAN System Api: RTT

Modify visibility of startRanging [NAN RTT] to SystemApi. Matches the
visibliity of the RttManager API.

Change-Id: Ia92de9885d0b38dfce74484f437bd122dd53cbf6
(cherry picked from commit ab9ef45971fc41bc078ad1362845309ef02f62f9)