91 Commits

Author SHA1 Message Date
Etan Cohen
523a425083 [AWARE] Add a group network specifier allowing matches to multiple requests
Add a group Aware network specifier which can match any of the
requests it contains. It is intended to represent a single connection
which may match multiple network requests.

Bug: 64125969
Test: unit tests
Test: acts/sl4a + new DataPathTest:test_multiple_identical_networks
Change-Id: I5971dc21c0a6d95fbd287ba0df0c7fba4ba580da
2017-08-17 10:49:40 -07:00
Etan Cohen
a1dff77196 [P2P] Public API to clean-up resources of P2P
1. Add public API to close a Channel and allow configuration to be
   cleaned-up. Actual clean-up will only happen when the last p2p
   client executes close or terminates (binder death is triggered
   for the service).
2. Add Close Guard to verify that API is called - issue warning
   otherwise. Note that to actually get the warning an app needs
   to use the StrictMode policy:

   StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
       .detectLeakedClosableObjects().build());

Bug: 37443149
Test: (new) unit tests, CtsVerifier, Settings/WFD app
Change-Id: I9590101ef7f7ba0a90812634ac1b931d1482fe72
2017-07-20 14:00:41 +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
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
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
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
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
Peter Qiu
01a6ca780b wifi: override equals method for WifiSsid
Bug: 62053649
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I02309880398750a1f5039b8b07a65972fe25104a
2017-05-24 13:21:19 -07:00
Rebecca Silberstein
fa5713a2c2 Merge "WifiManager: get startLOHS packageName" into oc-dev am: 07f580eaff
am: 5dceb97fd3

Change-Id: I47cac61d2d4f4b8d4c659bfc4bb764710f67b018
2017-05-22 17:17: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
Rebecca Silberstein
a23cbf0656 Merge "WifiManagerTest: alt way to check callback" into oc-dev am: 52fbde5255
am: dd28278023

Change-Id: I8e56318a4d62330d31fb129439cd3ed26305f13a
2017-05-05 20:22:42 +00:00
Rebecca Silberstein
695cea5929 WifiManagerTest: alt way to check callback
We are seeing failures on automated tests.  This is occuring when the
thread id is retrieved from the TestLooper.  Since we do not have
control over exactly which thread is used in the TestLooper for these
environments, this CL changes the checks to make sure the the callback
is called, and also that we never attempt to get the main looper (the
behavior when the provided handler is null).

Bug: 37828843
Test:  frameworks/base/wifi/tests/runtests.sh
Change-Id: I853c423b5f383225c250357d638c4cfd2c098edc
2017-05-05 18:10:19 +00:00
Rebecca Silberstein
11b16af5fa Merge "WifiManagerTest: test for startLOHS return code" into oc-dev am: f8d909c14a
am: fa82e296c3

Change-Id: I0c942308c45fcef49afc29a1a533524124a8883a
2017-05-05 16:40:15 +00:00
Rebecca Silberstein
23d79bf144 WifiManagerTest: test for startLOHS return code
Add a test checking the return code value for startLocalOnlyHotspot.
This test verifies that the error code supplied by WifiServiceImpl is
passed to the caller via the onFailed(reason) callback.

Bug: 36760523
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I37eb788d62df89e0b2a133be4368a375e29e39e3
2017-05-02 13:26:41 -07:00
Jeff Sharkey
16ec201af1 Merge changes from topic 'LOHSapi' into oc-dev am: 3ddc413b73
am: 5050b970bf

Change-Id: Ibbc1c8a17c51cda2797d4acb8b66ad6672011919
2017-05-01 22:51:57 +00: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
Jeff Sharkey
442b93c03a Merge "hotspot2: update method name for timestamp related APIs" into oc-dev am: b6f66cf931
am: 28b08173da

Change-Id: I4d019e13e0d7bb5d7f1bada97bfa7948a1b650ac
2017-05-01 22:21:34 +00: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
317c8634f5 Merge changes I8d149ab0,Ia0a52819,If54a89cb,I20faa733,Ib32dfd23 into oc-dev am: 07ea44909f
am: 63ca3e2414

