1611 Commits

Author SHA1 Message Date
Roshan Pius
651b264b3d WifiConfiguration: Correct documentation for priority
Addressing the concerns raised by API council for deprecating this
field.

Bug: 35854198
Test: make update-api
Change-Id: If9ca582f5d3bd8539a226b425662832241a447cc
2017-03-17 08:44:06 -07:00
Roshan Pius
cbd0c76ad0 WifiConfiguration: Update psk documentation
Adding some documentation to explain the expected contents of this
field.

Bug: 35967623
Test: make update-api
Change-Id: Ia28e2c79834c4d7b0de7350c18d5f32633e6309d
2017-03-17 08:40:17 -07:00
Treehugger Robot
2d87679a11 Merge "wifi: add a flag indicating legacy Passpoint configuration" 2017-03-16 23:20:45 +00:00
Roshan Pius
8b549c9539 Merge "WiFi: Wifi service get configured networks use ParceledListSlice." 2017-03-15 20:34:33 +00:00
Treehugger Robot
6493f3df6b Merge "hotspot2: update documentation for WifiManager#queryPasspointIcon" 2017-03-14 22:45:57 +00:00
Peter Qiu
3efd531e2f hotspot2: update Passpoint configuration management APIs
Address API Councils comment to update both
WifiManager#addOrUpdatePasspointConfiguration and
WifiManager#removePasspointConfiguration to return void and throw
exception on failure instead of returning a boolean.

Bug: 35858311,35856174
Test: make -j32
Change-Id: Iac421eba7aa90e8bc3ffaf5d81210302c7557e95
Merged-In: Iac421eba7aa90e8bc3ffaf5d81210302c7557e95
2017-03-13 11:21:14 -07:00
Peter Qiu
b5ca6f36b5 hotspot2: hide validate method for Passpoint configuration
The validate method is used by Framework only, no need to expose
to app developers. So hide it.

Bug: 35756298
Test: make -j32
Change-Id: I15ccae472f30d7ae968816479f6ea35d90248fe0
Merged-In: I15ccae472f30d7ae968816479f6ea35d90248fe0
2017-03-13 11:21:13 -07:00
Peter Qiu
5679145d9a hotspot2: update Passpoint intent definitions
Address API Councils comment on the newly added intent definitions
for Passpoint events:
- Use a Parcelable class to represent icon info
- Document all extras that are included for an action
- Document that the new intents will only be sent to registered
  receivers, and not manifest receivers
- Rename extras to be more generic

While there, removed the deprecated hidden Passpoint intent
definitions.

Bug: 35857805
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I22de2d52fce3ed1adc8d72bf1580d3337bc747c5
Merged-In: I22de2d52fce3ed1adc8d72bf1580d3337bc747c5
2017-03-13 10:39:04 -07:00
zhangshuxiao
ec19db6bd4 WiFi: Wifi service get configured networks use ParceledListSlice.
The number of configurations will be more and more, some
users configured more than 600KB or even 1M, It will cause
the binder failed. Therefore, we use ParceledListSlice
to splits into multiple transactions when more than 64K.

binder: 1885: binder_alloc_buf size 1058080 failed, no address space

Test: more than 500 configurations.

Change-Id: I35b8bac478c6d9efa2fb8572fdc7ca22eb910609
Signed-off-by: zhangshuxiao <zhangshuxiao@xiaomi.com>
2017-03-13 14:38:37 +00:00
Peter Qiu
580a1bdfbc wifi: add a flag indicating legacy Passpoint configuration
Bug: 36101691
Test: make -j32
Change-Id: I42df3160be9b2b863fededc1641482e5a39084e5
2017-03-10 13:56:33 -08:00
Etan Cohen
3a764c19d1 [AWARE] Update network API: make open/encrypted explicit
Replace the older (implicitly) open network with 3 network
creation APIs:
- Open
- Passphrase-based
- PMK (SystemApi only)

Bug: 26564544
Bug: 35702875
Test: unit tests and integration (sl4a) tests
Change-Id: I29a1d668d245853755cd2dfaaa6c65fbb43989f7
2017-03-08 09:11:21 -08:00
Etan Cohen
62a2f9f6ab [AWARE] Add data-path security configuration (Passphrase)
Add API to optionally provide a passphrase to
configure security on a data-path.

