Commit Graph

2582 Commits

Author SHA1 Message Date
Roshan Pius
e3638d4ffc WifiNetworkSpecifier: Builder.build() returns WifiNetworkSpecifier
Based on API council feedback, return the WifiNetworkSpecifier object
from the builder.

Bug: 127464965
Test: Compiles
Change-Id: I072b761872f573103d42081ec0059cde6fafa51c
2019-03-06 08:08:19 -08:00
Ecco Park
c1041d3fce api-review: add @Nullable for getFriendlyNames() and getServerUri()
Bug: 126701512
Test: unitTest
Change-Id: Ia09bcc4c34e0915b2add89f5851be6e732402ac0
Signed-off-by: Ecco Park <eccopark@google.com>
2019-03-03 13:36:24 +00:00
Ecco Park
a2c829c185 api-review: add @Nullable and @Nonull for return value of Passpoint APIs
Bug: 126702500
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: Iec5985d7fdaaa6fa953230444a9aa490dfd73b7b
Signed-off-by: Ecco Park <eccopark@google.com>
2019-03-03 13:35:21 +00:00
TreeHugger Robot
aaac1dd62b Merge "[OWE] Rename isOweSupported to isEnhancedOpenSupported" 2019-03-01 18:29:48 +00:00
Roshan Pius
86ea249e4a WifiNetworkSpecifier/Suggestion Builder: Add @NonNull annotations
Based on feedback from API council.

Bug: 123313291
Bug: 126699563
Bug: 126701114
Test: Compiles
Change-Id: I119649add8ec71b041631357994aa20c253a5568
2019-03-01 07:08:26 -08:00
Jeff Sharkey
9e8f83db6d All Parcelable CREATOR fields are @NonNull.
If they were null, then the Parcelable would fail to work.

Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
2019-02-28 23:29:04 -07:00
Hai Shalom
68cf696b3b [OWE] Rename isOweSupported to isEnhancedOpenSupported
Stick to the official WFA marketing name in this public API.

Bug: 125850601
Test: atest com.android.server.wifi
Test: Use Settings to scan and connect to OWE network
Change-Id: I4eb9fb99500d7d56489c00ef0ee2ac571ff162d1
2019-02-28 19:14:54 -08:00
Andrei-Valentin Onea
34ccde884d Merge "Add @UnsupportedAppUsage annotations" 2019-02-28 13:50:19 +00:00
TreeHugger Robot
7c0532ae76 Merge "Clarifies Javadocs for setDeviceMobilityState() API" 2019-02-28 04:03:06 +00:00
Sunil Ravi
7ad5e8b779 Merge "Wi-Fi: @IntRange for getRx/TxLinkSpeedMbps" 2019-02-27 21:16:25 +00:00
David Su
5602fa6bf5 Clarifies Javadocs for setDeviceMobilityState() API
Clarifies the meaning of high and low movement mobility
states, and that the setDeviceMobilityState() should be
called when transitioning between states.

Bug: 122614678
Test: compiles
Change-Id: Ife9920b81c985238931357ed978983a83d70ffef
2019-02-27 10:44:19 -08:00
Andrei Onea
9a8b6bf0f1 Add @UnsupportedAppUsage annotations
For packages:
  android.net
  android.net.wifi
  android.nfc

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I7489aad1dceeb18ed7ca48a1ed8829a668b3fa04
2019-02-27 13:31:33 +00:00
Roshan Pius
fc900aa0e5 WifiScanner: Add a flag to hide request from app-ops
This flag is intended to be used by the NLP/FLP package on the device to
hide their request from app-ops logging. NLP/FLP module will be
responsible to blame (note in app-ops) their external clients who
eventually get the location computed using these raw results.

Also, removed a redundant permission tag in the previously added
|ignoreLocationSettings| flag. This entire surface is useable by apps
holding LOCATION_HARDWARE permission. So, there is no need to explicitly
call this out for that field.

