1438 Commits

Author SHA1 Message Date
Peter Qiu
2a658a152a wifi: hotspot2: omadm: add parsing support for PPS MO tree
This parser will convert a PPS MO (PerProviderSubscription Management Object)
tree XML string to a PasspointConfiguration parcelable object.

Bug: 32129686
Change-Id: Ia80b6d73828436ded57a3817f5eca7b79c618de4
Test: frameworks/base/wifi/tests/runtests.sh
2016-10-26 11:52:30 -07:00
Peter Qiu
bae4becf69 wifi: hotspot2: omadm: add XML parser for parsing OMA-DM XML string
The XML parser will parse an XML string into a tree-like structure
represented by XMLNode, which will be used by an object specific parser
(e.g. PerProviderSubscription Management Object tree parser) for further
processing.

Bug: 32129686
Test: frameworks/base/wifi/tests/runtests.sh

Change-Id: I69c1931b2e8a6f3551e4eba5cffa3d2d0877872a
2016-10-26 11:52:24 -07:00
Peter Qiu
e557c35d95 wifi: hotspot2: initial implementation of PasspointConfiguration
Only support nodes under HomeSP and Credential subtree that are used
by Hotspot 2.0 Release 1.

These classes are used for data exchanges between the app and the system
service (WifiService).  All the business logics and validations will be
done on the service side (WifiService).

Bug: 31813706
Test: frameworks/base/wifi/tests/runtests.sh

Change-Id: I6b08f52dd7b1a7b337899ab80f11d062c8e2f532
2016-10-26 10:23:09 -07:00
Treehugger Robot
05d950ee3b Merge "wifi: WifiEnterpriseConfig: use ParcelUtil to parcelize key and certificates" 2016-10-06 17:35:33 +00:00
Treehugger Robot
0169a3b094 Merge "wifi: add ParcelUtil for parcelizing non-parcelable objects" 2016-10-06 17:21:44 +00:00
Etan Cohen
f12c6e4f5e Merge "[NAN] Expose NAN characteristics as an API" 2016-10-06 04:45:29 +00:00
Etan Cohen
e64c62fd02 [NAN] Expose NAN characteristics as an API
Expose NAN characteristics as an API.

(cherry-pick of commit 3a9de10963d869fa8f721432ce12785de384c560)

Bug: 31912101
Test: build and validate API updates
Change-Id: If02942d738aab8fa2f2f47489c6840af1bc38280
2016-10-05 20:00:53 -07:00
Etan Cohen
2a4c81b7a7 [NAN] Add COARSE_LOCATION permission check to NAN discovery
NAN discovery can expose location based on service signatures.

(cherry-pick of commit e1d8a5a6fc3661f226afff3fde59a3eb2c06d718)

Bug: 31907534
Test: unit test + integrated (sl4a) testing
Change-Id: Iec0fae507dfdae65fe08ab6e2ddb89334c15def5
2016-10-05 15:23:21 -07:00
Etan Cohen
99997dc1ab [NAN] Use NAN capability information to validate configurations
Validate publish and subscribe configurations and message length using
the NAN configuration retrieved from the firmware.

(cherry-pick of commit 65eaa6d82170140b351d48342550a27c971d2a37)

Bug: 31912101
Test: unit tests
Change-Id: I0328cabf1aafb3f350c5fe38e6d03b0e002c693b
2016-10-04 18:37:19 -07:00
Peter Qiu
1e9dd72b64 wifi: WifiEnterpriseConfig: use ParcelUtil to parcelize key and certificates
Bug: 31834143
Test: frameworks/base/wifi/tests/runtest.sh

Change-Id: Ie013c0637e66fb970746ad8f80bca03515b72443
2016-10-04 10:18:50 -07:00
Peter Qiu
49f2684f31 wifi: add ParcelUtil for parcelizing non-parcelable objects
This CL adds the support for X509Certificate and PrivateKey objects.

Bug: 31834143
Test: frameworks/base/wifi/tests/runtest.sh

Change-Id: I1416a2aeeb0dfdd4a562d1a3b578addf55deb4ab
2016-10-04 10:18:44 -07:00
Etan Cohen
4c22e8bede [NAN] Update API javadoc to clarify NAN status change broadcast scope
(cherry-pick of commit 1fceaf9d63cd572cad57e71f6cb66f0cb59183b5)

Bug: 31675932
Test: make -j 32 update-api (to generate doc)
Change-Id: I7263a15902c423c1c71c2c457c82e8caef5abceb
2016-09-30 11:31:47 -07:00
Randy Pan
634d97add8 Remove the obsoleted ScanResult.isAutoJoinCandidate
Bug: 31565767
Test: unit tests
Change-Id: I3e1ee0e919c800c4d5eeaf94fdc68123b6de542e
2016-09-29 13:12:55 -07:00
Treehugger Robot
afbe615993 Merge "wifi: add test target/directory for unit testing WiFi framework APIs" 2016-09-28 22:52:31 +00:00
Etan Cohen
60add8ad01 [NAN] Remove builder API using String to translate to byte[]
Per API review: String accessor was not needed (duplicate, semantics
not accurate, trivial use-case).

