Commit Graph

3494 Commits

Author SHA1 Message Date
TreeHugger Robot
558351e00a Merge "WifiManager: Add a note for NETWORK_SETTINGS_RESET behavior" into rvc-dev 2020-05-15 23:21:38 +00:00
Roshan Pius
151cbf160b WifiManager: Add a note for NETWORK_SETTINGS_RESET behavior
Bug: 156657612
Test: Compiles
Change-Id: I668c625d5a0b20bbc9e3e1a5c15c1ada6e1fa2bb
2020-05-15 12:43:13 -07:00
Ahmed ElArabawy
8863a835cb Wifi: Add constant and utility method for bands
This commit adds a constant WIFI_BAND_ALL to refer to bit mask
for all bands.
It also adds a method to check on if previous scan covers all
supported bands.

Bug: 156053158
Test: atest android.net.wifi
Change-Id: I426dd3940b7efd67eaf6e12f862a1e3f0ebc177a
2020-05-12 09:33:25 -07:00
Ahmed ElArabawy
f7ccda0564 Wifi: Add definitions for bands frequency boundries
Channel frequency ranges for the three bands (2.4G, 5G, and 6G) are used
in different places with separate definitions or via literal numbers.
Also, the values are not accurate and sometimes not consistent.

This commit defines those ranges in a single place for use of other
classes. It also adds some utility methods that use those definitions.

Bug: 153896822
Test: atest android.net.wifi
Change-Id: Ifd19e245fd808c06d48d7557e30be3e92a9e7ec5
2020-05-11 09:44:53 -07:00
David Su
5d1cb4fe1e Merge "Revert "frameworks/base/wifi/tests: Run mts-wifi on AOSP builds"" into rvc-dev 2020-05-09 00:21:18 +00:00
David Su
6cb518de87 Revert "frameworks/base/wifi/tests: Run mts-wifi on AOSP builds"
Revert "opt/net/wifi/tests: Run mts-wifi on AOSP builds"

Revert submission 10814415-mts-wifi-com-androi-wifi

Reason for revert: Workaround no longer necessary: b/152559881#comment2
Reverted Changes:
I11baae67e:frameworks/base/wifi/tests: Run mts-wifi on AOSP b...
I66febcbb2:opt/net/wifi/tests: Run mts-wifi on AOSP builds

Bug: 152559881
Test: in continuous runs
Change-Id: I1d5f4d312f4e15ae5e2e56965b3fc76fdefcdcea
2020-05-08 20:43:10 +00:00
Anton Hansson
b97976134c Merge "Enable api lint and check_last_api for modules" into rvc-dev 2020-05-06 09:28:03 +00:00
Anton Hansson
340954c017 Enable api lint and check_last_api for modules
This adds checking of module api compatibility to the individual module
api rules. Until now, this checking has been done via the monolithic
metalava runs which we are aiming to get rid of.

Now is a good time to do this because we can compare them to the just
finalized version 30 API, which we have no diffs with. Baseline the
existing wifi failures that metalava fails to find in the previous API.

Bug: 144149403
Test: m checkapi
Change-Id: Id222895daa3a769c265965b052a17d5a1ca18462
2020-05-05 19:17:08 +01:00
Andrei Onea
f718c51499 Jarjar duplicate classes
Add jarjar rule for extra .aidl classes
android.net.DataStallReportParcelable and
android.net.NetworkTestResultParcelable .

Test: atest CtsStrictJavaPackagesTestCases
Bug: 155682584
Change-Id: I4a1fe9fca444cd61502d60799010481be8f9efec
2020-05-05 16:08:06 +01:00
Andrew Sapperstein
8fe35e5f21 Fix broken @see tags in public documentation.
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.

To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
 - worked around by fully qualifying the constructor

Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
(cherry picked from commit e0624c7a40)
2020-05-01 18:25:32 +00:00
Anton Hansson
8bf731c0fc Rename module dist files
This makes the filenames of the disted artifacts (api txts and stubs)
match the module name of the modules they're from. This matches the
naming scheme used by java_sdk_library, which should make the future
transition to this build rule easier.

