1555 Commits

Author SHA1 Message Date
Glen Kuhne
6862d2f6c6 Unhide WifiConfiguration proxy accessors
Unhiding HttpProxy accessors in WifiConfiguration.
This change occurs in parrallel with changes that restrict updating of
WifiConfigurations with new or updated proxy info to uids
holding permission OVERRIDE_WIFI_CONFIG, or holding DeviceOwner or
ProfileOwner policies.

Bug: 14669153
Test: None
Change-Id: Id69525cfec152ea52697693f9a3bd6f86019c694
Merged-In: Id69525cfec152ea52697693f9a3bd6f86019c694
2017-01-17 15:33:12 -08:00
Randy Pan
438643b151 Keep WIFI_FEATURE defines in sync with HAL
Bug: 33673826
Test: build
Change-Id: Ifec7b28ef7b08a478d889d40d13b45f3a60a7e07
2017-01-13 14:59:30 -08:00
Stephen Chen
58ddbd76bb Expose WifiManager#connect and ActionListener as @SystemApi
This is needed by Wifi Wakeup and Notifications which live within
NetworkRecommendation package.

Bug: 33224871
Test: GTS
Change-Id: If4f1f9957f82b1292af4187c7728cbccab0184e8
Merged-In: If4f1f9957f82b1292af4187c7728cbccab0184e8
2017-01-11 21:51:36 -08:00
Etan Cohen
6a4b323f08 [AWARE] Unhide Wi-Fi Aware API (baseline)
Baseline Wi-Fi Aware API providing discovery and connectivity (data-path).

Bug: 30983968
Test: unit tests + integration (sl4a) tests passing.
Change-Id: Idd7c6a625f168717b083d5f13e291ce916571933
2017-01-11 11:13:26 -08:00
Amin Shaikh
bdc89f99ea Expose fields in WifiConfiguration.
hasNoInternetAccess and isNoInternetAccessExpected are key signals needed
to determine whether Wi-Fi should be woken up for a given saved network.

Test: make
Bug: 33224312
Change-Id: I3f48735ebae72e15fbdb0a3057cf7c71fb0cc307
Merged-In: I3f48735ebae72e15fbdb0a3057cf7c71fb0cc307
2017-01-09 18:47:46 +00:00
Treehugger Robot
b1c9bc5ea5 Merge "wifi: hotspot2: Passpoint configuration APIs update" 2017-01-08 06:51:52 +00:00
Etan Cohen
b84ad8062d [AWARE] Remove reason from discovery session terminate callback
Only valid reason is per request (destroy or timeout/count).

Bug: 32670068
Test: unit tests & integration tests (sl4a) passing
Change-Id: I85d417442e26a16d7f09d6d2d4cbb8ae7a9eba7e
2017-01-06 16:07:41 -08:00
Etan Cohen
3de35a5e55 [AWARE] Simplify Wi-Fi Aware API namespace
Simplify Wi-fi Aware API namespace. Rely on project and remove WifiAware
prefix from most classes.

(pure rename operation: no functional changes)

Bug: 31470256
Test: unit-tests + integration (sl4a) tests.
Change-Id: I38b8137c1730c8f40c482c6770caafcaeafd5c46
2017-01-06 16:06:42 -08:00
Peter Qiu
90eb89ed06 wifi: hotspot2: Passpoint configuration APIs update
- renamed addPasspointConfiguration to addOrUpdatePasspointConfiguration
  to match the implementation of the API
- updated getPasspointConfigurations to return an empty list instead of
  a null when no configuration is installled

Bug: 33587910
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: Id40185edb08910c01454c44b77957e2d5c0df722
2017-01-06 14:06:52 -08:00
Sundeep Ghuman
0a5b3e2fe9 Fix failing WifiNetworkScoreCacheTest.
There was a NPE thrown by an unintialized mock.

Bug: 33818187
Test: Android unit tests
Change-Id: I478885dcebaf41f93488a6a12bb83652ad462be5
2016-12-21 16:44:46 -08:00
Amin Shaikh
3d18c621cb Expose ScanResult#untrusted as a @SystemApi.
- Expose ScanResult#untrusted to inform NetworkRecommendationProviders
  that a ScanResult does not correspond to a saved network.
- Add static construction methods and assertions to RecommendationResult

