Commit Graph

2655 Commits

Author SHA1 Message Date
TreeHugger Robot
7d90b419bf Merge "WifiManager: setWifiEnabled bypass for older apps" 2019-04-02 19:19:10 +00:00
Roshan Pius
8a277663ab WifiManager: setWifiEnabled bypass for older apps
For apps targeting older SDK (<Q), preserve the old behavior for
setWifiEnabled.

Bug: 129549163
Test: Compiles
Change-Id: I4a2e89cfa1c1ac612a679ecab6a2d526a987f7c0
2019-04-01 11:16:08 -07:00
xshu
0fa11fe4fc new WifiConfiguration @hide API to get SSID + SecurityType
Refactor for server side usage.
There is no funcational change.

Bug: 128911090
Test: unit tests
Change-Id: I84983d095ec70ba41325736f95235f09ece2c494
2019-03-29 12:39:13 -07:00
Roshan Pius
f348c9a783 Merge "WifiNetworkSuggestion: Change the polarity of priority" 2019-03-26 18:34:56 +00:00
Roshan Pius
01f9b47101 Merge "Revert "WifiConfiguration: Add a new temp blacklist reason for disconnect"" 2019-03-25 13:56:27 +00:00
Hai Shalom
f8865bd2d8 Merge "[WPA3] Initialize Suite-B ciphers correctly based on the CA cert type" 2019-03-24 16:46:58 +00:00
TreeHugger Robot
4c2ec4c89c Merge "RTT LCI API *MINOR UPDATE2* (Client Side) - removing two LCI methods Based on discussion with IEEE 802.11 WG these are not necessary for RTT." 2019-03-22 23:23:21 +00:00
Roshan Pius
33798c7793 Revert "WifiConfiguration: Add a new temp blacklist reason for disconnect"
This reverts commit 506a9b9517.

Bug: 126503889
Reason for revert: UI changes was punted to R. No rationale in making this API changing behavior now.

Change-Id: Ia8ccacc383cdb6db7520657a46d77bc1154f8569
2019-03-22 22:33:39 +00:00
Roy Want
50f6c6f36b RTT LCI API *MINOR UPDATE2* (Client Side) - removing two LCI methods
Based on discussion with IEEE 802.11 WG these are not necessary for RTT.

Bug: 111439464
Test: All unit tests pass; end-to-end tests pass.
Change-Id: I78adc0257cf65cfad9698f3d43342d5404d790e5
2019-03-22 16:40:33 +00:00
Kai Shi
555ae2e92e Wifi Usability: address comments from API review council
Rename getIsSameRegisteredCell() to isSameRegisteredCell().

Bug: 128919394
Test: wifi unit test with frameworks/base/wifi/tests/runtests.sh
Change-Id: I3549d9abbaba87971ea3c0a9edf4351289731912
2019-03-22 15:19:54 +00:00
Hai Shalom
90147e3222 [WPA3] Initialize Suite-B ciphers correctly based on the CA cert type
Initialize Suite-B ciphers correctly based on the CA cert type. Read the
cert type from key store, parse it and get the signature algorithm.
Enforce SHA384, and initialize AllowedSuiteBCiphers based on the
certificate type: RSA or ECSDA.

Bug: 128861164
Test: Verify Suite-B initialized correctly with RSA and ECDSA certs.
Test: Associate to SUITE_B_192 AP.
Test: atest WifiNetworkSuggestionTest
Change-Id: Ia9b8460caa586f695ed7aab3507ddeb4ecb8c3f3
2019-03-21 13:41:32 -07:00
Etan Cohen
d7c6a26a87 Merge "[AWARE] Update Aware NetworkSpecifier API per API council feedback" 2019-03-21 15:54:02 +00:00
Roshan Pius
fd2df95522 WifiNetworkSuggestion: Change the polarity of priority
The current ordering of priority is hard to handle inside the wifi
stack because "-1" was unassigned priority and 0 is considered the
higheest priority level.
Reverse the polarity so it's much easier to compare network
suggestions with different priorities such that
priority1 > priority2 is always true. unassigned priority will always
be lesser than any assigned priority value.