Bug: 33552694
Test: unit tests and integration (sl4a) tests
Change-Id: Ie011345348a3918a412957e38610cabe147c35fa
2017-03-07 19:07:14 -08:00
Peter Qiu
16034c6903 hotspot2: update documentation for WifiManager#queryPasspointIcon
Address API Councils comment on documentation for
WifiManager#queryPasspointIcon.

Bug: 35845899
Test: None
Change-Id: Ia8fe0f8203482f8b8f410081f06b580e8fdbac46
2017-03-06 09:55:41 -08:00
Treehugger Robot
6ac19c0d23 Merge "wifi: WifiConfiguration: update documentation for isHomeProviderNetwork" 2017-03-03 19:02:28 +00:00
Treehugger Robot
603fb2ef56 Merge "hotspot2: expose string constants for cert type and auth methods" 2017-03-02 22:11:01 +00:00
Peter Qiu
f7303ba18e wifi: WifiConfiguration: update documentation for isHomeProviderNetwork
Address API Councils comment on documentation for isHomeProviderNetwork
field.  Specifically, the expected value for this field for non-Passpoint
network configuration.

Bug: 35855359
Test: make -j32
Change-Id: Ie6cdcc39c5156dccc14ed144e58a6d2f201aef17
2017-03-01 16:06:55 -08:00
Peter Qiu
f8dbd216c8 hotspot2: expose string constants for cert type and auth methods
So that we can use these constants in WifiService and the apps
as well in the future.

While there, remove auth method "CHAP" from the supported list,
since it is currenlty not supported by WifiService.

Bug: 34206769
Test: make -j32
Change-Id: Icadc3b13f2b135d51445d336116fbba86e96b70f
2017-03-01 16:05:52 -08:00
Treehugger Robot
2142b14a88 Merge "Fix up EAP-SIM documentation" 2017-03-02 00:01:33 +00:00
Paul Stewart
906a077cf8 Fix up EAP-SIM documentation
Address API Council comments on doucmentation for the method calls
and constants related to EAP-SIM.  While here, improve unit tests
to ensure that passing a null certificate (chain) causes the config
to forget any existing client certificates.

Bug: 35847887
Test: Unit tests

Change-Id: I1c4e18e1a7cfb61aa4764e32778793368938e70b
2017-03-01 14:02:28 -08:00
Etan Cohen
954111a252 [AWARE] Add data-path security configuration (PMK)
Add API to optionally provide a pairwise master key (PMK)
to configure security on a data-path.

Clarify the default API to mean open (unencrypted) data-path.

Bug: 33552694
Test: unit tests and integration (sl4a) tests
Change-Id: I43fe704547f2921b3207f215e42d253837aa04e9
2017-03-01 07:35:35 -08:00
Etan Cohen
7c9c4785fc [AWARE] Remove (hide) sendMessage with retryCount API
Remove the sendMessage(..., retryCount) API (the version
without retryCount) remains. Baseline API already retries
transmissions (at the PHY/MAC layers) - no reason to add
framework-layer retries.

Bug: 35755823
Test: unit tests and integration (sl4a) tests
Change-Id: I49d8bd1e836c09d56f3a9343313f5647eac5c32d
2017-02-24 14:17:51 -08:00
Amin Shaikh
d6a62ed405 Fix failing WifiConfigManagerTest test.
Bug: 35671673
Test: runtest frameworks-core frameworks-wifi
Change-Id: I55ff41464cabfb97d03a0758d73145df808ec2c8
Merged-In: I55ff41464cabfb97d03a0758d73145df808ec2c8
2017-02-23 10:29:10 -08:00
Amin Shaikh
a70bc57ef9 Add a disabled reason for recommendation providers
Display a message indicating that a saved networks has not been
automatically connecting due to low quality if
WifiConfiguration#mNotRecommended is set.

Bug: 34745259
Bug: 35671673
Test: m RunSettingsLibRoboTests && runtest frameworks-wifi
Change-Id: I275e2711da68715fb6d92bf954e9f58a3386b1f4
Merged-In: I275e2711da68715fb6d92bf954e9f58a3386b1f4
2017-02-22 15:18:28 -08:00
Etan Cohen
647f2e1493 Merge "[AWARE] Remove enableUsage/disableUsage API" 2017-02-17 21:33:40 +00:00
Etan Cohen
6bb624a532 [AWARE] Add discovery window period configuration
Discovery window period configuration modifies the duty cycle of
the Aware discovery session. Allowing trade-offs of discovery
latency vs. power.