Bug: 149293194
Test: lunch sdk_phone_armv7 && m sdk dist && find out/dist/apistubs
Change-Id: I076f30931bf2524d57703873cd7de25b3f23b457
2020-04-30 17:42:20 +01:00
Roshan Pius
79e555c4b9 WifiNetworkSpecifier.Builder: Fix formatting in build() javadocs
Bug: 146999777
Test: Compiles
Change-Id: I96fff2db5a285eeb2a1be36aa47a239939a9ae98
2020-04-22 08:40:53 -07:00
Roshan Pius
9f183e0108 WifiManager: Add @hide constant for sap
Reason code used to send out a disconnect when SAP is being shutdown.

Bug: 154286607
Test: Compiles
Change-Id: I3cb9b97960c1c9002435f23ba72ed14005a2d814
2020-04-20 10:11:01 -07:00
Roshan Pius
945a3757d2 wifi: jarjar network stack AIDL interfaces
This was the last set of wifi dependencies that were
not jarjar'ed.

Bug: 153596226
Test: Device boots up and connects to wifi networks
Test: Both the commands below return empty list:
a) dexdump service-wifi.jar | grep 'Class descriptor' |
grep -v -e "com/android/server/wifi" -e "com/android/wifi/x/"
b) dexdump framework-wifi.jar | grep 'Class descriptor' |
grep -v -e "android/net/wifi" -e "com/android/wifi/x/"

Change-Id: Ib214b130a740c1840890d5183ab8be594d3af7c8
2020-04-16 06:37:36 -07:00
TreeHugger Robot
65a3920a07 Merge "wifi: Jar jar all external dependencies to a singe namespace" into rvc-dev 2020-04-13 18:18:34 +00:00
Roshan Pius
71709e04c9 WifiConfiguration: Add a method to check if keymgmt needs preShareKey
Bug: 153435438
Test: atest android.net.wifi
Change-Id: If67d853000d99f32204bf0b8b95465909e8740e2
2020-04-11 04:38:59 +00:00
Roshan Pius
5e85ab2683 wifi: Jar jar all external dependencies to a singe namespace
Differentiation between framework-wifi & service-wifi included static
dependencies were getting a little hard to manage. Also, use
com.androd.wifi.x@0 to preserve the original package name.

Bug: 153697614
Test: Device boots up and connects to wifi networks
Test: Manual inspection using dexdump on both framework-wifi.jar & service-wifi.jar
Change-Id: Ifa1efaa772a708c0d40d2d9be415d0c42b71b332
2020-04-10 14:41:01 -07:00
Roshan Pius
cfc6db259d wifi: Add subfilters for android.hardware.wifi
Renaming android.hardware.wifi package also renames the various wifi
PackageManager feature flags. So, refine it to only match the HIDL
stubs.

Bug: 153697614
Test: Manual
a) Added a log to check for rtt, p2p, aware feature flags in Wifiservice
b) Returns false before the change.
c) Returns true with the change.
Test: Manual
dexdump and ensured that all the HIDL stubs are renamed.
Test: Device boots up and connects to wifi networks.
Test: Cts-Verifier aware RTT test does not fail immediately.
Wi-Fi Aware test --> Discovery with ranging --> Publish.
Change-Id: I43ac3195304a4bd2d8e725a4302eb4239290396f
2020-04-10 18:37:01 +00:00
Roshan Pius
0cadd8c7c4 Merge "wifi(jar-jar): Jar-jar all static dependencies" into rvc-dev 2020-04-10 05:30:50 +00:00
Roshan Pius
5a283f2d9d wifi(jar-jar): Jar-jar all static dependencies
Bug: 153596226
Test: Device boots up and connects to wifi networks.
Test: Manual inspection of classes included in framework-wifi &
service-wifi using dexdump

Change-Id: Ic31cdae62761110eeb4834a588b36328de19adb8
2020-04-10 05:14:03 +00:00
Nate Jiang
69e1136884 Change doc for suggestion API
Add more explanation in doc, when app receive error code calling
suggestion API.

Bug: 150215899
Test: atest android.net.wifi

Change-Id: I8055546be8f12f807c35b9f50b239940a671482e
2020-04-09 18:18:01 -07:00
Roshan Pius
21eb629baa wifi(jar-jar): Jar-jar HIDL stubs to a separate namespace
This is statically linked by the wifi service, so should be jar-jar'ed
out to a separate namespace to avoid other components in system_server
calling our copy of the stubs.

