Commit Graph

2343 Commits

Author SHA1 Message Date
TreeHugger Robot
d4c19aa24b Merge "passpoint-r2: redefine status and error enums" 2018-08-01 18:44:00 +00:00
Michael Plass
c32985fa8d Permission required for RSSI_CHANGED broadcast
Document requirement for ACCESS_WIFI_STATE permission to receive
android.net.wifi.RSSI_CHANGED broadcasts.

Bug: 111698366
Test: Unit tests
Change-Id: I7c02c0e226fef2b2ab2f374bb68b2de1b64effe3
2018-07-30 11:08:56 -07:00
Roshan Pius
2866912853 Merge "WifiManager: Add callback for traffic poller" 2018-07-27 18:24:48 +00:00
Ecco Park
87b0298b74 passpoint-r2: redefine status and error enums
Bug: 74244324
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: I0df739206fdf2e7a7dbfd56771768b875bc96f19
Signed-off-by: Ecco Park <eccopark@google.com>
2018-07-26 17:49:50 -07:00
TreeHugger Robot
ce419f1342 Merge "WifiScanner: Add permission for start/stop pno scan APIs" 2018-07-26 16:14:26 +00:00
Andrew Solovay
b44f927f05 Merge "docs: Updating setDomainSuffixMatch() for Android P" into pi-dev am: 447b8b6394
am: b6c29ac737

Change-Id: I0b93883c585240b81447530735fbe573695b4cf8
2018-07-25 13:37:00 -07:00
Andrew Solovay
5c704e6deb docs: Updating setDomainSuffixMatch() for Android P
Small update to reflect P-related change (that common-name verification
is no longer supported), per
https://android-dot-devsite.googleplex.com/about/versions/p/android-9.0-changes#certificate-common-name

Also added some missing paragraph breaks while I was doing it.

Doc is staged to:

http://go/dac-stage/reference/android/net/wifi/WifiEnterpriseConfig#setDomainSuffixMatch(java.lang.String)

Exempt-From-Owner-Approval: Docs-only change
Bug: 110483059
Test: make ds-docs
Change-Id: I50b6eb70bf16c17dd0ae4e54711c5bb599c47c1a
2018-07-25 18:57:05 +00:00
Roshan Pius
80fb13753b WifiManager: Add callback for traffic poller
The current mechanism for traffic poller directly exposes the wifi
service's internal message handler to privileged apps. Move away from
this mechanism and expose an API to let apps register for callbacks from
traffic poller. This API uses binder IPC for registration and
invocation of callbacks. Clients are automatically removed on binder
death.
This will also let us mark WifiManager#getWifiMessenger() method
private to prevent any apps from getting access to this internal messenger.

Note: This is based on the existing SoftapCallback registration
mechanism.

Also, fixed a bunch of checkstyle errors that were not caught
previously.

Bug: 27074039
Test: Unit tests
Test: Verified the data indicators on Sysui
Change-Id: I505bd2398552be99ccca7b7d3c31a488aa72af70
2018-07-25 14:31:29 +00:00
Roshan Pius
8a73ce4877 WifiScanner: Add permission for start/stop pno scan APIs
Only wifi service should invoke these calls.

Bug: 69862744
Test: Unit tests
Test: Verified that pno still works.
Change-Id: Ib0ded6aeb994b78e6a8965d66f2adef233cb002e
2018-07-24 13:24:20 -07:00
TreeHugger Robot
ddd7c01b17 Merge "WifiScanner: Scanner enable/disable" 2018-07-24 01:08:30 +00:00
Roshan Pius
5ac661678f WifiScanner: Scanner enable/disable
Add a new method in WifiScanner to enable/disable scanning. This will be
used by WifiStateMachine to control scanning.

Bug: 110428211
Test: Unit tests
Test: Manual tests

Change-Id: Iebaf5ff81754bf1f14f7533ac16eddb882970b8c
2018-07-23 20:00:39 +00:00
Roshan Pius
7c59a10bb4 WifiManager: Remove unused param in getControllerActivityEnergyInfo
Bug: 34076874
Test: Compiles
Change-Id: I9a87d320ae8b2a3dd70b1f3109609b7cf429e124
2018-07-20 13:45:18 -07:00
Ecco Park
84d601fbda passpoint-r1: fix the wrong filed for PPS-MO.
Currently Passpoint-r1 follows the PPS-MO format to install passpoint
profile.

