Commit Graph

1446 Commits

Author SHA1 Message Date
Etan Cohen
83c9496cba [NAN] Do not expose WifiManager.isNanSupported as new API
am: a3264c4e3d

Change-Id: Ifd6a9bb6a129e441b033f3e392c88162ed029493
2016-08-19 16:58:00 +00:00
Etan Cohen
a3264c4e3d [NAN] Do not expose WifiManager.isNanSupported as new API
The WifiManager.isXxxSupported() only functions if HAL is enabled
and seems to be a duplicate of:

PackageManager.hasSystemFeature(PackageManager.FEATURE_WIFI_NAN)

Bug: 28251988
Change-Id: I8f410def6f0bd3d3fc0926072ab66acce52a0e14
2016-08-18 21:16:25 +00:00
Etan Cohen
cb34ec8f3a [NAN] Fix bad merge use rethrowFromSystemServer
Added 'throw' to the 'e.rethrowXXX()'. Not needed but seems
to be the accepted style.

Change-Id: I75e42d68ee6092699a55e26ee05151373139606d
2016-08-17 11:20:39 -07:00
Svetoslav Ganov
d3663c04a7 Add WiFi toggle prompts - framework
If permission review is enabled toggling WiFi on or off
results in a user prompt to collect a consent. This applies
only to legacy apps, i.e. ones that don't support runtime
permissions as they target SDK 22.

bug:28715749

Change-Id: I020601e208c0736005bcabc7b7b77b96eee45b03
2016-08-09 17:01:43 -07:00
Roshan Pius
23173a2efa WifiConfiguration: Expose NetworkSelectionStatus strings
Make the status/disable reason string arrays public to be used in
XmlUtil for restoring of data.

BUG: 30448209
Change-Id: If8201df9397edcc4251e5b6aa4d613212fb576ad
TEST: Unit tests
2016-07-28 10:19:51 -07:00
Etan Cohen
a3c30c3753 [NAN] Add LV utilities (TLV with T size of 0).
am: 009b1fcb85

Change-Id: I8cac5a1f9a6d57da82e4a99af496bff2d699774f
2016-07-22 18:10:17 +00:00
Etan Cohen
009b1fcb85 [NAN] Add LV utilities (TLV with T size of 0).
NAN uses LV (not TLV). Expose an LV variant of TLV to make API
cleaner.

Bug: 30096512
Change-Id: I74b4c514d50f1df5750b521bd68a5e2d832d92c3
2016-07-22 10:24:10 -07:00
Etan Cohen
04e1a246f9 [NAN] Fix TlvElement member names - reflect public access.
am: e40b4d344e

Change-Id: I22cc48b0ba4b873c299fb01df1a925cea8f5727a
2016-07-22 00:30:01 +00:00
Etan Cohen
e0a9ad3729 [NAN] TLV utilities iterator - throw correct exception
am: 3e5ac12302

Change-Id: Ic6638a0d937f9eddba34cc1777655ab05e0e1bf6
2016-07-22 00:29:46 +00:00
Etan Cohen
4acf412746 [NAN] Modify arguments from \"array, length\" to \"array\"
am: 0a5b7efcb2

Change-Id: I0ce1c4cbaac1f54f67d2593e31f2956e67b5eb9f
2016-07-21 22:52:53 +00:00
Etan Cohen
e40b4d344e [NAN] Fix TlvElement member names - reflect public access.
Bug: 30096512
Change-Id: Ic2ab61e891bead6f6e8f13d9ac311ead8fecba5b
2016-07-18 11:39:28 -07:00
Etan Cohen
3e5ac12302 [NAN] TLV utilities iterator - throw correct exception
Make sure that iterator.next() validates that next element exists -
otherwise throw the exception specified by the interface.

Bug: 30096512
Change-Id: I327da433e3f1181e272c81ee503cbe8aab323f7e
2016-07-18 10:37:20 -07:00
Etan Cohen
0a5b7efcb2 [NAN] Modify arguments from "array, length" to "array"
Arrays carry their own lengths. There's no need to provide mechanism
to 'shave' the array - could be done explicitly by caller if needed.

Bug: 29617160
Change-Id: Ib135aa04145f400163cd1a8908dfca4590b4480d
2016-07-18 10:33:39 -07:00
Etan Cohen
73867f93cf [NAN] NAN System Api: RTT
am: ab9ef45971

Change-Id: I34039caac1a40a2c26d8a89d5a0d938fa5a4af62
2016-07-15 16:52:06 +00:00
Etan Cohen
ab9ef45971 [NAN] NAN System Api: RTT
Modify visibility of startRanging [NAN RTT] to SystemApi. Matches the
visibliity of the RttManager API.

Change-Id: Ia92de9885d0b38dfce74484f437bd122dd53cbf6
2016-07-14 16:59:55 -07:00
Etan Cohen
baa4d940ef [NAN] Provide inteface MAC address to app.
am: d097f8a4e5

Change-Id: I62b0b2cfd4a95c23b89c938cef1118ab81c304ce
2016-07-14 00:36:30 +00:00
Etan Cohen
fbe1bfd93f [NAN] Add (T)LV validation testing
am: c13b9f6b7d

