314 Commits

Author SHA1 Message Date
David Su
e955accd13 Expose ScanResult/WifiInfo @hide APIs as @SystemApi
Expose @hide APIs in ScanResult/WifiInfo as @SystemApi.
These APIs are mostly used by Settings.

Bug: 144311098
Test: atest FrameworksWifiApiTests
Change-Id: Ifdfa78ed59f6a42a3646defa5a9f164d146ceada
2019-11-19 13:18:38 -08:00
David Su
f7ef955d90 WifiManager/Scanner: Expose @hide APIs as @SystemApi
Expose @hide APIs in WifiManager/WifiScanner as
@SystemApi so that they can be referenced by external
callers (mostly Settings).

Bug: 143970861
Test: atest FrameworksWifiApiTests
Change-Id: I956290e2a3aca3f4946da52d7e271082824dd06c
2019-11-18 10:44:56 -08:00
David Su
b73c737ffc Expose Wifi P2P @hide APIs as @SystemApi
These APIs are mostly used by Settings.

Bug: 143892817
Test: atest FrameworksWifiApiTests
Change-Id: I27061280b0c49677fa651c6f9799e48b78e4c109
2019-11-15 11:25:13 -08:00
James Mattis
31a8feb9c7 Merge "Swap param order in registerSoftApCallback" 2019-11-15 18:58:28 +00:00
Ahmed ElArabawy
c67d4f750e Wifi: Support check on device capability for 6GHZ
This commit implements support of checking whether device supports 6GHz band.

Bug: 139354972
Test: atest com.android.wifi.server
Change-Id: Id2c1ef085bb680b9d59ce1788147b154efc4b422
2019-11-15 10:14:33 -08:00
James Mattis
cb157e8a33 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
2019-11-13 21:08:33 -08:00
Philip P. Moltmann
889043a661 Merge "Pipe through featureId from calling context to wifi location checking code" 2019-11-09 00:56:14 +00:00
Philip P. Moltmann
dcb850c580 Pipe through featureId from calling context to wifi location checking
code

Bug: 136595429
Test: atest FrameworksWifiTests FrameworksWifiApiTests
Change-Id: I7e1090e6e618dcd9e67b64c0f4c29934c8e1a69e
2019-11-08 14:54:57 -08:00
James Mattis
80c86d5c08 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 Hawk.

Change-Id: I22b5029a8dbd7a50ad6faf0bb3b15269af839956
2019-11-08 09:39:00 -08:00
Nate(Qiang) Jiang
d076cbcd8d [Suggestion API] add network callback API
Add new API that allow apps to get connection event.

Bug: 142062781
Test: atest android.net.wifi
Test: atest com.android.server.wifi

Change-Id: I387f620901621feb2b15dff7c696d5d3f9a068b9
2019-11-07 14:35:02 -08:00
Les Lee
3c7989bfdc Merge "wifi: Add SoftApInfo Callback support" 2019-11-06 05:18:26 +00:00
lesl
3fd4b647f7 wifi: Add SoftApInfo Callback support
Bug: 142752869

Test: unit test, atest frameworks/base/wifi/tests/
Test: Manual test - checked by log.
Change-Id: I9fe7a18654721f98026680711685c06add3da264
2019-11-05 13:39:13 +08:00
Ahmed ElArabawy
dbe3883155 Wifi: Add AP wifi technology to ScanResult
This CL adds to ScanResult structure information about the Wifi
technology.

Bug: 143382822
Test: atest com.android.wifi.server
Change-Id: Ibe1d30e2efc4693be22148443b26446b90d89179
2019-11-02 22:52:58 -07:00
Ahmed ElArabawy
1e13ad6574 Wifi: Change "Technology" to "Standard" in API
This commit is to change the naming from Wifi Technology to Wifi
Standard. This is to comply with the API council review.

Bug: 143551314
Test: atest com.android.wifi.server
Change-Id: I0584f9b791dd14119af199cb14d4caf4ffbf54ab
2019-11-02 22:20:19 -07:00
Ahmed ElArabawy
b746c431e7 Wifi: Support of HE Operation handling for Wifi-6
This Commit adds support for handling of HE Operation Information
element as part of the support for 11ax

