Commit Graph

1964 Commits

Author SHA1 Message Date
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
Rebecca Silberstein
07f580eaff Merge "WifiManager: get startLOHS packageName" into oc-dev 2017-05-22 16:57:58 +00:00
Glen Kuhne
387b97e68b Merge "P2P: update WifiP2pServiceResponse creator" into oc-dev 2017-05-19 22:36:00 +00:00
Rebecca Silberstein
967dfb4451 WifiManager: get startLOHS packageName
When an application calls startLocalOnlyHotspot, we need to send the
package name from the manager-side of the call.  This CL updates the
call to WifiServiceImpl.startLocalOnlyHotspot and the relevant aidl
file.

Bug: 31466854
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I1dd0142dc58c767336c9323986d20e38bf11220d
2017-05-19 09:32:53 -07:00
Glen Kuhne
6f80049a41 P2P: update WifiP2pServiceResponse creator
WifiP2pServiceResponse.newInstance now receives the srcAddr and tlvs
binary data directory directly from the hal iface callback.
This fixes a bug introduced in O that broke serviceDiscoveryRequests.

Bug: 38174469
Test: CtsVerifier Service Discovery Requester
Test: frameworks/opt/net/wifi unit test
Change-Id: I66739713292a19ec399358a1033fccb35e76b9cf
2017-05-18 10:52:33 -07:00
TreeHugger Robot
f17d3b89d3 Merge "WifiManager: add unspecified ip mode" into oc-dev 2017-05-18 01:44:35 +00:00
Rebecca Silberstein
bf47543618 WifiManager: add unspecified ip mode
Add an unspecified IP mode that allows WifiServiceImpl to clear state
in the interface-based IP mode tracking.

Bug: 31466854
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I15485cdab95ed4308cf5c2877fba40eac82bf162
2017-05-17 00:25:24 -07:00
Roshan Pius
65c494a548 WifiP2pWfdInfo: Only pass the wfd info to WifiNative
WifiP2pWfdInfo.getDeviceInfoHex() is used to set the WFD info in
wpa_supplicant. The length of this WFD info will be calculated and
prepended by the HIDL interface itself, so there is no need for this
length to prepended in the framework. So, get rid of it.

Bug: 38222615
Test: Compiles
Change-Id: If8ff6e558dad974a053265e0a8c8222943065823
2017-05-16 09:17:37 -07:00
Randy Pan
c7642c3239 Merge "Add network disabled reason starting index" into oc-dev 2017-05-03 22:55:48 +00:00
Wei Wang
41c1e3f1aa Merge "Fix RttManager documation unit issue." into oc-dev 2017-05-03 19:45:19 +00:00
Wei Wang
8330dc98f5 Fix RttManager documation unit issue.
Bug: 35138520

Test: Build passes. Nothing else to test as this only changes javadocs.
Change-Id: Id522eba4cf8dba2be670582e7d734bd9203b2aae
2017-05-02 20:32:37 -07:00
Randy Pan
f4315fed7e Add network disabled reason starting index
Bug: 36872201
Test: Flash, run connection tests and check the bug reports
Change-Id: I4b015bc805671765f32cbabe6e5f4b623498279d
2017-05-01 22:07:26 -07:00
Peter Qiu
a9f9889218 hotspot2: hide Release 2 APIs
Bug: 37514629
Test: builds
Change-Id: Idcd684cf9846791cb02ae0f74ec35ff4850666f1
2017-05-01 16:22:24 -07:00
Jeff Sharkey
3ddc413b73 Merge changes from topic 'LOHSapi' into oc-dev
* changes:
  WifiManager: expose base LOHS apis
  WifiManager: update API for LOHS
2017-05-01 22:35:05 +00:00
Rebecca Silberstein
1668d9732a WifiManager: expose base LOHS apis
This CL exposes a minimal set of APIs to start LocalOnlyHotspot.  This
includes the call to start the hotspot along with the objects necessary
to get updates and unregister the hotspot request.

Bug: 31466854
Bug: 37073685
Test: make update-api
Test: make
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I5e9a6a842c0b9233ebf99317f61e0b36192d5be7
2017-05-01 12:45:45 -07:00
Rebecca Silberstein
6d7b130e23 WifiManager: update API for LOHS
Add a return code for disallowed tethering for the user.  Also updated
call to startLocalOnlyHotspot in WifiServiceImpl to return a code
instead of a config.  This allows us to return different failure modes
to the application instead of assuming an incompatible mode error.