Change-Id: Ieb34996878d9689e2bd29590a302a95dd7d2d83c
2017-04-30 18:45:31 +00: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
Etan Cohen
14ff091a1d Merge "[AWARE] Add AutoCloseable interface/implementation" into oc-dev 2017-04-25 03:26:07 +00:00
Etan Cohen
62dd9594eb Merge "[AWARE] Remove match style API" into oc-dev am: 2be0a532bf
am: 1945f3ad2e

Change-Id: I94ddbb5eae5ff644b5b06b57633762b6bce8433f
2017-04-24 23:25:06 +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
Etan Cohen
8039e6d48d [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.

(cherry-pick of commit 6a4572c89671d9320620eb0ef071dfe0a01de901)

Bug: 37514387
Test: unit tests and integration (sl4a) tests passing.
Change-Id: Ia14065ab9dcd92481412532bfdb198f2e8d9f83c
2017-04-21 13:15:53 -07: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
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 a5028455a4b7592091f12c80d4b4d42c9c866d66)

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
Lorenzo Colitti
0824bbc91a Merge "[AWARE] Implement custom Wi-Fi Aware network specifier" am: a9cbda5bd8 am: 1d82eb0612 am: 0d89fcc628
am: dadd384808

Change-Id: Iebc1f993e0a3ccf86e813a52168431b624aa7716
2017-04-18 09:01:54 +00:00
Lorenzo Colitti
dadd384808 Merge "[AWARE] Implement custom Wi-Fi Aware network specifier" am: a9cbda5bd8 am: 1d82eb0612
am: 0d89fcc628

Change-Id: Ia6549a6fa404518d091ecb7bd74ece41f547d8c7
2017-04-18 08:51:20 +00:00
Etan Cohen
a5028455a4 [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).

Bug: 36275276
Bug: 36053921
Test: unit tests and integration (sl4a) tests passing.
Change-Id: I776fb348b15ec4830f890a8ac5c41f24594e12a7
2017-04-05 21:31:03 -07:00
Dan Shi
1fee398b88 Change test type from InstrumentationTest to AndroidJUnitTest
Details about test configs changes are tracked in doc
https://docs.google.com/document/d/1EWUjJ7fjy8ge_Nk0YQbFdRp8DSHo3z6GU0R8jLgrAcw/edit#

Bug: 35882476
Test: local test

Change-Id: Ic3c4c7a9d29ef9d32a407f31cfc93c5e43650297
2017-03-31 16:02:33 -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
70b93740c2 Merge "Remove implementation of bssid hotlist" am: 62c5f64fa5 am: 37a1d983fe
am: 7b4d1bbacc

Change-Id: I1cc13641f08367784c772a08ec5aeffba08ea207
2017-03-30 00:14:00 +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
Michael Plass
31225c466e Remove implementation of bssid hotlist
Test: Relevant unit tests pass
Bug: 30147676
Change-Id: I268907cc13ef21c0ba547722fe7c866ee4cdae5a
2017-03-29 14:19:50 -07:00
Etan Cohen
b36a9e0eb5 Merge "[AWARE] Remove Publish/Subscribe Count configuration" am: 5d81b9d67d am: 9bc8e05da2
am: 342a27e7f7

Change-Id: I5b4d9ea932373e8dd82e846d2c31995b23329fff
2017-03-29 17:19:50 +00: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 2cbaf22bba4da1b60c551112a97ccc7f2e7157fa)

Bug: 36446307
Test: unit tests and integration (sl4a) tests.
Merged-In: I9129975bd2e1a61b3d23a4b6acaae703b42216c7
Change-Id: I9129975bd2e1a61b3d23a4b6acaae703b42216c7
2017-03-29 10:05:19 -07:00
Etan Cohen
b51c04effb Merge "[AWARE] Fix unit tests" am: de8e09409b am: c24d7f781a
am: 7060ae081b

