Commit Graph

2219 Commits

Author SHA1 Message Date
Jong Wook Kim
4f10fb95de Default Randomized MAC Address to 0:0:0:0:0:0 in WifiConfig
Set the default value of Randomized MAC address as 0:0:0:0:0:0 instead
of null.

Making this change to simplify storing randomized address to XML for
permanent storage. Without this change, will need to manually check if
the value is null during MacAddress<->XML conversion.

Bug: 72753415
Test: Unittest.
Change-Id: I6edf486360e267acec9f8a343386444be2ea99fa
2018-02-07 19:31:19 +00:00
Michael Plass
ee84871fda Merge "WifiConfiguration validation improvement" 2018-02-04 23:19:50 +00:00
Michael Plass
7508e5cf2f WifiConfiguration validation improvement
Prevent WifiConfiguration.mIpConfiguration from ever being null

Bug: 62187840
Test: Unit tests
Change-Id: I6d7c53daad08aa242909c762956093eb135dd6c0
2018-02-02 14:38:24 -08:00
Etan Cohen
a61813e609 [RTT] Route legacy RTT API on top of new RTT API
Route legacy RttManager API on top of new WifiRttManager API - but
only support the legacy startRanging call. All others (including
Responder modes) are deprecated and throw an exception.

Note: the deprecation tags will be in a separate CL.

Bug: 65108579
Test: unit tests pass
Test: WifiRttManagerTest:test_regular_scan_then_rtt_ranging_stress
Change-Id: I63541fdcaac36f4bb40ed71660bbcfc507693ffc
2018-02-01 06:43:15 -08:00
Etan Cohen
64dd7468f3 Merge "[AWARE] Remove ability to accept connections from ANYONE" 2018-01-31 16:05:05 +00:00
Ningyuan Wang
8f405e6686 Remove aggressive handover APIs part 1
Bug: 27877641
Test: compile, unit tests
Change-Id: Ib291988a43d7eb5495fbb42624b434fe799044ab
2018-01-29 13:17:26 -08:00
Rebecca Silberstein
6a278404e3 WifiManager: return errors for WPS API calls
WPS support in Client mode is deprecated.  Trigger onFailed callbacks
for WPS operations. Added unit tests to check for error callbacks.

Bug: 72168432
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I442afd75b6b3ed3d43488cc2185274e9584352d1
2018-01-28 08:25:02 +00:00
Rebecca Silberstein
5703622163 WifiManager: update documentation on factoryReset
Update the documentation on factoryReset to reflect what is actually
done by WifiServiceImpl (removed saved wifi networks).

Bug: 68030936
Test: check documentation
Change-Id: I6958ffb94dec8d86f6a53d4c44504ce16c8a3012
2018-01-28 08:17:49 +00:00
TreeHugger Robot
8c0731cbb2 Merge "remove logic in saveConfiguration" 2018-01-26 01:38:28 +00:00
xshu
8a78930769 remove logic in saveConfiguration
The API is deprecated and now returns true.

Bug: 72074967
Test: compile, run ./frameworks/base/wifi/tests/runtests.sh
Change-Id: I83ce6cc8898f7df9fc920675fa669d03fa15f36e
2018-01-25 15:20:58 -08:00
Ningyuan Wang
4a014d8fce Merge "Remove WifiManager 'scanWithTraffic' APIs" 2018-01-25 01:03:15 +00:00
Mukesh Agrawal
5e24057999 Merge changes I72baa5ca,I0366341a
* changes:
  WifiConfiguration: deprecate WPA-1 related fields
  WifiConfiguration: deprecate WEP-related fields
2018-01-25 00:59:47 +00:00
TreeHugger Robot
1266a4f5d5 Merge "MAC Randomization: Store Randomized MAC Address in WifiConfiguration" 2018-01-24 23:57:47 +00:00
Etan Cohen
9b78f8254d [AWARE] Remove ability to accept connections from ANYONE
Wi-Fi Aware data-path (NDP) setup requires an Initiator and a Responder.
Both Initiator and a Responder are set up with the MAC address of the
peer to which to connect to as well as a security configuration (Open,
PMK, Passphrase).