Also updated method name to retrieve the wifi config.

Bug: 37073685
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Iaa442f7062145dbfbdc8e26ae5479d14307addf8
2017-05-01 11:41:53 -07:00
Peter Qiu
967501ec98 hotspot2: update method name for timestamp related APIs
Bug: 37514629
Test: build
Change-Id: Iadd8b7a9ea98bc01f796a261293f87173ba1d52f
2017-05-01 09:41:14 -07:00
Rebecca Silberstein
b34ebbedcf Revert "WifiManager: expose Local Only Hotspot APIs"
This reverts commit ec18f81e5b.

Reverting the CL to expose the APIs so we have more time for testing
and ironing out the API.

Bug: 31466854
Bug: 37073685
Test: make update-api
Test: make
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh

Change-Id: I17d4e3e32e28dbbb08ba99c266a9b74044e6001d
2017-04-30 21:45:45 +00:00
Rebecca Silberstein
ec18f81e5b WifiManager: expose Local Only Hotspot APIs
Expose the APIs to start and stop LocalOnlyHotspot.

Bug: 31466854
Bug: 37073685
Test: make update-api
Test: make
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I8d149ab04d24bf0eb54dd8d8a62e285f9c5b483e
2017-04-30 00:38:54 -07:00
Rebecca Silberstein
4871da6b07 WifiManager: implement watch LocalOnlyHotspot
Implement new calls to watchLocalOnlyHotspot and
unregisterLocalOnlyHotspotObserver along with the classes
LocalOnlyHotspotObserver and LocalOnlyHotspotSubscription.

Added tests for watching LOHS and cancelling a LOHS subscription.

The calls will be exposed in a later CL.

Bug: 36704763
Test: compiles
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ia0a528191ae0897742304d8b61e9779ad721a450
2017-04-30 00:38:22 -07:00
Rebecca Silberstein
ce74fc29b0 WifiManager: implement start/stopLocalOnlyHotspot
Implement new calls to startLocalOnlyHotspot and
cancelLocalOnlyHotspotRequest along with the classes
LocalOnlyHotspotCallback and LocalOnlyHotspotReservation.

Added tests for starting LOHS and cancelling a LOHS request.

The calls will be exposed in a later CL.

Bug: 36704763
Test: compiles
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: If54a89cb8dfd235bc18ef3e6c89f9d30882136a3
2017-04-30 00:38:22 -07:00
Rebecca Silberstein
54a540c04a WifiManager: add LocalOnlyHotspotObserverProxy
Add the proxy for LOHS observer callbacks to make sure we give updates
to calling apps on the correct thread.

This will be used in a follow-on CL.

Bug: 36704763
Test: mmma -j64 frameworks/base/
Change-Id: I20faa73325116426f45d9d8fabc45b279bd5a286
2017-04-30 00:38:21 -07:00
Rebecca Silberstein
b1c4cb795c WifiManager: add LocalOnlyHotspotCallbackProxy
Add the proxy for LOHS callbacks to make sure we give updates to calling
apps on the correct thread.

This will be used in a follow-on CL.

Bug: 36704763
Test: mmma -j64 frameworks/base/
Change-Id: Ib32dfd232ff8aaeb5f7b228cf0cfc3fd23fd7ee4
2017-04-30 00:38:21 -07:00
Rebecca Silberstein
5adbc3fb7d WifiManager: add APIs for LOHS
Add the APIs and docs for LocalOnlyHotspot (LOHS).  The calls are
not implemented with this CL.

Bug: 36704763
Bug: 37073685
Test: make
Change-Id: Ib7ab287a65091f54abef56feebb4cccd1e15a173
2017-04-30 00:38:10 -07:00
Erik Kline
95581dacb2 Merge "WifiManager: add updateInterfaceIpState" into oc-dev 2017-04-28 01:57:03 +00:00
TreeHugger Robot
afd8d9e2b2 Merge "Throttle wifi scan requests from background apps (1/2)." into oc-dev 2017-04-27 23:38:28 +00:00
David Farrow
6986e8a1ba Merge "documentation fixes" into nyc-mr1-dev am: 14826e5489 am: b1e3d9ab26
am: 4ea763ad8a