Bug: 127644378
Test: Compiles
Change-Id: I74dacdb85838250c242257a80ebbe6046cef752f
2019-03-20 11:21:10 -07:00
Etan Cohen
28b6d6a936 [AWARE] Update Aware NetworkSpecifier API per API council feedback
API council feedback:
- Move required builder methods to the constructor
- Add IntRange to port and transport protocol APIs

Bug: 128904106
Test: atest android.net.wifi.aware
Test: atest com.android.server.wifi.aware
Test: CtsVerifier Aware tests
Change-Id: I9bc978732caeada792e997bdd6263a53efdf7071
2019-03-20 07:37:32 -07:00
Kai Shi
06d82fb327 Merge "Wifi usability: add four new fields to report the latest celluar signal strength" 2019-03-19 16:39:48 +00:00
Hai Shalom
e6f3e214e3 Merge "[Wi-Fi] Do not delete certs when forgetting network" 2019-03-18 22:38:48 +00:00
Andrew Solovay
d13ac3c727 Merge "docs: Fixing {{ in code comment (which makes devsite publish choke)" 2019-03-18 21:14:49 +00:00
Mingguang Xu
e5f7947773 Merge "Wifi usability: Add expected range for Wi-Fi usability score" 2019-03-16 06:02:02 +00:00
Mingguang Xu
4fc47c2b80 Wifi usability: Add expected range for Wi-Fi usability score
In addition, fix a couple of typos in documentation.

Bug: 126391553
Bug: 126699865
Bug: 113262380
Bug: 128675382

Test: frameworks/base/wifi/tests/runtests.sh

