Commit Graph

2546 Commits

Author SHA1 Message Date
Roshan Pius
34929e323a WifiNetworkSuggestion/Specifier: Fix javadoc
Bug: 123313291
Test: Compiles
Change-Id: I2d88af7ed0ee3b92c17ab9af84aadad31523d6ab
2019-02-08 11:58:47 -08:00
Ahmed ElArabawy
dd4895f5b4 Merge "Statsd atom: Add WifiLock type" 2019-02-07 23:25:45 +00:00
Oscar Shu
1f0613f659 Merge "Update getRandomizedMacAddress API comments" 2019-02-07 23:15:54 +00:00
xshu
6bcd531f86 Update getRandomizedMacAddress API comments
Bug: 122991465
Test: unit tests
Change-Id: If1a867921a2dfed24359512922d24c9c49fb494b
2019-02-06 10:36:59 -08:00
Ecco Park
5a01b5a7a7 Merge "WifiConfiguration: New disable network status for no subscription" 2019-02-04 23:00:47 +00:00
Daisuke Niwa
ff3fbdea61 WifiConfiguration: New disable network status for no subscription
Add a new network disable reason to disable EAP network if
AT_NOTIFICATION notification code (1031) is returned. It indicates
user has not subscribed to the requested service.

Bug: 122921493
Test: Manually verified that device will not try to connect to the
EAP network if EAP authentication failed with 1031 code before.
Signed-off-by: Daichi Ueura <daichi.ueura@sony.com>
Change-Id: I0c531064cb5098f1e036a7fd8975a94cb51855b9
2019-02-04 07:30:31 -08:00
Roy Want
b1772f92bd RTT LCI API (Client Side)
Bug: 111439464
Test: Tests were added for new classes. All unit tests pass.
Change-Id: I5a644a06c512b98e735fc1acb19e38a33bf4b2ad
2019-02-01 12:37:21 -08:00
Ecco Park
66a1ecb729 Merge "add eap_method and phase2_method string in enterpriseConfig for dump" 2019-01-30 15:50:05 +00:00
Les Lee
1b396fa0af Merge "Restrict wifi p2p broadcasts" 2019-01-30 03:42:55 +00:00
Mingguang Xu
7b8b30b4c2 Merge "Wifi usability: Add link probe results and rx link speed into usability stats" 2019-01-30 03:20:50 +00:00
Ecco Park
d987b7278e add eap_method and phase2_method string in enterpriseConfig for dump
Currently we don't print any information for eap_method and
phase2_method.
Without this information, it is difficult know that the configuration is
created correctly.

Bug: 123089627
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: I933790a87bd38d4af7438c61f4e12f2e0488d3a1
Signed-off-by: Ecco Park <eccopark@google.com>
2019-01-29 18:22:31 -08:00
Roshan Pius
5af35cba45 Merge "WifiNetworkConfigBuilder: Split into 2 separate builders" 2019-01-29 18:25:21 +00:00
Roshan Pius
3409263cba WifiNetworkConfigBuilder: Split into 2 separate builders
Split the existing WifiNetworkConfigBuilder into 2 separate builders,
one for building WifiNetworkSuggestion and one for WifiNetworkSpecifier.

Other changes in the CL:
a) Marked the constructor of the abstract NetworkSpecifier class public
to allow WifiNetworkSpecifier.Builder() (& hence WifiNetworkSpecifier) to
be public. The alternative is to put the builder for WifiNetworkSpecifier
in some other file (like WifiManager)
b) Mark WifiNetworkSpecifier class public to make it's builder visible.
c) Modify the documentation (& usage example) for WifiNetworkSpecifier
builder to explicitly call out that this can only be used for a local
wifi connection (i.e no internet capability).

Bug: 123313291
Test: ./frameworks/base/wifi/tests/runtests.sh
Test: make docs
Change-Id: I1a5fcff886124010222e112dbca92797a514b6d9
2019-01-29 10:23:46 -08:00
Ecco Park
b3f28003ee Merge "passpoint-r2: set CA certificate for remediation server" 2019-01-29 17:18:41 +00:00
lesl
e81b74b8ac Restrict wifi p2p broadcasts
1. Add new API requestDeviceInfo to support get device information
2. Add more documentation about permissions required and relate change