Add the configuration.

Note: the whole ConfigRequest object is not public (at this point)
so by default so is the new configuration.

Bug: 33552536
Test: unit tests and integration (sl4a) tests.
Change-Id: I16f5c084dbc91431763a81de0a3adfe6f452e44c
2017-02-16 18:38:23 -08:00
Etan Cohen
416d6fba17 [AWARE] Remove enableUsage/disableUsage API
The APIs (never public) were provided for indirect access to enable
or disable Aware usage. No longer necessary.

Bug: 35435032
Test: unit tests and integration (sl4a) tests
Change-Id: Ia5c2b8aed8dd908f49b5e4f42a77feed3cda946c
2017-02-16 14:13:42 -08:00
Ningyuan Wang
fb19d8d7c1 Merge "Create createFromByteArray() for WifiSsid" 2017-02-14 02:13:34 +00:00
Ningyuan Wang
a6ea570a4a Create createFromByteArray() for WifiSsid
Bug: 35318006
Test: compile, unit tests
Change-Id: I0138bd67c0dec37419897318401b18ee4445a111
2017-02-13 15:40:19 -08:00
Treehugger Robot
d3146f3c3c Merge "hotspot2: fix typo in the getter functions" 2017-02-13 19:49:51 +00:00
Paul Stewart
e613fccb56 Allow EAP-SIM authentication methods under PEAP
Extend the PEAP outer method to contain EAP-SIM innner methods
so these transactions can be encrypted.

Cherry-pick of 68c63024c2ace87921c1e84a99d18dae6001c74c

Bug: 34835771
Test: Unit tests

Change-Id: I4931ed43e396c93bad0bfce1750291982f8cd146
2017-02-10 16:15:52 -08:00
Peter Qiu
701a4b55c9 hotspot2: fix typo in the getter functions
Bug: 34862444
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: If833fb06cead7df9d631b3b12d66d05b8422d46c
Merged-In: If833fb06cead7df9d631b3b12d66d05b8422d46c
2017-02-08 20:59:02 +00:00
Roshan Pius
fb441f5009 WifiManager: API upates for O
Deprecate the following API's:
1. pingSupplicant() - We don't want apps trying to figure out if
wpa_supplicant is running or not. It should not be something that
apps need to know.
2. saveConfiguration() - No longer needed, we automatically persist data
when needed.

Other changes:
1. Reworded the docstrings to remove direct reference to wpa_supplicant
for network configuration related API's.
2. We no longer allow apps to modfiy network configuration of other
apps. Added a docstring explaining that in the 3 modify API's.
3. Changed the wording of enableNetwork's |disableOthers| flag.

Bug: 31146757
Test: make update-api
Change-Id: If970d85146de3532072191cb2b7ecb0d5adb2774
2017-02-08 08:51:26 -08:00
Roshan Pius
45491113ed WifiConfiguration: Remove priority field
This field is no longer used anywhere within wifi framework and hence
removing this from public API.

Bug: 28341078
Test: make update-api
Change-Id: I5bd115742ca610735b00c20f2ffab7590c5f3256
2017-02-08 08:50:29 -08:00
Peter Qiu
bffe405e1f hotspot2: expose Passpoint APIs as public
Bug: 34862444
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: I8bf5c715b9088c673e59a73a78e18f6e6b64d1d1
2017-02-07 13:34:47 -08:00
Peter Qiu
da8a67e8a6 hotspot2: fix class/function/variable names to comply with API guideline
Bug: 34862444
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworsk/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ide425c06be46bc41c8f601e732dca0543de096b1
2017-02-07 13:34:46 -08:00
Peter Qiu
a77809766c hotspot2: rename classes to comply with API guideline
This is purely a file rename operation.

Bug: 34862444
Test: None
Change-Id: I297a228f3ee7e09c9cce5ca9f677eb1db478fd46
2017-02-07 13:34:46 -08:00
Treehugger Robot
e724f82b3d Merge "wifi: WifiConfiguration: add isHomeProviderNetwork field" 2017-02-02 19:29:53 +00:00
Treehugger Robot
2ac992fcad Merge "hotspot2: implement hashCode() for classes with equals() function" 2017-02-01 03:12:13 +00:00
Treehugger Robot
cf7f9dd6a1 Merge "Print the package name and creator UID in dump()." 2017-02-01 02:41:00 +00:00
Jeremy Joslin
711efaccd2 Print the package name and creator UID in dump().
Add a little more info to help differentiate the registered score
caches during a dump.

