Commit Graph

1971 Commits

Author SHA1 Message Date
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
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
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
c0643da09e Merge "WifiManager: setWifiApEnabled always returns false" into oc-dev 2017-05-31 15:42:33 +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
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
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