252137 Commits

Author SHA1 Message Date
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
Sergio Giro
23d2e40334 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
2016-09-01 17:24:40 +00:00
Sergio Giro
94adef75af java.security.Provider: port to jdk8u60 (second part)
- Add overridings for HashMap operations

Provider is a subclass of HashMap. When operations are on
Strings, they must be processed as part of the
algorithm->implementation mapping of the provider, and
so these methods must be overriden accordingly.

Newly overridden Methods added are:

compute, computeIfAbsent, computeIfPresent, getOrDefault,
merge, putIfAbsent, replace, replaceAll.

- Check that classes and constructors are public when
creating instances of services.

- Cosmetic changes like use of {@code} instead of <code>

Bug: 29631070
Test: make droid docs; vogar ProviderTest
Change-Id: I0238f4a48f31ddc50a3f18c27515023940d9ba02
2016-09-01 18:19:50 +01:00
Neil Fuller
47784a790b Merge "Track exposure of new j.l.reflect methods" 2016-09-01 13:15:52 +00:00
Sergio Giro
2cab523ef2 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
2016-09-01 12:49:07 +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
Chih-Hung Hsieh
a619ec70cf 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
2016-08-29 14:56:58 -07:00
Chih-Hung Hsieh
ae1aadc04f Fix google-explicit-constructor warnings in soundpool.
* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: Id1183b2929242cdf1fd0a1558d0e70194a1de9bb
2016-08-29 14:53:50 -07:00
Chih-Hung Hsieh
6d09d547b0 Fix google-explicit-constructor warnings.
* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: Ic550902559b0800bdcfc0b1d301313a909434eed
2016-08-29 14:51:31 -07:00
Chih-Hung Hsieh
bd6b663b47 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
2016-08-29 14:47:52 -07:00
Chih-Hung Hsieh
a6543289f5 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
2016-08-29 14:46:35 -07:00
Mitchell Wills
b0b6afc248 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.
2016-08-29 20:03:22 +00:00
Felipe Leme
bb205d5e3e Merge "Fixed statuses on Battery Saver column."
am: 21e0701f76

Change-Id: I4125ff3ad049ef2717fe12ba7ca62d99bf9bd3c5
2016-08-29 18:44:28 +00:00
Felipe Leme
21e0701f76 Merge "Fixed statuses on Battery Saver column." 2016-08-29 18:32:27 +00:00
Felipe Leme
bd1a93a721 Fixed statuses on Battery Saver column.
BUG: 30139400

Change-Id: I1798607af13c9be5e1f21212fd7078f7152562bd
(cherry picked from commit 9e325706f42a1dc48abe80a24323fae4579ab033)
2016-08-29 11:27:16 -07:00
Roshan Pius
521c66e73c NetworkSelectionStatus: Fix copy constructor
Add couple of missing elements in the NetworkSelectionStatus copy constructor.

BUG: 31102798
Change-Id: Ie5f3719b94acf021d4ae2756afd635388640168c
(cherry picked from commit 699680b6b4fb923e4129d678013e3fbbc0421eaa)
2016-08-29 11:26:57 -07:00
Randy Pan
22de5aaca9 Deprecate QNS network disable reason BAD_LINK
WifiNetworkAgent#unwanted no longer disables the network.

Bug: 28558417
Change-Id: I2e7ed99ae4cb952f124c673376d967eeee2b4ece
(cherry picked from commit 4156d615707a7aa27ecaf55c889824fd025a75b5)
2016-08-29 11:26:57 -07:00
Etan Cohen
b81c35f54b [NAN] API changes/fixes addressing apilint issues
Bug: 30983968
Change-Id: I2189442755380ad5d04f80bcb5978ca0c28e6420
(cherry picked from commit 9825309424cab3a3efabac0bde79b3c1419f9be9)
2016-08-29 11:26:56 -07:00
Etan Cohen
30a472e6b3 [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)
2016-08-29 11:26:56 -07:00
Etan Cohen
b6701faaf0 [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)
2016-08-29 11:26:55 -07:00
Etan Cohen
b0214c4cd5 [NAN] Udpate NAN API documentation, clean-up visibility
Change-Id: I951340eebab35c10efe98dab86b58fe8efada169
(cherry picked from commit 2e37b06dde2dff019b9143fc6b61021dab79bda3)
2016-08-29 11:26:55 -07:00
Etan Cohen
28035d98f0 [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)
2016-08-29 11:26:54 -07:00
Etan Cohen
fd11ec1576 [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)
2016-08-29 11:26:54 -07:00