Commit Graph

1359 Commits

Author SHA1 Message Date
Etan Cohen
447b032334 [NAN] Add support for NAN RTT.
Provide API for NAN RTT through WifiNanManager. While NAN RTT could be executed
directly through RttManager the peer information is hidden by WifiNanManager (no
MAC address is exposed). Using WifiNanManager keeps the information hidden.

Bug: 26564277
Change-Id: I8deeb3f9e360dc05f2ea175d115f287590d50322
(cherry picked from commit fb8021c837)
2016-08-26 13:22:08 -07:00
Etan Cohen
271c03738c [NAN] Remove OnNanDown notification from API
Duplicates the WIFI_NAN_STATE_CHANGED_ACTION broadcast. Remove
all state information from manager.

Bug: 28622807
Change-Id: I00632b216edb2dd74412861c4b46f01adec5a271
(cherry picked from commit cbf3759332)
2016-08-26 13:21:10 -07:00
Roshan Pius
72baa1de4d WifiConfiguration: Add new selection disable reasons
1. Add a new "permanently" disabled network selection status for disabling
networks after a user switch.
2. Add a new "temporarily" disabled network selection status for disabling
networks when WPS is enabled.

BUG: 28219928
Change-Id: I4ab7333ebaa830dadf73f317fd6bb81a02054235
(cherry picked from commit a6fac3eb6b)
2016-08-26 13:20:39 -07:00
Etan Cohen
5e680daad8 [NAN] Add type and nullability annotations. Update hide annotation.
Additional annotations on (what are planned to be) public APIs.
Fixed exposed API: @hide to a few new methods.

Bug: 27122760
Change-Id: Iea91de1b1c3c32a93378b5d90c1e88d994a10526
(cherry picked from commit d775a164c3)
2016-08-26 13:20:38 -07:00
Etan Cohen
5f47bf2199 [NAN] Add master switch to enable/disable usage of NAN APIs.
Add master switch to enable/disable usage of NAN. Tie into Wi-Fi
state machine (to enable/disable based on Wi-Fi enable/disable).
Dispatch broadcasts when NAN status changes.

Bug: 27698011
Change-Id: Iea36388443ff8d0dc26a280220022c6bdba6a0c8
(cherry picked from commit d3137af102)
2016-08-26 13:20:37 -07:00
Etan Cohen
51181fb85d [NAN] Re-factor connect/config flow
Simplify flow: configure and connect in a single call.
Prevent info leak: no longer provide configuration back to caller.
Update error status codes

Bug: 27617910
Bug: 27553226
Bug: 27579450
Bug: 27674927
Change-Id: Id7aba816a074dbbe0cb188cfe498c97dccbdcb27
(cherry picked from commit 52b3a24a02)
2016-08-26 13:20:17 -07:00
Etan Cohen
231859c2aa [NAN] Refactor session lifecycle to clarify API & eliminate race conditions
(cherry-pick of 2a73c7fb2a)

Bug: 27257965
Change-Id: I4d7eaa6fa1f089bed2e9185f59a37f59b530975d
(cherry picked from commit 88a6049545)
2016-08-26 13:18:58 -07:00
Etan Cohen
564355afd6 [NAN] Removed NAN event registration - dispatch all callbacks.
All events dispatched by default - there's no reason to ignore events.
The specific identity changed events for which there are use-cases to
get or ignore is controlled through a new configuration.

(cherry-pick of a5ed693788)

Bug: 27607613
Change-Id: I289a36157b55270c58311a016ef79f8746e0e0a0
(cherry picked from commit 574b3fb810)
2016-08-26 13:18:58 -07:00
Etan Cohen
26d5be2e5d [NAN] Consolidate publish/subscribe callback sets into single set
Merge onPublishFail & onSubscribeFail into onSessionConfigFail.
Merge onPublishTerminated & onSubscribeTerminated into onSessionTerminated.
A session is either publish or subscribe (never the two) so redundant.

(cherry-pick of 8414f5cf2b)