Bug: 77228252
Test: Unit tests - atest frameworks/base/wifi/tests/
Test: Manually test Wi-Fi Direct settings/WiFiDirectDemo
Change-Id: I388ef005e71c1c0b54d8365232519cf1db91d6e7
2019-01-29 16:21:42 +08:00
Mingguang Xu
bed0885e92 Wifi usability: Add link probe results and rx link speed into usability
stats

As title indicates.

Bug: 113262380

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

Change-Id: Idfa70d314f2938ea42a8b308c7d74e274af7c3cb
Signed-off-by: Mingguang Xu <mingguangxu@google.com>
2019-01-28 21:52:26 -08:00
Ecco Park
0fa92e6759 passpoint: remove @throws UnsupportedOperationException
Update the javadoc for Passpoint APIs to remove @throws
UnsupportedOperation Exception when the Passpoint is not enabled on the
device.

Bug: 121078741
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: I087a595c04b926a76b6ea9d6f2a475e12033815b
Signed-off-by: Ecco Park <eccopark@google.com>
2019-01-28 18:43:59 +00:00
Ecco Park
c99e749440 passpoint-r2: set CA certificate for remediation server
It needs the APIs to set/get the CA certificate for remediation server.

Bug: 116346527
Test: ./frameworks/base/wifi/tests/runtests.sh
Test: tested with R2 AP for connection and verified that the CA
certificate is saved into keyStore.
Test: tested with R1 credential
Change-Id: I8568935234a6197e83f1b997f145b7e98dc56497
Signed-off-by: Ecco Park <eccopark@google.com>
2019-01-25 17:05:05 -08:00
Roshan Pius
3a8cc45d71 WifiManager: Remove @SystemApi tag for settings APIs
Bug: 123314904
Test: make system-api-stubs-docs-update-current-api
Change-Id: Id9f088b3a9bbeeb74d5f5bcd3070743943b0c6e6
2019-01-25 11:55:18 -08:00
Roshan Pius
7abd8e47ba WifiInfo: App attribution for suggestion/request
Add a field to store package name for suggestion/specifier package name.
Storing these info in WifiInfo is the convention being followed
for ephemeral networks in WifiTracker.

Bug: 115504887
Bug: 113878056
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: Iab6ab93a2a281011499adfff3163c35058600706
2019-01-25 11:19:54 -08:00
Etan Cohen
448a1d5c2a Merge "[WIFI][LOCATION] Convert API from Coarse -> Fine for >= Q" 2019-01-24 22:49:12 +00:00
TreeHugger Robot
658db85cd0 Merge "WifiConfiguration: App attribution for suggestion/request" 2019-01-24 18:31:42 +00:00
Mingguang Xu
68e948f3c2 Wifi usability: Add @SystemApi to receive Wifi usability score
Add system API to allow framework to receive Wifi usability score from system APK.
Also add a new permission to protect this API from being used by unauthorized applications. This permission is the same as the one added for sending Wifi usability stats.

Bug: 113262380.

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

Signed-off-by: Mingguang Xu <mingguangxu@google.com>

Change-Id: Ib695dbb4c6c1f4518a464877f1d0f60dde4904eb
2019-01-24 00:41:16 -08:00
Roshan Pius
f15a9720fa WifiConfiguration: App attribution for suggestion/request
Add new field to mark a WifiConfiguration as created from a network
specifier or suggestion. WifiConfiguration.creatorName for such networks
will contain the package name of the app that added the corresponding
specifier/suggestion.
This can be used by the settings app to display the app's name in the
wifi picker summary.

Bug: 115504887
Bug: 113878056
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: Ic0ae2292930628dc38c668777c7de4f19af4e925
2019-01-23 11:12:11 -08:00
Mingguang Xu
8683314997 Wifi usability: Add @SystemApi to send Wifi usability stats
Add system API to allow framework to send Wifi usability stats to
system APK.
Also add a new permission to protect this API from being
used by unauthorized applications.
In addition, add a few more entries in Wifi.proto.

Bug: 113262380
Test: Unit tests for Wifi: frameworks/base/wifi/tests/runtests.sh

Change-Id: I5432419d6da3db96ecc6ff8e1c3197121ca7afbc
Signed-off-by: Mingguang Xu <mingguangxu@google.com>
2019-01-23 10:54:45 -08:00
Etan Cohen
12f70534e2 [WIFI][LOCATION] Convert API from Coarse -> Fine for >= Q
Convert all Wi-Fi permissions from Coarse -> Fine for:
- Wi-Fi Direct (p2p) always (since new permissions for Q)
- Else (Wi-Fi, Aware): target SDK >= Q

