Commit Graph

2081 Commits

Author SHA1 Message Date
Rebecca Silberstein
1cd6db44f2 WifiManager: update docs on setWifiEnabled
Update documentation to the setWifiEnabled call reflect what a return of
false would be for.  Note: False will be returned if the caller
requested to enable/disable wifi while in softap mode or airplane mode
is active.

Bug: 64374508
Test: checked generated docs
Change-Id: I1b1de84afee3844d326e7780a935a30d7f64d220
2017-08-04 16:09:22 -07:00
TreeHugger Robot
54e6518fc8 Merge changes from topic 'do_not_roam_on_traffic' into oc-dr1-dev
* changes:
  Add traffic thresholds to prevent wifi network changes
  WifiInfo: Add getters for success tx/rx rate
2017-08-02 22:09:15 +00:00
Ningyuan Wang
d69d86e3f0 WifiInfo: Add getters for success tx/rx rate
This adds getters to get success tx/rx rate, returning in the
unit of 'packets per second'.
This also adjusts the constant OUTPUT_SCALE_FACTOR so it can
be more informative.

Bug: 62428282
Test: compile, unit tests
Change-Id: I989defd8fdc14dfc78692385fda86fb20b369b7b
2017-07-19 16:59:20 -07:00
Michael Plass
5be7bc7516 WifiInfo - document packet counters and rates
Bug: 63039962
Test: wifi unit tests
Change-Id: Ibc17265e88ed174fce9bbffa32261080d076cea3
2017-07-18 13:44:43 -07:00
Roshan Pius
bc15a1e3ee Merge "wifi: Params for SAR limits" into oc-dr1-dev 2017-07-12 18:33:20 +00:00
TreeHugger Robot
4a82979153 Merge "Document WifiScanner callback behaviors" into oc-dr1-dev 2017-07-12 17:14:05 +00:00
Ningyuan Wang
d871e180f1 Document WifiScanner callback behaviors
This adds the missing documents for WifiScanner.ActionListener.
This also fixes the existing inaccurate documents.

Bug: 29524465
Test: compile

Change-Id: I40d40a6293cdb0af6b8cad45062722ee2a4b746d
2017-07-11 21:37:46 +00:00
Roshan Pius
aa85acc8e0 wifi: Params for SAR limits
Add 2 new config.xml values for setting TX power limits for SAR
requirements. The first boolean enables/disables the whole feature, the
second value sets the max power that OEM's can set if they want the tx power
to be limited.
Also, added the new HAL feature set enum value in WifiManager.

Bug: 62437848
Test: Compiles
Change-Id: Iab3ffad8df2fccd0ea2beac95fbf8458e268f21b
2017-07-07 11:00:18 -07:00
Etan Cohen
c0fabefba4 [AWARE] Fix close guard method name
Close guard prints out a message when it is triggered. The message
should be the method which should have been called. The method has
been renamed from 'destroy' to 'close' - but the log message wasn't
updated.

Bug: 37514387
Test: N/A (string change)
Change-Id: I8ee0b9539692095c771829fffe9fa4bf60aaa504
2017-07-06 06:47:27 -07:00
Etan Cohen
0dd8a3cd59 Merge "[P2P] Eliminate separate storage of binders - a memory leak" into oc-dr1-dev 2017-06-24 00:36:56 +00:00
TreeHugger Robot
702d4d56fe Merge changes from topic 'wrong_password' into oc-dr1-dev
* changes:
  SettingsLib: set network status for wrong password error
  wifi: add "wrong password" network disabled reason
2017-06-23 18:19:05 +00:00
Roshan Pius
24e9b7d4cf Merge "WifiEnterpriseConfig: New copy method to ignore masked password" into oc-dev
am: db11f55cb7

Change-Id: Id9cb3a6211cf516875c6ad4ac10058bb352ebd46
2017-06-23 12:28:27 +00:00
Roshan Pius
1e11d00627 WifiEnterpriseConfig: New copy method to ignore masked password
To ignore the masked password sent by apps, add a new copy-constructor
equivalent method which will ignore the masked password.