Bug: 27610709
Change-Id: I0282d17db88754428da25ee5f064b9a4805f9736
(cherry picked from commit 776ba56e53)
2016-08-26 13:18:57 -07:00
Etan Cohen
065c07e991 [NAN] Replace session callback configuration control
Controlling session callback invocation:
- Remove event registration
- Add configurations to the subset (actually just termination) which
  can be configured through the HAL

(cherry-pick of e393f57d0d)

Bug: 27607613
Change-Id: I608314cc2a9b077b4d5a2d2d0d315d55c6a7724b
(cherry picked from commit f6062eef20)
2016-08-26 13:18:57 -07:00
Etan Cohen
51fb9c67e4 [NAN] Expose match style configuration as public API.
Match style allows apps to configure getting a single notification
or continuous notifications (for all matches).

(cherry-pick of 8ef7453416)

Bug: 27568256
Change-Id: I9b7bd2e4e58af5c73188267d11c1288a93cf64ed
(cherry picked from commit 12213fb12d)
2016-08-26 13:18:56 -07:00
Etan Cohen
52065684df [NAN] API cleanup - rename FLAGS.
Per API guidelines - non-overlapping constants can be (should be)
named with "FLAG".

(cherry-pick of ad3693d59b,
 Change-Id: If8b2c0f9b2818215a64b5635e76731c8fdfd3b8d)

Bug: 27122760
Change-Id: I973d24f4f318471286087e6ae13b77cb119f01e7
(cherry picked from commit e698fab45c)
2016-08-26 13:18:56 -07:00
Etan Cohen
00abb43588 [NAN] Renamed listeners to callback per API guidelines
The interfaces had multiple functions and are hence callback
and not a listener.

Note: purely a rename operation.

(cherry-pick of 0d0f0c7faf,
 Change-Id: Ib12711f56a64052455843859125d72268c465fc0)

Bug: 27122760
Change-Id: Ie1905a5d907e5b09d449af52814b1aacb6426477
(cherry picked from commit 4e1af1b807)
2016-08-26 13:18:55 -07:00
Etan Cohen
b29bbcc54c [NAN]: API update - consolidate Puslish|Subscribe Data+Subscribe -> Config
Simplify configuration and consolidate structures whose difference
wasn't very clear.

(cherry-pick of e4c50de752,
 Change-Id: I0651cade71eb146d9ea9219baf6d2253588db3de)

Bug: 27122760
Change-Id: I6320bd4c960e4473b4bf3c28e54a7ba492fa2cf9
(cherry picked from commit 581a4f7b31)
2016-08-26 13:18:54 -07:00
Etan Cohen
982a045a8b NAN: Support multiple instantiation per UID - introduce a client ID.
Add the concept of a client ID which is used to identify a specific
(one of several) clients in all API calls.

(cherry-pick of aa36f07194,
 Change-Id: I43f13d51bee8b57c6d0ba1174168288b8d6c21c5)

Bug: 26962024
Change-Id: I0e0ddf37ea9800ae97115d6af384b54b49a40d74
(cherry picked from commit 5155990c09)
2016-08-26 13:18:54 -07:00
Gina Dimino
98ad88811c Docs: Suppress errors in SystemApi Build
Bug: 28427390

Change-Id: Ifea85bf7b1fcdd30a3d7f61bd17d0efba6368aa4
2016-06-01 16:13:53 -07:00
Adam Lesinski
0d47f4b646 Merge "BatteryStats: Introduce Async external stats requests" into nyc-dev 2016-04-18 23:27:10 +00:00
Wei Wang
f49b51e000 Merge "Use ConnectivityThread for RttManager." into nyc-dev 2016-04-18 21:17:25 +00:00
Adam Lesinski
010bf374d8 BatteryStats: Introduce Async external stats requests
Instead of calling out to external processes with a blocking IPC,
pass along a Binder on which the external process can pass back
the response. The calling process can then wait for the reply with
a timeout.

This eliminates watchdog restarts of the system_server when an external
process like telephony or bluetooth hangs.