Change-Id: I45f0ebc14c06fd869309b569adb2e5fd87c5cc28
2016-07-13 23:06:49 +00:00
Etan Cohen
2bd65a3255 [NAN] Add validity checks for service name
am: adfbfb3a93

Change-Id: I1f4ae4f673e5b08188d0727d1c9221d8af63a988
2016-07-13 21:18:14 +00:00
Etan Cohen
d097f8a4e5 [NAN] Provide inteface MAC address to app.
Expose NAN discovery interface MAC address to app. Required
to enable OOB discovery with other NAN functionality
(e.g. data-path).

Bug: 30000035
Change-Id: Id3c336a61a36522d7011557c805bc3c5307747a1
2016-07-13 12:09:51 -07:00
Etan Cohen
c13b9f6b7d [NAN] Add (T)LV validation testing
Test for validity of a (T)LV. Used in construction of publish and
subscribe configuration (both Tx and Rx filters).

Bug: 30007730
Change-Id: Ibf2179121d45c582bb054c06ec2a765ed0927040
2016-07-13 12:08:38 -07:00
Etan Cohen
e8fa8aa5c7 [NAN] Fix assumption about Strings containing single-byte characters.
am: 9a6161c61c

Change-Id: Id761eede5692131a9ca47497f03c088c6a0cc492
2016-07-13 16:14:44 +00:00
Etan Cohen
98717f24c2 [NAN] NAN data-path API: network specifier
am: 15849dc463

Change-Id: I406276385708a3577393f5532cdf652b0d739302
2016-07-13 14:29:00 +00:00
Etan Cohen
adfbfb3a93 [NAN] Add validity checks for service name
Add checks that the service name is valid per spec (see bug for
details). Stores internally as a byte[] for further propagation.

Bug: 30000106
Change-Id: Iab413aba6755c97bfca0332d6eaa21f636e47f3f
2016-07-08 07:23:36 -07:00
Etan Cohen
9a6161c61c [NAN] Fix assumption about Strings containing single-byte characters.
Code assumed that each character was represented by a single byte.

Change-Id: I92ea63f7273379ed1035f10c207d41e3e352bf38
2016-07-06 13:07:31 -07:00
Etan Cohen
15849dc463 [NAN] NAN data-path API: network specifier
Adds network specifier API. These are used in creating a connectivity
request through ConnectivityManager. The network specifier provides
mechanism to pass information to the network factory.

Bug: 26564277
Change-Id: Ib5b88685e033a2957644f2e9cff39a70712ac7b5
2016-07-06 13:07:26 -07:00
Mitchell Wills
2b6a530851 Merge \"Merge \\"Add a WifiScanner API to listener for ongoing scans\\" into nyc-mr1-dev am: 9f750bf5f4\" into nyc-mr1-dev-plus-aosp
am: 9b62f770dd

Change-Id: I689e6e5cf6a0e9b2c3166c594ec862b01b5bd6f6
2016-06-27 18:28:35 +00:00
Mitchell Wills
9f750bf5f4 Merge "Add a WifiScanner API to listener for ongoing scans" into nyc-mr1-dev 2016-06-27 18:12:41 +00:00
Mitchell Wills
741ec91eaa Merge \\"Don\\'t save the anonymous identity for EAP-SIM/AKA/AKA-Prime\\" into nyc-mr1-dev am: 015c8a3ac0
am: 48a2b01de0

Change-Id: I2f0ead049896e67e9513340cd08443927a40542c
2016-06-24 20:36:44 +00:00
Mitchell Wills
015c8a3ac0 Merge "Don't save the anonymous identity for EAP-SIM/AKA/AKA-Prime" into nyc-mr1-dev 2016-06-24 20:24:13 +00:00
Mitchell Wills
a464a9fce8 Don't save the anonymous identity for EAP-SIM/AKA/AKA-Prime
wpa_supplicant can update this value when authenticating so if the
framework writes it back the new value can be overwritten.

TEST: Patch was validated by original reporter
      Enterprise tests pass (b/29608435)
Change-Id: If359b4ca625371fbdb68177c7cdb6498c3a519a1
Fixes: 28161335
2016-06-24 13:17:31 -07:00
Mitchell Wills
0a726ac690 Add a WifiScanner API to listener for ongoing scans
Bug: 29412469
Change-Id: Id884851a12f95c89f928b81f5b5baa1f9f80fafe
2016-06-23 14:38:59 -07:00
Paul Stewart
0dd7ae2163 Merge \\"Fix invitation request from persistent GC\\" into nyc-mr1-dev am: 72abb6a42e
am: 008b8f78c9

Change-Id: I7f5afdedf253840c0bbd73ad8e52116b9667ee71
2016-06-22 01:12:01 +00:00
daisuke niwa
af1eafd7b1 Fix invitation request from persistent GC
When the device received the second invitation request
from GC of the same PersistentGroup, the wifi framework
processes "sa" as mOwner of WifiP2pGroup. At this point,
if an invited group is persistent group, WifiP2pGroup can't
know whether "sa" is GC or GO yet. So the framework shouldn't
process mOwner in the constructor.

