Commit Graph

2707 Commits

Author SHA1 Message Date
Treehugger Robot
5ccfef6e6b Merge "Export Wifi Parcelables AIDLs from framework.jar" 2020-02-03 02:05:12 +00:00
Xiao Ma
859af50899 Export Wifi Parcelables AIDLs from framework.jar
Add Wifi public/@SystemApi Parcelable AIDLs to
framework.jar AIDL exports so that they can be
referenced outside the Wifi module.

Create a new folder "aidl-export" to separate
the AIDLs we want to export to allow external
callers to reference in their AIDL. Private AIDLs
remain in the "java" folder.

most of modifications cherry-pick from internal master
(ag/10139892), but slight change for Android.bp to be
able to compile in aosp build system. keeping the same
aidl path as master to find the correct path when importing
ScanResult from wifi.

Bug: 140299412
Bug: 137835398
Test: atest FrameworksWifiTests

Merged-In: I4e0dc1119bf2b49865c9b5cdf23c571528228902
Change-Id: Idaae4f365e4efaead023ee175391a9e9432a6e00
2020-01-31 13:01:30 +09:00
David Su
23d84d343b Merge changes Iaa6f0d65,I68a16b64
* changes:
  Networking: Rename removeDoubleQuotes to sanitizeSsid
  Wifi: Rename removeDoubleQuotes to sanitizeSsid
2020-01-30 22:42:16 +00:00
Xiao Ma
34a5bbda41 Merge "Make Information Elements (IE) of a scan result available as a public API." 2020-01-29 00:12:20 +00:00
Xiao Ma
ac16b8ae3e Make Information Elements (IE) of a scan result available as a public API.
Bug: 137835398
Test: atest FrameworksWifiTests
Test: attach to upstream hotspot device by selecting the sanned
      ssid from wifi settings, then check the OUI, vendor specific
      type fileds of IEs from the logcat.

Merged-In: If3b9906c75033f51bd35fcf054154125719ea958
Change-Id: If3b9906c75033f51bd35fcf054154125719ea958
2020-01-28 06:23:36 +00:00
David Su
51939ea9be Wifi: Rename removeDoubleQuotes to sanitizeSsid
Keep removeDoubleQuotes as it is marked
@UnsupportedAppUsage.

Bug: 145745815
Test: compiles
Change-Id: I68a16b64eba3d84265b5cf2c83b434dc4fc7fa3c
Merged-In: I68a16b64eba3d84265b5cf2c83b434dc4fc7fa3c
(dirty cherry-pick from internal branch)
2020-01-27 13:39:39 -08:00
James Mattis
0ffae5ab87 DO NOT MERGE registerSoftApCallback Executor param
Updating WifiManager.registerSoftApCallback to now have a @NonNull
Executor as a parameter vs @Nullable.

Bug: 147671244
Bug: 145592261

Test: atest FrameworksWifiApiTests:android.net.wifi.WifiManagerTest
Also manually tested on Pixel 3.

Change-Id: I85e6194f067e451842c01733cca2ea12bd164036
2020-01-22 13:41:24 -08:00
Artur Satayev
54af4fc42a Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I547d7fb2e6bc2e9707bbc0d14dc1e8cd632c5a23
Merged-In: I547d7fb2e6bc2e9707bbc0d14dc1e8cd632c5a23
2020-01-09 13:52:18 +00:00
Roshan Pius
94006409ae WifiManager: Add missing field to getConfiguredNetworks() doc
Bug: 122815212
Test: None
Change-Id: I907aa8219a3812b7c2dadbe9ce99ccf4c83c535b
2019-11-26 17:39:34 +00:00
Roshan Pius
9518866c53 NetworkScoreManager: Add @SystemApi for wifi mainline module
Add formal API's for API's that the wifi mainline module uses:
a) NetworkScoreManager.requestNetworkScores - Request new network scores.
b) NetworkScoreManager.registerNetworkScoreCallback - @SystemApi wrapper
over the existing registerNetworkScoreCache.
c) NetworkKey.createFromScanResult - Create NetworkKey from ScanResult.

Also,
a) Converted the existing WifiNetworkScoreCache callback implementation to
support both the new @SystemApi (used by wifi) and the old @hide API
(used by settings).
b) Stopped invoking dump on all the callbacks from NetworkScoreService.
The dump of each callback should be invoked at their client site (i.e
wifi service should dump state of the callback it registers with the
service).
c) Added a helper method |dumpWithLatestScanResults| to help dump the
state of the WifiNetworkScoreCache from wifi service.

Bug: 144487252
Test: a) Device boots up and connects to wifi network.
b) Manually verified that network scores are being requested & updated
with the new interface.