Bug:26842468
Change-Id: I1b242e4ed22a63f1a4a0be8c78de8ac4d7bf56c5
2016-04-15 15:27:52 -07:00
Jeremy Joslin
e9f5cd3784 Merge "Added useExternalScores field to WifiConfiguration." into nyc-dev 2016-04-15 20:14:03 +00:00
Steve Malkos
53afdf2935 Merge "Expose RTT capability APIs for secure RTT." into nyc-dev 2016-04-15 20:03:22 +00:00
Wei Wang
bd3353a6c4 Use ConnectivityThread for RttManager.
Bug:27432949

Change-Id: I80fc02ff78981ca4798844c4d869b0eb60fbd84b
2016-04-15 12:45:34 -07:00
Jeremy Joslin
fc8601310d Added useExternalScores field to WifiConfiguration.
Bug: 25562019
Change-Id: Ie3b02875b74f6decb1d4be0107a5a8161f66d657
2016-04-15 09:10:46 -07:00
Wei Wang
cae1be2200 Expose RTT capability APIs for secure RTT.
Bug: 28199253
Change-Id: I790b72a365f788ef225566e7fc13b3e097f346b2
2016-04-14 15:47:42 -07:00
Mitchell Wills
0ed524dee8 Connect WifiScanner synchronously without sync barrier
This allows the WifiScanner constructor to be called from the Looper
that is associated with the provided handler instead of relying on the
provided looper to execute initialization async.

Bug: 27695292
Change-Id: Id30dbb8d181971035a0b3f76dd485875e9d03ca3
2016-04-14 15:27:44 -07:00
Jan Nordqvist
82f3053476 Merge "Fixed incomplete OSEN config code." into nyc-dev 2016-04-14 00:21:42 +00:00
Mitchell Wills
3c5870912b Merge "Make WifiScanner state not static and use ConnectivityThread" into nyc-dev 2016-04-13 18:41:55 +00:00
Mitchell Wills
91312c7cb2 Make WifiScanner state not static and use ConnectivityThread
Bug: 27432949
Change-Id: I3fa14b75ee6a48aea2bfb8fed662c37b678e3cf0
2016-04-12 20:59:24 +00:00
Samuel Tan
44a4668b45 Rename enableAutoJoinWhenAssociated() to setEnableAutoJoinWhenAssociated()
This renaming better reflects how this method is a setter, and
supports variable renaming taking place in WifiConfigManager and
WifiStateMachine.

BUG: 28088867
Change-Id: Ic2f7a1f53ffec4072e556d2831bfdcff9fef1ad7
TEST: 'runtest frameworks-wifi' passes.
2016-04-08 12:50:23 -07:00
Roshan Pius
5a4027e26c Merge "WifiScanner: Remove pnosetting stopPno API (1/2)" into nyc-dev 2016-04-07 19:28:24 +00:00
Roshan Pius
37aeb4700b WifiScanner: Remove pnosetting stopPno API (1/2)
BUG: 27532350
Change-Id: I6df3df56e66c7bbb8443c038cd8345989cf2d57e
2016-04-07 10:32:24 -07:00
Randy Pan
429b9fcb7b Merge "Enable/disable WifiConnectivityManager at runtime" into nyc-dev 2016-04-07 17:22:49 +00:00
Rubin Xu
f5c0a55d1e Fix wrong condition
am: 492ed58

* commit '492ed589df3609a15dd6a33709fc8d855ec1072d':
  Fix wrong condition

Change-Id: I23f23c4b77d19286915e501bea482e4d1fe7e714
2016-04-07 15:00:59 +00:00
Rubin Xu
492ed589df Fix wrong condition
Bug: 28050399
Change-Id: If729ee2bcc5496b5ee381e490f72c751da04dc09
2016-04-07 12:09:27 +01:00
Randy Pan
74638cdb31 Enable/disable WifiConnectivityManager at runtime
Add support to turn on and off WifiConnectivityManager at
runtime.