(cherry-pick of commit c76ccf3e7e673fb21f27ea8e7482021900b113cf)

Bug: 31470256
Test: unit tests & integration (sl4a) testing.
Change-Id: Id307702627afd8ee579b540d4c2f65359bf9a925
2016-09-28 11:47:24 -07:00
Etan Cohen
f085c1951a [NAN] Use a hidden class for peer ID opaque handle
Results in clearer run-time exception (relatively to using Integer).

(cherry-pick of commit 57db2b3eea5333e5ee144ea29e4a4af02fae7309)

Bug: 31689166
Test: unit-tests + integrated (sl4a).
Change-Id: I79d0e8061204834b9775b02d503cb18fd03ed8c6
2016-09-27 16:42:05 -07:00
Peter Qiu
601964b927 wifi: add test target/directory for unit testing WiFi framework APIs
The existing tests for the WiFi frameworks API android.net.wifi are
copied from frameworks/opt/wifi/tests, and will be removed in
frameworks/opt/wifi/tests.

Bug: 31745421
Change-Id: I789e983bc7dd02b6c3fa6a982ca671347912be0f
Test: frameworks/base/wifi/runtests.sh
2016-09-27 15:13:20 -07:00
Etan Cohen
6c48c33735 [NAN] Rename setTerminateNotificationEnabled per API review
(cherry-pick of commit 7df9b7a1039ea8e34e82e650cebd1025a2591580)

Bug: 31470256
Test: unit tests + integrated (sl4a) tests
Change-Id: I1554b5b7961a5c46656a40ad395431125da7aa7f
2016-09-27 10:53:47 -07:00
Etan Cohen
7c724e6708 [NAN] Fix javadoc links
(cherry-pick of commit ee3d9fc5e60ce4b57dbba7483ac323ed29df2e4a)

Bug: 31470256
Test: builds (javadoc only)
Change-Id: I645525660b9a6759f968d9e62cd79d6a851815bf
2016-09-26 13:54:50 -07:00
Etan Cohen
41d6f375be [NAN] Fix incorrect log message
(cherry-pick of commit 0d7863406b1542c3092fa976cfb41b09a97dd8bd)

Bug: 31678708
Test: integrated (sl4a) test
Change-Id: I822c66619642f08d1d8f68cc8257185360da60be
2016-09-26 11:53:28 -07:00
Etan Cohen
27c18cbb5b [NAN] Replace int peerId with more opaqure Object peerHandle per API review
(cherry-pick of commit f02ae5e23cb59fcbd364907ecb1199424fc5eb62)

Bug: 31470256
Test: unit tests & integration (sl4a) tests.
Change-Id: I0225027b8e1a2d7cb5d27afc91b97ef9643f5dff
2016-09-26 10:14:35 -07:00
Etan Cohen
93617997bb [NAN] Change Broadcast for NAN status change to notification only
Remove information about current status of NAN. Receiver will have
to query that information explicitly. New pattern (per API council
review) - helps reduce window for having old information.

(cherry-pick of commit 905077a590d5b63a262d6f1f4f6e555ad9b79359)

Bug: 31470256
Test: unit tests & integration (sl4a) tests.
Change-Id: If3d0873989389e6c69feb0d02e5d0c79cdf9679e
2016-09-26 07:53:57 -07:00
Etan Cohen
5542ccc59c [NAN] Remove failure reason codes from API per API review
Not all codes are actionable. Will add back if/as needed.

(cherry-pick of commit 4b47c3f5b869a5fb072b122c47bf2c9e87f582e9)

Bug: 31470256
Test: unit tests & integration (sl4a) tests.
Change-Id: Ibfc9df4dbd3b569caf4ade1da9d2ef43d99269a8
2016-09-26 06:05:06 -07:00
Etan Cohen
1dd012a41a Merge "[NAN] Reorder parameters of send message method(s) per API review" 2016-09-26 12:58:14 +00:00
Etan Cohen
8a66410296 [NAN] Reorder parameters of send message method(s) per API review
Move messageId before message in the argument list.

(cherry-pick of commit 3da7c88425d826e1a5e662f3d8671900e2ad15e5)

Bug: 31470256
Test: unit tests & integration (sl4a) tests.
Change-Id: I6bfd673a0f92d9908c5b837b713120927b1a0123
2016-09-25 17:19:05 -07:00
Etan Cohen
ede1d0f211 [NAN] Add Handler to publish/subscribe per API review
All callback registrations must have handlers.