Howevever, one field(SubscriptionParameter) is not correct.
Normally passpoint-r1 doesn't use this field because this is used for
passpoint-r2 feature.
So, currently there is no issue with wrong field for using passpoint-r1.

But, it needs to be "SubscriptionParameters" according to the hostpot2.0
release 2.0 techinical specification.

Bug: 111449001
Test:  ./frameworks/base/wifi/tests/runtests.sh
Change-Id: Idb6bb4d28913bd3d0905b330e25fbb20b99bbf2e
Signed-off-by: Ecco Park <eccopark@google.com>
2018-07-14 00:11:20 +00:00
Rebecca Silberstein
1d48831106 Merge "SettingsBackupAgent: notify of apBand conversion" into pi-dev am: cbf554b78b
am: 5f5f4788f1

Change-Id: I8a260e47661912420c20634c390aef288afaf92b
2018-06-22 11:34:55 -07:00
Rebecca Silberstein
d41106c52e SettingsBackupAgent: notify of apBand conversion
Added support to notify user of a change to their softap configuration
preferences after being restored via SettingsBackupAgent.

Bug: 80251951
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually confirmed configs are converted for different device
Change-Id: I4cec15549d694cdb1a7b09f1426d027eec021122
2018-06-19 09:59:12 -07:00
Rebecca Silberstein
7e4368909d Merge "WifiManager: add call to see if apband conversion is required" into pi-dev am: 85bdd711ce
am: b14e1fdbff

Change-Id: I8899a793ea7e6825d301d151de3713130390b14b
2018-06-06 10:16:21 -07:00
Rebecca Silberstein
34f0631ec1 WifiManager: add call to see if apband conversion is required
Add call @hide allowing settings to check if the device requires softap
configs be converted from 5GHz only to ANY

Bug: 80251951
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: Id4d435eb55e2696d23ceb4d301e5d039e134d66a
2018-06-01 17:52:12 -07:00
Roshan Pius
d7fece947a Merge "WifiConfiguration: New temp disable network status for no internet" into pi-dev am: 95509057f8
am: dee99a1b2b

Change-Id: I9274ba934a102a17d554133caed5ede6cce551b0
2018-05-21 10:26:51 -07:00
Roshan Pius
95509057f8 Merge "WifiConfiguration: New temp disable network status for no internet" into pi-dev 2018-05-21 17:04:10 +00:00
Etan Cohen
1ae59634c4 Merge "[RTT] Legacy RTT API: add attempted/succeeded counts" into pi-dev am: 9f9ce0462d
am: ad2ef030a7

Change-Id: Iddd2f1eed8274e59cca27c301f52411a7e19d25b
2018-05-17 08:28:30 -07:00
Etan Cohen
49821a11e1 [RTT] Legacy RTT API: add attempted/succeeded counts
Wi-Fi RTT legacy API is (now) a wrapper around the new API. Two
new result parameters were added to the new API but not propagated
to the corresponding legacy API:

- Count of attempted measurements
- Count of successful measurements

Bug: 79883720
Test: unit tests
Test: RangeApSupporting11McTest:test_legacy_rtt_80211mc_supporting_aps
Change-Id: Id000c691c22319474e3e98f5ba5d77e4bb4c343e
2018-05-16 17:50:53 -07:00
Roshan Pius
d61e3930ac WifiConfiguration: New temp disable network status for no internet
Add a new network disable reason to temporarily blacklist an
auto-connected network.

Bug: 72635747
Test: Manually verified that device switched away from an
auto-connected network when it detects no internet.
Change-Id: Id3d2de05f6b2869c0b64d5e427e14573e8912905
2018-05-14 14:18:57 -07:00
Etan Cohen
5c059bd984 Merge "[RTT] Update RTT preamble selection algorithm" into pi-dev am: 51f3c4481c
am: 057718d6e8

Change-Id: I38fd3bd4908e7212535abfd97ae5abd320afe830
2018-05-06 21:16:57 -07:00
Etan Cohen
67f5ffb7e8 [RTT] Update RTT preamble selection algorithm
Select preamble to use for RTT exchange using IEs advertised by the
AP rather than channel width (which is used as a backup method).

Bug: 69965964
Test: unit test & integration tests
Change-Id: I60ef31c4627795bd4da505f31998b49668d1a115
2018-05-05 05:01:31 +00:00
android-build-team Robot
4023ca9afa Merge "[AWARE] Update docs for service discovery callbacks" into pi-dev am: b9147471ec
am: 1191a4c5da