The original API (27) allowed a Responder to be configured to accept
a connection from anyone (e.g. using a null MAC address). This creates
ambiguous semantics when an NDP already exists. The second Responder
request could refer to the previously setup NDP or to a new one to be
created. We cannot tell the difference up-front.

Remove the "Accept request from ANYONE" API for newer APIs.

Bug: 72175022
Test: unit tests and integration tests
Change-Id: I194cc15402c33c2f1c62834d64646f2489274c35
2018-01-24 10:26:50 -08:00
Jong Wook Kim
d4ab45c846 MAC Randomization: Store Randomized MAC Address in WifiConfiguration
Store randomized MAC address for each network in mMacAddress field, so
that we don't have to create a new MAC address when connecting to a
saved network.

Bug: 63905794
Bug: 71548300
Test: Unittest
Change-Id: I05a50d3c3bc94e5ac4a0ec7cbd1f192a6d4c0b11
2018-01-24 10:09:48 -08:00
Peter Visontay
56afa3d5ee Log the CHANGE_WIFI_STATE App Op in WifiManager (client changes).
Test: Manually tested that the op is noted. Ran opt/net/wifi/tests/wifitests/runtests.sh and base/wifi/tests/runtests.sh. Manually tested that 'idle' mode is now handled correctly.
Bug: 63907873
Change-Id: I66b20cdaab0f93700cc3fb871ae888ae0a9be32b
2018-01-24 16:29:58 +00:00
mukesh agrawal
897b1e92c3 WifiConfiguration: deprecate WPA-1 related fields
WPA-1 provides poor confidentiality, and limits
throughput of multicast traffic. WPA-1 is also
not widely used.

Mark WPA-1 related fields as deprecated, to communicate
our intent to deprecate WPA-1 connections.

This does not affect WPA-2 ("RSN") connections.

Bug: 72332080
Test: m -j8 update-api
Change-Id: I72baa5caa76e3ca0f46861982ed3ae5afcfcd709
2018-01-24 08:22:15 +00:00
mukesh agrawal
8b055fa374 WifiConfiguration: deprecate WEP-related fields
WEP provides poor access control, poor
confidentiality, and reduces throughput. (On the
throughput front, WEP connections are limited
to 54 Mbps, even on access points that support
transmitting at speeds 10x as fast.)

Mark WEP-related fields as deprecated, to
communicate our intent to deprecate WEP connections.

Bug: 72332080
Test: m -j8 update-api
Change-Id: I0366341a62711c5f4a2e7d1bbf049a5e058d0ec2
2018-01-23 22:25:36 -08:00
Oscar Shu
1b2ee1b648 Merge "Remove unused fields in ScanResult.java" 2018-01-24 05:41:39 +00:00
Etan Cohen
9c0a08b774 Merge "[RTT] Public LCI and LCR API" 2018-01-23 00:31:50 +00:00
Etan Cohen
a14cde6eb7 Merge "[RTT] Add LCI and LCR structures" 2018-01-22 23:36:25 +00:00
Ningyuan Wang
0c73128715 Remove WifiManager 'scanWithTraffic' APIs
Bug: 72333409
Test: compile, unit tests
Test: manually test wifi works
Change-Id: I8da1e63f610165a01077bef0127b2164f3b23fd0
2018-01-22 15:05:55 -08:00
Oscar Shu
fb0d9a7a8c Merge "WifiManager: mark WPS related API calls deprecated" 2018-01-22 22:35:30 +00:00
Etan Cohen
e54f93907f [RTT] Public LCI and LCR API
Expose the LCI and LCR APIs.