Change-Id: I4c8d73f66f7d2d424bef3699dfc889e342621b02
Signed-off-by: Mingguang Xu <mingguangxu@google.com>
2019-03-15 15:52:08 -07:00
Andrew Solovay
68bec891b4 docs: Fixing {{ in code comment (which makes devsite publish choke)
One of the code samples in a Javadoc comment contains a {{ ;
this gets interpreted as a Django directive by our docs publish tool
(go/devsite2cmd), which results in a syntax error. We verified
(http://cl/238522152 ) that escaping one of the {s resolves the
issue.

Tested by building the docs and staging to:

http://go/mivi-stage/reference/android/net/wifi/WifiNetworkSuggestion.Builder

Bug: 128536865
Test: make ds-docs
Change-Id: I70a3e0481ad195665c878c72d0ec6b1ccbbf958f
Exempt-From-Owner-Approval: Doc-only change
2019-03-15 14:37:27 -07:00
Hai Shalom
ae8eb88f2f [Wi-Fi] Do not delete certs when forgetting network
Deleting EAP Wi-Fi configuration deletes shared credentials used by other
configs. To resolve this issue the following changes were implemented:
1. When manually adding Wi-Fi certs from storage, Wi-Fi will not attempt
to delete them when network is removed.
2. When apps use WifiEnterpriseConfig#setClientKeyEntry to add certs,
they will be deleted if the network is removed.
3. Allow the user to delete Wi-Fi certs the same way that allows the
user to add them. Make the "Remove" option available, and implement key
store removal in settings.

Bug: 30248175
Test: atest WifiEnterpriseConfigTest
Test: Load certs, remove certs from credentials menu
Test: Load cert, create 2 EAP networks that use it, forget one network
Change-Id: I5bb1a1e02437b4db4a9c0a289acc074c30a786ab
2019-03-15 13:47:02 -07:00
Roshan Pius
506a9b9517 WifiConfiguration: Add a new temp blacklist reason for disconnect
Also, added a constant to indicate the start of the permanent
blacklist reasons.

Bug: 126503889
Test: Compiles
Change-Id: I4ba1dc5377bffe34a9f236c0698c36cbf34969a9
2019-03-14 07:51:56 -07:00
Roshan Pius
35a659febd WifiManager: Fix javadocs
Bug: 128536865
Test: make docs
Change-Id: I263b66e989b2d2240e25cac31c00fc3b8a3f5a3d
2019-03-14 07:51:56 -07:00
Roshan Pius
198fa8adbf WifiNetworkSpecifier/Suggestion: Address API council comments
Modified builder methods to:
a) Add boolean input for all boolean setters.
b) Add a public value for unassigned priority and added IntRange
annotation.

Bug: 128317241
Bug: 128317186
Test: Compiles
Test: ./frameworks/base/wifi/tests/runtest.sh
Change-Id: Iaf9d26ed857fe9337d3e4006c9c894efbcfa32dd
2019-03-14 07:51:25 -07:00
Ahmed ElArabawy
8fb283da77 Wifi: Update to the WifiLock API documentation
This commit provides an update to the WifiLock types API documentation.
It adds the condition of the device to be connected to an access point
for lock to be active. This applies to both high perf and low latency
locks.

Bug: 127884567
Test: None
Change-Id: If65681939058a5d6508cf0a970517fa856cc04b3
2019-03-13 14:08:42 -07:00
TreeHugger Robot
8494e74f19 Merge "api-review: add @Nullable annotation in the argument of getMatchingOsuProviders" 2019-03-13 05:52:21 +00:00
Kai Shi
dfef383995 Wifi usability: add four new fields to report the latest celluar signal
strength

cellularDataNetworkType
cellularSignalStrengthDbm
cellularSignalStrengthDb
isSameRegisteredCell

Bug: 123095038
Test: Unit tests for Wifi: frameworks/base/wifi/tests/runtest.sh

Change-Id: I090e2ab1a327894dfc84e6ce880e887311e1df7d
2019-03-12 15:42:29 -07:00
Ecco Park
8b0c0723c5 api-review: add @Nullable annotation in the argument of getMatchingOsuProviders
Bug: 126702500
Test: UnitTest
Change-Id: I90314979ca1c9543c7646f1f6b9fcf5c65fd4577
Signed-off-by: Ecco Park <eccopark@google.com>
2019-03-12 13:53:20 -07:00
TreeHugger Robot
f53c33aa41 Merge "WifiManager: fix JavaDocs for SoftAP Start Failure" 2019-03-12 19:57:14 +00:00
Mingguang Xu
e05b0ec4da Merge "Wifi usability: Comments from API review council are addressed" 2019-03-12 18:21:08 +00:00
Quang Luong
1fc84caa29 Merge "Added Passpoint prefix to Passpoint related methods in WifiInfo" 2019-03-12 02:29:06 +00:00
David Su
1e13a6db46 WifiManager: fix JavaDocs for SoftAP Start Failure
JavaDocs are swapped for constants SAP_START_FAILURE_GENERAL and
SAP_START_FAILURE_NO_CHANNEL. Unswapping them.

Bug: 128333924
Test: compiles
Change-Id: I03163fcaa238bd218b8d6f78d8123dfb3e31a04f
2019-03-11 17:01:22 -07:00
Etan Cohen
07c6f4d4bd Merge "[AWARE] Move WifiAwareNetworkSpecifier Builder to its parent class" 2019-03-11 19:54:27 +00:00
Etan Cohen
0ccb0c81c7 [AWARE] Move WifiAwareNetworkSpecifier Builder to its parent class
Note: API only change - no functional changes

Move the Builder class and method which generates WifiAwareNetworkSpecifier
to the class it actually builds and have it return that type.

Per API council feedback to match standard builder patterns.

Bug: 126700127
Test: builds + make docs
Test: atest com.android.server.wifi.aware
Test: atest android.net.wifi.aware
Test: atest SingleDeviceTest (CTS)
Change-Id: If4d58e96b4a268df7afe58bc3d883b6c54ec889d
2019-03-10 18:15:31 -07:00
Etan Cohen
85a7b9fb47 [AWARE] Add annotations to ParcelablePeerHandle
Add annotations to ParcelablePeerHandle per API council feedback.

Bug: 126375748
Bug: 126701031
Test: atest android.net.wifi.aware
Change-Id: I60471659dd9dd267b10507d5fb5e7639b3c964c2
2019-03-10 16:38:19 -07:00
TreeHugger Robot
01458f27d9 Merge "p2p: change wildcard MAC address to 02:00:00:00:00:00" 2019-03-10 04:49:31 +00:00
Jimmy Chen
e009d0d5dc Merge "p2p: add annotation for WifiP2pManager public API" 2019-03-10 03:45:40 +00:00
Mingguang Xu
e77cabc488 Wifi usability: Comments from API review council are addressed
Addressed all comments from API review council:
1. Rename WifiUsabilityStatsListener to OnWifiUsabilityStatsListener.
2. Change the modifier of member variables in WifiUsabilityStatsEntry.java to private and use getters.
3. Document the unit of predicitonHoirzonSec and its expected range.
4. Add @ProbeStaus in probeStatusSinceLastUpdate.
5. Rename probeElapsedTimeMsSinceLastUpdate to
ProbeElapsedTimeSinceLastUpdateMs.
6. Marked @NonNull for Argument 3 in onWifiUsabilityStats.

Bug: 126391553
Bug: 126699865
Bug: 113262380

Test: frameworks/base/wifi/tests/runtests.sh

Change-Id: I20d9ad05dc0bb537b09006ca44a447401b3e1001
Signed-off-by: Mingguang Xu <mingguangxu@google.com>
2019-03-08 17:24:27 -08:00
Quang Luong
2a6cdc554e Added Passpoint prefix to Passpoint related methods in WifiInfo
Passpoint prefixes were added and changed getter methods to public API

Bug: 127544936
Test: atest AccessPointTest && atest WifiInfoTest
Change-Id: I445606e76352dfc445344109be735da4bbab12be
2019-03-08 17:16:38 -08:00
TreeHugger Robot
bf7934488f Merge "Add @Nullable/@NonNull to WifiManager APIs" 2019-03-08 15:19:28 +00:00
TreeHugger Robot
0e8f2456fe Merge "WifiNetworkSpecifier: Builder.build() returns WifiNetworkSpecifier" 2019-03-08 15:18:32 +00:00
David Su
6ef18c7d86 Add @Nullable/@NonNull to WifiManager APIs
Add @Nullable/@NonNull to WifiManager APIs

Bug: 126702500
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: Ied04a936ca50880376072801848fd3096b87d099
2019-03-07 11:46:01 -08:00
Jimmy Chen
37647805b6 p2p: add annotation for WifiP2pManager public API
Bug: 126702243
Test: Unit tests - atest FrameworksWifiTests
Test: Unit tests - atest FrameworksWifiApiTests
Change-Id: I3e0d80902a6d03d4fe4efe18695047b1c70ac13d
2019-03-07 17:41:09 +08:00
Jimmy Chen
28541ec70a Merge "p2p: add javadoc for the group owner band constants" 2019-03-07 08:42:38 +00:00
Jimmy Chen
7a5ecb109d Merge "p2p: add documentation for WifiP2pConfig.Builder API" 2019-03-07 06:08:07 +00:00
Hai Shalom
405ecb9909 [WifiConfiguration] Add @NonNull annotations to BitSets
Following API review, add @NonNull annotations to allowed* BitSets in
WifiConfiguration class.

Bug: 126702434
Test: atest WifiConfigurationTest
Change-Id: I05550f4d4677702de7ec5e3f0c8393a516c0a5e6
2019-03-07 03:00:51 +00:00
Jimmy Chen
367763b99c Merge changes I105589aa,I3674fd5b,I215962fa,I5ca97e26,Ib47a1a6d
* changes:
  p2p: add valid string documentation for network name and passphrase
  p2p: rename the annotation to match the API names.
  p2p: add annotation for WifiP2pConfig.Builder public API
  p2p: add annotation for WifiP2pConfig.Builder public API
  p2p: add annotation for WifiP2pConfig.Builder public API
2019-03-07 02:45:12 +00:00
TreeHugger Robot
a89f1caec9 Merge "[WPA3] Add missing SUITE_B_192 to getKeyIdForCredentials" 2019-03-07 02:18:38 +00:00
Jimmy Chen
f1ef098ed9 p2p: add javadoc for the group owner band constants
Bug: 126614268
Test: Unit tests - atest FrameworksWifiTests
Test: Unit tests - atest FrameworksWifiApiTests
Change-Id: Ibe129f2eaf9b9fe158cac2a32f3d9d397c5af22c
2019-03-07 10:13:14 +08:00
Jimmy Chen
fa81e58535 p2p: add documentation for WifiP2pConfig.Builder API
Bug: 126614407
Test: Unit tests - atest FrameworksWifiTests
Test: Unit tests - atest FrameworksWifiApiTests
Change-Id: I300948ad524f2527d0c564ce1e2365fd1688bbfd
2019-03-07 10:13:14 +08:00