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)
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
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
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
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)
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
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
This value may be a null, receiver should check before using variable.
Bug: 137618950
Test: make docs
Change-Id: If466dac092fc345482d0456f08a915d1e7ba0010
Changes doc for using Builder to create WifiAwareNetworkSpecifier
instead of deprecated Api.
Test: It's a doc change.
Bug: 136034317
Change-Id: I6f41ceae6d696fc5df336ad831c2c89ab3746c50
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
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
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
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
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>
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
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. { -- doesn't work, because the Javadoc compiler helpfully
escapes the *ampersand*, so the HTML output is "&#123", which
renders on the page as "{" 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
For apps targeting older SDK (<Q), preserve the old behavior for
setWifiEnabled.
Bug: 129549163
Test: Compiles
Change-Id: I4a2e89cfa1c1ac612a679ecab6a2d526a987f7c0
This reverts commit 506a9b9517.
Bug: 126503889
Reason for revert: UI changes was punted to R. No rationale in making this API changing behavior now.
Change-Id: Ia8ccacc383cdb6db7520657a46d77bc1154f8569
Based on discussion with IEEE 802.11 WG these are not necessary for RTT.
Bug: 111439464
Test: All unit tests pass; end-to-end tests pass.
Change-Id: I78adc0257cf65cfad9698f3d43342d5404d790e5
Rename getIsSameRegisteredCell() to isSameRegisteredCell().
Bug: 128919394
Test: wifi unit test with frameworks/base/wifi/tests/runtests.sh
Change-Id: I3549d9abbaba87971ea3c0a9edf4351289731912
Initialize Suite-B ciphers correctly based on the CA cert type. Read the
cert type from key store, parse it and get the signature algorithm.
Enforce SHA384, and initialize AllowedSuiteBCiphers based on the
certificate type: RSA or ECSDA.
Bug: 128861164
Test: Verify Suite-B initialized correctly with RSA and ECDSA certs.
Test: Associate to SUITE_B_192 AP.
Test: atest WifiNetworkSuggestionTest
Change-Id: Ia9b8460caa586f695ed7aab3507ddeb4ecb8c3f3
The current ordering of priority is hard to handle inside the wifi
stack because "-1" was unassigned priority and 0 is considered the
higheest priority level.
Reverse the polarity so it's much easier to compare network
suggestions with different priorities such that
priority1 > priority2 is always true. unassigned priority will always
be lesser than any assigned priority value.
Bug: 127644378
Test: Compiles
Change-Id: I74dacdb85838250c242257a80ebbe6046cef752f
API council feedback:
- Move required builder methods to the constructor
- Add IntRange to port and transport protocol APIs
Bug: 128904106
Test: atest android.net.wifi.aware
Test: atest com.android.server.wifi.aware
Test: CtsVerifier Aware tests
Change-Id: I9bc978732caeada792e997bdd6263a53efdf7071