Bug: 151475926
Test: Device boots up and connects to wifi networks.
Change-Id: I79247b72a3b5f6dabf38c3cb9705fb5ca0aa729f
2020-04-08 16:02:14 -07:00
TreeHugger Robot
c524ad59f3 Merge "WifiNetworkSpecifier: Ensure we don't match a regular wifi network" into rvc-dev 2020-04-07 13:38:37 +00:00
Roshan Pius
573e3fe6be WifiNetworkSpecifier: Ensure we don't match a regular wifi network
In Android 10, ClientModeImpl would always attach a
WifiNetworkAgentSpecifier for all wifi network agents created
(regardless of whether it was created in response to a specific request
or not). In Android 11, we changed that behavior to ensure that we
attach the WifiNetworkAgentSpecifier only for agents created in response
to a specific request. However, that is exposing a bug in
WifiNetworkSpecifier matching. WifiNetworkSpecifier attached requests
should not satisfy a generic wifi network agent. Fix the
canSatisfiedBy() matching to ensure that it only matches
WifiNetworkAgentSpecifier (or itself which cannot happen during network
matching)

Bug: 149500993
Test: Add a saved network manually while running the failing ACTS test:
act.py -c wifi_manager_cross.config -tb dut-name -tc WifiNetworkRequestTest:
test_match_failure_with_invalid_ssid_pattern
Test: atest android.net.wifi

Change-Id: I38d154bd0a5685fcc38de891256a8e1d4b8cfbb5
2020-04-07 06:45:46 +00:00
David Su
7309ac6092 Merge "framework-wifi: Remove dependency on framework-telephony-stubs" into rvc-dev 2020-04-06 19:01:46 +00:00
David Su
34fc65accf framework-wifi: Remove dependency on framework-telephony-stubs
Since Telephony is no longer a module, `framework-telephony-stubs`
is already part of `module_current`. Only stubs from other modules
need to be explicitly included.

Bug: 151092414
Test: compiles
Change-Id: Iedf05a82dea9e6831b6253dfcb213162d2b9e127
2020-04-04 01:37:28 -07:00
Roshan Pius
8a31e59ece Merge "WifiManager: Update doc for new metered change behavior" into rvc-dev 2020-04-04 00:31:04 +00:00
Roshan Pius
12e167b30e WifiManager: Update doc for new metered change behavior
Also, explictitly mark OVERRIDE_NOT_METERED in WifiConfiguration
when suggestion is not metered.

Bug: 153127005
Test: Compiles
Change-Id: I917de747406167fc38faa05e15d98a9b867a6ce8
2020-04-03 13:27:50 -07:00
Hai Shalom
faac9ca5a9 Merge "[DPP] Fix typo in javadoc for SUCCESS_CONFIGURATION_APPLIED" into rvc-dev 2020-04-03 20:21:34 +00:00
Hai Shalom
c5962ff651 [DPP] Fix typo in javadoc for SUCCESS_CONFIGURATION_APPLIED
Bug: 153015500
Test: No code changes
Change-Id: I3275680ccd6161b703ad60dbe82e558fc17e37e5
2020-04-01 15:55:20 -07:00
Anton Hansson
2c592f0df3 Merge "Remove build workaround for wifi stubs" into rvc-dev 2020-03-31 19:42:28 +00:00
Anton Hansson
2e53a5302b Add wifi util lib to classpath for wifi stubs
Fixes the individual wifi stubs to match those in the monolithic
current.txt.

Bug: 152857194
Test: diff <(cat api/system-current.txt | grep 'class RttManager {' -A30) \
           <(cat wifi/api/system-current.txt | grep 'class RttManager {' -A30) \
      && echo pass || echo fail
Change-Id: I3fc8a87e83f8dfee8d97966ead379d7acf0807bc
2020-03-31 15:45:00 +01:00
Anton Hansson
8256aad305 Remove build workaround for wifi stubs
b/151134996 is fixed now.

Bug: 151134996
Test: m framework-wifi-stubs-publicapi
Change-Id: Ia5c07faaca18c663d02c705aca0a7b7622a95e5f
2020-03-30 14:17:35 +01:00
Chalard Jean
996492f866 Merge changes from topics "api-fix-networkagent", "networkprovider_api", "satisfiedby" into rvc-dev
* changes:
  Rename satisfiedBy into canBeSatisfiedBy
  Address further API council comments.
  Update the NetworkProvider API for council comments