Bug: 122374563
Test: atest android.net.wifi
Test: atest com.android.server.wifi
Change-Id: Ia1d892d303ec9f002692f30d9e9fc043729b68d8
2019-01-23 09:06:20 -08:00
Jimmy Chen
69236f8e2b Merge "p2p: add p2p random MAC feature flag in framework" 2019-01-23 02:53:10 +00:00
Roshan Pius
c2aa6a91d3 Merge "WifiNetworkConfigBuilder: Pass package name" 2019-01-22 22:36:06 +00:00
Roshan Pius
6402e56c4a WifiManager: Mark disableEphemeralNetwork as @hide
This is only used by settings, so no need to make it @SystemApi.
Removing the @SystemApi tag which was unnecessarily added in ag/5529624.

Bug: 122278104
Test: make system-api-stubs-docs-update-current-api
Change-Id: I74a67abdc5e1ed2f2f049e560a3e6f8a1d0e8d76
2019-01-22 11:07:23 -08:00
TreeHugger Robot
9e10c87914 Merge "passpoint-r2: change the name for OSU_FAILURE_INVALID_SERVER_URL." 2019-01-22 18:07:23 +00:00
Etan Cohen
0d2740ca69 Merge "[WIFI] Open up the getRandomizedMacAddress API" 2019-01-19 17:39:41 +00:00
Hai Shalom
f1845027ca Merge changes from topic "isEasyConnectSupported"
* changes:
  [DPP] Rename isDppSupported to isEasyConnectSupported
  [DPP] Add more documentation about Easy-Connect (DPP)
2019-01-19 06:39:41 +00:00
TreeHugger Robot
4453778fb1 Merge changes from topic "DppExecutor"
* changes:
  [DPP] Use Executor instead of Handler in Easy Connect API
  [DPP] Add more documentation about stopEasyConnectSession API
2019-01-19 04:33:21 +00:00
Jimmy Chen
176af33735 Merge "wifi: extend feature flag from int to long" 2019-01-19 00:26:07 +00:00
TreeHugger Robot
2ba0d6ff68 Merge "[DPP] Add _GENERIC suffix to EASY_CONNECT_EVENT_FAILURE code" 2019-01-18 23:05:39 +00:00
Etan Cohen
41561126ef Merge "[WIFI] Clarify getConfiguredNetworks behavior for Carrier Apps" 2019-01-18 21:07:09 +00:00
Roshan Pius
6c3d416762 WifiNetworkConfigBuilder: Pass package name
Capture the package name (along with uid) of the app using the
builder for creating network specifiers & suggestions. We need
the exact package name to differentiate apps using shared UIDs.

Bug: 123078593
Test: ./frameworks/base/wifi/tests/runtests.sh
Test: act.py -c wifi_manager.config -tb dut-name -tc WifiNetworkRequestTest
Test: act.py -c wifi_manager.config -tb dut-name -tc
WifiNetworkSuggestionTest
Test: New CtsVerifier tests for network request.

Change-Id: Ib55d34b60219808ad30bf44db2a806e1c69ae2c5
2019-01-18 11:52:20 -08:00
Ecco Park
327c0b1e31 passpoint-r2: change the name for OSU_FAILURE_INVALID_SERVER_URL.
Currently OSU_FAILURE_INVALID_SERVER_URL name is confused with another
flag called (OSU_FAILURE_SERVER_URL_INVALID) that is used for connecting
OSU server.

So, it is better to change the name to meaningful name.

Bug: 119514793
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: I4dabe6bab12211faae7758b8fc2df2381efb6c21
Signed-off-by: Ecco Park <eccopark@google.com>
2019-01-17 21:56:16 -08:00
Etan Cohen
753e63c0f5 [WIFI] Make Aware + Connectivity agent network specifiers sensitive
Configure the Wi-Fi Aware and Wi-Fi connectivity API agent network
specifiers as sensitive. This will strip them out from the
network capabilities before the capabilities are forwarded to the
app.

Necessary since the agent network specifier contains information
which the apps should not have.