Change-Id: I1b3005ef17b9d54e1f9b9c75138d214e80fc414c
2017-04-27 17:28:28 +00:00
David Farrow
4ea763ad8a Merge "documentation fixes" into nyc-mr1-dev am: 14826e5489
am: b1e3d9ab26

Change-Id: I4f2682c11384a9f656054b95cfba56132085634a
2017-04-27 17:19:21 +00:00
David Farrow
b1e3d9ab26 Merge "documentation fixes" into nyc-mr1-dev
am: 14826e5489

Change-Id: I18df5f88d8f72ec74e62b39a056459e4e715b9db
2017-04-27 17:09:26 +00:00
Rebecca Silberstein
720cac4536 WifiManager: add updateInterfaceIpState
Add a call to WifiManager that allows ConnectivityService to
provide interface mode change updates.  Mode variables are also
added in this CL.

A corresponding CL will be added to WifiServiceImpl.

Fixed two checkstyle errors on imports.

Bug: 31466854
Test: make
Change-Id: Iccccd2643515a09fadb29f7b7e82697aaf994189
Merged-In: Ifc2dec71cfa760ad52295db4dc26d53edc349618
Merged-In: Iabd864759181aba72766a26110ecef9f4cca3d5d
2017-04-26 21:00:12 -07:00
Etan Cohen
14ff091a1d Merge "[AWARE] Add AutoCloseable interface/implementation" into oc-dev 2017-04-25 03:26:07 +00:00
Etan Cohen
2be0a532bf Merge "[AWARE] Remove match style API" into oc-dev 2017-04-24 22:59:26 +00:00
Etan Cohen
a1d90d9e9f [AWARE] Add AutoCloseable interface/implementation
Make resource holding classes AutoCloseable. These are objects
which (already) require the client to call a destroy() method.

Note: the destroy() method was renamed to close() - no sense in
identical/duplicate methods.

Bug: 37514387
Test: unit tests and integration (sl4a) tests passing.
Merged-In: Ia14065ab9dcd92481412532bfdb198f2e8d9f83c
Change-Id: Ia14065ab9dcd92481412532bfdb198f2e8d9f83c
2017-04-21 14:05:58 -07:00
Rebecca Silberstein
435f1dc7a7 Merge "WifiManager: add new methods to start softap" into oc-dev 2017-04-21 17:33:46 +00:00
Etan Cohen
66a3b8c7c0 [AWARE] Remove match style API
Match style (ALL or FIRST) are not necessary - there is no use-case
for need to match any but the first time. Match style ALL also has
power implications.

Bug: 37547045
Test: unit tests + integration (sl4a) tests passing.
Change-Id: I6ae872711159f4ade4b2c7cfcd36cd2a0e64dd52
2017-04-20 17:12:20 -07:00
Michael Plass
5fc916d852 Merge "Deprecate BSSID Hostlist system API" into oc-dev 2017-04-20 23:37:53 +00:00
Rebecca Silberstein
42ae52899f WifiManager: add new methods to start softap
Add two new methods to start/stop softap in WifiService.  These are
internal calls that allow WifiService and ConnectivityService to
coordinate the switch to and from softap mode.  These calls will not be
callable by apps and are protected by the NETWORK_STACK permission.  The
calls are added in this CL, but are not used at this time.

Bug: 36540346
Test: compiles

Change-Id: Idabdba7f779cbac999ff88d8993b2f4b1f4a1624
Merged-In: Idabdba7f779cbac999ff88d8993b2f4b1f4a1624
Merged-In: Ie2476bbae3554bd9fc203c478d25cb2e2898c8e3
2017-04-20 22:32:26 +00:00
Wei Wang
cdbffa986d Throttle wifi scan requests from background apps (1/2).
Bug: 37320631

Test: Manual test on Sailfish. Unit tests using runtest.sh.

