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
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
The existing WifiScanner.setScanningEnabled() API is invoked by
ActiveModeWarden after any client iface state changes. Documenting this
behavior explicitly (i.e enable needs to be invoked multiple time if
there are multiple STA's brought up).
Bug: 140111024
Test: None
Change-Id: Ie377a9b57119cb7389df60294fc2111ec654fd38
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
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
When wifi service is not yet up, we throw a remote exception for API
calls which have void return. Change this to only throw a remote
exception when the input params have non-default values.
This takes care of cases where some other system modules resets wifi
params as a part of their initialization sequence (which will already be the
value when the wifi service comes up, so the calls are not useful)
Bug: 140076130
Bug: 139897982
Test: atest WifiManagerTest
Change-Id: If24d5ae52f1d39d2d99a860f3dc6c5f1860fd656
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
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
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
Bug: 138305265
Test: atest FrameworksWifiApiTests
Test: atest FrameworksWifiTests
Test: connect to a WPA3 SAE access point with different
password/identifer combinations.
Change-Id: I1f26a5dbf5654ca2a6734f94eec547f33c349e9e
Many system/vendor modules assume that wifi service is up by the time
they run. This is no longer the case since wifi stack now starts a
little later in the bootup sequence (to support pluggable wifi stack
module for mainline). If any of these modules invoke a WifiManager
call,
a) Return an appropriate dummy value if the API returns a value
b) Raise a RemoteException if the API returns nothing (void).
Bug: 139492857
Bug: 137650946
Test: Verified that SUW & CNE receiver no longer crashes with the stack
traces in the linked bugs.
Also, verified that SUW still can connect to wifi networks & detect when
wifi auto-connects after SUW comes up.
Test: Verified wifi/softap toggle from Settings/Sysui.
Change-Id: Ia100a4612fc903ae470a0c89523d4fda27eb3fbc
Wifi services will be initialized a little later in the bootup sequence
because it is now a separate APK. So, retrieve wifi services lazily
(on the first method call on the object).
This will alleviate the need to modify all the clients which instantiate
WifiManager very early in the bootup sequence (Sysui, some vendor apps,
etc).
Bug: 137374831
Test: Device boots up & connects to wifi networks.
Change-Id: I8e1f0eb3a5a8fdb79b088447fbb9f97413f64483
Merged-In: I8e1f0eb3a5a8fdb79b088447fbb9f97413f64483
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
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
This value may be a null, receiver should check before using variable.
Bug: 137618950
Test: make docs
Change-Id: If466dac092fc345482d0456f08a915d1e7ba0010