Commit Graph

2394 Commits

Author SHA1 Message Date
Hugo Benichi
311f0ff0b3 Merge "WiFi: Define a base abstract class for IWifiManager" 2018-11-09 03:28:46 +00:00
Jimmy Chen
53f58bc1c7 Merge "p2p: support factory reset for P2P group" 2018-11-09 02:47:08 +00:00
Hai Shalom
7212090a3e Merge changes from topic "SAE-OWE support"
* changes:
  [WPA3] Fix WifiConfigurtionTest to support OWE as open network
  [WPA3] Add new types for WPA3/OWE and device capabilities API
2018-11-07 18:28:13 +00:00
Roshan Pius
af319257bb Wifimanager/WifiConfiguration: Fix javadocs
Test: make docs
Change-Id: I2ef78b7e5fc7558d297337d4bd9b0265487365ea
2018-11-07 07:24:53 -08:00
Hugo Benichi
fe354b7825 WiFi: Define a base abstract class for IWifiManager
This patch creates a base abstract class that implements
IWifiManager.aidl with stub methods that throw runtime exceptions.

Actual implementations of IWifiManager can extend this class instead of
directly extending the autogenerated IWifiManager.Stub.

This allows adding new methods or modifying existing methods in
IWifiManager without requiring a synchronized change on all concrete
implementations.

Bug: 112338174
Test: Compiled, flashed marlin, booted. WiFi works.
Change-Id: I316c999d6c076f4e6ea1354bd558512915d551ed
2018-11-07 23:28:31 +09:00
Roshan Pius
bd22c4a57b WifiManager: Fix javadocs
Bug: 113878056
Test: make docs
Change-Id: Ia63e7df59d67def62b189b1bd98c0b21ce36d5f4
2018-11-07 05:30:35 -08:00
Marcin Oczeretko
726479fa28 Fix WifiNetworkConfigBuilder javadocs
Test: n/a
Change-Id: Iee1964687569e5ce9545513b31d087817a9ed1e9
2018-11-07 11:24:34 +00:00
Jimmy Chen
c4240a7ce8 p2p: support factory reset for P2P group
provide system API for Settings

Bug: 109866998
Test: Manual tests
      * manual trigger network reset in below conditions:
        * trigger network reset with P2P on
        * trigger network reset with WiFi on, P2P off
        * trigger network reset with WiFi off
        * trigger network reset with WiFi off then do reboot
      * check groups shown in WiFi Direct page
      * use wpa_cli -i p2p0 list_network
Test: CtsVerifier - WiFi Direct category
Test: Unit tests - atest frameworks/opt/net/wifi/tests/wifitests
Test: Permission check
      * call factoryReset as Guest
      * call factoryReset from 3rd-party application

Change-Id: Id487ebf4564b78b613b550c0f0266effb0ae793e
2018-11-07 09:57:23 +08:00
Roshan Pius
4e415edecd WifiManager: Mark isScanAlwaysAvailable() deprecated
This API is useful for the apps to decide when they can issue a scan
request. Since WifiManager.startScan() is deprecated, this should be
too. There is no functionality change for now, just a warning
that this will go away along with startScan().

Bug: 74448981
Test: `make api-stubs-docs-update-current-api`
Change-Id: I5310dc53dae244d7a99319bbde111254e9097a14
2018-11-06 13:46:30 -08:00
Hai Shalom
6adbc58858 [WPA3] Add new types for WPA3/OWE and device capabilities API
Add new types for WPA3: SAE and Suite-B-192, and Enhanced open: OWE.
Added a new API to get the device key management capabilities, because
not all devices using latest HAL have WPA3/OWE support. Updated
current.txt and system-current.txt accordingly.

Bug: 112195778
Test: atest com.android.server.wifi

Change-Id: Idceb28dd8663349013243f69b8f20c0c8606581c
2018-11-06 10:11:07 -08:00
Roshan Pius
d84d668d45 Merge changes from topic "network_request_match_callback"
* 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
2018-11-06 17:42:58 +00:00
Oscar Shu
28de999efe Merge changes from topic "PnoPipeline"
* changes:
  Pno frequency culling: Settings.Global flag
  Pno frequency culling: add frequencies field
2018-11-06 01:45:19 +00:00
Jong Wook Kim
06432b66d9 Merge "Add MacRandomizationSetting to WifiConfiguration" 2018-11-02 19:52:23 +00:00
xshu
b0856c531c Pno frequency culling: add frequencies field
Add a field to pass frequencies per PnoNetwork