Change-Id: If7c0206df29aea15089eba335d5b4e82f066eed9
2017-04-19 17:40:24 -07:00
Etan Cohen
6850728818 [AWARE] Implement custom Wi-Fi Aware network specifier
Convert Wi-Fi Aware connectivity requests to use a custom
network specifier (as opposed to a string). Aside from
simplifying code, allows for more control of information
printed out, and of additional information to be packaged
and used in network decisions (uid - TBD).

(cherry-pick of commit a5028455a4)

Bug: 36275276
Bug: 36053921
Test: unit tests and integration (sl4a) tests passing.
Merged-In: I776fb348b15ec4830f890a8ac5c41f24594e12a7
Change-Id: I776fb348b15ec4830f890a8ac5c41f24594e12a7
2017-04-18 22:57:52 +09:00
Michael Plass
5b1979f5b9 Deprecate BSSID Hostlist system API
Test: unit tests pass
Bug: 30147676
Change-Id: I73a6ef1f839c0eb977cf790e5cce36d95f06a783
2017-03-31 11:39:48 -07:00
Sohani Rao
7b38b035f5 Introduce Authentication Failure reason codes
In order to differentiate between various reasons for authentication
failure, add reason codes. These will be hidden since we don't intend to
have API change.

Bug: 33245941
Test: Unit test
Change-Id: I7222520df18e54d684ba9e50ff95be5d46a7d70c
2017-03-30 17:31:23 -07:00
TreeHugger Robot
859789061f Merge "Cherry-pick: Remove implementation of bssid hotlist" into oc-dev 2017-03-30 02:58:41 +00:00
Michael Plass
82b4fd94f1 Cherry-pick: Remove implementation of bssid hotlist
Test: Relevant unit tests pass
Bug: 30147676
Change-Id: I268907cc13ef21c0ba547722fe7c866ee4cdae5a
2017-03-29 16:57:51 -07:00
Etan Cohen
2ce80c839e Merge "[AWARE] Remove Publish/Subscribe Count configuration" into oc-dev 2017-03-29 20:15:03 +00:00
TreeHugger Robot
ef4b501c6d Merge "wifi: document UnsupportedOperationException for Passpoint related APIs" into oc-dev 2017-03-29 19:34:09 +00:00
TreeHugger Robot
10180bb47b Merge "wifi: update passpoint to Passpoint in comments" into oc-dev 2017-03-29 19:31:42 +00:00
Peter Qiu
6bbc8955c1 wifi: update passpoint to Passpoint in comments
Per API Council, we should use the trademark name Passpoint
instead of passpoint in the code comments.

Bug: 35854283
Test: make -j32
Change-Id: Iea6697191a936d1d779c0ea50cd19c134bc7df02
2017-03-29 10:29:21 -07:00
Peter Qiu
1fe2a8cfa6 wifi: document UnsupportedOperationException for Passpoint related APIs
An UnsupportedOperationException will be thrown for Passpoint related
API calls if Passpoint is not enabled on the device (build config
config_wifi_hotspot2_enabled is set to false).

Bug: None
Test: None
Change-Id: Id0ba1f7b80091d55a839fa3eee36baf9b45b7f5f
2017-03-29 10:20:21 -07:00
Etan Cohen
f6d243b6be [AWARE] Remove Publish/Subscribe Count configuration
Simplify API: semantics of publish/subscribe count restrictions
aren't clear at the app level. They depend on DW configuration as
well as discovery session type - number of packets transmitted over
the air.

There's already an app-facing discovery session lifetime configuration -
the TTL. That has clearer semantics and is sufficient (for now).

(cherry-pick of commit 2cbaf22bba)

Bug: 36446307
Test: unit tests and integration (sl4a) tests.
Merged-In: I9129975bd2e1a61b3d23a4b6acaae703b42216c7
Change-Id: I9129975bd2e1a61b3d23a4b6acaae703b42216c7
2017-03-29 10:05:19 -07:00
Roshan Pius
eb4027397b WifiManager(aidl): Remove pingSupplicant binder call
This is now deprecated in the public API and instead calls
isWifiEnabled(). So, remove this AIDL call.

Bug: 36493092
Test: Compiles
Change-Id: I6339d5bb18f423d84fa9222a87e2df7eb9c336a9
Merged-In: I6339d5bb18f423d84fa9222a87e2df7eb9c336a9
2017-03-28 10:11:22 -07:00