Bug: 119833663
Test: Compiles
Change-Id: Idba70fe4a15e611d4485d05b771d71f2d707d0b5
2019-02-26 21:46:37 -08:00
Roshan Pius
ede298f966 WifiConfiguration: Add @hide method to set security params
Setting of these security params is duplicated in multiple parts of the
wifi stack. So, centralize this.

a) Move the security type enum from ScanResultMatchInfo class internally
into WifiConfiguration. (Note: Values don't change, just the name & location
since this is being persisted in multiple places)
b) Add a helper method to set the various security params required for
each security type.

Also, removed setting defaults in WifiNetworkSpecifier &
WifiNetworkSuggestion. This will anyway be handled by WifiConfigManager
on network addition. There is no need to replicate this in the API
surface.

Bug: 124071722
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: I382c497dfe331ee59f3560a8272b0e4ecf6ff8fc
2019-02-26 21:46:37 -08:00
Jimmy Chen
f33cb878f4 p2p: sanity check for network name
Bug: 120259460
Test: Unit test - atest android.net.wifi.p2p.WifiP2pConfigTest
Change-Id: I4ba5643a9fdded7b9f9837a21b24a89fac98a5ce
2019-02-26 06:10:22 +00:00
Hsiu-Chang Chen
2a2e15cb78 Merge "p2p: fix the copy constructor of WifiP2pDevice" 2019-02-23 01:27:15 +00:00
Ecco Park
e334ea7de8 Merge "Passpoint: add FQDN and Provider name field in WifiInfo" 2019-02-22 19:07:26 +00:00
Sunil Ravi
b1c6b36dfa Wi-Fi: @IntRange for getRx/TxLinkSpeedMbps
Added from range for getters getRxLinkSpeedMbps/getTxLinkSpeedMbps.

Bug: 124302657
Test: Connect STA to AP and verify the link speeds in network details.
Change-Id: I0b541c592ef80e6907c528879450c5be7bdc3d9d
2019-02-20 16:51:50 -08:00
Ecco Park
5d14d0a528 passpoint: remove NETWORK_SETUP_WIZARD permission
This permission is not required as SetupWizard does not have the UI to
manage Passpoint profile.

Bug: 124301934
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: I3bca539249c31124205c69e3304d697f0c072087
Signed-off-by: Ecco Park <eccopark@google.com>
2019-02-20 13:29:51 -08:00
Etan Cohen
9f69d22441 Merge "[RTT] Deprecate old feature availability APIs" 2019-02-20 01:45:19 +00:00
Ecco Park
3f94ad15cd Passpoint: add FQDN and Provider name field in WifiInfo
As part of new Passpoint UX, quick Setting and "Network &* internet"
screen of Settings needs to present Provider name when Passpoint AP is
connected instead of displaying SSID of the AP.

In addition, Wifi Picker needs to match current passpoint connection
info with Passpoint AccessPoint by FQDN.

So, the two fields are added in WifiInfo

Bug: 124462043
Test: ./frameworks/base/wifi/tests/runtests.sh
Test: Tested with Passpoint AP and confirmed that the info is set
correctly.
Change-Id: I7215cba671e1c7eb07fbacb9d546d810cc26e826
Signed-off-by: Ecco Park <eccopark@google.com>
2019-02-15 10:16:12 -08:00
Jimmy Chen
1ddbe82a99 p2p: revise API Javadoc
Revise API Javadoc according to API council's comments.

Bug: 123661241
Test: build - make docs
Change-Id: I258ecd1c78e95d0847d86965ec306dfd2bdafac1
2019-02-14 18:31:43 +08:00
Roshan Pius
cd3afe26d7 WifiInfo: Fix javadocs to reflect the new behavior
Bug: 124080065
Test: Compiles
Change-Id: Ia087d07eda30f94a79f5e1132fc3249aa0df5b32
2019-02-13 12:14:34 -08:00
Etan Cohen
ae78bea482 Merge "[WIFI] Update javadoc for getConfiguredNetworks" 2019-02-12 20:16:18 +00:00
TreeHugger Robot
ebfc162db3 Merge "Remove unnecessary SystemApi annotation from EasyConnectCallbackProxy" 2019-02-12 18:56:40 +00:00
Etan Cohen
a3be9e2506 Merge changes from topic "parcelable_peer_handle"
* changes:
  [AWARE] Create a Parcelable version of PeerHandle
  Revert "[AWARE] Make PeerHandle parcelable"