Bug: 139354972
Test: atest com.android.wifi.server
Change-Id: I5e8319c4065e57eef1b89f21be2725b6bab3ad4d
2019-10-31 18:23:32 -07:00
Patrik Fimml
c7c962f3fc Configurable SoftAP: Add System API.
This adds a facility for system apps (with NETWORK_SETUP_WIZARD
or NETWORK_SETTINGS permission) to have more control over hotspot
parameters, while allowing them to use local-only mode and the LOHS
callback API for status updates.

Linters give conflicting advice about parameter ordering. With
startLocalOnlyHotspot(config, executor, callback), we satisfy
    (+) put callback last (enforced at compile time)
    (+) use Executor instead of Handler
    (+) put most meaningful argument first
while we're not satisfying
    (-) put executor last as it is a SAM (doesn't seem to make much
    sense to instantiate executor as SAM anyway, users are more likely
    to get an instance from elsewhere)
    (-) for overloads, add new arguments at the end.

Bug: 132705022
Test: atest SoftApConfigurationTest android.net.wifi.WifiManagerTest
Test: atest android.net.wifi.cts.WifiManagerTest (not tested due to
failures on emulator b/143120756)
Change-Id: Ia189b3664b47a253e160acb71eafab4f217649eb
2019-10-29 15:36:42 +01:00
James Mattis
aefe78c409 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 Hawk.

Change-Id: I1caeb10bc50202873e760a76b346bccd941e2574
2019-10-24 17:18:50 -07:00
Quang Luong
6812e7e84d Merge "Add @SystemApi allowAutojoin(int, boolean) to WifiManager" 2019-10-24 20:22:00 +00:00
TreeHugger Robot
d304b60c3c Merge "[Passpoint] Clean up all test assets for ConfigParserTest unit test" 2019-10-24 01:33:55 +00:00
Hai Shalom
7899942cd7 [Passpoint] Clean up all test assets for ConfigParserTest unit test
Clean up all test assets for ConfigParserTest unit test, and use
generic example values.

Bug: 143239550
Test: atest ConfigParserTest
Change-Id: I52b4011c86ebbb780c40265fb46ea0290442572c
2019-10-23 15:35:03 -07:00
Hai Shalom
2f5062a19b Merge "[Passpoint] Add API to indicate OSU profile and expiration" 2019-10-23 17:14:32 +00:00
Hai Shalom
06f9041220 [Passpoint] Add API to indicate OSU profile and expiration
Add an API to indicate if a profile was provisioned by an OSU
(subscription) server. This is necessary for the settings app
to handle profile expiration date use cases, which are different
between R1 (non-OSU) cases and R2 cases.
Make the getSubscriptionExpirationTimeInMillis API public.

Bug: 141474717
Test: atest PasspointConfigurationTest
Test: atest ConfigParserTest
Test: Complete OSU registration, verify API returns true
Test: Install R1 profile, verify API returns false
Change-Id: I788108f973a47716c5d7c9353eafedd5fb06cb8e
2019-10-22 12:14:40 -07:00
Quang Luong
1074029528 Add @SystemApi allowAutojoin(int, boolean) to WifiManager
WifiManager.allowAutojoin(int, boolean) lets a user toggle whether a
saved network should be allowed to be auto-joined. This "allowAutojoin"
bit is stored within the WifiConfiguration of a saved network.

Bug: 139199957
Test: atest FrameworksWifiApiTests
Change-Id: Ia8650abb59dc53a010accc44bd7b6e28facce992
2019-10-21 14:27:38 -07:00
Ahmed ElArabawy
7aad3c84ed Wifi: Settings to have access to Wifi technology
This CL adds to WifiInfo structure information about the Wifi
technology.
This makes it available to Settings app to use to present in
user interface.

Bug: 138634524
Bug: 140168755
Test: atest com.android.wifi.server
Change-Id: I8aae8e8928462be7729c85fc15e0e7bdd97c1e6e
2019-10-21 10:37:39 -07:00
Nate Jiang
31654058d3 Merge "[WifiManager] add public API to register callback on scan result" 2019-10-18 05:55:47 +00:00
Nate(Qiang) Jiang
ee434e8194 [WifiManager] add public API to register callback on scan result
Bug: 142680108
Test: atest android.net.wifi
Test: atest com.android.server.wifi

Change-Id: I370a972c166242d31d21672c9d8023258664968a
2019-10-17 15:48:06 -07:00
Nate Jiang
a100fb4841 [NetworkSuggestion] add public API to support passpoint in suggestion
Allow apps suggest passpoint network in NetworkSuggestionAPI