Test: runtest frameworks-services

Bug: 33490132
Change-Id: If7006040f63843c1c468c9d95c5c017383c5c5dd
Merged-In: If7006040f63843c1c468c9d95c5c017383c5c5dd
2016-12-21 11:46:22 -08:00
Treehugger Robot
31a8f712ab Merge "Create and implement a CacheListener inside WifiNetworkScoreCache." 2016-12-21 00:28:48 +00:00
Sundeep Ghuman
d76e65bead Create and implement a CacheListener inside WifiNetworkScoreCache.
Bug: 33041117
Test: Unit tests
Change-Id: Ic07522062f79223079b84c49210fcfc0217ecd38
2016-12-20 15:07:01 -08:00
Amin Shaikh
d3dfd3b8e9 Make WifiConfiguration#meteredHint a @SystemApi
This allows NetworkRecommendationProviders to set this field on
returned WifiConfigurations.

Test: make
Bug: 33760009
Change-Id: I4d34272a1fb8d88bcc56cf4f00d8beadd06ac603
Merged-In: I4d34272a1fb8d88bcc56cf4f00d8beadd06ac603
2016-12-20 12:46:50 -08:00
Sundeep Ghuman
46169f946b Copy WifiNetworkScoreCache into frameworks/base. Add tests.
Begin process of migrating WifiNetworkScoreCache.java from System Server
(//frameworks/opt/net/wifi/service/java/com/android/server/wifi/) to a
SystemApi. This CL is a straight copy and paste of
WifiNetworkScoreCache.java. Only new code is located in
WifiNetworkScoreCacheTest.java

Bug: b/33050254
Test: Unit tests added to cover most common use cases.
Change-Id: I7510420d293339ce7811fcf71a6efceb8d809c3a
2016-12-12 14:57:10 -08:00
Michael Plass
1ff5bd2646 Remove user-triggered disconnect counters
Removes these fields of WifiConfiguration:
  numUserTriggeredWifiDisableLowRSSI
  numUserTriggeredWifiDisableBadRSSI
  numUserTriggeredWifiDisableNotHighRSSI
  numTicksAtBadRSSI
  numTicksAtNotHighRSSI
  numUserTriggeredJoinAttempts

Add parcel test for WifiConfiguration.

Bug: 33013630
Test: unit tests pass
Change-Id: I39566c4e7845b01899739c36d6ec633f272fec6f
2016-12-07 08:50:10 -08:00
Etan Cohen
65617f21bf Merge "[AWARE] Fix javadocs for match filter update"
am: 7241d28826

Change-Id: I67b2798b0eb1bc7e4ccd727aad9e761da49a8823
2016-12-05 15:57:37 +00:00
Etan Cohen
7241d28826 Merge "[AWARE] Fix javadocs for match filter update" 2016-12-05 15:51:18 +00:00
Paul Stewart
1fd6f643ac Add constants for 802.11r
am: e72f7dc385

Change-Id: I06d93c3ce96cddd6447b340304ce9fec2d4e41f2
2016-12-03 04:16:58 +00:00
Roshan Pius
f301986727 Merge changes from topic 'fast-bss-transition'
* changes:
  Add capability flag for 802.11r fast BSS transition
  Add constants for 802.11r
2016-12-02 23:57:40 +00:00
Etan Cohen
0ae58fa665 [AWARE] Fix javadocs for match filter update
Javadocs update. Specifically, cannot contain generics (since
under-the-hood generics are just the undecorated class).

Bug: 32840891
Test: generated docs (no functional change)
Change-Id: I4bc2967a60ad27d137fd5a4dd3db18625343c910
2016-12-01 16:59:41 -08:00
Etan Cohen
7f12aa5470 Merge "AWARE: Abstract structure of match filters"
am: f358a69cba

Change-Id: Ic7e87e47e9a9beebb11aa7465e4d2be9dd3e767a
2016-12-01 21:35:05 +00:00
Etan Cohen
f358a69cba Merge "AWARE: Abstract structure of match filters" 2016-12-01 15:42:35 +00:00
Stephen Chen
dfd9942a31 Merge "Add meteredOverride field to WifiConfiguration."
am: f9479fe639

Change-Id: I0d2540cf0a360f07c1dd103191fd348602099ff5
2016-12-01 03:23:32 +00:00
Treehugger Robot
f9479fe639 Merge "Add meteredOverride field to WifiConfiguration." 2016-12-01 03:08:44 +00:00
Etan Cohen
1857b982c3 AWARE: Abstract structure of match filters
Replace byte[] representation with a List<byte[]> representation
which abstracts the LV (TLV without a type field) structure of
the match filters.

Tlv utilities: remove tag indicating that will be made public API.
That is no longer expected (will be an internal utility) since the
match filter structure is now parsed when exposed to API.

Lv utilities: removed. Was a simple wrapper around Tlv utilities -
no longer needed since will not be exposed as API.

(cherry-pick of commit c9870d0d431471bf1362e46fc4f2f1bc6722896a)

Bug: 32840891
Test: unit-tests and integration (sl4a) tests passing
Change-Id: I6d792c4d7584ce002f6c11692e83e7654ef3e764
2016-11-30 17:01:52 -08:00
Stephen Chen
c76fda7269 Add meteredOverride field to WifiConfiguration.
This stores a user's metered selection. This will be set by
Settings -> Data Usage -> Network restrictions and used in conjunction
with WifiConfiguration.meteredHint to properly track a Wifi network's
metered state.

Bug: 33106464
Bug: 26545374
Test: runtest --path
frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java
runtest --path
frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java

Change-Id: I1a378ef2946c1b5b6091bba379f2ab48a15d29d8
2016-11-30 11:15:13 -08:00
Etan Cohen
ad299d38ff Merge "[AWARE] Data-path creation roles hard-coded for discovery sessions"
am: 47502919ad

Change-Id: If8f7d8e0e039d2d9961de84e5aa8693448b77a26
2016-11-30 17:08:32 +00:00
Etan Cohen
1ddf6a6d3a [AWARE] Data-path creation roles hard-coded for discovery sessions
Data-path roles (initiator & responder) are hard-coded for discovery
session participants by the spec: subscriber <-> initiator and
publisher <-> responder. Remove API parameter which allowed caller
to specify role.

(cherry-pick of commit 9c7483fec41db681a2d6de93a9061fb8764ecba5)

Bug: 32883026
Test: unit-tests and integration (sl4a) tests passing.
Change-Id: I889eacda9416d9ecd04caa0c72413f984611d40c
2016-11-30 07:10:42 -08:00
Etan Cohen
f74733a367 Merge "[AWARE] Move manager tests from service to manager directory"
am: 018f6ec16f

Change-Id: I795e75882ac702c3637afa43ba2f73d612d74661
2016-11-23 23:50:27 +00:00
Etan Cohen
b77b69545e [AWARE] Move manager tests from service to manager directory
Move operation - no functional tests. Only editorial changes:
- Remove (no longer) necessary import statements
- Removed reference to a constant sitting on the service side.
  Replaced with locally defined constant.

(cherry pick of commit 7ba5ad3c53dac62e56cd12dbe2054ce8374b6b92)

Bug: 32954930
Test: unit-tests pass
Change-Id: Ibe463fa73c27fc67996460eb91ea0222437927a6
2016-11-23 10:28:09 -08:00
Peter Qiu
3aa7fdd19a Merge "wifi: hotspot2: add copy constructor for PasspointConfiguration"
am: 248c8311e8

Change-Id: I9a652a0f02f2895bde3ac9e4c332c80fc38b0df6
2016-11-22 01:37:00 +00:00
Treehugger Robot
248c8311e8 Merge "wifi: hotspot2: add copy constructor for PasspointConfiguration" 2016-11-22 00:03:43 +00:00
Etan Cohen
ce7f932be7 Merge "[AWARE] Update API per review"
am: 9e4f111e0f

Change-Id: I69001477d02c612540ff74385400551293f7c600
2016-11-21 21:50:34 +00:00
Etan Cohen
6831f93725 [AWARE] Update API per review
- Move Handler to last position
- Peer ID changed from 'Object' -> opaque class
- Rename onMessageSent -> onMessageSendSucceeded

(cherry pick of commit 1fef08507aeb49bb2e4e7be4804a378ba2cf7770)

Bug: 31470256
Test: unit tests & integration (sl4a) tests pass
Change-Id: I5530d310e982ea16a63a5af1f704625fd24e436c
2016-11-21 18:23:39 +00:00
Peter Qiu
8bbb583ff7 Merge "wifi: hotspot2: add support for validating passpoint configuration"
am: ebb722d04a

Change-Id: Ic20a77103961bd9ff61b6af90130c25ad19c451a
2016-11-18 08:54:11 +00:00
Treehugger Robot
ebb722d04a Merge "wifi: hotspot2: add support for validating passpoint configuration" 2016-11-18 08:45:15 +00:00
Peter Qiu
40dfd2d0bc Merge "wifi: add constant definition for EAP types"
am: a908e65b66

Change-Id: I283fba81ca5246222bda07f7f109d2f359e5e395
2016-11-17 02:21:41 +00:00
Treehugger Robot
a908e65b66 Merge "wifi: add constant definition for EAP types" 2016-11-17 02:10:23 +00:00
Ningyuan Wang
6e67bb87cf Merge "Add security capabilities enums to ScanResult"
am: a3c0324824

Change-Id: Iad2aba87155d52343b372b2d7af3e037842c1ca4
2016-11-16 23:54:24 +00:00
Peter Qiu
a32e50986e wifi: hotspot2: add copy constructor for PasspointConfiguration
Bug: 32714562
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: Ida7e4da3d6a9679743397643e0250434dbdb43af
2016-11-16 15:35:48 -08:00
Peter Qiu
a25d717de8 wifi: hotspot2: add support for validating passpoint configuration
Bug: 32572199
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I8e649430af54d863dfa5492abc3dfd79c772c765
2016-11-16 15:08:03 -08:00
Peter Qiu
4a79ac2c82 wifi: add constant definition for EAP types
Bug: 32810711
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: Ia62f2674e8cdf975d1380f733a8687bdb15ed197
2016-11-16 13:49:22 -08:00
Ningyuan Wang
d150b2b001 Add security capabilities enums to ScanResult
This adds enums of security parameters, including
protocol, key management, and cipher suites.

Bug: 32512793
Test: compile

Change-Id: Ibf784d79695ca5e261c6bfe623406bc693c5ac17
2016-11-16 11:13:42 -08:00
Peter Qiu
1b39c61ce7 wifi: remove unused hidden Hotspot 2.0 Release 1 API
am: 1c3054ea87

Change-Id: I5a13979aedb39ad347099fd25e7515b099b9ac19
2016-11-16 00:00:06 +00:00
Peter Qiu
a9a9a9bb8d wifi: remove hidden unused Hotspot 2.0 Release 2 APIs
am: a38558b539

Change-Id: I48766f0c259693496dc9b63ad0dd287b93185787
2016-11-15 23:59:20 +00:00
Svetoslav Ganov
6c3032f16b 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

Original-Change-Id: I020601e208c0736005bcabc7b7b77b96eee45b03
Change-Id: I3fdc2b02abecaf3166614b0cb9fac3553cb7ab88
(cherry picked from commit d3663c04a721e0848dd3e9179c84ba585d91839d)
2016-11-14 18:34:40 -08:00
Peter Qiu
1c3054ea87 wifi: remove unused hidden Hotspot 2.0 Release 1 API
WifiManager#buildWifiConfig was used by the Hotspot 2.0 Release 1
app (WifiInstaller) for parsing Release 1 installation data into
a WifiConfiguration object.  WifiInstaller will be updated to use
the new framework API (android.net.wifi.hotspot2.ConfigBuilder)
instead. So this API is no longer needed.

Bug: 32509661
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: Iacee739a9ed12ea00b1b7457e22e790ef4a177da
2016-11-14 13:23:01 -08:00
Peter Qiu
a38558b539 wifi: remove hidden unused Hotspot 2.0 Release 2 APIs
These APIs are used for installing/modifying the PerProviderSubscription
Management Object tree in XML string representation and are used only by
the unreleased Hotspot 2.0 Release 2 app (OSU app).  The OSU app will be
updated to use the new APIs which uses Parcelable objects to represent
provider configuration.

Bug: 32509661
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: Iff6b6e4b95b76d48201eeeb47f441b7c94f359bb
2016-11-14 13:23:01 -08:00
Sohani Rao
584b5cee49 Merge "Add WiFi toggle prompts - framework" 2016-11-14 20:59:36 +00:00