In addition to the change to persist hiddenSSID, this CL takes care of
backup and restore use case for hiddenSSID as one of soft ap config.
cherry-picked from aog/773385
Bug: 117052143
Test: Unit tests
Change-Id: I4af897f466c5d8fea66aec93e39faf3f13bd23fb
* changes:
WifiManager: Network request match callback registration
wifi(API): NetworkSpecifier for Wifi NetworkAgent
wifi(API): Mark old API's deprecated
wifi(API): New API surface for network suggestion
wifi(API): New API surface for connection via NetworkRequest
Add and Implement the new network request match callback register/unregister
@hide methods to be used by settings UI.
Note: This uses the same pattern used for other callbacks to settings
like traffic state change, softap.
Bug: 113878056
Test: ./frameworks/base/wifi/tests/runtests.sh
Change-Id: Ia4964759c6b10790dda0fc61a41c4d95dab904c9
Create an @hide NetworkSpecifier to use by the Wifi NetworkAgent. This
will be used by connectivity service to match the incoming
NetworkRequest (with WifiNetworkSpecifier) with the NetworkAgent we
created to serve that request.
The WifiNetworkAgentSpecifier will hold the current connected wifi
network configuration which will be used to pattern match the
WifiNetworkSpecifier from NetworkRequest's.
Also, added a @hide helper method in MacAddress to help with matching
bssid pattern.
Bug: 113878056
Test: Unit tests
Change-Id: I9a643f0b914d48ff64104c798ec2869db40cb24b
List of API's that are obsoleted by the new connection API proposed for
Q. These API's will continue to work with some restrictions for apps
targeting older SDK.
Also, removes the ability for 3p apps to toggle wifi state regardless of
target SDK. This will be limited to 1p apps like settings/setup wizard.
Bug: 115504728
Test: Compiles
Change-Id: Ifec5ab721b37bc334ff7448b7829df4be2dcab37
Allows apps to provide the platform a list of wifi network credentials
that the device is allowed to connect. Each NetworkSuggestion instance
will hold a standard WifiConfiguration object to represent network
credentials along with some other meta info that will help the platform
make good network selection decisions. NetworkConfigBuilder will be
reused for building the NetworkSuggestion objects as well.
Apps also have a mechanism to register to be awakened via PendingIntent
when the platform connects to one of their suggestions. This mechanism
will require the app to
a) Hold location permission, and
b) Registered PendingIntent should hold a foreground service (to prevent
abuse of this mechanism to bypass platform background limit checks).
Bug: 115504887
Test: Unit tests
Test: `make api-stubs-docs-update-current-api`
Change-Id: I9f5223fa45d49c22ce8f81d0ba56e5d12565381d
Adds a new builder class build a NetworkSpecifier that can be
used along with a standard ConnectivityManager.requestNetwork() to
request connection to a specific wifi network.
To avoid referencing any params from WifiConfiguration class (which is
going to be deprecated), copy over all public non-deprecated constants
to the new builder class.
Note: Most of these fields will be needed for |NetworkSuggestion| as well,
hence moving it to this common builder.
Since all the internal modules of wifi stack use WifiConfiguration,
WifiNetworkSpecifier embeds a standard WifiConfiguration field to hold
the relevant network credentials. There are 2 fields added in
WifiNetworkSpecifier to allow apps to specify a SSID/BSSID pattern to
match.
Bug: 113878056
Test: Unit tests
Test: `make api-stubs-docs-update-current-api`
Change-Id: I9c8919deb23024123f2b69c6fd705092976a1acf
Connection status for server is not well-defined.
So, change the status to be meaningful.
Bug: 117728536
Test: ./frameworks/base/wifi/tests/runtests.sh
Test: live test with Passpoint R2 service provider AP
Signed-off-by: Ecco Park <eccopark@google.com>
Change-Id: Ie4dfb3b46926efb26d156bc41bff3709fa60d01e
Allow setting different levels of MAC randomization for each network.
For now, we are going to support "Persistent" which generates randomized
MAC once and persist that MAC, and "Trusted" which uses the factory MAC.
Bug: 118396042
Test: Existing unittest verifying parcel
Test: adb shell dumpsys wifi | grep -B8 "MacRandomizationSetting"
Change-Id: I067f21a9a9a42370aa8dfe80b05aef3a4f9a7fad
Bug: 74244324
Test: ./frameworks/base/wifi/tests/runtests.sh
Test: live test with Passpoint R2 service provider AP
Change-Id: I1f875e7b0eb30ce7b5c992b194187a922d27cde3
Signed-off-by: Ecco Park <eccopark@google.com>
Moved WifiWakeReasonAndCounts out of base/wifi and
into opt/net/wifi, since this class is only used
internally and not exposed in the public API.
Bug: 73503971
Fix: 73503971
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: Ibd519f3d3357092ed1b7364b15b63a3cd58c5fa5
Bug: 74244324
Test: ./frameworks/base/wifi/tests/runtests.sh
Test: live test with Passpoint R2 service provider AP
Change-Id: I526c23681f79967cfa644d18d59166e9c7682f33
Signed-off-by: Ecco Park <eccopark@google.com>
Several java files had the typo {#link (for cross-references to other
Javadocs) instead of the proper {@link format. This was confusing the
new doc publish tool (Mivi) since that's the format used for {# Django
comments #}.
Fixed a couple of links that had other errors (which prevented building
once the {# -> {@ was done) and other typos.
Replaced throughout the frameworks/base project; I'll need a separate CL
for the AndroidX fixes.
(Other files were not in the public Javadocs.)
Bug: 111925950
Test: make ds-docs
Change-Id: Ia06e1fffd814671289a1caebd5962aedc18a28d7
Original Change-Id: Ia06e1fffd814671289a1caebd5962aedc18a28d7
Exempt-From-Owner-Approval: Docs-only change
Updated documentation indicates that four WEP key values must be
provided. This replaces the earlier reference to "up to four." Providing
fewer than four values causes a java.lang.IllegalArgumentException.
Documentation also references the option to provide empty strings for up
to three of the values.
Test: make ds-docs
Bug: 36949880
Change-Id: I1da9f0ecfb390623f4d53ca508a554303861ed98
Exempt-From-Owner-Approval: Docs-only change
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.
Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.
Bug: 115609023
Test: m
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
The javadoc is inconsistent with the acutal implementation.
The intended implementation actually throws an Exception instead of
returning an empty list.
Bug: 62786310
Test: compile, unit tests
Change-Id: Ifcb89dd6bea1a73f8db079a84ed32c46bbcb3bce
Bug: 74244324
Test: ./frameworks/base/wifi/tests/runtests.sh
Test: live test with Passpoint R2 service provider AP
Change-Id: I5153f8ac8fd2685e843c2f28f5c4892b4c5906db
Signed-off-by: Ecco Park <eccopark@google.com>
Invoke initialize on all instances of
WifiAwareAgentNetworkSpecifier.
Bug: 113882732
Test: Unit tests
Test: Aware data path related CtsVerifier tests pass now.
Change-Id: Ifcf4b4708534b7c630f7846fa3823ba4f6a6aca3
Bug: 74244324
Test: ./frameworks/base/wifi/tests/runtests.sh
Test: live test with Passpoint R2 service provider AP
Change-Id: Ifd1be8450b3a7915f3e6de29942cf8d1d196d0bb
Signed-off-by: Ecco Park <eccopark@google.com>
Some fields in WifiInfo are not written into Parcel so
these fields will not be carried over process boundaries.
cherry-picked from: ag/4820524
Bug: 79889311
Test: compile & verified fields are filled from app
Test: Unit tests
Change-Id: I0d8f453c49212fc6d12d28537454c9a9657c1ef7
Some of the wifimanager logs on the app side are too spammy. Move these
logs under a verbose logging flag. This flag is updated to reflect the
logging level set on wifi service when the WifiManager object is created.
Bug: 111350569
Test: Ensured that the logs under the flag are logged only when verbose
logging is turned on.
Change-Id: Ied1ee14b423e4d0a473e153dcfd3e07e20391be5
Some fields in WifiInfo are not written into Parcel so
these fields will not be carried over process boundaries.
cherry-picked from: aog/706786
Bug: 79889311
Test: compile & verified fields are filled from app
Test: Unit tests
Change-Id: I0d8f453c49212fc6d12d28537454c9a9657c1ef7
Bug: 74244324
Test: ./frameworks/base/wifi/tests/runtests.sh
Test: live test with Passpoint R2 service provider AP
Change-Id: Iba35ab14b6b5925d2ef0435af9e94f97d0d9fa1d
Signed-off-by: Ecco Park <eccopark@google.com>
For packages:
android.net.wimax
android.net.wifi.p2p.nsd
android.net.wifi.p2p
android.net.wifi.hotspot2.pps
android.net.wifi.hotspot2.omadm
android.net.wifi.hotspot2
android.net.wifi.aware
android.net.wifi
android.net.util
android.net.sip
android.net.rtp
android.net.nsd
android.net.metrics
android.net.lowpan
android.net.http
android.net.captiveportal
android.net
This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@
Bug: 110868826
Test: m
Change-Id: Ie25423113ee1a8071cd5039382c00de6ce0af7fd
Merged-In: I520be7a4c79e68310c12e4f55bf66acaa94145a1
For packages:
android.net.wimax
android.net.wifi.p2p.nsd
android.net.wifi.p2p
android.net.wifi.hotspot2.pps
android.net.wifi.hotspot2.omadm
android.net.wifi.hotspot2
android.net.wifi.aware
android.net.wifi
android.net.util
android.net.sip
android.net.rtp
android.net.nsd
android.net.metrics
android.net.lowpan
android.net.http
android.net.captiveportal
android.net
This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@
Bug: 110868826
Test: m
Change-Id: I520be7a4c79e68310c12e4f55bf66acaa94145a1
In current implementation, when the same UID allocates, and acquires
multiple wiFi multicast wakelocks, the tag associated with the lock is
passed in the acquire method, and stored in the multicasters list.
However, when the UID tries to release the lock, the tag is not included
in the method call, and all the wakelocks found in the list of
multicasters for this UID are released.
This behavior does not reflect the expected behavior of the App using the
API
This commit contributes to the fix of this situation by passing the
wakelock tag in the release method, to enable the release of the proper
wakelock.
Bug: 70691435
Test: ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I4e4efd2ce75e77cde54ba92217364b83f2c7c401
The current mechanism for traffic poller directly exposes the wifi
service's internal message handler to privileged apps. Move away from
this mechanism and expose an API to let apps register for callbacks from
traffic poller. This API uses binder IPC for registration and
invocation of callbacks. Clients are automatically removed on binder
death.
This will also let us mark WifiManager#getWifiMessenger() method
private to prevent any apps from getting access to this internal messenger.
Note: This is based on the existing SoftapCallback registration
mechanism.
Also, fixed a bunch of checkstyle errors that were not caught
previously.
Bug: 27074039
Test: Unit tests
Test: Verified the data indicators on Sysui
Change-Id: I505bd2398552be99ccca7b7d3c31a488aa72af70