Bug: 141378137
Test: atest android.net.wifi
Test: atest com.android.server.wifi

Change-Id: Ibca75b0de758e3dfa78b7939851c8dda2eb3d696
2019-10-17 09:51:17 -07:00
Patrik Fimml
090ea13604 LOHS: use Executor and AIDL interface internally
This enables us to use Executor in new external APIs (as recommended).
This also migrates the LOHS callbacks to an AIDL interface, which
results in cleaner and type-safe code, and allows us to use Executor
without an extra layer of indirection.

Test: atest android.net.wifi.WifiManagerTest LocalOnlyHotspotRequestInfoTest WifiServiceImplTest android.net.wifi.cts.WifiManagerTest
Bug: 132705022
Change-Id: I621062fd3865ca048c022c7ad3520ae4694fc0df
2019-10-02 15:49:40 +02:00
Oscar Shu
5e7736022e Merge "Remove getOrCreateRandomizedMacAddress API" 2019-09-27 17:14:30 +00:00
xshu
44e80de8be Remove getOrCreateRandomizedMacAddress API
Bug: 137799272
Test: unit tests
Change-Id: I078d28ed81a84e32aaece839a51590364a974481
2019-09-25 16:27:29 -07:00
Roshan Pius
4807c9a3dd WifiScanner: Add support to add more results to ScanData
Bug: 140111024
Test: atest android.net.wifi
Change-Id: I71a7568eb508db61cabdaf6e11b51df01c9eb49b
2019-09-24 06:38:11 -07:00
Roshan Pius
c3b87926fb WifiManager: Remove setCountryCode API
Wifi stack will instead call existing public Telephony API/broadcast
to get the country code.

Bug: 140744935
Test: Manual tests
Test: atest android.net.wifi
Change-Id: I83be57123630c510e121f49ceadb30644e26c29c
2019-09-17 14:52:29 -07:00
Roshan Pius
641a6834ba WifiManager: Remove async channel usage
Changes:
a) Migrate existing async channel methods to tracked binder calls.
b) Migrate existing async channel responses to tracked binder callbacks.
c) Deprecate WifiManager.disable() (Use public WifiManager.disableNetwork()
instead). Don't see any external users of this API.
d) Removed unnecessary RssiPacketInfo class (only the total pkt count is
necessary in the public API, so remove this class and only pass the
total count in the callback).

Bug: 130039719
Test: atest android.net.wifi
Test: Manual tests
a) Able to connect to networks from settings.
b) Able to remove network from setttings.

Change-Id: Ie82a9fce2f9e32e48a2da77477893427863fb460
2019-09-17 14:52:29 -07:00
Jimmy Chen
7938515152 ocsp: add OCSP field in WifiEnterpriseConfig
Bug: 136720092
Test: atest FrameworksWifiApiTests
Test: tested with OCSP supported profile
Change-Id: I0095a235792997fda54a2f68af48819caf3deef1
2019-09-06 10:39:35 +08:00
Jimmy Chen
9d4f41f27c Merge "wifi: common name support in PPS-MO profile" 2019-08-26 02:00:59 +00:00
Jimmy Chen
3c9c642fdb wifi: common name support in PPS-MO profile
Bug: 120107510
Test: atest FrameworksWifiApiTests

Change-Id: I82d3e280ebf3169288409a9a1c2a845f88d8e345
2019-08-23 13:12:28 +08:00
Roy Want
ca7dc1a72a Merge "Increased precision of Lat/Lng decoder and enabled BSSID list to be explicit (client)" into qt-r1-dev am: 4e027572e3 am: ac9c2723c6
am: b7a647f676

Change-Id: Ia22a173359eb79a3f8f21612364b33724a827ae0
2019-08-19 15:00:20 -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
xshu
855a106973 Fix runtest.sh in frameworks/base/wifi
The "make" command seems no longer supported after syncing today to
TOT:

build/core/main.mk:13: Calling make directly is no longer supported.
build/core/main.mk:14: Either use 'envsetup.sh; m' or 'build/soong/soong_ui.bash --make-mode'

Made the fix as suggested above.

Bug: 138863873
Test: unit tests

Change-Id: I2e24da0195327b750a7438427ef5033bcd6f5373
2019-08-02 15:50:20 -07:00
Nate Jiang
f6b731a861 [WifiManger] add API to get suggestion
Develop a new API for Apps to get the network suggestion suggestedby its
own.