Change-Id: Id5a66189150e7a088127519373a832f63bdd12ac
Merged-In: Id5a66189150e7a088127519373a832f63bdd12ac
(cherry-picked from c278f80c28)
2019-11-24 07:04:30 +00:00
David Su
1124e240c0 Merge "NetworkKey: migrate from ScanResult.wifiSsid to SSID" 2019-11-21 18:44:46 +00:00
David Su
e51ae1566b NetworkKey: migrate from ScanResult.wifiSsid to SSID
wifiSsid is an @hide field, migrate to getter method.

Bug: 144311098
Test: atest NetworkKeyTest
Change-Id: Ic689e12b8de4af52fae26c25bc90c8eb093ad3fe
Merged-In: Ic689e12b8de4af52fae26c25bc90c8eb093ad3fe
2019-11-20 10:41:59 -08:00
James Mattis
4a3e2c1e93 Swap param order in registerSoftApCallback
Moving executor to be the first argument in registerSoftApCallback.

Bug: 144379300
Test: atest FrameworksWifiApiTests:android.net.wifi.WifiManagerTest
Manually on pixel 3

Change-Id: I7074278d16beac422ce7b29d4471b2794fa97825
Merged-In: I7074278d16beac422ce7b29d4471b2794fa97825
2019-11-18 13:48:29 -08:00
James Mattis
190e1cacde Marking SoftApCallback methods as SystemAPI
Making SoftApCallback methods available to @SystemAPI including
the API for registration of a SoftApCallback. This includes updating
registration to use an executor now vs a handler.

Bug: 143564153
Test: atest FrameworksWifiApiTests:android.net.wifi.WifiManagerTest
Also tested manually on a Pixel 3.

Change-Id: I22b5029a8dbd7a50ad6faf0bb3b15269af839956
Merged-In: I22b5029a8dbd7a50ad6faf0bb3b15269af839956
2019-11-14 10:48:33 -08:00
James Mattis
201a319860 Support for hotspot client visibility.
Adding support for visibility into clients that connect to an active hotspot.

Bug: 137309578
Test: atest FrameworksNetTests:com.android.server.connectivity.TetheringTest
atest FrameworksWifiApiTests:android.net.wifi.WifiManagerTest
atest FrameworksWifiApiTests:android.net.wifi.WifiClientTest
Tested manually on Pixel 3.

Change-Id: I1caeb10bc50202873e760a76b346bccd941e2574
Merged-In: I1caeb10bc50202873e760a76b346bccd941e2574
2019-11-11 22:10:35 -08:00
Chen Xu
386027afdd Merge "new telephony annotation class" 2019-11-04 23:29:39 +00:00
Chen Xu
7631ff7c48 new telephony annotation class
This is a preparatory work for mainline. since Intdef is hidden, so we
have to move some annotations (applied in SDK/system API) to a separate
annotation class and having other module statically link to it.

TODO: include telephony annotation in framework-non-updatable-sources

Bug: 140908357
Test: Build
Change-Id: I37f8a0624bbf27f264870ee9dbf03d3aaa5cadc1
(cherry picked from commit c9d4ee112e)
Merged-in: I37f8a0624bbf27f264870ee9dbf03d3aaa5cadc1
(cherry picked from commit 4712711d3d91621083bf92f5a1647b92c20a8b81)
2019-11-04 21:26:50 +00:00
David Su
1cef853e2d Clarify JavaDoc for SoftAP APIs
Add more documentation to WifiManager's
EXTRA_WIFI_AP_INTERFACE_NAME, EXTRA_WIFI_AP_MODE,
and startSoftAp().

Bug: 143138160
Test: compiles
Change-Id: I15a22ca8d0718e02e606ba6e19d20b1727aa93d2
Merged-In: I15a22ca8d0718e02e606ba6e19d20b1727aa93d2
2019-11-01 20:26:09 -07:00
David Su
562f07e9ed Promote @hide APIs to @SystemApi for tethering
Bug: 142372871
Test: compiles
Change-Id: I91f143cdc23c6dce8921931a591298ee0c1a1c00
Merged-In: I91f143cdc23c6dce8921931a591298ee0c1a1c00
2019-11-01 20:25:57 -07:00
Xin Li
d57e959e71 Merge qt-r1-dev-plus-aosp-without-vendor (5817612) into stage-aosp-master
Bug: 135460123
Change-Id: I65906d82b14125c0893d5cde0cfebb73bf9e38ab
Merged-In: I1f2564837c33cd4c6c3db6aac3cbaf8c09707da9
2019-09-10 11:16:29 -07:00
Aurimas Liutikas
00be951a08 Add missing nullability annotations.
To prepare for enabling MissingNullability Metalava check this CL
works on adding missing nullability issues that metalava flags if
we tell it to flag new things since API 29.