Bug: 65108607
Test: builds
Change-Id: If103dbff349a3f9e951d12dc4cec1d7dc48745ad
2018-01-22 11:23:46 -08:00
Etan Cohen
7c700afcd9 [RTT] Add LCI and LCR structures
Baseline LCI & LCR classes and structure (and planned API).

Bug: 71643239
Test: unit tests
Change-Id: I1ebe4f46d219901761758de58d73815ccfe6e815
2018-01-22 11:23:46 -08:00
Siddharth Ray
b50a684ba8 Wifi: Add scanning, activity time and API
Addition of Wifi Scanning time to Aggregate BatteryStats

Addition of Wifi Active time to BatteryStats (aggregate)

Addition of API to obtain Wifi battery stats for power drain diagnostics.

BUG:67213886

Test: Manual
Change-Id: I4f4c27ba839017d44feca685a4fae2f130d31765
2018-01-22 10:45:55 -08:00
Roshan Pius
19916d8b8e Merge "WifiConfiguration: Add support for auto-selecting AP band" 2018-01-19 21:33:47 +00:00
Roshan Pius
0fbb97de1f WifiConfiguration: Add support for auto-selecting AP band
Add new constant indicating the band/channel for SoftAp operation will
be determined during softap initialization.

The term 'ANY' for this option to be consistent with terminology used
in hostapd.

Bug: 68763822
Test: Compiles
Change-Id: I9676caf5188601ca16c9229aaa8be2d0e43404a6
2018-01-18 23:24:29 -08:00
xshu
b743503d3a Remove unused fields in ScanResult.java
Deleting some @hide fields

Bug: 67419731
Test: compile, run ./frameworks/base/wifi/tests/runtests.sh
Change-Id: Id89c4c13e3cf13a3881bee3245740d6248faeff9
2018-01-19 00:15:37 +00:00
xshu
5fee9aee0c WifiManager: mark WPS related API calls deprecated
Bug: 72047245
Test: compile, run ./frameworks/base/wifi/tests/runtests.sh
Change-Id: I1ac03e0729fea0ecc58785c94ebae28ba1523fd7
2018-01-18 13:58:38 -08:00
Mehdi Alizadeh
55f3aae053 Adds unregisterSoftApCallback API
Bug: 68712383
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I9d6a52eed722b0b0a159b73d517a9dc4d3f8107c
2018-01-18 11:15:23 -08:00
Mehdi Alizadeh
0037dde2fd Adds API to register callback for soft AP event
Bug: 68712383
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I270366494500251858fe2ddf6209c7b4bfb5f546
2018-01-18 11:15:23 -08:00
xshu
9d704cb209 Delete WifiManager API - getConnectionStatistics
Bug: 70901977
Test: compie, run ./frameworks/base/wifi/tests/runtests.sh

Change-Id: If425576642e1a2a055ea5459d1f4440bdde48f9f
2018-01-10 17:38:34 -08:00
Michael Plass
4422221bd0 Merge "Deprecate WifiManager EXTRA_BSSID, EXTRA_WIFI_INFO" 2018-01-10 16:23:49 +00:00
TreeHugger Robot
032626a7ed Merge "WifiManager: startScan throttling" 2018-01-10 00:21:18 +00:00
Roshan Pius
478ee74428 WifiManager: startScan throttling
Changes in the CL:
a) Mark startScan() as deprecated so that we can take away this API in
future releases.
b) Modify the documentation regarding scan throttling to indicate that
both foreground & background apps are subject to throttling.

Bug: 68987915
Test: Compiles
Change-Id: I938237b186c39c6b4cfec9dcdbd9b9d196bae0cc
2018-01-09 13:13:09 -08:00
Oscar Shu
c3ddef9d47 Merge "API cleanup - delete @removed methods" 2018-01-09 21:12:57 +00:00
Etan Cohen
e73f12ff8c Merge changes I620d8e72,I532ca35c
* changes:
  [RTT2] System API for a Responder Configuration
  [RTT2] Baseline public Wi-Fi RTT API