Bug: 28715251
Change-Id: Ie7065da0d6c978c3747ecbd6f728de87d9567009
2016-06-20 08:51:50 -07:00
Gina Dimino
4926ee18c0 Merge \\\"Docs: Suppress errors in SystemApi Build Bug: 28427390\\\" into nyc-dev am: d06520a488 am: b7181150c4
am: cb08f6805a

Change-Id: I65d3016319d0cc53a53f931aa62c642ac53b9520
2016-06-17 20:42:09 +00:00
Roshan Pius
6a89ee2d90 WifiConfiguration: Make NetworkSelectionStatus public
Expose a public constructor for |NetworkSelectionStatus| class and add a
setter in WifiConfiguration to set the |NetworkSelectionStatus| object.
Needed for config store persistence of this object.

BUG: 29273147
Change-Id: I9d9036928137760c4832567dd2b9d0fabc874940
TEST: Unit tests
2016-06-10 14:38:45 -07:00
Roshan Pius
08131593a8 WifiManager: Add new API to restore old backup data
Add a new API to restore the old backups containing the raw data from
wpa_supplicant.conf & ipconfig.txt files.
This helps clean up all the existing wifi configuration parsing
logic from SettingsBackupAgent.

BUG: 29075035
Change-Id: I8c7b93ef7c9e2decc8e4f9e5d7038939cf0ef196
2016-06-03 17:19:01 -07:00
Gina Dimino
98ad88811c Docs: Suppress errors in SystemApi Build
Bug: 28427390

Change-Id: Ifea85bf7b1fcdd30a3d7f61bd17d0efba6368aa4
2016-06-01 16:13:53 -07:00
Roshan Pius
7bc0adbced WifiManager: Add new API's for backup/restore
Expose new API's to retrieve data to be backed up for Wifi
configurations and to restore configurations from the data.
BackupSettingsAgent will invoke these API's to backup/restore wifi
settings.

BUG: 28967335
Change-Id: I64e2f37a29d538d976bcc53dd2165653073b5862
2016-05-31 13:36:38 -07:00
Etan Cohen
a258918133 [NAN] Add retry count for transmitting L2 NAN messages
am: 93d3c79b54

* commit '93d3c79b54cbc913ff013102a408c6d330d6e73a':
  [NAN] Add retry count for transmitting L2 NAN messages

Change-Id: I429fb24a0b4b260009efe3ac7ea641577d1ac8b4
2016-05-24 01:28:04 +00:00
Etan Cohen
93d3c79b54 [NAN] Add retry count for transmitting L2 NAN messages
Bug: 28690414
Change-Id: I0a253f6d7e0d15f4bb50cae685c5e2496682cd67
2016-05-23 15:07:47 -07:00
TreeHugger Robot
cbbe160fcc Merge "WifiManager: add WIFI_MODE_NO_LOCKS_HELD" 2016-05-20 18:36:23 +00:00
Rebecca Silberstein
df547e04c3 WifiManager: add WIFI_MODE_NO_LOCKS_HELD
Add a WifiLock mode representing that no locks are held (@hide).

Bug: 28669096
Change-Id: I774d5ff226e7c639812f9735555c8ea1ed6444af
Test: compiles and runtest frameworks-wifi
2016-05-19 16:18:36 -07:00
Etan Cohen
fc31a8e4f1 resolve merge conflicts of fb8021c to master
Change-Id: Ic2869ca4bf8acfa2080810145f887bf643f1d52a
2016-05-18 16:54:29 -07:00
Christopher Wiley
b41e74f41e Fix some trivial warnings in WifiP2pDevice.java
Add some missing @Override annotations, and mark some constants
as unused.

Bug: 28799169
Change-Id: I1ddef87ecb089b62e299544ae94a21d10ef42d98
Test: Compiles.
2016-05-16 15:54:06 -07:00
Etan Cohen
fb8021c837 [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
2016-05-13 17:20:54 -07:00
Etan Cohen
bbb65b8680 resolve merge conflicts of cbf3759 to master
Change-Id: I76218c1612c9a2f3b7844a203a481cc7af0e3686
2016-05-09 17:46:50 -07:00
Etan Cohen
cbf3759332 [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
2016-05-09 15:39:15 -07:00
Roshan Pius
a6fac3eb6b 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
2016-05-03 22:27:53 +00:00
Adam Lesinski
529c1ec13d Merge "BatteryStats: Introduce Async external stats requests" into nyc-dev am: 0d47f4b am: 811c48d
am: 5b7c57d

* commit '5b7c57d53b08b29f8dc2c05a4193ec9524ce8c60':
  BatteryStats: Introduce Async external stats requests

Change-Id: I6c789ebd217f9ff15f69d6361d0e6fb3b61ff45e
2016-04-18 23:45:58 +00:00
Adam Lesinski
0d47f4b646 Merge "BatteryStats: Introduce Async external stats requests" into nyc-dev 2016-04-18 23:27:10 +00:00