This is not a complete CL, mostly addresses public api and
toString/equals for @SystemApi

Exempt-From-Owner-Approval: Large scale nullability clean up
Bug: 124515653
Test: make -j checkapi
Merged-In: I109260842cfc25f06e40694997fcbb4afa02c867
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
2019-08-30 00:14:44 +00:00
Roshan Pius
aa562f6dc3 Merge "Fix LocalOnlyHotspotReservation double stop of local hotspot."
am: c046f9f039

Change-Id: I362b05f32fc26a7233bd4dd26b3e941c8d2e9a46
2019-08-27 10:19:55 -07:00
Roy Want
2d2b916cd3 Increased precision of Lat/Lng decoder and enabled BSSID list to be explicit (client)
Bug: 139448024
Bug: 139448573
Test: All tests pass (with increased precision), end-to-end tests pass.
Change-Id: I1e1dd3b26df707279e6cc2d59951f28d7878efe8
2019-08-16 21:11:21 +00:00
Yury Kotlyarov
ee7b0a6ab2 Fix LocalOnlyHotspotReservation double stop of local hotspot.
If user executed startLocalOnlyHotspot(), then reservation.close()
garbage collector still keeps reservation object until drain.
If user executed startLocalOnlyHotspot second time during
application life cycle, garbage collector can delete previously
allocated reservation object. In this case finalize() of old
reservation object will be executed, then close(), then
stopLocalOnlyHotspot(). As result, new started LocalOnlyHostpot
can be immediatly stopped by old reservation object delete.
Steps to reproduce: execute startLocalOnlyHostpot() and
reservation.close() multiple times during application life cycle,
check if hotspot up couple of seconds after start.
This fix prevents stopping of local hotspot if reservation
was previously closed.
Test: manual

Bug: 139074896
Change-Id: I86c10b577dbab8cad2d5f7e19805511a93bcb668
2019-08-07 16:05:54 -05:00
Steven Liu
47af13c805 Add the defination of Intent - WIFI_NETWORK_SETTINGS_RESET_ACTION
Bug: 135489675
Test: Do 'reset settings', registered app got the Intent.
Change-Id: I39adae63269595edda79aaf3da82a3dfe613d59a
2019-07-24 09:52:47 -07:00
TreeHugger Robot
4bdeefacba Merge "p2p: update documents about EXTRA_WIFI_P2P_GROUP in connection changed event" into qt-dev 2019-07-18 18:11:23 +00:00
Jimmy Chen
036b140b39 p2p: update documents about EXTRA_WIFI_P2P_GROUP in connection changed event
This value may be a null, receiver should check before using variable.

Bug: 137618950
Test: make docs
Change-Id: If466dac092fc345482d0456f08a915d1e7ba0010
2019-07-18 14:27:21 +00:00
Nate Jiang
16601cdd99 [AWARE] recommend use Builder create instance in doc
Changes doc for using Builder to create WifiAwareNetworkSpecifier
instead of deprecated Api.

Test: It's a doc change.
Bug: 136034317
Change-Id: I6f41ceae6d696fc5df336ad831c2c89ab3746c50
2019-06-25 17:57:37 -07:00
Hai Shalom
2195d1fc66 [OWE] Support OWE in transition mode
Support OWE in transition mode for devices with OWE support
and devices without OWE support. Scan results will return a
new type of network for OWE in transition networks on devices
that support OWE, and Open for devices that don't support OWE.
Handle the case where Open network is manually added to a device
that supports OWE.

Bug: 132139642
Test: Device with OWE: Connect to Open, OWE-Transition, OWE networks
Test: Device without OWE: Connect to Open, OWE-Transition
Test: Manually create Open network, connect to OWE-Transition
Change-Id: I29e69eaae2672562420ee7c6393bf2cc4d7f1b91
2019-05-13 15:37:43 -07:00
TreeHugger Robot
78f6faf13d Merge "[InformationElementUtil] Add FT/SAE AKM" into qt-dev 2019-05-12 05:43:32 +00:00
Hai Shalom
b6b102f014 [InformationElementUtil] Add FT/SAE AKM
Add FT/SAE AKM to InformationElementUtil class and parse it correctly so
that the phone would be able to associate with APs advertising it.
Added additional unit tests that were missing.

Bug: 132378498
Test: atest InformationElementUtilTest
Change-Id: I470e4e071de36dfe8f79475477c6077ed8bef3cb
2019-05-10 13:44:56 -07:00
Bram Bonné
5853bd038f Documentation update for MAC access restrictions.
With change ag/7340724, the device's P2P MAC adress will only be
available to callers holding the LOCAL_MAC_ADDRESS permission, and will
be anonymized otherwise. This CL updates the documentation in
WifiP2pManager to reflect that.