2018-01-09 19:16:51 +00:00
Etan Cohen
2892ba6611 [RTT2] System API for a Responder Configuration
The Responder Configuration is an abstracted specification of the peer
RTT Responder (to which we initiate an RTT operation).

The Responder is abstracted from a ScanResult (for an AP) or a Wi-Fi
Aware PeerHandle or MAC address. Utility methods are provided.

The Responder configuration is the underlying representation used by
the RTT manager and service to communicate infomration on RTT targets.
This API thus does not provide any additional permission or backdoor
hooks to the RTT functionality. It exposes a lower level utility
representation of the data. We may choose to make this more widely
available in the future if necessary.

Bug: 65108607
Test: builds
Change-Id: I620d8e725ad61792b7604ff1355adb1b0ef38ad1
2018-01-08 13:00:09 -08:00
Etan Cohen
a0688e0321 [RTT2] Baseline public Wi-Fi RTT API
Basic Wi-Fi RTT API for ranging to APs + Wi-Fi Aware peers.

Note: no functional tests, just unhiding/comment fixes.

Bug: 65108607
Test: builds, unit tests, integration tests.
Change-Id: I532ca35c866a7862859a0e64d9f7eccd95baa83d
2018-01-08 13:00:05 -08:00
xshu
48bd260b4e API cleanup - delete @removed methods
Bug: 68652341
Test: compile, run ./frameworks/base/wifi/tests/runtests.sh
Change-Id: If24720905171844f81359f9913c6b647bdeed85b
2018-01-08 20:44:39 +00:00
TreeHugger Robot
5fd1c97e34 Merge "ScanResult: Add radio chain information" 2018-01-08 19:06:11 +00:00
Roshan Pius
4f17615066 ScanResult: Add radio chain information
On devices with multiple radio chains, each scan result could be
received using different combination of the available radio chains
(DBS, MCC). Add a new parameter in the scan result to convey this meta
information about the scan result.

Bug: 68335251
Test: Unit tests
Change-Id: I1fc97745b9e74b768b67b0c80e52ce4a13e69527
2018-01-08 09:17:54 -08:00
Etan Cohen
acb394d13a Merge "[AWARE] Uhide the RTT in context of Aware discovery API" 2018-01-05 16:00:15 +00:00
Narayan Kamath
c21066b0e7 Merge "BatteryStats: Add WorkChain support for WiFi events." 2018-01-05 09:02:18 +00:00
Etan Cohen
b7abd810ba [AWARE][RTT] Check for null callback registration
Check on the manager side for null callback registration and throw
and exception.

Should be done in addition to service side checks since, in well
behaved apps (which don't bypass the manager), the callback registered
with the service is a proxy wrapper for the user-provided callback.

Bug: 71575804
Test: unit test & integration tests
Change-Id: Ice6585fccb13d842d9518b1f60bff911fb66c48f
2018-01-04 07:34:50 -08:00
Narayan Kamath
728c8a0874 BatteryStats: Add WorkChain support for WiFi events.
The changes are straightforward, the only change outside of BatteryStats
is to use the new WorkSource.isEmpty API to account for WorkChains in a
given WorkSource.

Bug: 62390666
Test: BatteryStatsBackgroundStatsTest, BatteryStatsNoteTest, WifiLockManagerTest
Change-Id: I1dff43b6f2a09877e3af4442bfe8a8fd80b1ba74
2018-01-04 14:18:22 +00:00
TreeHugger Robot
c36fbd4f0f Merge "[Wifi][Passpoint] OSU Server status and failure callbacks" 2018-01-03 02:57:27 +00:00
Etan Cohen
d91b59a1b0 Merge "[RTT2] RTT Responder config mods to meet API requirements" 2018-01-03 01:09:55 +00:00
TreeHugger Robot
ff49fa53af Merge "WifiScanner: Add scan request type to ScanSettings" 2018-01-02 23:43:52 +00:00