2019-02-12 00:13:47 +00:00
Etan Cohen
5c8614ea1a [RTT] Deprecate old feature availability APIs
Wi-Fi RTT feature availability has been using PackageManager feature
flags since P. WifiManager legacy API for feature availability should
have been deprecated.

Bug: 122969274
Test: atest android.net.wifi
Change-Id: Ic7016df77aa295367ae93e94666665c9192a4024
2019-02-11 15:38:08 -08:00
Etan Cohen
4bf6987cee [WIFI] Update javadoc for getConfiguredNetworks
Document more clearly PO/DO behavior (in addition to already documented
Carrier app).

Bug: 123390208
Test: build docs
Change-Id: Ic5228fd801c4243d8398313a2a7d84cf5b6e6d89
2019-02-11 14:23:49 -08:00
Etan Cohen
8c83a07c36 Merge "[AWARE] Enhance TLV utils to support new TLV structs in NAN" 2019-02-11 16:35:59 +00:00
Jiyong Park
019081edc6 Remove unnecessary SystemApi annotation from EasyConnectCallbackProxy
The class is a private inner class which is not accessible from anywhere
outside of WifiManager but is annotated with SystemApi. The annotation
is failing android.signature.cts.api.AnnotationTest#testAnnotation.

Bug: 124210145
Test: run cts -m CtsSystemApiAnnotationTestCases
Change-Id: I0c38e39f3e1cf5e161fafad4c243ebe2531830bb
2019-02-11 22:40:07 +09:00
Roshan Pius
2fb540e01f Merge changes I2d88af7e,Ic0730eca
* changes:
  WifiNetworkSuggestion/Specifier: Fix javadoc
  wifi.proto: Add wifi config store IO duration metrics
2019-02-09 00:26:12 +00:00
Roshan Pius
34929e323a WifiNetworkSuggestion/Specifier: Fix javadoc
Bug: 123313291
Test: Compiles
Change-Id: I2d88af7ed0ee3b92c17ab9af84aadad31523d6ab
2019-02-08 11:58:47 -08:00
Ahmed ElArabawy
0dfff0de84 Wifi: Update the API doc for LOW_LATENCY wifilocks
This commit is updating the javadoc for the LOW_LATENCY wifi locks.
This is based on the request of the API Council review.

Bug: 122984857
Test: None
Change-Id: I815eb5b9905b700433aed4ef4fbbce215ffbe391
2019-02-08 10:28:35 -08:00
Etan Cohen
bd0ebf80b4 [AWARE] Create a Parcelable version of PeerHandle
Extend PeerHandle to create a parcelable version. Cannot simply
add parceling to the original class since it is not version safe
(new apps running on old operating systems will crash).

Bug: 119594815
Bug: 122984982
Test: atest android.net.wifi.aware
Change-Id: If6edb9f43ad89d1438eb0969292fe55904677d2d
2019-02-08 08:29:43 -08:00
Etan Cohen
ea792225c4 Revert "[AWARE] Make PeerHandle parcelable"
This reverts commit a36b5c5815.

Can't change the behavior of PeerHandle in-place. Will create
a new class which extends it.

Bug: 122984982
Test: atest android.net.wifi
Change-Id: I14da17680fcbf20ece84631896d10cfaa53e33dc
2019-02-08 08:29:15 -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
Etan Cohen
912eff0969 [AWARE] Enhance TLV utils to support new TLV structs in NAN
Enhance TLV utilities (and fix bug). New methods necessary as
part of construction of NANv3 compliant TLVs.

Bug: 117605977
Test: atest android.net.wifi
Test: atest com.android.server.wifi
Change-Id: I1b47e5f281cb3bd5e0c2a234c577e7571b13367d
2019-02-06 12:46:12 -08: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