(cherry-pick of commit 9b04fd2475f5ebecb81e75a8272cf410ba3f5854)

Bug: 31470256
Test: unit tests & integration (sl4a) tests.
Change-Id: I5ecc04f997e45b76710f526f378e4cf6e0e28fb9
2016-09-23 10:16:26 -07:00
Etan Cohen
bc3d106b97 Merge "[NAN] Separate ATTACH from IDENTITY_CHANGE callbacks." 2016-09-23 03:59:40 +00:00
Christopher Wiley
430904a4ab Merge changes from topic 'remove-set-frequency-band'
* changes:
  Remove ability to set frequency from WifiAssociationTest
  Remove WifiManager#get/setFrequencyBand
2016-09-22 23:34:17 +00:00
Etan Cohen
78ef40a668 [NAN] Separate ATTACH from IDENTITY_CHANGE callbacks.
Provide separate mechanism to attach with a request for identity
change listener.

(cherry-pick of commit 78e33f277eff5183f4525ce2a699acf2ad848177)

Bug: 31470256
Test: unit tests & integration (sl4a) tests.
Change-Id: I26b3bf4e904f3c3822578185fa55e2de5e63b71b
2016-09-21 18:11:33 -07:00
Etan Cohen
b68ed2876c [NAN] Method renames based on API council feedback
- Fix tenses throughout
- connect -> attach
- disconnect/terminate -> destroy
- IsUsable -> IsAvailable

Note: pure rename operation - no functional changes

(cherry-pick of commit 34a0342ab515762f3fc594ffbc4784e56e79ccbf)

Bug: 31470256
Test: unit tests + integration (sl4a) test
Change-Id: I0f275c590c63109b7196622cfc5001082e3eb5a2
2016-09-21 13:46:21 -07:00
Etan Cohen
bd4bf35d22 [NAN] Refactor WifiNanManager to create separate sessions per connect.
Separate session enables separate namespace for functions which depend
on a connection to exist.

(cherry-pick of commit a2eb21d1233e921487e3dada1d10ba3e14611168)

Bug: 31470256
Test: unit tests, integration (sl4a) tests.
Change-Id: I8be0bc609e55319446cef149ba49cd6f7a5f446a
2016-09-21 10:54:42 -07:00
Christopher Wiley
79ec1736be Remove WifiManager#get/setFrequencyBand
These methods are marked @hide and only partially implemented by
the WifiService.  In general, it seems wrong to strictly prefer
one WiFi band over another for all WiFi operations.  To reduce
implementation complexity, cause setFrequencyBand to become a noop
and getFrequencyBand to reflect the underlying reality, which is
that we will always operate on all supported bands.

Bug: 31148223
Test: Compiles
Change-Id: Iccff517915f7d5ed7e96bf56e4f195b2cda80f0a
2016-09-20 15:33:38 -07:00
Etan Cohen
5706a8f535 Merge "[NAN] Rename to make discovery explicit" 2016-09-20 16:41:04 +00:00
Rebecca Silberstein
3c70a2fad2 Merge "WifiScanner: retrieve single scan results" 2016-09-20 15:50:08 +00:00
Etan Cohen
3855370c24 [NAN] Rename to make discovery explicit
Pure rename operation - no other functional changes.

(cherry-pick of commit ddb5f646562f31d7e78778a978e546f85312b009)

Bug: 31470256
Test: unit tests, integrated (sl4a) tests.
Change-Id: I5110d1a673b7ba4e39350d723b5984586fec585a
2016-09-19 21:52:14 +00:00
Etan Cohen
0fbeb0543e [NAN] Update API: replace looper with handler
Per API council guidelines.

(cherry-pick of commit 0ff5bf0092eb25f579e2e93fb2f93bc953b39211)

Bug: 31377060
Test: unit tests, integrated (sl4a) tests
Change-Id: I05142001fb593399fb4675fbec965d7e08e0fac1
2016-09-19 20:47:15 +00:00
Etan Cohen
8c3354f719 [NAN] Make parcelable class final - per API linter
(cherry-pick of feef60406e961afcda8893c7560382382c358910)

Bug: 31380952
Test: build + sl4a integration test (WifiNanManagerTest:test_nan_discovery_session)
Change-Id: I74c079763d6b3a4f0119b16acd7a18014a10ebbd
2016-09-19 14:09:42 +00:00
Rebecca Silberstein
bfc76e0646 WifiScanner: retrieve single scan results
Add a new CMD_GET_SINGLE_SCAN_RESULTS message type and
getSingleScanResults method that allow WifiService to get
scan results directly from WifiScanner.