Change-Id: I7e90e4c0853457fa49335a48b20d74c3afb9ba1b
2017-03-29 15:14:30 +00:00
Etan Cohen
a85dcbbd8e [AWARE] Fix unit tests
Update to reflect new mockito semantics.

No functional change, no change to test semantics!

(cherry-pick of commit afddcc3c9860fecfdb3ed72fafb09d73e8549411)

Bug: 36680830
Test: unit tests now passing
Merged-In: Ic210f20ce47ab19da25bd0835ae2ee5ae0f73011
Change-Id: Ic210f20ce47ab19da25bd0835ae2ee5ae0f73011
2017-03-29 08:07:22 -07:00
Etan Cohen
2cbaf22bba [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).

Bug: 36446307
Test: unit tests and integration (sl4a) tests.
Change-Id: I9129975bd2e1a61b3d23a4b6acaae703b42216c7
2017-03-28 11:25:21 -07:00
Etan Cohen
afddcc3c98 [AWARE] Fix unit tests
Update to reflect new mockito semantics.

No functional change, no change to test semantics!

Bug: 36680830
Test: unit tests now passing
Change-Id: Ic210f20ce47ab19da25bd0835ae2ee5ae0f73011
2017-03-28 10:50:41 -07:00
Peter Qiu
424c8c1716 Merge "Merge "wifi: use android.graphics.drawable.Icon for Passpoint icon data" am: 44ef19d131 am: aadbb2d45e" into nyc-mr2-dev-plus-aosp
am: 3f57a273d2

Change-Id: Ie314289ce69f07c872c7a16ddc90d36be25c777f
2017-03-23 23:13:32 +00:00
Treehugger Robot
44ef19d131 Merge "wifi: use android.graphics.drawable.Icon for Passpoint icon data" 2017-03-23 22:53:46 +00:00
Peter Qiu
cf08edf4ff Merge "hotspot2: ignore uninterested headers and content type attributes" am: 7a7bb444cb am: 10d1deff83
am: f9de6d77bc

Change-Id: I735caa47dc93f98e4ef0be7fb5f0fe700dffa1bf
2017-03-23 20:18:41 +00:00
Peter Qiu
ed1fc64efd wifi: use android.graphics.drawable.Icon for Passpoint icon data
Bug: 35857805
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ib076cd7f565638613173c7373ea5ea61affb876d
2017-03-23 11:42:49 -07:00
Peter Qiu
5a493241d9 hotspot2: ignore uninterested headers and content type attributes
Each vendor might put additional headers and content type attributes
in the installation file, and will not be useful for us.  So just
ignore them when parsing the installation file instead of error out.

While there, add support for parsing "Extension" node in PpsMoParser.
This an interior node containing vendor specific information, only
meaningful to the vendor.  So we will ignore fields under this node.

Bug: 36477333
Test: frameworks/base/wifi/tests/runtests.sh
Test: manual test by installing ruckus Passpoint profile
Change-Id: I9954ed000387bc8048d0452a5bfb0f339e676659
2017-03-23 11:40:05 -07:00
Dan Shi
7f2afd2dff Add test configs to apct tests under frameworks/base
TouchLatency is needed by test TouchLatencyJankTestWear
UiBench is needed by test UiBenchJankTests

Details about test configs changes are tracked in doc
https://docs.google.com/document/d/1EWUjJ7fjy8ge_Nk0YQbFdRp8DSHo3z6GU0R8jLgrAcw/edit#

Bug: 35882476
Test: local test
make -j32 TouchLatency TouchLatencyJankTestWear  && \
tradefed.sh run template/local --template:map test=TouchLatencyJankTestWear \
      --test-tag testname --log-level-display VERBOSE
make -j32 UiBenchJankTests UiBench  && \
tradefed.sh run template/local --template:map test=UiBenchJankTests \
      --test-tag testname --log-level-display VERBOSE

Change-Id: I63f23e3a21ad1343607953958fb7bb0a5fb8c343
2017-03-21 00:05:14 -07:00