Change-Id: If81d0074074058ab41944e097dad22f1651b9f7b
2018-05-04 19:32:02 -07:00
android-build-team Robot
b9147471ec Merge "[AWARE] Update docs for service discovery callbacks" into pi-dev 2018-05-05 02:11:03 +00:00
Roshan Pius
2c8c9f8cd3 WifiConfiguration: Fix documentation for SSID am: 183a5f0a35
am: 7436da4317

Change-Id: I2948b9e19e5df5c34efe9c7530562279f63d7654
2018-05-04 15:41:52 -07:00
Roshan Pius
183a5f0a35 WifiConfiguration: Fix documentation for SSID
SSID strings can be UTF-8 encoded. Fix documentation to reflect that.

Bug: 78483295
Test: Compiles
Change-Id: Ib25967a52627a17a13b5d5b418fc3c3c3d05f7c8
2018-05-04 22:12:29 +00:00
Etan Cohen
4b45f8da5e [AWARE] Update docs for service discovery callbacks
Clarify that service discovery callbacks may be triggered multiple
times (and that therefore apps should deal correctly with it). These
may happen for several reasons (not documented since too low level):
- Peer went out-of-hearing-range and came back
- Peer went out of geofence range and came back
- Concurrency limitations caused discovery to switch from ranging-based
  to non-ranging-based or back

Bug: 77925576
Test: N/A
Change-Id: I9fbb909e5bd57fb714aa82bcfeb2834361722149
2018-05-04 10:33:59 -07:00
Jimmy Chen
66cbe22201 wifi: implement hashCode to be consistent with equals
Per Effective Java, if a class implements equals(),
it should override hashCode().

Test: (new) unit tests
Bug: 37000525
Change-Id: If4175a7e2bc34935c525d0fb96fbbe1e904030e3
2018-05-04 15:02:49 +08:00
Roshan Pius
c705615816 Revert "Revert "WifiManager: Return status from startScan()""
This reverts commit 4c36c2903d.

Reason for revert: Compilation failure in Arc++ fixed.
Bug: 77297012
Change-Id: Ic707f7256e8d7430c28e58085c6c2208f88042f2
2018-04-27 19:05:15 +00:00
Doris Ling
4c36c2903d Revert "WifiManager: Return status from startScan()"
This reverts commit b81c3d5f9a.

Bug: 77297012
Change-Id: Ie8727343650b549d4f438643d50a10fe50ab52b1
Reason: this change is breaking the build
2018-04-26 22:31:45 +00:00
Roshan Pius
b81c3d5f9a WifiManager: Return status from startScan()
Bug: 77297012
Test: Ensured that scans from settings are still running.
Test: Unit tests
Change-Id: I0ffea57c48ad2ef5312dd90462b4b707cbf2368c
2018-04-24 15:55:51 +00:00
TreeHugger Robot
086633e03d Merge "WifiConfiguration: Remove a bunch of unused fields" into pi-dev 2018-04-06 19:54:20 +00:00
TreeHugger Robot
1024314c67 Merge "WifiConfiguration: Modify time display in toString" into pi-dev 2018-04-06 18:16:36 +00:00
Rebecca Silberstein
9c2c8f5df6 Merge "WifiManager: allow setWifiApConfiguration to return false" into pi-dev 2018-04-06 04:42:36 +00:00
Roshan Pius
7fbf0a8e9c WifiConfiguration: Modify time display in toString
Use TimeUtils to format the time display fields which hold wall clock
time.
Also, use |elapsedRealTime| to calculate the time durations for the
fields which are populated using elapsedRealTime.

Bug: 77224338
Test: Unit tests
Test: 'adb shell dumpsys wifi'
Change-Id: I850ebdc3ba1f7bfb7d5137382d2feed7e551c311
2018-04-05 15:32:34 -07:00
Roshan Pius
682ac77a65 WifiConfiguration: Remove a bunch of unused fields
Bug: 77224338
Test: Compiles
Change-Id: I0e1bfcfa1c00a493452c51e7212d176dd9919f3c
2018-04-05 15:32:33 -07:00
Mukesh Agrawal
0f57f60b7c Merge ""02:00:00:00:00:00" invalid for MAC randomization" into pi-dev 2018-03-29 22:25:13 +00:00
Rebecca Silberstein
cf1b40fb2b WifiManager: allow setWifiApConfiguration to return false
The api for setWifiApConfiguration allows for config saves to return
false, but the implementation always returns true (if there wasn't an
exception thrown).  This CL allows the API to actually return false and
adds unittests.