Bug: 62893342
Test: Unit tests.
Test: Manual tests with the linked CL.
Test: Regression tests.

Change-Id: Ib208dcd94a888e07a9b3dc0442620233ea7791e5
2017-06-22 16:22:05 -07:00
Etan Cohen
9304be6f80 [P2P] Eliminate separate storage of binders - a memory leak
A global storage of binders is replaced by attaching a binder
to its corresponding channel.

Bug: 62905652
Test: NonConcurrencyTest:test_*p2p* acts/sl4a tests passing
Test: p2p/aware behavior verified using Settings app
Change-Id: I08e8d8f5d56cfd81d078e74f3cf2ccc5d06f61e3
2017-06-22 18:26:07 +00:00
TreeHugger Robot
8c4d17b4d8 Merge "Fix confusing javadoc for WifiManager.EXTRA_RESULTS_UPDATED" into oc-dr1-dev 2017-06-20 21:46:05 +00:00
Peter Qiu
873edc6e76 wifi: add "wrong password" network disabled reason
Bug: 62444625
Test: manual test
Test: integration test
Change-Id: I8b56f926fce41eea33522d8daa82b6a5fe1b31c0
2017-06-20 13:35:33 -07:00
TreeHugger Robot
088f2754c0 Merge "wifi: add API for retrieving Hotspot 2.0 OSU providers" into oc-dr1-dev 2017-06-14 16:14:44 +00:00
Ningyuan Wang
47e9400f1e Fix confusing javadoc for WifiManager.EXTRA_RESULTS_UPDATED
This rephrases the javadoc for WifiManager.EXTRA_RESULTS_UPDATE
and WifiManager.SCAN_RESULTS_AVAILABLE_ACTION, explaining the
meaning of WifiManager.EXTRA_RESULTS_UPDATED in a better way.
This also removes "supplicant" keyword in this javadoc because
we no longer use supplicant for scan.

Bug: 62273016
Test: compile
Change-Id: Ib8ce2d6e8aaf70819c9e2622fb5acfcc14a0d593
2017-06-13 13:51:23 -07:00
Peter Qiu
e78c25e970 wifi: add API for retrieving Hotspot 2.0 OSU providers
For an R2 Passpoint AP, there might be zero or more OSU providers
associated it.  Add an API to retrieve the associated OSU providers.

Bug: 62235301
Test: manual test by exercising this API in WifiTracker and verify
      the content of the OSU provider

Change-Id: I2e730f0b16d80e0b97b4ce7cbd086b606e71eb0c
Merged-In: I2e730f0b16d80e0b97b4ce7cbd086b606e71eb0c
2017-06-13 16:00:26 +00:00
Etan Cohen
830f4db231 [ErrorProne] Fix Error Prone warnings in aware/p2p code
Bug: 33104624
Test: builds
Change-Id: Ibf17a02c81aebfa28903fe440a75e3c2e9244a19
2017-06-12 11:18:10 -07:00
Etan Cohen
486a411224 [AWARE] Add validity check on PMK/Passphrase lengths
Bug: 62376042
Test: unit tests + inegrated (sl4a) tests
Change-Id: Ib6383a0ba9ef61114eb72b9a04cc683792b8e89d
2017-06-07 12:08:09 -07:00
Etan Cohen
af3022347f [P2P] Add binder to service calls
Bug: 33040182
Test: unit tests, run-time behavior
Change-Id: Ic383efc858bb4454d99c98ab24365c63ad3e7f54
2017-06-06 17:23:44 +00:00
Jeff Sharkey
28f6dc9512 Merge "Give Doclava our manifest; more permission docs." into oc-dev am: 65d4cbba37
am: 67cb5f5210

Change-Id: Ic4c30cdb8bbfda5b3703eb3c7c36c1bf8ab3a216
2017-06-06 16:17:39 +00:00
Rebecca Silberstein
4ee03a919d Merge "WifiConfiguration: add local only networkId" into oc-dev am: 46f4d5c4a6
am: 0ffff6a341