BUG: 31444878
Test: manually tested on angler
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh on angler
Test: ran GTS CtsNetTestCases on angler
Change-Id: I705233d7dc4ae7e8480c53ff0f9e1b6c8875fecb
2016-09-17 01:38:33 -07:00
Roshan Pius
8da6bdc2d3 WifiScanner: Change hidden/PNO scan params
Since networks are no longer configured in wpa_supplicant, network
IDs/priorities being passed around for hidden/PNO scanning does not
make any sense.
Changing the wifi scanner interface to remove all network ID/priority
references. These will be replaced by SSID of the corresponding
networks for hidden networks.

BUG: 29503772
TEST: Existing unit tests.
TEST: Successfully connected to a hidden network on device
Change-Id: I5d877e0345d574fb513b6eecca14f65f2ee4e7ab
2016-09-14 09:15:41 -07:00
Mitchell Wills
9bc78e8a25 Add a flag to indicate if a ScanData is for a scan for all channels
BUG=30897947

Change-Id: I919d7fa9c3bf196371e506d23e393a9d609a5b4b
(cherry picked from commit 4bfb391c91b3539d2ec20ffd7e01056dafa0984d)
2016-09-12 11:28:55 -07:00
Treehugger Robot
efb7bec56a Merge "WifiManager: Remove unused methods" 2016-09-07 21:43:20 +00:00
Roshan Pius
c4856bd73c Merge "WifiEnterpriseConfig: Refactor set/get field values" 2016-09-07 15:47:40 +00:00
Roshan Pius
6cfe668c80 WifiManager: Remove unused methods
Remove the unused hidden methods from WifiManager.

BUG: 29449615
TEST: Compiles, boots up.
Change-Id: Ie7e6f438b23a368e44d35390267d5505e12bb75e
2016-09-06 13:38:31 -07:00
Roshan Pius
29ce1dab5a WifiConfiguration: Fix isEnterprise
Add a check for the eap method in Enterpriseconfig associated with the
WifiConfiguration.

BUG: 31275240
Change-Id: I21aabb09bdd21e29a80d4b9c6ea0e2b1f0d7e2df
2016-09-06 10:13:40 -07:00
Roshan Pius
c8cd577c86 WifiEnterpriseConfig: Refactor set/get field values
WifiEnterpriseConfig has a few keys which are generated internally
have unquoted values. However, the public setFieldValue() always quotes
the value when set.  So, this causes a problem when restoring
these field values from config store. Since this is an internal
disctinction that only WifiEnterpriseConfig understands, add a list to
check if a particular field value needs to be quoted or not. Also,
remove any direct "mFields.put" invocations with |setFieldValue|.

While there,
Refactor the existing |setFieldValue| & |getFieldValue| methods.

BUG: 31246524
TEST: Unit tests
TEST: Integrated with config store and verified that a previous TLS EAP
connection failure is no longer seen.

Change-Id: Ib85f3bce378720a6a6c2ae1439837a8e866a088d
2016-09-06 10:05:02 -07:00
Roshan Pius
9709b8b372 WifiEnterpriseConfig: Fix copy constructor
Add missing elements from WifiEnterpriseConfig copy
constructor.

BUG: 31245222
TEST: Ran ACTS WifiEnterpriseTest suite.
Change-Id: Ia6f95fca4131ad9a1facca8f9c4c856dff868058
2016-09-02 14:08:50 -07:00
Roshan Pius
d2d667275d NetworkSelectionStatus: Fix copy constructor
Add one more missing element from NetworkSelectionStatus copy constructor.

BUG: 31102798
Change-Id: Iae18f944e7ef722b280b20a51f128f90b2ff45c7
2016-09-01 15:08:44 -07:00
Mitchell Wills
8efb84e3e0 DO NOT MERGE Revert "Add WiFi toggle prompts - framework"
This reverts commit 40f8b9251831c5f009fd476b1a3d216e126d3ef0.

Change-Id: I23e8b6ac97d8853c271429fc13fbfa313717a95a
2016-08-29 20:15:48 -07:00
Roshan Pius
521c66e73c NetworkSelectionStatus: Fix copy constructor
Add couple of missing elements in the NetworkSelectionStatus copy constructor.

BUG: 31102798
Change-Id: Ie5f3719b94acf021d4ae2756afd635388640168c
(cherry picked from commit 699680b6b4fb923e4129d678013e3fbbc0421eaa)
2016-08-29 11:26:57 -07:00
Randy Pan
22de5aaca9 Deprecate QNS network disable reason BAD_LINK
WifiNetworkAgent#unwanted no longer disables the network.

Bug: 28558417
Change-Id: I2e7ed99ae4cb952f124c673376d967eeee2b4ece
(cherry picked from commit 4156d615707a7aa27ecaf55c889824fd025a75b5)
2016-08-29 11:26:57 -07:00