Bug: 67601382
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually update ap config in settings and verify save
Test: wifi integration tests
Change-Id: I038ab68f5fc4bf22df5b61d329077eacda547338
2018-03-29 15:15:41 -07:00
Jeff Sharkey
407932ebc0 Merge "Tidy up users of TRANSPORT constants." into pi-dev 2018-03-29 19:23:38 +00:00
Jeff Sharkey
c159d52942 Tidy up users of TRANSPORT constants.
Some call sites using explicit TRANSPORT types want to know about the
raw underlying transport, and they don't want to know about VPNs
that are going over that transport.

For example, SettingsLib always wants to know about the actual
Wi-Fi network, so it uses NOT_VPN to avoid being confused by VPN
networks that are backed by a TRANSPORT_WIFI network.

GnssLocationProvider wants to know about any validated internet
access, regardless of the underlying transport.

Test: atest com.android.settingslib.wifi
Bug: 68499889
Change-Id: Ib5897946d856444d9ff3b54c4aeace6baa42f8bf
2018-03-28 13:05:23 -06:00
Etan Cohen
7a60ea4c6a [RTT] Expose new public API for number of measurements
The RTT distance and standard deviation are calculated based on a set
of N measurements. Of those M (M<=N) may be successful.

The quality of the provided results can be assessed by 2 measures:

1. The standard deviation of the results

The standard deviation is only valid if the number of successful
measurements is >1 otherwise a 0 is returned. A value of 0 cannot be
differentiated from a legitimate 0 standard deviation.

In one case (number of samples > 1) a standard deviation of 0 indicates
high confidence in the result. In the other case (number of samples = 0)
no confidence information can be derived.

2. The ratio of successful to total attempted measurements

Add API which provides the number of attempted measurements and number
of successful measurements used to calculate the final results.

Bug: 76445930
Test: N/A (unhide CL only, code verified earlier)
Change-Id: Ia7322b3abc28e83c29d0b0ae79db30fd99bb7fe1
2018-03-28 11:28:11 -07:00
Etan Cohen
ce7179bfcf [RTT] Add API for number of measurements
Add information about the number of attemped and successful measurements
used to calculate the final results (especially critical for standard
deviation).

Bug: 76445930
Test: unit tests & integration tests
Change-Id: I906b6e8a4d74799447ab7c2e55965fdd448dc470
2018-03-27 16:18:54 -07:00
Jong Wook Kim
d184ba5435 "02:00:00:00:00:00" invalid for MAC randomization
Since we are using "02:00:00:00:00:00" as the default/invalid MAC
address in the Wifi Framework, we should make it invalid for Connected
MAC Randomization for consistency.

Updated the configuration to use "02:00:00:00:00:00" as the default
invalid MAC and attempt multiple time to generate valid random MAC.

Bug: 74436465
Bug: 74446723
Test: Unittest
Change-Id: Ia5ac806d478191d7e8fad247d5c3a1b97d16498f
2018-03-21 15:52:52 -07:00
Oscar Shu
c275307166 Merge "Remove unused ScanSettings and WifiChannel classes" into pi-dev 2018-03-20 17:16:27 +00:00
Oscar Shu
6604af68c5 Merge "Deleting Visibility from WifiConfiguration" into pi-dev 2018-03-16 18:45:27 +00:00
TreeHugger Robot
dbeb6bc3f1 Merge "WifiConfiguration: Undeprecate WPA_PSK" into pi-dev 2018-03-15 02:11:46 +00:00
TreeHugger Robot
5e278aedfa Merge "[RTT][AWARE] Minor update to distance documentation" into pi-dev 2018-03-15 02:07:13 +00:00
Roshan Pius
8f1a910ad8 WifiConfiguration: Undeprecate WPA_PSK
This is needed for client mode operations for configuring WPA_PSK
networks. There is no alternative public value for WPA_PSK.
The intention was to deprecate usage of this value for AP
mode, but since we share the same object across client & AP mode
operations, we cannot mark this field deprecated.

Bug: 72332080
Test: make update-api
Change-Id: I75f675b630080d853422f945d7cbc37c5f205fde
2018-03-14 15:17:00 -07:00