Change-Id: I84c310c491dff17f193e8e7942c2ba90798e65b9
2017-06-06 16:11:46 +00:00
Jeff Sharkey
ec68b46bc8 Merge "Annotate @SystemApi with required permissions." into oc-dev am: c1406978a4
am: 7a2e4a8486

Change-Id: Ib629e25dbf047c110feaf03e4ff744b5c6df9aeb
2017-06-06 15:48:24 +00:00
Jeff Sharkey
67cb5f5210 Merge "Give Doclava our manifest; more permission docs." into oc-dev
am: 65d4cbba37

Change-Id: I2ec50efb67debd15d354db69b84fb620eb74bc0e
2017-06-06 15:28:26 +00:00
Jeff Sharkey
65d4cbba37 Merge "Give Doclava our manifest; more permission docs." into oc-dev 2017-06-06 15:19:23 +00:00
Rebecca Silberstein
0ffff6a341 Merge "WifiConfiguration: add local only networkId" into oc-dev
am: 46f4d5c4a6

Change-Id: I76454a05fdeec94b84d0bfb6f084790e0a7f77d5
2017-06-06 14:49:57 +00:00
Rebecca Silberstein
46f4d5c4a6 Merge "WifiConfiguration: add local only networkId" into oc-dev 2017-06-06 14:42:59 +00:00
Jeff Sharkey
bfc4fcde9f Give Doclava our manifest; more permission docs.
We've seen some @SystemApi methods protected with non-system
permissions, so give Doclava the platform AndroidManifest.xml so it
can parse the actual permission protection levels to look for APIs
that are letting in non-system apps.

Also document more @SystemApi permissions.

This is purely a docs change; no logic changes are being made.

Test: make -j32 update-api
Bug: 62263906
Change-Id: Ie0f0a5fb0033817bcc95060f2183a52ae4ae7b06
2017-06-05 17:38:19 -06:00
Jeff Sharkey
7a2e4a8486 Merge "Annotate @SystemApi with required permissions." into oc-dev
am: c1406978a4

Change-Id: I305967cad945a807c3f8234efabaad0ef8b591d1
2017-06-05 22:28:21 +00:00
Jeff Sharkey
d86b8fea43 Annotate @SystemApi with required permissions.
Most @SystemApi methods should be protected with system (or higher)
permissions, so annotate common methods with @RequiresPermission to
make automatic verification easier.

Verification is really only relevant when calling into system
services (where permissions checking can happen on the other side of
a Binder call), so annotate managers with the new @SystemService
annotation, which is now automatically documented.

This is purely a docs change; no logic changes are being made.

Test: make -j32 update-api && make -j32 offline-sdk-docs
Bug: 62263906
Change-Id: I2554227202d84465676aa4ab0dd336b5c45fc651
2017-06-05 13:27:11 -06:00
TreeHugger Robot
cc4804631a Merge "wifi: hotspot2: implement Parcelable class for OSU provider" 2017-06-02 18:38:04 +00:00
Peter Qiu
55840d018e wifi: hotspot2: implement Parcelable class for OSU provider
Bug: 62235196
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I3327981569fccbe20aba780f4c3f0f5bcb432f31
2017-06-01 14:11:53 -07:00
Rebecca Silberstein
544eff2d23 WifiConfiguration: add local only networkId
When applications start LOHS, they need a way to connect to the
network on the same device.  The WifiConfiguration.networkId
will be set to the newly defined value to serve as a signal to
ConnectivityService that this request is for a local only
network connection.

Bug: 62076211
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: Iab5240a7b4f526f8bc72dd44cdba59e65faedcd1
2017-05-31 22:51:06 -07:00
Peter Qiu
1e38ea4fe2 Merge "hotspot2: add/update javadoc for Passpoint APIs" into oc-dev am: 8837aff18b
am: c3e58eb3f2

Change-Id: Icf572f5b5b224a78762fd728ab90778d84c9ecbc
2017-05-31 22:42:10 +00:00
Peter Qiu
c3e58eb3f2 Merge "hotspot2: add/update javadoc for Passpoint APIs" into oc-dev
am: 8837aff18b