2020-03-27 22:50:42 +00:00
Chalard Jean
2da4f9f9ae Rename satisfiedBy into canBeSatisfiedBy
Test: FrameworksNetTests NetworkStackTests
Bug: 152238712
Change-Id: I076876a6662bde143ef7d315ce3767acafff93c1
2020-03-27 23:46:30 +09:00
Artur Satayev
8612937cb6 Remove unsupportedappusage-annotation library.
It is not needed anymore, and is replaced by "unsupportedappusage" library.

Bug: 145132366
Test: m
Change-Id: I589b3f80979e38ff81ff5f0ad2de1ae8df9c9f00
Merged-In: I589b3f80979e38ff81ff5f0ad2de1ae8df9c9f00
Exempt-From-Owner-Approval: clean up
2020-03-26 14:40:16 +00:00
Les Lee
d6f3212620 Merge "wifi: Support setBssid for tethered mode hotspot" into rvc-dev 2020-03-26 00:23:14 +00:00
Nate Jiang
0ccefbe94b Merge "Keep most recently connection network flag" into rvc-dev 2020-03-25 18:10:13 +00:00
Anton Hansson
3544feedb7 Merge "Make framework-wifi stubs use the new defaults" into rvc-dev 2020-03-25 13:21:40 +00:00
Anton Hansson
013dc72801 Make framework-wifi stubs use the new defaults
Makes it convenient to change all stubs from a central place.

Bug: 149293194
Test: m framework-wifi-stubs{public,system,module_libs_}api
Change-Id: Ie857558b507c90dd46a7777c82f14d7d45422222
2020-03-24 19:50:06 +00:00
David Su
9c493f4722 Merge "frameworks/base/wifi/tests: Run mts-wifi on AOSP builds" into rvc-dev 2020-03-24 19:14:07 +00:00
lesl
b1c47a7641 wifi: Support setBssid for tethered mode hotspot
PS: Remove BSSID convert to WifiConfiguration since BSSID field doesn't
use in WifiConfiguration usage on SoftAp.

Bug: 152180102
Test: atest frameworks/base/wifi/test/
Change-Id: Id781ff6af222fe1d557560feaa44b5d2761c3a81
2020-03-24 21:26:31 +08:00
Roshan Pius
5f176bf91e Merge "WifiMigration: Add a settings key to indicate migration is complete" into rvc-dev 2020-03-24 05:11:50 +00:00
Roshan Pius
849a6f78a5 WifiMigration: Add a settings key to indicate migration is complete
Bug: 151888061
Test: Manual verification (ensured that this method returns null after
first reboot)

Change-Id: Ie8ad397c7b68e35cfa7b696ef22d84f376cf3fe7
2020-03-23 18:48:28 -07:00
David Su
87d6a79f2f frameworks/base/wifi/tests: Run mts-wifi on AOSP builds
This is a temporary workaround for mts-wifi to
run on AOSP builds, since on those devices the
Wifi package name is `com.android.wifi` and not
`com.google.android.wifi`.

Bug: 151836001
Test: continuous runs
Change-Id: I11baae67e10638acd8c24ae0fab92e5b2bfca6e4
2020-03-23 16:14:54 -07:00
Vladimir Marko
82f2060f55 Merge "Add permitted_packages to framework-wifi." into rvc-dev 2020-03-23 20:43:18 +00:00
TreeHugger Robot
162db72a8a Merge "WifiMigration: Add sample config store XML files" into rvc-dev 2020-03-20 23:02:58 +00:00
Michael Wright
b99ba10bec Merge "Make ScanResult final." into rvc-dev 2020-03-20 19:02:10 +00:00
Roshan Pius
da0704b275 WifiMigration: Add sample config store XML files
Also, added a readme to list the different sample files.

Bug: 152048434
Test: Compiles
Change-Id: If15ec11fd36b327ac4942f97a49ff04abc1cbd0f
2020-03-20 11:57:48 -07:00
Vladimir Marko
8a71e9b9e3 Add permitted_packages to framework-wifi.
Test: m out/soong/.intermediates/frameworks/base/wifi/framework-wifi/android_common/package-check.stamp
Bug: 151314205
Change-Id: If04aa602c2e628243fe6cb3545db912a1179c5d5
2020-03-20 11:32:54 +00:00