Bug: 122160111
Test: atest ConnectivityServiceTest (frameworks/base/tests/net)
Test: atest frameworks/base/tests/net
Test: atest frameworks/opt/net/wifi/tests/wifitests
Test: atest frameworks/opt/telephony/tests/telephonytests
Test: atest frameworks/opt/net/ethernet/tests
Test: atest android.net.cts - some flakiness!
Test: act.py ThroughputTest
Test: act.py DataPathTest
Test: atest SingleDeviceTest (cts)
Change-Id: I9673107a2ee13bca63539fc7dbee7f376af3ebcb
2019-01-18 05:24:32 +00:00
Roshan Pius
3c3f264c7f Modify toString for WifiNetworkSpecifier, etc
Bug: 119632465
Test: Verified logs manually.
Change-Id: I5b8a5b5665313a62606ebc9ca9b2fb14ac37ea33
2019-01-18 04:51:15 +00:00
Hai Shalom
50b9e393bc [DPP] Rename isDppSupported to isEasyConnectSupported
Rename isDppSupported to isEasyConnectSupported to be
consistent with the rest of the API.

Bug: 123041766
Test: atest com.google.android.gts.setupwizard.DppHostTest
Test: act.py -c ../WifiDppConfig.json -tc WifiDppTest
Change-Id: I45fe54140c593b33b43fb67128c5e540859cc3ff
2019-01-17 19:02:14 -08:00
Hai Shalom
e1a40cfed3 [DPP] Add more documentation about Easy-Connect (DPP)
Add more documentation about Easy-Connect (DPP) in WifiManager. Explain
in a few words the key items of this technology.

Bug: 122985335
Test: No code changes
Change-Id: I395b37f23874a0b8b25a418118d7b38804d29501
2019-01-17 19:02:06 -08:00
Hai Shalom
77dc840540 [DPP] Use Executor instead of Handler in Easy Connect API
Following API Council review, use Executor instead of Handler
in all Easy Connect API.

Bug: 122984003
Test: atest com.google.android.gts.setupwizard.DppHostTest
Test: atest DppManagerTest
Test: act.py -c ../WifiDppConfig.json -tc WifiDppTest
Change-Id: I58f61929e4b8792d43fc495ddaa51f766737b743
2019-01-17 15:45:46 -08:00
Ecco Park
37f2ba0a3f Merge "passpoint-r2: add @systemApi for Passpoint APIs" 2019-01-17 22:32:49 +00:00
TreeHugger Robot
3b6f1ed1a9 Merge "passpoint: mark as @deprecated and add permissions" 2019-01-17 22:28:05 +00:00
Etan Cohen
a914a2ef0b [WIFI] Open up the getRandomizedMacAddress API
The randomized MAC address needs to be available to DO, PO, and
Carrier apps (which is restricted to getting the randomized MAC
address only from configurations it created).

Unhide the API and document the restrictions.

Bug: 112205095
Test: atest com.android.server.wifi
Test: atest android.net.wifi
Change-Id: I7376a00cf6ada51236d8a00538159e1ca25743b3
2019-01-17 13:21:07 -08:00
Etan Cohen
999aa2af59 [WIFI] Clarify getConfiguredNetworks behavior for Carrier Apps
Carrier privileged apps will have a partial exemption post-Q to
receive a set of configurations which they created (but no others).

Clarify documentation.

Bug: 112205095
Test: N/A
Change-Id: I0d5e44155f0db40de0c2ca554d29cb6cd1e40f3d
2019-01-17 13:21:07 -08:00
Hai Shalom
16789e7525 [DPP] Add more documentation about stopEasyConnectSession API
Following API Council review, add more documentation about
stopEasyConnectSession API.

Bug: 122984897
Test: No code changes
Change-Id: I7741b14387ddc9bb0d6aced6c6b493d8d77a357c
2019-01-17 11:06:09 -08:00
Hai Shalom
5ec038abf4 [DPP] Add _GENERIC suffix to EASY_CONNECT_EVENT_FAILURE code
Following API council review, rename EASY_CONNECT_EVENT_FAILURE to
EASY_CONNECT_EVENT_FAILURE_GENERIC.

Bug: 122984877
Test: atest DppManagerTest
Change-Id: I4703e7f66b21e7e54dbf1f1059fd1410b7b1bece
2019-01-17 10:48:30 -08:00
Jimmy Chen
d91c4ed282 p2p: add p2p random MAC feature flag in framework
P2P random MAC needs the driver to support changing MAC address.

Bug: 118904478
Test: manual test
      * Enter WiFI Direct Page
      * check the feature is enabled in logcat
        * WifiP2pService: Supported feature: P2P MAC randomization
      * check p2p0 MAC address is randomized.

Change-Id: I189a984b27886ca009b5f269c848fa38faedf0d9
2019-01-17 11:23:34 +08:00