Change-Id: I1659c6bd9ac5f5420eae1ffded9c0d257e8436c6
2017-05-31 22:35:11 +00:00
Peter Qiu
e5850517c4 hotspot2: add/update javadoc for Passpoint APIs
Add javadoc for getter/setter methods configuration classes.
Document exceptions with @throws tag.

Bug: 37907515
Test: build
Change-Id: Ied1842912f6710530bf77db4df5ef5d30a44b2a7
2017-05-31 13:16:50 -07:00
Rebecca Silberstein
3cf4ad52b3 Merge "WifiManager: setWifiApEnabled always returns false" into oc-dev am: c0643da09e
am: 84296900b0

Change-Id: I500e8256583aa05b0fd2096988e34de6d1ed0f3c
2017-05-31 16:14:49 +00:00
Rebecca Silberstein
84296900b0 Merge "WifiManager: setWifiApEnabled always returns false" into oc-dev
am: c0643da09e

Change-Id: Ibaec59c3416f502c6ff9b131d12f38c6205f2287
2017-05-31 15:59:37 +00:00
Rebecca Silberstein
c0643da09e Merge "WifiManager: setWifiApEnabled always returns false" into oc-dev 2017-05-31 15:42:33 +00:00
Peter Qiu
66197daa9d Merge changes from topic 'hide_passpoint_r2' into oc-dev am: 4bd47fce86
am: 421018f44b

Change-Id: I6d56c9c822e707ed41fc3a4b3c0ca58188bc1000
2017-05-30 19:08:03 +00:00
Peter Qiu
421018f44b Merge changes from topic 'hide_passpoint_r2' into oc-dev
am: 4bd47fce86

Change-Id: I71fe905c7842384d7700f02f923b12cdae9bf594
2017-05-30 18:55:37 +00:00
TreeHugger Robot
4bd47fce86 Merge changes from topic 'hide_passpoint_r2' into oc-dev
* changes:
  hotspot2: hide Release 2 APIs
  Voice Messaging Intent API.
2017-05-30 18:47:12 +00:00
Peter Qiu
ff323d3ce9 hotspot2: hide Release 2 APIs
These APIs are based on the design of the legacy OSU app.  Since
the app will be redesigned, hide these APIs for now.

Bug: 38260972
Test: build
Change-Id: I56b9c27305624306773284a7cc1721606037462d
2017-05-30 09:47:43 -07:00
Erik Kline
ea60f1d6d6 Merge "WifiManager: add iface name and mode labels" into oc-dev am: dfd185c62f
am: 3e737d1cf0

Change-Id: Ieff7af7c1ac2113b8044c16a01cad0f96cb70158
2017-05-26 10:01:30 +00:00
Erik Kline
3e737d1cf0 Merge "WifiManager: add iface name and mode labels" into oc-dev
am: dfd185c62f

Change-Id: I67f82525b5c0fa5b81235311988c9b186d16077a
2017-05-26 09:55:29 +00:00
TreeHugger Robot
2ed64ce4d5 Merge "wifi: override equals method for WifiSsid" 2017-05-25 18:11:54 +00:00
Rebecca Silberstein
4ac2cab8fd WifiManager: add iface name and mode labels
Connectivity service needs to get the interface name and intended ip
configuration mode for softap.
This CL adds the interface name and softap target mode variables to
use to insert the extra info into the wifi ap state change broadcast.

Note: additional CLs are needed to verify the iface name and mode.  The
mode tracking is still in progress.

Bug: 62076211
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually verified the name in the broadcast
Change-Id: I64e1d13a9e422945fe9c4c268c206da365d0a3eb
2017-05-25 03:34:17 -07:00
Rebecca Silberstein
8cc4eb79d2 WifiManager: setWifiApEnabled always returns false
The method setWifiApEnabled should not be used.  Introduction of the
start/stopTethering API left this call in an intermediate state, thus
introducing race conditions.  Callers with proper permissions should be
calling ConnectivityManager.startTethering or
WifiManager.startLocalOnlyHotspot.

Note: integration tests are being updated to reflect this change.

Bug: 38436732
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I84b9514bf6bb67d733fd1a32492e0e0d485e2cd6
2017-05-25 01:16:56 -07:00