Bug: 27968625
Change-Id: I57d3604bfb2a4e816fb16f6389f7cbaa2460c24b
2016-04-04 10:44:52 -07:00
Randy Pan
467400a23b Obsolete a couple of auto-join related APIs.
Remove the get/setHalBasedAutojoinOffset() APIs. HAL based PNO
is now enabled on all supported devices.

Bug: 26666366
Change-Id: I55b3a80a5807c33569dbbdf4dcfc2411af067567
2016-04-04 10:44:36 -07:00
Jan Nordqvist
61b5a76893 Fixed incomplete OSEN config code.
Bug=27929688

Change-Id: I8f4a0415576e6dc35d735fa46dc50591478403af
2016-03-31 09:43:49 -07:00
Mitchell Wills
612b4c588b Merge "Send WorkSource for scan requests so the origin can be overridden" into nyc-dev 2016-03-30 21:58:44 +00:00
Mitchell Wills
133240f565 Merge "Add WifiScanner API that accepts a WorkSource for scans" into nyc-dev 2016-03-30 18:43:23 +00:00
Mitchell Wills
ad95b6a6ea Send WorkSource for scan requests so the origin can be overridden
Bug: 27903217
Change-Id: I37b24c0f5b8e9408a9f25e4479cdbb71235757a6
2016-03-29 17:36:41 -07:00
zhangshuxiao
f51097c743 When wifi ssid is empty, return WifiSsid.NONE
Issue 199610

When WifistateMachine enter Roaming State, WifiInfo
getSSID will return 0x, statusbar show "0x", because
roaming State do not update WifiInfo mWifiSsid.

Cherry pick from I241f8e9c11dc16db26cadde133043745f2f19573

BUG=27403109
TEST=compile and unittests
Signed-off-by: zhangshuxiao <zhangshuxiao@xiaomi.com>

Change-Id: Ieb7429511898a5ed3d44fd15fc1f250c122e802a
2016-03-29 16:35:47 -07:00
Mitchell Wills
d24427fabd Add WifiScanner API that accepts a WorkSource for scans
Bug: 27903217
Change-Id: I2303a2b91a4914e6cacc3108d29697f7a2dad056
2016-03-29 14:13:15 -07:00
Roshan Pius
89d9480be2 Merge changes from topic 'wifi_tx_power_levels' into nyc-dev
* changes:
  Add new wifi tx power levels in Wifi activity energy
  Add new wifi tx power levels in link layer stats
2016-03-29 18:03:37 +00:00
Rebecca Silberstein
174b140dfe Merge "Add hasEverConnected to NetworkStatus object" into nyc-dev 2016-03-29 16:04:35 +00:00
Mitchell Wills
d1f33cc950 Add accessor for buckets scanned in ScanData
Bug: 27506257
Change-Id: I9f7ae27ef8416de5e1b00dc63ee458e9e2ba69ab
2016-03-25 17:57:32 -07:00
Rebecca Silberstein
cd7167db2d Add hasEverConnected to NetworkStatus object
Add a boolean indicating if we have ever successfully connected to a
network given the current configuration.  This value should be set to
true upon a successful connection and set to false if the credentials
change.  The default value is false.

BUG: 27855896
Change-Id: I1af8f4ad7aac622b48f3c90d88b0debd671a1f40
2016-03-25 17:35:58 -07:00
Mitchell Wills
fb2d2cec7b Merge "Add bucketsScanned to ScanData" into nyc-dev 2016-03-25 20:26:50 +00:00
Paul Stewart
0a835f6e43 Merge "WifiConfiguration: Remove dead commented code" into nyc-dev 2016-03-25 03:42:10 +00:00
Paul Stewart
e8ea325716 WifiConfiguration: Remove dead commented code
Nobody uses this code.  Let's clean up.

Bug: 27054653
Change-Id: I7b3dccd09de270de6fd5a17da3217495dbce421a
2016-03-24 14:56:28 -07:00
Samuel Tan
a70cbf7f9c Merge "ScanResult: add clarifying comments to |flags| and |capabilities| fields" into nyc-dev 2016-03-24 17:46:22 +00:00