Test: adb shell dumpsys network_score
Change-Id: I59cb877b3237aaa85cb564795fb8a41c3d95e315
2017-01-31 14:48:01 -08:00
Peter Qiu
ddafc73496 hotspot2: implement hashCode() for classes with equals() function
According to API guideline, classes that override equals()
function should override hashCode() as well.  Make it so.

Bug: 34198926
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I4c3afed78a2fc06cdc26dd04d076f579b3472139
2017-01-31 13:26:36 -08:00
Peter Qiu
aef5b6095f hotspot2: update PasspointConfiguration APIs
Based on the API guideline, use of public variables are discouraged.
So update PasspointConfiguration and its associated classes to use
private variables with public accessor methods.

While there, cleanup unit tests to reduce code duplications.

Bug: 34627062
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I6ea45bbcf03aec01c187425a66094fad6098d75d
2017-01-31 13:26:36 -08:00
Peter Qiu
04959d48e1 wifi: WifiConfiguration: add isHomeProviderNetwork field
This is a boolean field indicating if the given WiFi network is provided
by a Passpont home provider. This is useful for the Passpoint provisioning
app to determine if the current WiFi connection is allowed to perform
Passpoint subscription or policy updates when it needs to.

This field will be set by PasspointNetworkEvaluator when generating
a WifiConfiguration for a Passpoint network.

Bug: 34467212
Test: make update-api; make -j32
Change-Id: Ia8ec2508de9658a9ee520087359ff2cd68091b63
Merged-In: I47310cda078cbf1f2d1b0a9bf79f487230fb668f
2017-01-31 11:43:14 -08:00
Treehugger Robot
161ac8b006 Merge "hotspot2: enclose conditional statement in parenthesis" 2017-01-31 18:12:57 +00:00
Peter Qiu
55078c4fa8 hotspot2: enclose conditional statement in parenthesis
Couple unit tests are failing due to conditional statements
not enclosed in the parenthesis, which causes unexpected
returned value for the equals function.  So fix it.

Bug: 34764955
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Iaf0151803cb62eb8af308e5de40558617f84cd2f
2017-01-30 17:47:53 -08:00
Etan Cohen
275f323e86 [AWARE] Minor hardening of manager.
Callbacks are possible even if no listener was defined.
Perform a check and print error (as opposed to crashing).

Bug: 32315992
Test: unit-tests + integration tests passing
Change-Id: Ia5eb81448ace6b88abcd448e4f378da6530ac630
2017-01-30 13:09:41 -08:00
Treehugger Robot
c71b5dab72 Merge changes from topic 'enterprise-client-chain'
* changes:
  Test passing null cert/keys to WifiEnterpriseConfig
  Account for null client certificate
  Add a client chain to WifiEnterpriseConfig
2017-01-28 01:38:31 +00:00
Paul Stewart
88b3c589ad Test passing null cert/keys to WifiEnterpriseConfig
Ensure that null certificates and keys don't crash.

Bug: 34765004
Test: This is a test
Change-Id: I439b4f985c1b88ad4a9b58ee6f4eb4f90bd81246
2017-01-27 12:48:55 -08:00
Paul Stewart
1ca57a1d10 Account for null client certificate
If a null certificate is passed to setClientKeyEntry() we should
not pass a non-null array with a single null element to the
setClientKeyEntryWithCertificateChain helper method.  Instead we
should pass a null array.

Cherry-pick of 410a3498ac28dccf69212d94a533040893c7ce0c

Bug: 34765004
Test: cts-tradefed run cts -d --module CtsNetTestCases --test android.net.wifi.cts.WifiEnterpriseConfigTest
Change-Id: I02793b4b29bc7325f98833c58bf652ba68353827
2017-01-27 12:47:20 -08:00
Paul Stewart
291ddaef78 Add a client chain to WifiEnterpriseConfig
Add a list of supporting certificates to be presented in the process
of presenting client credentials.

Cherry-pick of e3511767169357a1409119b5666c62d50e005583

Bug: 34688653
Test: Compile, unit tests
Change-Id: I6afd8baf67312e8ddaaeefd26f30dacc51aa33bb
2017-01-27 09:46:27 -08:00