Bug: 132055766
Test: atest tests/src/android/net/wifi/

Change-Id: I9c2b5ce2cb2c2d2d6766fd34f3451ad4f22a5698
2019-05-07 10:16:20 +00:00
Oscar Shu
0731915380 Merge "Dump randomized MAC in bugreport" into qt-dev 2019-05-03 17:00:40 +00:00
xshu
51ef178ca6 Dump randomized MAC in bugreport
Needed for debug purposes.

Bug: 131850574
Test: unit tests
Test: verified with dumpsys wifi: "mRandomizedMacAddress: 42:03:7d:d0:0e:6c"

Change-Id: Icc3eed999849c58079c298452574f68b96ba7706
2019-05-02 16:24:05 -07:00
Roshan Pius
72e1cea036 WifiSsid: Catch String out of bound exception
Bug: 130843215
Test: None
Change-Id: I6046bf0fe9e9c402e565e5fa63f0e0aec711725c
2019-04-19 09:17:59 -07:00
TreeHugger Robot
1ead26718c Merge "[WifiEnterpriseConfig] Update javadoc for setDomainSuffixMatch" into qt-dev 2019-04-17 01:34:45 +00:00
Hai Shalom
ee5959b1b8 [WifiEnterpriseConfig] Update javadoc for setDomainSuffixMatch
wpa_supplicant accepts a semicolon delimited list of domain suffixes.
Update the javadoc to reflect this.

Bug: 130664269
Test: No code changes
Change-Id: I93dbabeddb8854112b413dbb27d094d9d187a73c
2019-04-16 15:04:01 -07:00
Ecco Park
fedd61650e Pass the package of caller to getPasspointConfigurations into WifiService
The package information of caller is needed to check the SDK version in
WifiService layer.

Bug: 124301934
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: I07020da22f044bdd32d376787fc14690bf926513
Signed-off-by: Ecco Park <eccopark@google.com>
2019-04-11 17:04:23 +00:00
Etan Cohen
903c9bd539 [AWARE] Enable discovery/operation on 5G
Speed up discovery, increase robustness.

Bug: 129151127
Test: atest android.net.wifi
Test: atest atest com.android.server.wifi
Test: ACTS ThroughputTest:test_iperf_single_ndp_aware_only_ib
Change-Id: I83cf0720d07e5623b7861bf4cd73344bcff90ba5
2019-04-09 13:22:05 -07:00
Etan Cohen
6d98837eb6 Merge "[AWARE] Add unit test - fix hashing bug" into qt-dev 2019-04-08 18:21:58 +00:00
Etan Cohen
09231fb6e2 [AWARE] Add unit test - fix hashing bug
Adding unit tests to verify hashing code uncovered a bug (hashing
arrays) - fixed.

Bug: 130051430
Test: atest android.net.wifi
Test: atest com.android.server.wifi
Test: ACTS ThroughputTest:test_iperf_single_ndp_aware_only_ib
Change-Id: I4c654dd656b4bd1bce8077c73c66f458d103bc86
2019-04-06 22:28:35 -07:00
Roshan Pius
31fbd556f6 WifiManager: Restore network pin behavior on enableNetwork
This code is mostly a NO-OP for most apps & OEM's. The pinner only takes
effect if the app's target SDK < Android L. But, there might
be some OEM's who may want to enable this for all apps.

Bug: 129906426
Test: Compiles
Change-Id: Iccf67ba0d4ea8d9c5d3561a128908611636b420e
2019-04-04 14:45:21 +00:00
Andrew Solovay
ce10ef80fc docs: Javadoc cleanup
There were a number of Javadoc style problems in the
WifiNetworkSuggestion.Builder.build() docs, which caused some formatting
problems.

One specific problem worth noting: A {{ causes trouble at publish time,
because it looks like the start of a Django directive. But escaping the
{ -- e.g. &#123 -- doesn't work, because the Javadoc compiler helpfully
escapes the *ampersand*, so the HTML output is "&amp;#123", which
renders on the page as "&#123" instead of "{". So putting a space
between the two braces seems like the simplest solution.

No code changes here, just Javadoc comment fixes.

Tested by building the docs and staging to:

http://go/dac-stage/reference/android/net/wifi/WifiNetworkSuggestion.Builder#build

Screenshots (in case the stage gets overwritten):
https://screenshot.googleplex.com/o4p7efFGCbJ.png (1)
https://screenshot.googleplex.com/nkhEqU54LNb.png (2)

Bug: 128536865
Test: make ds-docs (then build & stage)
Change-Id: Ie04bc4dc517443a6899aba989beeb38b9299826e
2019-04-03 15:54:27 +00:00
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