Bug: 138447131
Test: atest android.net.wifi
Test: atest com.android.server.wifi
Change-Id: Ib8b9c23fe0c7b5e913475bb368fb3d7d4f443e2d
2019-07-30 16:23:22 -07:00
Otto Seiskari
f442263a08 Fix tests/runtests.sh
The location of FrameworksWifiTests.apk installed by the script
with adb seems to have changed. The path of the APK contains the
TARGET_ARCH environment variable, which is now fetched
with a similar method as in system/netd/tests/runtests.sh.

Noticed the issue with "lunch aosp_x86_64-eng". Before this fix,
the test script produced an error:

    adb: failed to stat [...]/FrameworksWifiApiTests.apk:
    No such file or directory

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

Change-Id: Id4a33ca89fa21a9a4ef791c5c1c5760e0e2badaf
Signed-off-by: Otto Seiskari <otto.seiskari@indooratlas.com>
2019-04-26 17:00:05 +00:00
Jimmy Chen
834487249d p2p: unit tests for WifiP2pWfdInfo
Bug: 130138124
Test: atest FrameworksWifiApiTest
Change-Id: I7368f9b4f3e67985f404f701e92dfe82286935be
Merged-In: I7368f9b4f3e67985f404f701e92dfe82286935be
2019-04-11 11:12:33 +08:00
Jimmy Chen
1c4257ddb2 p2p: unit tests for WifiP2pInfo
Bug: 130138124
Test: atest FrameworksWifiApiTest
Change-Id: I7a6bec4faf81ec6e9164b8737588a51503caaaf7
Merged-In: I7a6bec4faf81ec6e9164b8737588a51503caaaf7
2019-04-11 11:12:27 +08:00
Jimmy Chen
b20dfbbf23 p2p: unit tests for WifiP2pProvDiscEvent
Bug: 130138124
Test: atest FrameworksWifiApiTests
Change-Id: I3eb9f7bcd19e1ec074174cdb2a6822fb983976ba
Merged-In: I3eb9f7bcd19e1ec074174cdb2a6822fb983976ba
2019-04-11 11:12:20 +08:00
Jimmy Chen
25eb12cd7f p2p: unit tests for WifiP2pDeviceList
Bug: 130138124
Test: atest FrameworksWifiApiTests
Change-Id: I53d05702a50509117720a10f50df93e496ff9d65
Merged-In: I53d05702a50509117720a10f50df93e496ff9d65
2019-04-11 11:12:11 +08:00
Jimmy Chen
be65fa391d p2p: unit tests for WifiP2pConfig
Bug: 130138124
Test: atest FrameworksWifiApiTests
Change-Id: I5cb6c9e0c0125d87672401e0dbd227b646a3a9d4
Merged-In: I5cb6c9e0c0125d87672401e0dbd227b646a3a9d4
2019-04-11 11:11:56 +08:00
Jimmy Chen
3fbdff2dec p2p: unit tests for P2P UPNP service discovery
Bug: 130138124
Test: atest FrameworksWifiApiTests
Change-Id: Id3218378e6548ca013484f5f693db1863bf419e1
Merged-In: Id3218378e6548ca013484f5f693db1863bf419e1
2019-04-11 11:11:50 +08:00
Jimmy Chen
50902313c2 p2p: unit tests for P2P DNS SD service discovery
Bug: 130138124
Test: atest FrameworksWifiApiTests
Change-Id: I454441ab024f1a72f2e5a92e08894993be749d3d
Merged-In: I454441ab024f1a72f2e5a92e08894993be749d3d
2019-04-11 11:11:44 +08:00
Jimmy Chen
97e310111f p2p: unit tests for WifiP2pGroup
Bug: 130138124
Test: atest FrameworksWifiApiTests
Change-Id: I40818ac3ab02facecb0976cf4cd5ab0ca18d84d5
Merged-In: I40818ac3ab02facecb0976cf4cd5ab0ca18d84d5
2019-04-11 11:11:39 +08:00
Jimmy Chen
d5d85c28a7 p2p: unit tests for WifiP2pGroupList
Bug: 130138124
Test: atest FrameworksWifiApiTests
Change-Id: I51f6fb88983ce8d0f45139241954ca1de1553fcf
Merged-In: I51f6fb88983ce8d0f45139241954ca1de1553fcf
2019-04-11 11:11:24 +08:00