Bug: 64312268
Test: compile, unit test
Change-Id: Ib9a6b9da8345c1719dbd394763fda2a3e8d1f147
2018-11-01 11:02:09 -07:00
Roshan Pius
3c38ee435a WifiManager: Network request match callback registration
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
2018-10-31 09:23:15 -07:00
Roshan Pius
99cfe09fa2 wifi(API): NetworkSpecifier for Wifi NetworkAgent
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
2018-10-31 09:23:15 -07:00
Roshan Pius
914a64ecd2 wifi(API): Mark old API's deprecated
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
2018-10-31 09:23:15 -07:00
Roshan Pius
bc662b1844 wifi(API): New API surface for network suggestion
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
2018-10-31 09:23:14 -07:00
Roshan Pius
819e1a749c wifi(API): New API surface for connection via NetworkRequest
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
2018-10-31 09:23:14 -07:00
Ecco Park
58100660ed passpoint-r2: change the status for server connection
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
2018-10-30 23:21:12 +00:00
Jong Wook Kim
cbe2e7a746 Add MacRandomizationSetting to WifiConfiguration
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
2018-10-30 10:23:22 -07:00
Ecco Park
c2896a27fa Merge "passpoint-r2: add the status for Trust CA certs and Provision completion" 2018-10-23 14:15:54 +00:00
Ecco Park
55b5f249ce passpoint-r2: add the status for Trust CA certs and Provision completion
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>
2018-10-16 13:53:22 -07:00
David Su
4ed4874429 Merge "Moved WifiWakeReasonAndCounts.java out of base/wifi" 2018-10-15 17:08:18 +00:00
David Su
7914b7246b Moved WifiWakeReasonAndCounts.java out of base/wifi
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
2018-10-10 16:49:24 -07:00
Ecco Park
8bdec9e823 passpoint-r2: add the status for starting third soap exchange
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>
2018-10-05 15:19:31 -07:00
Andrew Solovay
5c05dedda1 cherry-pick from pi-dev docs: Replacing {#link with {@link
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
2018-10-04 18:17:05 +00:00
Oscar Shu
a20fa4ea1d Merge "WifiManager: getScanResults fix javadoc" 2018-09-28 21:36:37 +00:00
David Castro
48af76d641 Merge "docs: Updates the documentation for the wepKeys field." into pi-dev am: 61a4d35100
am: 6c758e81cb

Change-Id: I76be81d65473f1e6d01b793bb29448152dabf78b
2018-09-27 15:25:29 -07:00
David Castro
6c758e81cb Merge "docs: Updates the documentation for the wepKeys field." into pi-dev
am: 61a4d35100

Change-Id: I9f5ad3998d97b740e07b8e4345b22108245ee5ae
2018-09-27 15:15:16 -07:00
David Castro
f0d5c5c30a docs: Updates the documentation for the wepKeys field.
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
2018-09-20 17:01:51 -04:00
TreeHugger Robot
0a5d59ffd1 Merge "passpoint-r2: add the status for starting second soap exchange" 2018-09-18 22:49:36 +00:00
Mathew Inwood
8c854f86a4 Move some members to the "Q blacklist".
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
2018-09-14 13:18:34 +01:00
xshu
5f00c8a91a WifiManager: getScanResults fix javadoc
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
2018-09-12 16:59:27 -07:00
TreeHugger Robot
603ed1ddc2 Merge "WifiAwareAgentNetworkSpecifier: Initialize unmarshaled instance" 2018-09-05 19:51:23 +00:00
Ecco Park
41f4d9c54f passpoint-r2: add the status for starting second soap exchange
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>
2018-09-05 10:59:44 -07:00
Ecco Park
e6072e99b5 Merge "passpoint-r2: add the new failure about timeout for redirectListener" 2018-09-05 17:16:08 +00:00
Roshan Pius
3f770d934e WifiAwareAgentNetworkSpecifier: Initialize unmarshaled instance
Invoke initialize on all instances of
WifiAwareAgentNetworkSpecifier.

Bug: 113882732
Test: Unit tests
Test: Aware data path related CtsVerifier tests pass now.
Change-Id: Ifcf4b4708534b7c630f7846fa3823ba4f6a6aca3
2018-09-05 16:47:01 +00:00
Ecco Park
b6f805729f passpoint-r2: add the new failure about timeout for redirectListener
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>
2018-08-31 17:54:54 -07:00
Oscar Shu
e8cf7b5e09 Merge "Fix some fields in WifiInfo are not written into Parcel" am: 5add10333d
am: e3de537252

Change-Id: Ib17bfb34652b6d68d963dafdbe72e2d48903d139
2018-08-29 18:05:35 -07:00
Oscar Shu
e3de537252 Merge "Fix some fields in WifiInfo are not written into Parcel"
am: 5add10333d

Change-Id: Idce8900c306b8e59f89825f34d0190c3092136b1
2018-08-29 17:50:50 -07:00
keigo, nishira
f53446deca Fix some fields in WifiInfo are not written into Parcel
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
2018-08-28 16:24:01 -07:00
Roshan Pius
045d380e68 WifiManager: Add verbose logging enabled flag
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
2018-08-28 15:04:43 -07:00
keigo, nishira
04b05b4daf Fix some fields in WifiInfo are not written into Parcel
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
2018-08-20 11:54:00 -07:00
Ahmed ElArabawy
dfb32165f7 Merge "Wifi: Pass the multicast wakelock TAG in release" 2018-08-20 18:06:08 +00:00
Ecco Park
1460c30b75 passpoint-r2: define new status and new Intents for lauching an OSU app
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>
2018-08-20 17:37:18 +00:00
Mathew Inwood
6b269a7e26 Merge "Add @UnsupportedAppUsage annotations" am: d717c04b12
am: 629a3828e2

Change-Id: I99215dd5430968df2e2dd514d21b396b00c1403e
2018-08-16 03:29:58 -07:00
Mathew Inwood
629a3828e2 Merge "Add @UnsupportedAppUsage annotations"
am: d717c04b12

Change-Id: I8f8c9106b494caa6dc5ad405111f2a285a01e49f
2018-08-15 10:12:01 -07:00
Mathew Inwood
fa3a7466e1 Add @UnsupportedAppUsage annotations
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
2018-08-14 14:44:29 +01:00
Mathew Inwood
53f089f843 Add @UnsupportedAppUsage annotations
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
2018-08-14 14:39:24 +01:00