History log of /frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
403df479e25031276c738dbea334f09bb7e4bf37 18-May-2017 Ningyuan Wang <nywang@google.com> Remove network from supplicant when it is disabled

This CL expands OnSavedNetworkUpdateListener interface by
replacing onSavedNetworkUpdate() event with a list of
detailed events.
This CL also removes a network from supplicant when it's
disabled.

Bug: 37406637
Test: compile, unit tests, manual tests, integration test

Change-Id: Idfa29cd15b8ad75de3bb7448abd7f3c93f9778f0
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
48807b36bcc3d518ed12389e4889e5583fc8d672 24-May-2017 Ningyuan Wang <nywang@google.com> Merge "Abort scan before connection" into oc-dev
c4ad341e844e88a34be7ed4c3c9509fb72608b37 02-May-2017 Ningyuan Wang <nywang@google.com> Abort scan before connection

In the past, supplicant would abort any ongoing scan before
issuing a connection or roaming request.
For Android O we issue scans using wificond, so supplicant doesn't
know about ongoing scan issued by wificond.
As a result, we may have regression that connection request may be
delayed because device is waiting for ongoing scan to finish.
This patch adds back the logic at framework level, fixing the potential
regression.

Bug: 37743832
Test: compile, unit tests, integration test, manual test

Change-Id: I556c7561d39a9d0b91399d5b3348256bcf0943c8
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
8131b04dc799cb0c75240c7b9eb0517ba1f00be8 13-May-2017 Roshan Pius <rpius@google.com> WifiNative: Add VINTF check for vendor HAL

Currently, we're ignoring HAL start failures to support devices like
gce, hikey which did not have any vendor HAL support previously.

To solve that problem:
1. Remove the Vendor HAL daemon (HIDL shim) from such device's
device.mk.
Handled by other CL's in the topic.
2. Add the Wifi HAL's to the VINTF (manifest.xml) on all devices which
has the Vendor HAL daemon running. (Unfortunately, there is no automatic
translation from the module missing in device.mk to manifest.xml
currently).
Handled by other CL's in the topic.
3. Use the HalDeviceManager to query the VINTF to figure out if the
Vendor HAL is present on the device or not.
4a. If the Vendor HAL is not supported, ignore start/stop calls.
4b. If the Vendor HAL is present, report failure if start/stop fails.

Also, fixed a few invalid mock expectations set.

Bug: 36886769
Test: Device boots up and connects to wifi on 2017 devices.
Test: Unit tests.
Change-Id: Ia3d90c8fafe2f8c156c843f5f47b94deaabe5a56
(cherry picked from commit 30f34829e0e7e49dc09c897c72dd0ded7d9805eb)
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
a1da73ea4926ce8a5689594ff3685b0fe033d99f 02-May-2017 Ningyuan Wang <nywang@google.com> Update anonymous identity upon EAP network connection

This allows wifi framework to update anonymous identity
provided by authenticator to network configuration.
With this, supplicant can use pseudonym instead of
permanent identity for EAP-SIM/AKA/AKA' networks.

Bug: 37530183
Test: compile, unit tests, manual test

Change-Id: Iaf9d709cbcaabb5b183ee14a23982bd99188b91e
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
fab2bc6d0df6f2523d0b8a5ecfebaf1ee936bcee 30-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Cherry-picl: Remove bssid hotlist from framework" into oc-dev
bb9016d1e5f7c2b27502e7d7db13b55460bca88b 24-Mar-2017 Michael Plass <mplass@google.com> Cherry-picl: Remove bssid hotlist from framework

Bug: 30147676
Test: Relevant unit tests pass, wifi functions
Change-Id: Iac6a4c3d4a9e842e73b6122218fe0842126e43e7
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
e185ee5267de1257f21caa30a5f44d64600160a2 29-Mar-2017 Michael Plass <mplass@google.com> Remove WifiNative.setLinkLayerStats

Link layer stats are always enabled now, so remove this unneeded call.

Similarly for setDfsFlag() - DFS is always on.

Bug: 36087365
Test: Unit tests pass
Change-Id: I05a971b3fa9ac17f41990ace125733570de55f4c
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
f2e03411f137f55940a8f3592e96a272585bd7dd 22-Mar-2017 Roshan Pius <rpius@google.com> WifiNative: Fixing some nits

Remove unnecesary static types defined in SupplicantStaIfaceHal and be
consistent with all the other API's in WifiNative. The layer below (i.e
WifiVendorHal, SupplicantStaIfaceHal, etc) should convert from
WifiNative type to the corrsponding HIDL type.

Also, WifiVendorHal can direcly accept a looper in it's constructor
instead of passing it a Handler Thread.

Bug: 36524196
Test: Manual test & unit tests
Change-Id: I90c65f97b0025e6d1416170c18038d4e2064d76f
Merged-In: I90c65f97b0025e6d1416170c18038d4e2064d76f
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
af0e32cfa2f7402c60b9df88a0d9bd19f421026c 22-Mar-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Handle vendor HAL death

The handling is similar to wificond binder death handling. We go back to
initial state on the vendor HAL death.

Also fixed couple of nits:
1. Fixed the vendor Hal test failures due to mockito change.
2. Renamed the log event handler variable (fixing a previous sed).

Bug: 34859006
Test: Unit tests
Test: Crashed the vendor HAL manually and verified WSM returned to
Initial State

Change-Id: Ia2c8249ca5b6857af09f8e996900881ac8a844ec
Merged-In: Ia2c8249ca5b6857af09f8e996900881ac8a844ec
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
2a3d1bbe1226dca81a6e2387e781acfd77e0072b 27-Mar-2017 Ningyuan Wang <nywang@google.com> Merge "Remove shouldDisconnect and redundant transition" am: f06fd7eebf am: b198610fd3
am: a687043ca4

Change-Id: I64121a06546b704ec5b04a14314c519d8857ef46
a5936a61582404692c6046e3b496d3b1d22a94cb 23-Mar-2017 Ningyuan Wang <nywang@google.com> Remove shouldDisconnect and redundant transition

This removes the redundant state transition upon
START_CONNECT request.
This also removes the shouldDisconnect parameter
because supplicant will implicitly disconnect current
connected network anyway upon a connect request.

Bug: 36535549
Test: compile, unit tests, integration test

Change-Id: Ib636eb05e9b37e54deeeb1f107dd47da7fe75ad0
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
ba3f5bc64ef27f2ec0d3eae3f53c633ea9e66268 24-Mar-2017 Amin Shaikh <ashaikh@google.com> Update WPS NFC token retrieval.

- Refactor getWpsNfcConfigurationToken -> getCurrentNetworkWpsNfcConfigurationToken

Bug: 35725168
Test: ./runtests.sh
Change-Id: I41782a775d6b478f92ef0d3ad48e83816eca94b6
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
163f9765f9e4c3f868b1e0d630b6adeaa115fb4a 17-Mar-2017 Roshan Pius <rpius@google.com> Split up WifiNative/WifiMonitor into STA-AP/P2P

With HIDL, there isn't any dependencies between the STA & P2P
WifiNative's. So, split up WifiNative/WifiMonitor into 2, one for P2P
& non-P2P cases. The WifiP2pNative, WifiP2pMonitor &
SupplicantP2pIfaceHal classes are now moved to p2p package.

Also, added couple of missing methods in SupplicantP2pIfaceHal from
SupplicantStaIfaceHal.

Bug: 36371256
Test: Compiles, device boots up and connect to wifi networks.
Change-Id: I85ea84355ab2a1803053f663f207b42b793c552c
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
2a1078dc3729bab248bbd28c8336749481e045cf 16-Mar-2017 Roshan Pius <rpius@google.com> SupplicantP2pIfaceHal: Support for P2P client list and save config

Also,
Moved mac address to long conversion methods to NativeUtil to help with
unit tests.

Bug: 36042785
Test: Added unit tests.
Change-Id: I6c1a78abf8c0f8159195c2542dfe217a7b954df0
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
3e240b2bfb6fefe8b91ad68e8a12b652b4136c69 16-Mar-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Stop wpa_supplicant auto connect

Bug: 36282386
Test: Compiles & manual tests.
Change-Id: I90a7b56de1b6f3315bd71c94df45abe8aa9dc155
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
6ba8a37de432d957e10dd9cc74798758870d02e6 14-Mar-2017 Michael Plass <mplass@google.com> BgScan rename for wifi vendor background scan

Also clean up some stale todos

Test: Unit tests pass
Bug: 35806209
Bug: 34900537 stale todo fixed by b/35101185
Bug: 34901818 removed todo
Bug: 34901744 retarget todo to b/35138520

Change-Id: I90a77a1aad7ff55c26ee70b383bcdbd16cac32cf
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
b8b3fb8228a1f90106bad8c59ce006b81ef7921c 09-Mar-2017 Roshan Pius <rpius@google.com> Remove all legacy HAL usage from framework

WifiNative now just becomes a module to route calls into the appropriate
native module: WifiVendorHal, WificondControl, SupplicantStaIfaceHal,
SupplicantP2pIfaceHal.

Changes in the CL:
1. Cleanup WifiNative to remove the legacy HAL usage.
2. Remove the |HIDL*| flags in WifiNative.
3. Remove static instance of WifiNative/WifiMonitor.
4. Remove WifiMonitor code parsing the string events from
wpa_supplicant.
5. Remove all unused jni code used for legacy HAL interactions.
6. Remove dependency of libwifi-hal & libwifi-system from framework.

Notes:
a) We can now potentially split up WifiNative into separate chunks:
WifiStaNative, WifiP2pNative, WifiRttNative, etc instead of having a
monolithic WifiNative instance.
b) We may have to add back the local log in WifiNative (b/36059665).

Bug: 35702893
Bug: 34457880
Bug: 34884202
Bug: 35421721
Test: Compiles, existing unit tests pass.
Test: Device boots up and connects to wifi networks.
Test: Verified with wifi regression (b/36068282)

Change-Id: I3e13522c912242af8023471e029edb1ce47fd3e9
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
96c464e93515cda4326ca93ecf8a90c9ab551b7f 08-Mar-2017 Roshan Pius <rpius@google.com> SupplicantP2pIfaceHal: Enable P2p HIDL iface

Also,
1. Port over Wps set methods from sta iface for P2p.
2. Add method for removing P2p network.
3. Add nfc methods.
4. Move set/get p2p client list method to WifiNative.
5. Other misc cleanups.

Bug: 33383725
Test: Device boots up with P2P
Change-Id: I31999222a0207bb0101961bab079f4c628137a1a
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
58374056df4e1a862e4b4be92912d3c762bd90fe 08-Mar-2017 Roshan Pius <rpius@google.com> Wifinative: Fixed a missing plumbing to vendor HAL

Bug: 36037311
Test: Device boots up and connects to wifi network.
Change-Id: Iab3b6ecfa498b832fb9467754a7c930c3eb70b32
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
eed5100c0a64dc8d12651226bb9fd2fad4b2891b 04-Mar-2017 Roshan Pius <rpius@google.com> SupplicantP2pNetworHal: Add method to load Groups

Bug: 35765841
Test: Add unit tests
Change-Id: If6a993f9cf8318efe01e7f4eeb40b0bd2347d27d
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
04c453c2e07efc30b99528926f205740226f1c7b 17-Feb-2017 Ningyuan Wang <nywang@google.com> Request Pno scan via wificond and re-enable pno scan

Bug: 32977707
Test: compile, unit tests, manual test, will do integration test

Change-Id: I3b7d5020aa695120a047a2d228fc6be5760e2343
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
3a0679d411c5eb889d38ed32181446c82d5bd825 02-Mar-2017 Roshan Pius <rpius@google.com> WifiNative: Use Vendor HAL for mode change

Restructure the WifiNative setup/teardown operations so that vendor HAL
can start & configure the chip in the correct mode and then inform
wificond about it.

Bug: 35765841
Test: Will send for integration tests.
Change-Id: I14ef0011117f83bed99c21fb459f00263a90a793
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
3b7def108eeb23b7350038f2defc966ee23e9952 27-Feb-2017 Roshan Pius <rpius@google.com> WifiNative: Turn on supplicant/vendor HIDL Interface

While there,
Fixed unit test failures in WifiNative.

Bug: 35765841
Bug: 35868540
Test: Verified via the wifi integration test suite.
Test: Verified the build for any power regressions.
Change-Id: I7daf7c35af5a5a284e2468b3451b7f87102997bd
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
fdffec5da789c47a99dccdde29cbc6740e015f0b 03-Mar-2017 Roshan Pius <rpius@google.com> WifiNative: Separate connect to supplicant

Since we have separate interfaces for P2P & STA operations to supplicant
in the HIDL world, separate out these initialization sequence.

PS: This new flag (isStaIface) is currently unused in the legacy socket
interface.

Bug: 35915447
Test: Wifi comes up and able to connect to networks.
Change-Id: Idf1df650670e9b329c11443223c9e177fd6b3b32
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
a89f52e241cc52873b3856d4e035717cd562c2db 28-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] Logging for module

Test: Runs with WifiNative.HIDL_VENDOR_ENABLE = true
Bug: 35795176
Change-Id: I2d4cd24a3d28439284b6db91731ecc59652f2a09
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
5219690b05a85e8d533a8707ffc556fe233cd4c2 02-Mar-2017 Roshan Pius <rpius@google.com> Revert "Turn on supplicant's HIDL interface"

This reverts commit bab25491a3637b2d9c0f0d683b225ec03f047222.

Bug: 35868540
Test: Power testing.
Change-Id: Ie8bc866d531424bb149691eeff0590f42fb9c7c5
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
d3014b79dd46393cd22fc566937878a738c392a5 01-Mar-2017 Ningyuan Wang <nywang@google.com> Stop supplicant using wificond

Bug: 35868809
Test: compile, unit tests, integration test

Change-Id: Ied15d8d39c8c3a09f1917bf13afe3d2b1ed1b8dc
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
e4ed72d85e692f6bcb60c7d51206c8eb837c7b79 01-Mar-2017 Tomasz Wiszkowski <ender@google.com> Additional checks for NPE and corner cases.

Applying changes requested via comments in go/aog/342636

Bug: 35854497
Change-Id: Ied0532f92b6d1f8df2e02e6039abdab841c10fa9
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
782eac0bacec797262eb4d721ad58cfcf2fbf885 22-Feb-2017 Tomasz Wiszkowski <ender@google.com> Move listNetworks parsing from WifiP2pServiceImpl to WifiNative.

Idea is to make switch from legacy to new version easier by placing all the legacy code
in a common place and substituting it incrementally.

Change-Id: I99f3bbfe6c439f6beb138eeebaf4e7605dcc3646
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
520fbe7db055661af039303c1081236c73b04abd 25-Feb-2017 Roshan Pius <rpius@google.com> WifiNative: Refactor for WifiVendorHal integration

Bug: 35765841
Test: Device boots up and connects to wifi network.
Change-Id: I92a1dd25e19d0abeb1c6df152764ddc57a3af66a
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
bab25491a3637b2d9c0f0d683b225ec03f047222 18-Feb-2017 Roshan Pius <rpius@google.com> Turn on supplicant's HIDL interface

Bug: 33383725
Test: Unit tests
Test: Will send for regression tests.

Change-Id: I04218bd92483a928c8eb8bd94f2474dcbffa4c7e
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
61233efc46707ace6cb3a45dd84766f06df946af 08-Feb-2017 Tomasz Wiszkowski <ender@google.com> HIDLization of WifiDirect, stage 2: method calls.

BUG: 33383725
Change-Id: I82249adf59546d0e73f0eafd85b3e7e0ce51936c
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
e6d7f23569585f8f0fb02adbef992d3f1430db44 15-Feb-2017 Ningyuan Wang <nywang@google.com> Request single shot scan via wificond

Bug: 34715459
Bug: 33398008
Test: compile, unit tests, integration tests

Change-Id: Ie44ae50d9d498bd164bd407259f013dd367e4ed2
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
ef1606e936204c56ffdae305f2f423ee3503fecd 23-Feb-2017 Mehdi Alizadeh <mett@google.com> WifiNative: Override hashCode for HiddenNetwork and PnoNetwork classes

The HiddenNetwork and PnoNetwork classes in WifiNative already had the
equals method, now implementation for a hashCode method added to match.

Added a unit test in WifiNativeTest that creates instances of the two
classes with same values and checks if they have similar hashcodes.

Bug: 33626203
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I62bf655bf9619f4fe6186673b7da8eb294633474
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
38a6c1ba5d461b8c7b11685c5dd2e98d9e106b55 22-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaNetworkHal: Fix network extra parsing/writing

The HIDL interface doesn't need the string to have the quotes. So,
refactor the helper functions so that it parses/creates an unquoted
string. The existing socket interface will continue to use the quoted
strings.

Also,
Don't attempt to read the wpa_supplicant.conf file in legacy store migration
if HIDL is enabled.

Bug: 35663125
Test: Unit tests
Test: Migration from N to O using HIDL interface.
Change-Id: I2ee9f61f6e9f393608982952986c5dd980c998f9
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
5cf97c9b13cc06554c8901e63d55ba051b7e7881 18-Feb-2017 Roshan Pius <rpius@google.com> WifiNative: Supplicant HIDL integration

Hooked up all the hidl methods to Wifinative under a static flag.

Bug: 33383725
Test: Integeration tests
Change-Id: I9c953a1c6f746d50f1ec2dc5263908d87b539539
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
24250365afbd9a20b2e03364eddf2025c8f1138a 17-Feb-2017 Roshan Pius <rpius@google.com> WifiNative: Start supplicant HIDL integration

Remove the |initializeSupplicantHal| call and use the existing
|connectToSupplicant| call to initialize the SupplicantStaIfaceHal &
SupplicantStaP2pIfaceHal. This will ensure that we keep the existing
startup sequence.
Also, don't start the wifimonitor thread if HIDL is enabled.

Bug: 33383725
Test: Existing unit tests
Change-Id: Id082eedb27d7d7dae1bd26f40da9b8e23ee2ce10
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
f3aae0be78cd02f5fedd7d99b73536d2c799b030 18-Feb-2017 Roshan Pius <rpius@google.com> Remove unused/unwanted WifiNative methods

Remove a bunch of unused/not needed WifiNative methods and change method
signatures in preparation for integration with HIDL interface.
1. Remove the ping command since this is no longer exposed in the public
API.
2. enable/disableNetwork, blacklist, hs20 methods are no longer used.
3. saveConfig method no longer needed since wpa_supplicant is
not the config store.
4. setScanInterval is no longer needed since scanning is controlled by
wificond.
5. enableAutoConnect is no longer needed since auto connect is
controlled by QNS.

Bug: 33383725
Test: Compiles
Change-Id: Iaf8631b583cd380fbcbc90c88e2734c44c65049a
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
53f278b6fed422a18d763b07216a21e96d9445f9 15-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] RingBufferLogging

Test: unit tests added
Bug: 34902105

Change-Id: I6411ad720fe537bd2b97b22b180762c4c9e48145
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
2e5959fc746d48ab49f731cdbbb2b9fea6704e2a 17-Feb-2017 Ningyuan Wang <nywang@google.com> Plumb through enableVerboseLogging() to WificondControl

Bug: 35439153
Change-Id: Ieb5afe5409c9cda337f0ab3e4e0899a99c4c559d
Test: compile, unit tests, manual tests
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
fc83b303a3382329c28d631b1e0fb2bb35969f85 17-Feb-2017 Roshan Pius <rpius@google.com> PasspointEventHandler: Stop creating wpa_supplicant string commands

Add new WifiNative API's for Anqp-query/Icon requests. This API will
internally create the string commands needed for now. Will be hooked up
to the HIDL interface method soon.

Bug: 35393853
Test: Unit tests
Change-Id: Ie93a318abd7bf5d1d94ea01d072fd6e0551d0354
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
a26a8b33616c94859ba33f33403794cf636baa54 16-Feb-2017 Roshan Pius <rpius@google.com> WifiSupplicantControl: Remove this class (Part 1)

Make WifiSupplicantControl instance part of WifiNative and
expose all the public methods of WifiSupplicantControl in WifiNative.
This is a prelude to removing this class altogether. All of this methods
have been exposed in SupplicantStaIface and WifiNative will use that
once we switch over to HIDL.

Note: Some of the existing methods in WifiSupplicantControl were just
wrappers over WifiNative methods and hence removed them altogether.

Bug: 35421721
Test: Existing unit tests.
Test: Will send for regression tests.
Change-Id: I1c90c8d13bec583ff4b2989c8d62b910c5e73e26
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
374f78d3841f7bf74543dc4d21db66d1d3472c3a 09-Feb-2017 Randy Pan <zpan@google.com> Add an API to reset firmware roaming configuration

While there, fix an issue with parsing blacklist BSSID. The string
passed in is already unquoted.

Also delete the helper function that parses MAC address string
to a byte array. Use the one provided by NativeUtil.

Bug: 33696699
Test: manual test by exercising the relevant framework logic
Change-Id: I94a0362bf8884f53d22bc53067f3347d6f97f946
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
79d22abe8ab440408ac1d568ddced7efd1a19278 08-Feb-2017 Tomasz Wiszkowski <ender@google.com> HIDL P2P Interface bring-up - stage 1 - basic class.

BUG: 33383725
Change-Id: I4e642e68bc4a48e937bd43fb45afeff78f35da57
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
66e9f4ab597136cbf4accadb8e009fc68ff071a7 03-Feb-2017 Glen Kuhne <kuh@google.com> ISupplicantStaNetwork save & load WifiConfigs

Methods to set/get network variables from wpa_supplicant to
WifiConfiguration & vice versa.

TODO: Enterprise config params will be added in a further CL.

Test: Unit tests
Bug: 33383725
Change-Id: Ib002266a93b4738d0634cd1bbc925b61a86c1df7
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
8631700c2c81784d8fb02d38a304cf6609f67c14 31-Jan-2017 Ningyuan Wang <nywang@google.com> Move getScanResult to WificondControl

This allow WifiNative to fetch the latest scan results from wificond
instead of supplicnat.

This should not impact framework behavior because both wificond and
supplicnat fetch scan results from kernel via nl80211.

Bug: 34715459
Test: compile, unit tests, manual tests, integration test

Change-Id: I21ab3d15399318240fba8e76dfd5afc638954bed
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
d45b46b01f8562219468291bdc19363f0540ced0 27-Jan-2017 Ningyuan Wang <nywang@google.com> Move signal poll and getPktCounters to WificondControl

Bug: 34715459
Test: compile, unit tests, manual tests, cts test

Change-Id: Idbed255d86b83c6bfb725db7af89117546ca3358
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
70603901b67c48202ecbb1818e59d487bbcceeda 26-Jan-2017 Ningyuan Wang <nywang@google.com> Create new class WificondControl

This creates a new class WificondControl.
WificondControl provides methods for WifiNative to send control commands to
wificond.
This also moves driver reload, disable/enable supplicant, and interface
cleanup from WifiStateMachine to WifiNative and WificondControl.
This also adds corresponding unit tests for changes above.

Bug: 34715459
Bug: 34776808
Test: compile, unit tests, manual tests, integration test.

Change-Id: I5a5436ae54e7dcd1f2f2f7c780a6f0bdce79ffc2
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
b4419d876beda78c29836726e43d80203b4a656c 04-Feb-2017 Roshan Pius <rpius@google.com> WifiSupplicantHal: Rename to StaSupplicantIfaceHal

Bug: 33383725
Test: Compiles
Change-Id: Icfe37705c3f053aa46f410a6c11e71fb93733a05
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
d84fd37259c6e956d0f00c261f573dfa319acb91 28-Jan-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Prepare for HIDL integration

Changes in the CL:
1. As a precursor to plumbing through the WifiVendorHal method to
WifiNative, add a |isStaMode| flag to startHal in WifiNative.
WifiVendorHal.startVendorHal() uses this boolean to configure the chip
in the correct mode.
2. Add a new CMD_INITIALIZE message in WifiStateMachine. This will be
used to initialize the HAlDeviceManager module (via
WifiVendorHal.initialize()). This needs to be done
before the WifiVendorHal.startVendorHal() is invoked, so triggering this
when we get notification that the system services are ready.
3. Also added error recovery in WifiVendorHal.start(), any failures will
trigger a HAL stop.
4. Add a flag to enable the HIDL calls.

Bug: 33384303
Test: Compiles
Test: Added unit tests
Test: Devices is able to boot up and configure the chip in STA mode
(via HIDL using some local changes not yet ready to commit).
Test: Devices is able to boot up and connect to an access point (not
via HIDL, making sure nothing is broken if we check this CL without the
rest of HIDL changes).

Change-Id: I8350a2e120edec4941f0e070478fa7e313a01bb3
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
da4958bd7409aaf26ead2b221754d4a5035f7bdf 27-Jan-2017 Randy Pan <zpan@google.com> Add the new roaming features to WifiNative and WifiVendorHal.

Bug: 34740076
Test: Compiles
Change-Id: I4436700f419d8ab015c99fd56c1b9947c37c226a
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
8c6d09c03532b3936fab2fed6f8b84c895333565 27-Jan-2017 Roshan Pius <rpius@google.com> WifiVendorHal: Interactions with HalDeviceManager

Changes in the CL:
1. Add WifiVendorHal to injector and pass it on WifiNative. Both
WifiVendorHal and WifiSupplicantHal needs an instance of
HalDeviceManager, so remove the lazy initialization of HalDeviceManager.
2. Use the HalDeviceManager in WifiVendorHal to create the required
objects.
3. WifiSupplicantHal & WifiVendorHal should monitor the callbacks
provided by HAlDeviceManager to teardown all it's internally cached
handles if the HAL is down for some reason.

Bug: 33384303
Test: Compiles & unit tests pass.

Change-Id: I7d15aaea6d4e3f9cf66c77977b1c6c4fa8adb377
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
240671db659a4f7ca7e217d41c7aee9d85e22c33 08-Dec-2016 Glen Kuhne <kuh@google.com> ISupplicant service & iface initialization

Created new class WifiSupplicantHal for calling the new HIDL supplicant
hal from wifi framework.
Is initialized from WifiStateMachine after supplicant is enabled by
wificond, preparing ISupplicantStaIface & ISupplicantP2pIface.
Have disabled the initialization for now, code is inert.

Test: unit tests pass
Bug: 33383725
Change-Id: Iec5bb856c554b68c8f54a5a1224ca2fe7b548618
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
b86089a48fae8878b5a27533a116c97b0be6d0e7 10-Jan-2017 Peter Qiu <zqiu@google.com> util: fix parsing logic for ExtendedCapabilities IE

The IEEE 802.11 standard specified that Extended Capabilities IE contained
a bit field of variable length. So use BitSet to represent the data instead
of an integer.

Bug: 34179560
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I1df2c92c475f1dbc4e7b17c243b4560d822ff129
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
a140809e4a8eeb21b257caa7faaac0b96a3608f9 17-Nov-2016 Randy Pan <zpan@google.com> Remove obsoleted HAL API set_bssid_blacklist

Bug: 32907214
Test: Bulid
Change-Id: Ibeedb6f95349ce8f225228ba02cdd4eedc599074
Merged-In: Ibeedb6f95349ce8f225228ba02cdd4eedc599074
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
45ff377d3332f5a77d5290ca6392e4de0533db6a 11-Nov-2016 Ningyuan Wang <nywang@google.com> Get association frequency from wificond

This allows framework to get association frequency from wificond
instead of supplicant. Wificond uses a cache frequency updated upon
MLME events.

Bug: 31595463
Test: compile, manual test

Change-Id: I231d79a1b3e278d7251625ec2cc8ba5d4f7a4083
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
4d11585ede6636fee294ffb89e832e2f7f271c12 28-Oct-2016 Ningyuan Wang <nywang@google.com> Add group and pairwise cipher suite info to Capabilities object

This parses the group and pairwise cipher suite from IEs, and stores
them in InformationElementUtil.Capabilities object.

This repaces buildCapabilities() with from() and generateCpabilities
String(). This decouples security capabilities information from the
capabilities string, which is exposed to API and need to match
supplicant format.

This add the pairwise cipher to capabilities string to match the
supplicant format.

This also fixes the WPA IE structure in comments.

Bug: 32481849
Change-Id: Iaf9ec222886375ed4e5ba66b1d8e0e408acd0a20
Test: compile, manual test, unit tests
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
2346407ae1d03ea85082792d30bee1e667a678fe 01-Oct-2016 Ningyuan Wang <nywang@google.com> Remove unused getFreqCapability()

Bug: 31864245
Test: compile
Change-Id: I6d91e6c67ea1b59390ed9f8d285ac834a95b8f5a
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
026cb51837e4cf3aea30b903320b992a3f5d0d7b 20-Sep-2016 Christopher Wiley <wiley@google.com> Remove implementation of user selected WiFi bands

This functionality artificially limits WiFi's ability to connect to WiFi
networks and establish connectivity. We already prefer 5Ghz networks
to 2.4Ghz networks, and offer knobs to scan on a particular band.

The UI that exposed this feature has been removed since M.

Bug: 31148223
Test: builds, unit tests pass

Change-Id: I8ae1f9d2b7217d404557fb69eccb2dd42799d4df
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
0183b78a485c5b0f6cb28b42a872c2685a3ac560 16-Sep-2016 Ningyuan Wang <nywang@google.com> Get packet counters from wificond

BUG=30978872
TEST=compile, manual tests

Change-Id: Ic0f729deeda1d606b004b600af4c1c664e52ad7d
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
6259b630ddb59b642729a2d2113d81ed8e33a0e3 12-Sep-2016 Roshan Pius <rpius@google.com> WifiScanningService: 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.

For hidden networks, we'll now send a sorted array of <ssid> for
each network (similar to PNO). This should help wificond prioritize
networks when the size exceed the max supported by driver.
Also, since wpa_supplicant already supports sending a list of ssids for
scanning, plumb it all the way through.

NOTE:
1. The backend for all these scans will eventually be replaced by
wificond.
2. Hidden networks are no longer considered in bgscan requests. This was
anyway not workin in HalWifiScanner's gscan backed bgscan.

BUG: 29503772
TEST: Existing unit tests.
TEST: Successfully connected to a hidden network on device
Change-Id: Ie7783353d2eb87c2fd7b9a10f44e3e5df4cbc218
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
c7266ce57118ebc5e639175543f0151106f85903 14-Sep-2016 Ningyuan Wang <nywang@google.com> Remove unused SetInterfaceUp()

BUG=None
TEST=compile, wifi still works

Change-Id: I9060f67fc9848bba8de82f7dc17e59fcdebc8d2f
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
09044adabba28c56b48922d105994d30e7ab015e 02-Sep-2016 Peter Qiu <zqiu@google.com> passpoint: refactor PasspointEventHandler

Changes include:
- cleanup the callback interface
- remove dependency for ScanDetail
- remove unused code
- add unit tests

BUG: 31264540
TEST: build and run unit tests

Change-Id: Idab62a6e12bef7807e2ef8bc5aec4e46fbf965dc
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
4fb2665730fb7be67d716cd8a1264d4931476724 01-Sep-2016 Ningyuan Wang <nywang@google.com> Remove unused fetchAnqp()

BUG=None
TEST=compile

Change-Id: Idfd32411377b5300ae4dbe1b0b5eb5e15e9b3924
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
1146b64b7ebaa328508487bae886801bfc9c44be 31-Aug-2016 Ningyuan Wang <nywang@google.com> Build ScanResult.capabilities from IE and capability mask

This take use of InformationElementUtil.Capabilities.buildCapabilities
to build ScanResult.capabilities instead of asking wpa_supplicant for
a FLAG string.

With this change, getRawScanResults() no longer depends on
wpa_supplicant to parse IE elements and provide FLAG string.

This helps us integrate wificond scanning to java framework because
in this way wificond just needs to provide capability mask and raw
IE array, instead of parsing IE array ahead.

BUG=31157181
TEST=compile and manual test
TEST=
example:
flag string before change:[WPA2-PSK-CCMP][WPS][ESS]
flag string after change:[WPA2-PSK][ESS]
Since we only care PSK, WEP and EAP keywords, these strings can be seen
as identical.

Change-Id: I97fe527416c3678d49b6516f2cac1ddbdf4b29bb
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
8f3a60a18a52a28d03f459bd65754317d94e745e 26-Aug-2016 Ningyuan Wang <nywang@google.com> Remove unused fetchAnqp()

BUG=None
TEST=compile

Change-Id: I601607ca0772e436ca66a555aa1359d76c04d677
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
ee7bdc30d102e05df8d275ebc133afed21808e34 19-Aug-2016 Roshan Pius <rpius@google.com> WifiConfigStoreLegacy: Migration from legacy store

Add a new module |WifiConfigStoreLegacy| to perform the necessary
migration of data from the legacy store files:
1. wpa_supplicant.conf (indirectly via wpa_supplicant ctrl iface)
2. networkHistory.txt
3. ipconfig.txt

The new module exposes 3 methods to help in migration:
1. isStoresPresent() - to indicate the need for migration.
2. read() - to read data from all the store files.
3. removeStores() - to delete all the store files after migration.

This is using the existing store read methods in WifiNetworkHistory,
WifiSupplicantControl & IpconfigStore.

TODO: Migrate passpoint info later.

BUG: 29337176
TEST: Added a unit test.
TEST: Manual tests using some hacks in WifiConfigManager.

Change-Id: I143a4271cc63573a69a3008396d1396c1f36721b
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
503d588975085552863f781d38e2d77aae10c75b 20-Aug-2016 Roshan Pius <rpius@google.com> SupplicantWifiScannerImpl: Restart PNO on settings change am: 1bf983a421 am: 1a21f2a41d
am: b486a6e4a6

Change-Id: I2045dbda093b03f05e41e17479bc2bef10168803
b486a6e4a6a1a38449222973fb91ca59d7c00d61 19-Aug-2016 Roshan Pius <rpius@google.com> SupplicantWifiScannerImpl: Restart PNO on settings change am: 1bf983a421
am: 1a21f2a41d

Change-Id: I13fc81d9d03df86dbf8c22fef203da95a4e396c4
1bf983a4211f547593a60523e43112ecdb5c8997 15-Aug-2016 Roshan Pius <rpius@google.com> SupplicantWifiScannerImpl: Restart PNO on settings change

When a new network is added, ConnectivityManager will stop/restart PNO
scans. However because of the 5 second debounce logic in HwPnoDebouncer,
this toggle will not be sent to wpa_supplicant. So, force restart PNO in
SupplicantWifiScannerImpl whenever there is a change in the network list .

PS: wpa_supplicant already has some internal logic to handle network
additions when PNO scans are running. But, not sure if this is working
as intended.

BUG: 30833790
Change-Id: Ib328abd866298a8a672a2f19fc863ee515dcbe74
TEST: Added unit tests
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
8249dec7f00e21218bcff6e16cf584ef37d87686 10-Aug-2016 Christopher Wiley <wiley@google.com> Rely on wificond to start/stop supplicant

Bug: 30666540
Test: Still able to connect via WiFi

Change-Id: Ia8a706db70be18b2d4b4687400d9a06d0819690e
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
8812ab2ce5def57a6abe55719ee69892d27c70d7 12-Aug-2016 Christopher Wiley <wiley@google.com> Always start/stop wpa_supplicant service on request

For a given product, P2P is either supported or not supported,
depending on the product configuration and hardware support.
Because of this, on a given product, we do not need to determine
which wpa_supplicant configuration to run, we can just use "whatever
the given product supports."

We've changed init files to define a single service "wpa_supplicant".
In places where there were both p2p_supplicant and wpa_supplicant
services defined, we have removed the wpa_supplicant service, and
replaced it with the definition of p2p_supplicant.

Above the supplicant we choose for a given platform, we still keep
the hooks that allow optional P2P support in the framework, since
the framework needs to support hardware with P2P support, and hardware
without.

Bug: 30816535
Test: unit tests pass on bullhead
Test: cts-tradefed run cts-dev \
--module=CtsNetTestCases \
--test=android.net.wifi.cts.ConcurrencyTest passes

Change-Id: I6ea65fde1707f65e70b41c94ca823bb2318d81f0
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
4999fc8cdc0533ff46255457ba5d684a1956c0c8 11-Aug-2016 Christopher Wiley <wiley@google.com> Merge "Remove dead code related to stopping/starting driver"
8b84cf53d7f1ed263b0bfa1966160677c2ef3d14 06-Aug-2016 Christopher Wiley <wiley@google.com> Remove dead code related to stopping/starting driver

Bug: 30764863
Test: unittests pass on bullhead and upcoming devices
Test: WiFi continues to be able to connect/disconnect on bullhead

Change-Id: I0bded8709ffb329a1df9c37a28872c58132254f3
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
79d37587c4a79adec92c010fead953cf26cc2b30 10-Aug-2016 zhangshuxiao <zhangshuxiao@xiaomi.com> Merge "Don't log identity in to bugreport" am: 2cc6820c70 am: ebfe1fbec6 am: 171eee1ff5
am: 3bcaeb2eb0

Change-Id: I99364614c64735f2311388786cabe266dc2dc91f
3bcaeb2eb09da72f0c253bc06f9e406c38457173 10-Aug-2016 zhangshuxiao <zhangshuxiao@xiaomi.com> Merge "Don't log identity in to bugreport" am: 2cc6820c70 am: ebfe1fbec6
am: 171eee1ff5

Change-Id: I1abafb5e41f6c0eb791cd6ac407cdff4965cdffa
ebfe1fbec6d52e10b9dbe532b969782edb7e21f2 10-Aug-2016 zhangshuxiao <zhangshuxiao@xiaomi.com> Merge "Don't log identity in to bugreport"
am: 2cc6820c70

Change-Id: I4ba3511102b2ed13a431a5447e8cd6e68863ec17
f20f5757ad97c9e2cf3920ff7e861358a576053b 09-Aug-2016 zhangshuxiao <zhangshuxiao@xiaomi.com> Don't log identity in to bugreport

Change-Id: Ifc7697b8188eeb9623f0efe206f5cdb19a8b0f60
Signed-off-by: zhangshuxiao <zhangshuxiao@xiaomi.com>
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
0f0cd745dce43b211bf1ea52cf6096c5ffea9b5b 05-Aug-2016 Wei Wang <weiwa@google.com> Merge "Remove spam logs for Wifi RTT"
07412d5e025b85de146399081db4851088d86dae 05-Aug-2016 Wei Wang <weiwa@google.com> Remove spam logs for Wifi RTT

Removed debug logs for RTT params and adjusted log levels.

Bug: 30115441
Change-Id: I89d6757c8ebb59851eff67f91abe71b095ade327
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
bc582fdbca0d2099139f9790c7d0e1f9b55b0214 02-Aug-2016 Christopher Wiley <wiley@google.com> Remove unused driver management JNI calls

wificond does this work for us now.

Bug: 30041062
Change-Id: Ie4c8e6d8b55b9495102f92db6772d382cc3e7c07
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
367a496587a34be0aec60765eeb1365baadf03bc 23-Jun-2016 mukesh agrawal <quiche@google.com> WifiNative: make getLocalLog() an instance method

We want to add some tests that mock out WifiNative.getLocalLog().
To do that, we need getLocalLog() to be an instance method.
Make it so.

While there: add @NonNull annotation to getLocalLog(), to
make the semantics clearer.

BUG=29424414
TEST=unit tests

Change-Id: Ifb224104cf54b42a945258967dcaf50541849abc
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
eee8cb8bcecfa3b33ae03f7753359499a274e7a9 23-Jun-2016 mukesh agrawal <quiche@google.com> WifiNative: make getLocalLog() an instance method

We want to add some tests that mock out WifiNative.getLocalLog().
To do that, we need getLocalLog() to be an instance method.
Make it so.

While there: add @NonNull annotation to getLocalLog(), to
make the semantics clearer.

BUG=29424414
TEST=unit tests

Change-Id: Ifb224104cf54b42a945258967dcaf50541849abc
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
cc180872c51908b15ce5cbf834634ff323e036bc 21-Jun-2016 Christopher Wiley <wiley@google.com> Fix trivial warnings in WifiNative

Change-Id: I8b022734990e5e47470b0f4590ef7b37802a6856
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
e3831b70d4a8a967fe8df5496d542a432692c434 02-Jun-2016 Roshan Pius <rpius@google.com> WifiBackupRestore: Parse older backup data

Add a new API to restore the old backups containing the raw data
from wpa_supplicant.conf & ipconfig.txt files.
Changes in CL:
1. Migrate all the wpa_supplicant.conf parsing logic in
|SettingsBackupAgent| into |WifiBackupRestore|.
2. Create WifiConfiguration objects from the wpa_supplicant.conf.
3. Parse the ipconfig data using |IpConfigStore| into
IpConfiguration objects.
4. These retrieved networks are added back using addOrUpdateNetwork().

While there,
1. Make the "id_str" parsing/writing methods in WifiNative static so that
it can be used for restoring the data from wpa_supplicant.conf.
2. Make all the configurations enabled & shared in the test
WifiConfiguration objects.

BUG: 29075035
TEST: Compiles & unit-test passes
Change-Id: If099af59811aa80f63eb5fd20ddf234e8089fd27
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
d722d068b68772e52dd7621cfb915fce5ac08482 01-Jun-2016 Glen Kuhne <kuh@google.com> Remove chatty log from WiFiNative

When verbose debugging is enabled, every beacon frame generates a log
stating the DTIM value. This was left behind from development of DTIM
tracking.

BUG=29055049
TEST=unit tests
Change-Id: I3923536094b1894b940754101123f38518a5d519
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
9fa27ea3c46fa591812988d725c03a6d52351701 01-Jun-2016 Glen Kuhne <kuh@google.com> Remove chatty log from WiFiNative

When verbose debugging is enabled, every beacon frame generates a log
stating the DTIM value. This was left behind from development of DTIM
tracking.

BUG=29055049
TEST=unit tests
Change-Id: I3923536094b1894b940754101123f38518a5d519
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
1cc13da95b88204da01c49661b9f46cd097ec29f 25-May-2016 Randy Pan <zpan@google.com> Merge "Wifi: local log size reduction" into nyc-dev am: 3126f8d539 am: d2fffaa41f
am: 2e7aed495e

* commit '2e7aed495e8621559c9f99168f49851c4880fc4d':
Wifi: local log size reduction

Change-Id: I281e4958cd78829c7583de0314731153a3d2b0e0
15941215e85f924765f00779e9b5daff9ed6f118 24-May-2016 Randy Pan <zpan@google.com> Wifi: local log size reduction

Cut down the max number of lines allowed in Wifi LocalLogs.
Currently LocalLog checks the number of lines in its buffer
instead of total size in number of bytes. The buffer being
used can grow really big if some lines are lengthy.

Bug: 28865103
Change-Id: I7f77de1048bb465b79265b3ecb3a925e3a2659d9
Test: Wifi Framework Unit Tests
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
568ee6fd8718c327a9099489a1eed4058bafc3b1 19-May-2016 mukesh agrawal <quiche@google.com> Merge "WifiNative: add wallclock timestamps for packet fate" into nyc-dev am: 30c88d6ec0 am: fb030b8ce7
am: 2f4a2da863

* commit '2f4a2da8639559e523c8e617f88db3ff4c830ee6':
WifiNative: add wallclock timestamps for packet fate

Change-Id: Ic0d26814196dce450dfef78ee8bc7e29697caab5
eaf6303a081b4a7f2231b5053099da7a1c16b7bd 18-May-2016 mukesh agrawal <quiche@google.com> WifiNative: add wallclock timestamps for packet fate

Packet fate reports are timestampped in a different format than
logcat messages. This makes it hard to correlate packet fate
summaries with other system activity.

Resolve this, by adding wall-clock timestamps to packet fate
summaries.

BUG=28701632
TEST=manual test

Manual test:
- set bullhead to non-GMT timezone
- install build on bullhead
- trigger connection failure
- verify that walltime column is in the right ballpark,
relative to logcat messages

Change-Id: I3aed8d9acca42f0ef0cc4f2f2fbdabdde33ce4c8
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
45224b0dd2aa45cbc44c13734e5d5e5827edd73f 17-May-2016 mukesh agrawal <quiche@google.com> Merge "packet fate: include status code for auth+associate" into nyc-dev am: c7d77be3ba am: 063a8fc03a
am: e8ca9b9453

* commit 'e8ca9b94534da21110287bdd12e1230a15058e08':
packet fate: include status code for auth+associate

Change-Id: I3ccb635bf20606e6153911698d9a58755333fe30
5e550bdccf8aaace892366fbbaf90bd0a7c456af 14-May-2016 mukesh agrawal <quiche@google.com> packet fate: include status code for auth+associate

During 802.11 authentication, we've seen wpa_supplicant
report error information that is at odds with
over-the-air traffic.

For systems that provide packet fate for these early
frames, we can gather better information about the
auth process from the frames themselves.

Specifically: we can include the status code in the
packet fate summary. Make it so.

While there:
- fix a whitespace issue in parseIeee80211FrameCtrlType()
- rename frameControlField, since it didn't really hold
all of the frame control info. (frameControlField
omitted the frame control flags.)
- modify some packet fate tests to be less specific about
expected whitespace; it's too hard to maintain the tests
when exact whitespace matching is required

BUG=28717266
TEST=unit tests
TEST=manual

Manual test
- configure hostapd to allow zero connections
- configure bullhead to connect to hostapd
$ adb shell dumpsys > /tmp/dumpsys
- verify that packet fate summary shows auth frame with status 17

Change-Id: Ib8742091d0a9acc7fdde0423229d150bf4c1c6d8
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
7e1082bec4d42fdb4fc92061c7041826218eff1c 05-May-2016 Ningyuan Wang <nywang@google.com> Replace createCSVStringFromIntegerSet() with TextUtils.join()

BUG=28563127
TEST=compile
TEST=runtest frameworks-wifi

Change-Id: Ica9620c69b4a70330e681207466d3d77c940a9ad
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
590f3fc2045389d5ef274c4b3bd6162d93b1a0ac 13-Apr-2016 Samuel Tan <samueltan@google.com> Log summarized packet fate reports

When verbose debugging is not turned on, log
summarized packet fate reports that include the
timestamp, direction, fate, protocol, and type of the
network frame, but nothing more. These one-line
summaries will be logged to the system dump in
table format.

BUG: 28150622
TEST: 'runtest frameworks-wifi' passes.
TEST: Manually trigger a WiFi connection failure (e.g. enter
wrong password for a secured network), and examine the
output of 'adb shell dumpsys' for the logged packet fate
summaries.

Change-Id: Id4cc9c3cdc85d209788e0eb1c51e5a47e04d0a6a
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
d0cb2fae195ebb9f658095667f3c7b7b8d69a204 07-Apr-2016 mukesh agrawal <quiche@google.com> wifi service: add support for driver dump HAL API

Implement the framework side of the driver dump HAL API:
- When a bugreport is generated, ask the HAL to provide
a driver memory dump.
- When dumping a bugreport, include the driver memory
dump (if available).

Along the way: add a stub implementation of the driver
dump HAL API, in case a particular vendor HAL does not
implement the API.

While there: declare the (existing) callback for
firmware memory dumps as static. There's no need for
on_firmware_memory_dump() to be visible outside of
com_android_server_wifi_WifiNative.cpp. (Modules
that need access to on_firmware_memory_dump() will be
provided with a pointer; they don't need to reference
the function by name.)

BUG=27554392
TEST=unit tests
TEST=bullhead: dumpsys + verify that driver dump is present
TEST=angler: dumpsys + verify we properly handle unimplemented API

Change-Id: I619b9c819a41a795c1119a8c2fa22447f0c44b56
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
8ba794562167643688ee38352f98345403fa22c8 07-Apr-2016 Roshan Pius <rpius@google.com> WifiNative: Remove PnoMonitor

Remove PNOMonitor from WifiNative since it has been refactored out into
SupplicantScanner now.

BUG: 27677054
Change-Id: I99850a1e59bfe0ee21c674467ae7480df85e76ff
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
ed510cfa64decd813f76faf9bb1b0a70b74b9898 01-Apr-2016 mukesh agrawal <quiche@google.com> WifiLogger: add support for packet fate

1) Provide a method for other parts of wifi service
to report connection failures to WifiLogger.
2) Start packet fate monitoring if/when we start
logging in verbose mode.
3) Fetch packet fates on failure, as appropriate.
4) Include packet fate information in dumps.

While there:
a) Change visibility of the single-arg dump() method
in BaseWifiLogger. (Only derived classes should be
calling that overload.)
b) Disambiguate the call from WifiLogger.dump() to
BaseWifiLogger.dump(), by adding |super| to the
expression.
c) Remove unused WifiNative.WIFI_ERROR_UNINITIALIZED

BUG=27528124
TEST=unit tests

Change-Id: Ica85ce39e79983194c3930ef54c29ac07454faed
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
0fcb06473cbe2824e401a80c0520bb1c14ed8f41 01-Apr-2016 mukesh agrawal <quiche@google.com> WifiNative: flesh out packet fate implementation

1) Add methods to invoke the packet fate HAL functions.
2) Add methods to dump a packet fate to a string.

BUG=27528124
TEST=unit tests

Change-Id: I3897687099ab19f5cf24a0821cbc6600ea12e52a
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
09b1d0786d05436d524d7556c269e665a0962ee6 01-Apr-2016 mukesh agrawal <quiche@google.com> WifiNative: add infrastructure for packet fates

1) Define the Java classes that the C++ code will
copy packet fate information into.
2) Define the constants that will be used to represent
fates. (This is needed to write readable tests for
item 1.)
3) Declare the native methods on the Java side.
(This is required for registerNatives to continue
to work, after we add the new methods on the C++
side.)

BUG=27528124
TEST=unit tests

Change-Id: If0930f645f95e60c8cb471b10fcb740273159e05
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
64697f7a5b9c1c39f8c9d9c225b8ca4c798422c2 26-Mar-2016 Samuel Tan <samueltan@google.com> WifiNative: fix error log message typo in getNetworkExtra()

Change "serialize" to "deserialize" in the error log message,
since WifiNative.getNetworkExtra() attempts to do the latter rather
than the former.

BUG: 27919414
Change-Id: Idd4f750ae8af79d89d2e5662d391d10d239f1f09
TEST: N/A
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
aa575d82dcc01cb213402923796c870ecdd45b28 25-Mar-2016 Mitchell Wills <mwills@google.com> Merge "Pass buckets scanned from HAL to framework" into nyc-dev
20047f18a7cccdc279d480916308f612c5cbb63e 25-Mar-2016 Paul Jensen <pauljensen@google.com> Merge "Move ApfFilter from ConnectivityService to IpManager" into nyc-dev
0e67c341974310405230e2fd761395296f15d5c1 24-Mar-2016 Samuel Tan <samueltan@google.com> Merge "WifiNative: improve documentation for getRawScanResults()" into nyc-dev
e1dab7a2e3ab5911f812a302b4beed1f6eb5aba7 18-Mar-2016 Paul Jensen <pauljensen@google.com> Move ApfFilter from ConnectivityService to IpManager

There's a few advantages to having ApfFilter in IpManager:
1. If things go wrong, crashing a particular transport is less bad then
crashing ConnectivityService. We also don't want to use
ConnectivityService as a dumping ground for transport-specific logic.
2. This makes implementing WifiManager.MulticastLock a lot simpler and
safer because enabling/disabling it doesn't have to go through the
NetworkAgent, which could risk various races (e.g. installing a filter
into the wrong WiFi network).
3. IpManager is the ultimate source for LinkProperties for a particular
transport and since ApfFilter uses the LinkProperties it's better to
have it closely paired with the IpManager. Likewise, ApfFilter needs
to know the APF capabilities of the transport, so having it in
the transport avoids having to parcel this information through the
NetworkAgent.

Bug: 26238573
Change-Id: I99b85f2b64972f0e7572170ec5d1926081aa3429
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
8e66cfa1668921d9ef0f385879a7cffa54a3f5a8 24-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Revert "Remove hardcoded 'wlan0' from native WiFi code"" into nyc-dev
3b51fd1bb8356b284822f4f677ad941524e616eb 24-Mar-2016 Ningyuan Wang <nywang@google.com> Revert "Remove hardcoded 'wlan0' from native WiFi code"

This reverts commit da10b1588be241c59434d5f464463e7f8c7bcc5e.

BUG=27814126

Change-Id: I04be0b5b991fdb8a1d3a8467d622c07a185f3900
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
eb5731beb47704699dd8866b1a1dc59f3764c981 23-Mar-2016 Samuel Tan <samueltan@google.com> WifiNative: improve documentation for getRawScanResults()

Change documentation for getRawScanResults() so that it is more
readable, and clearly indicates which BSS information fields are
being masked.

BUG=None
TEST=N/A

Change-Id: Ic6322759590c0c25021511ab74e44961f7f1ad66
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
c9e6069eb941d282af213dc20b171877db6b567b 23-Mar-2016 Mitchell Wills <mwills@google.com> Pass buckets scanned from HAL to framework

Bug: 27506257
Change-Id: Ia57327e265317fd0d1ce09d238d9c1e9c55bf2b1
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
05762a3d4a5e88727cbf2818c67d84d0f9ca9a82 22-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Remove hardcoded 'p2p0' from WifiNative" into nyc-dev
c6ccad1ec19b0a53266962237774422b156ea726 18-Mar-2016 Ningyuan Wang <nywang@google.com> Remove hardcoded 'p2p0' from WifiNative

WifiNative should get the p2p interface name from
SystemProperties instead hard-coded name.

BUG=27383938
TEST= cts & unit tests & manual test
Change-Id: I25a4280ee14252d01e4582ced90c1b456e4babb2
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
da10b1588be241c59434d5f464463e7f8c7bcc5e 18-Mar-2016 Ningyuan Wang <nywang@google.com> Remove hardcoded 'wlan0' from native WiFi code

This CL changes the setInterfaceUpNative() API, adding an
interfaceName parameter.
This also moves the code for 'bringing up wlan0' out of
startHalNative().
The reason is that startHalNative() should not be in charge of
bringing up a specific interface.
For the similar reason this moves the code for 'bringing down
wlan0' out of waitForHalEventsNative().

BUG=22457263
TEST= cts & unit tests & manual test

Change-Id: Ia9cd7a6b4d75e5582561ffa53084932a3c177f05
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
64e816ff5483030636e1815f69a6cbaf8cef289e 17-Mar-2016 Ningyuan Wang <nywang@google.com> Use boolean instead of int parameter for toggleInterface()

WifiNative::toggleInterface() is using an int parameter for setting
interface up/down. It should be boolean instead.
This CL also renames toggleInterface() to setInterfaceUp().

BUG=27704936
TEST=compile, manually tested on bullhead

Change-Id: I88a98d3e4e53c95921d519db685886a3535dab9e
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
e0f989563233faa6873a80f803d087f4d5f2af8c 18-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Fixed 'Remove ill-defined WifiNative::getInterfaces()'" into nyc-dev
dcd877d6c143db557884993ea437e2a432cb0ba3 17-Mar-2016 Roshan Pius <rpius@google.com> SupplicantScannerImpl: Support connected PNO scan

wpa_supplicant does not support PNO scans when it is in connected state.
So, we need to revert to using background scans for devices which do not
support ePNO.
So, connected PNO becomes a SW PNO scan regardless of whether the device
supports HW PNO scan or not.

BUG: 27525899
Change-Id: I84fb8f5028403dae00302940e9d71ca1c0603de3
TEST: Compiles & unit-test passes
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
918b4bdc2ae16438c5213320daeff1d551f4aed8 16-Mar-2016 Ningyuan Wang <nywang@google.com> Fixed 'Remove ill-defined WifiNative::getInterfaces()'

WifiNative::getInterfaces() is ill-defined because it does not only
get the number of interfaces but also changes sWlan0Index and sP2p0Index.
This CL removes this function and replaces it with queryInterfaceIndex().
This also removes sP2p0Index because it is never used.
This fixes pervious CL:887328 by making sure interface was not removed
before toggling.

BUG=27369790
BUG=27711081
TEST=compile, and manually tested with bullhead

Change-Id: Ib24ec70edf82ef9b3177caa39978ade337ff0e4f
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
a24cf11dc36674056efef38be297eea40cc5761f 17-Mar-2016 Rebecca Silberstein <silberst@google.com> Merge "Revert "Remove ill-defined WifiNative::getInterfaces()"" into nyc-dev
6d8029355c62eea70a230d49493d35c4462938b4 17-Mar-2016 Rebecca Silberstein <silberst@google.com> Revert "Remove ill-defined WifiNative::getInterfaces()"

This reverts commit 34fdbd63c2d3c402cd83b5e7911c88d4180832b2.

Change-Id: Idf5e4f1cde14e16805953f2fc78b7beefdbce76c
BUG: 27711081
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
05af64cf72e191310760172a557e3c3340b78075 17-Mar-2016 Joe Onorato <joeo@google.com> Merge "Turn off excess logging" into nyc-dev
917ecd60fb7e65ca97604ccad9f4427f28bb3cd6 17-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Remove ill-defined WifiNative::getInterfaces()" into nyc-dev
34fdbd63c2d3c402cd83b5e7911c88d4180832b2 16-Mar-2016 Ningyuan Wang <nywang@google.com> Remove ill-defined WifiNative::getInterfaces()

WifiNative::getInterfaces() is ill-defined because it does not only
get the number of interfaces but also changes sWlan0Index and sP2p0Index.
This CL removes this function and replaces it with queryInterfaceIndex().
This also removes sP2p0Index because it is never used.

Bug: 27369790
TEST=compile, and manually tested with bullhead

Change-Id: Ia67954de88957c24b16b9c962231e785a465f44c
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
063cfc7e3eef78fcbda24a66f0c473828b39c854 10-Mar-2016 Roshan Pius <rpius@google.com> SupplicantWifiScannerImpl: Report Pno events

1. Plumb the scan results event from wpa_supplicant to onPnoNetworkFound()
callback for supplicant based PNO scans.
2. Pull in the PNO scan pause/resume logic to WifiScanner. PNO scans take
the lowest priority and will be scheduled when all other ongoing scans
are completed.

BUG: 27167559
Change-Id: I1acf704af99a00ffde654ed684792afede3cf326
cherry-picked from:
https://partner-android-review.googlesource.com/#/c/539848
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
d34e3a7b98d51f684100483151fceb233fd95215 11-Mar-2016 Roshan Pius <rpius@google.com> Update ScanCapabilities in WifiNative

BUG: 27607839
Change-Id: I8edb1b7637fa69b3ba1ee59e52d2e1c5a6e79c9e
TEST:Compiles & unit-test passes
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
d0310c7cb097dcb88a042b9308306091b4b8d568 08-Mar-2016 Roshan Pius <rpius@google.com> Pause PNO scans for single scan

Since PNO scans and regular scans are being scheduled by
WifiStateMachine and WifiScanner respectively. We need a
stop gap solution to pause wpa_supplicant PNO scans during
single scans.

TODO's:
Will move this logic in entirety to within Scanner once we
have WifiConnectivity manager using Scanner for all scans.

BUG: 27481309
TEST: Compiles & unit-test passes
TEST: Used PMC app to run single scan along with PNO to verify
behaviour manually.

Change-Id: I0731192dcad2dc5b697f645d588580303818f370
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
01fb5b27ba32f180080f2b2b12adbc5c803611ce 10-Mar-2016 Roshan Pius <rpius@google.com> Merge changes from topic 'wifi_scanner_hidden_network_ids' into mm-wireless-dev

* changes:
Allow multiple Handlers to be registered for a WifiMonitor event
WifiScanner: Changes to support hidden Network Ids
af2b79e4cfc1da793b3d8fb4a96c144deefc7d58 01-Mar-2016 Joe Onorato <joeo@google.com> Turn off excess logging

Change-Id: I1e1d116f1e2abfc01255b492a38a7839635b9bed
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
d74ff28cdb01d3f711e0b0f0e99e51fdb221eaf2 07-Mar-2016 Roshan Pius <rpius@google.com> WifiScanner: Changes to support hidden Network Ids

Add the required plumbing to support scanning for hidden networks via
wpa_supplicant.
Added a test case to verify that the network ID list is being sent
as expected.

BUG: 27503786
Change-Id: I2d1ef74494080e01248ae8aad5081c7608fc0e81
TEST: Compiles & unit-test passes
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
163d510aac068682c390664e51e83bbf870fe5f5 08-Mar-2016 Sunil Dutt <usdutt@qti.qualcomm.com> Wifi: send an explicit ENABLE_NETWORK with "no-connect"

ENABLE_NETWORK command is called from the framework because of PNO state
change, which triggers the connect.This command is only expected to
enable the network and not issue a connect because from framework the
expected sequence of operations for a connect are SET_NETWORK,
ENABLE_NETWORK and SELECT_NETWORK.
Send an explicit ENABLE_NETWORK with "no-connect" to avoid connection.

Change-Id: I7583e9ff0c5b8700d9ec945d93b5175c134e8e76
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
3a2b55ba283dec0d3e3421bdd27568ad0644bd7e 07-Mar-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Change PNO network list type" into mm-wireless-dev
9a7223a7a51be6e8f700b9240493859e667f2017 07-Mar-2016 Roshan Pius <rpius@google.com> Merge "PNO: Bugfixes in WifiNative" into mm-wireless-dev
d17c24a96de6fdeec1d6d41ad5c986712d9acf18 07-Mar-2016 Roshan Pius <rpius@google.com> Merge "WifiScannerImpl: PNO implementation (Part 1)" into mm-wireless-dev
ffe70f78d0aca71e9c5af82f11472d422f14b301 07-Mar-2016 Roshan Pius <rpius@google.com> Merge "PNO: Changes in Native for new interface" into mm-wireless-dev
8c0c14b2c98bc26e6a09f66cff1244f0a30f44cb 05-Mar-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Change PNO network list type

Change the PNO network list type from WifiNative to WifiScanner type
since that is the new public interface for starting PNO scans.

1. Remove the PnoNetwork constructore from WifiNative
2. Create a temporary conversion function in WifiStateMachine to
convert to WifiNative.PnoNetwork.

BUG: 27167559
Change-Id: I7c845321eab20f822f5d7d5231294181343ef2be
TEST: Compiles & unit-test passes
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
ef3ea1092bc17673c0a85a845b053151b7c10e07 04-Mar-2016 Roshan Pius <rpius@google.com> PNO: Bugfixes in WifiNative

Fix coupke of bugs in the |setPnoListNative| API found in manual testing
of startPnoScan/stopPnoScan testing.

BUG: 27167559
Change-Id: I1e2f8167fbee6db2401fdc918cd46f7d9d594bff
TEST: Compiles & unit-test passes & manual testing of Scanner API
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
9153bd67d51b305ffdd61355e0748e3c332c2caf 02-Mar-2016 Roshan Pius <rpius@google.com> WifiScannerImpl: PNO implementation (Part 1)

1. Immplementation of the PNO interface in WifiScannerImpl for
setting/resetting the PNO list.
a. For supplicant based PNO, setting the pno list will also
trigger the scan and we don't scan any background scans.
b. For HAL based PNO, we set the pno list and then schedule a normal
background scan.
2. Plumbing of the OnPnoNetworkFound callback to the client.

TODO's:
1. Will need to integrate the PNO monitor notifcations in
SupplicantWifiScannerImpl to raise OnPnoNetworkFound callbacks.

BUG: 27167559
Change-Id: I8859a419b37b9cb125a710fb67ae1b62db7f779d
TEST: Compiles & unit-test passes
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
9bd01d6cb65ea96d6729d35a1fc43bb2bb40e3bd 02-Mar-2016 Roshan Pius <rpius@google.com> PNO: Changes in Native for new interface

Changes in WifiNative to accomodate the new Scanner based PNO interface.
Currently, we're just setting the |wifi_epno_network| list member in
|wifi_epno_params| structure. All the other values are being ignored.

1. Change the native |android_net_wifi_setPnoListNative| to accept the
PNO settings parameter instead of directly accepting the list of
networks.
2. Changes in WifiNative to send down the new |PnoSettings| structure
down to the native code instead of directly sending the list.
a. Keep the existing interface from |WifiStateMachine| which accepts a
|PnoNetwork| list and converts it into |PnoSettings| structure.
This interface will be removed once all the new Scanner based
interface plumbing is complete.
3. Add a separate native API to reset PNO list.

While there,
Remove redundant "Wifi" prefix from Pno class names.

BUG: 27167559
Change-Id: I78d35c20b4bb7a12c51d0c2cc609fb7bcb5ae516
TEST: Compiles & unit-test passes
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
3d995b8a3a508e957e3dac2e508956020cd9abfe 04-Mar-2016 Roshan Pius <rpius@google.com> Send list of hidden networkID for supplicant scan

Since we disable all the networks in wpa_supplicant (as of b/26984166),
we need to explicitly send the list of hidden ssid's to scan.

1. Use the 'scan_id' override to send a lit of hidden networkId's to
supplicant.
2. Add a new set of hidden networkId's in ConfigurationMap which can be
used as parameter for the above.
3. Add a test to start scan with a hidden network added.

BUG: 27471630
TEST: Verfied that we auto-connect to a hidden ssid.
TEST: `runtest frameworks-wifi`

Change-Id: I8aea09d1ec2f24310959a558e8b12d31a26d179c
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
a5c3069e0bf18cb7eedd3e5c0eccecea48e953c0 04-Mar-2016 Ningyuan Wang <nywang@google.com> Remove lazy roam code

Lazy roam is no longer in use.
Therefore this CL removes the relevant code.

Bug: 27484729

Change-Id: I8209a6ff1ba9281aa83840c039e99ae9c34ffe9a
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
d63e34a4e68bcd320d01fe930662cc2ad3426656 04-Mar-2016 Ningyuan Wang <nywang@google.com> Remove unused function configureSsidWhiteList()

The function configureSsidWhiteList calls a empty function in
WifiNative.
This removes the relevant code.

Bug: 27377844
Change-Id: Ifc1e6418e52e28688fb0c379b77824a20add127f
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
6609df5a9c14e4440c085567a27437a8cfc50f88 14-Jan-2016 Paul Jensen <pauljensen@google.com> Plumb WiFi packet filtering HAL APIs to Network Agent.

Bug: 26238573
Change-Id: I67e08f4771007a2ea2cbc7a93eaaa55cddd017a2
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
3dd6f75ff2ab823bd0c14581f2e047c74916f16f 29-Feb-2016 Erik Kline <ek@google.com> Add NDOE calls to WifiNative

Bug: 26238390
Change-Id: I23109a6c3692dc49c4c931151c3c5ed735aa23a7
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
9d7489491984e86915b2cf4fac38a882de1c8cdb 09-Feb-2016 Roshan Pius <rpius@google.com> Disable all networks in supplicant

Temporary changes to test if we can disable all the networks in
supplicant conf file except the one we want to connect to.

Changes:
1. Remove all existing native enableNetwork invocations and replace
it with a single selectNetwork call in |WifiConfigStore.selectNetwork|.
selectNetwork enables the provided network and disables all others in
wpa_supplicant.
2. Enable all networks in wpa_supplicant before enabling PNO. These will
be disabled when we come out of PNO and decide to conneect to one of
them via selectNetwork.
3. Save the network status in networkHistory.txt and ignore the status
stored in wpa_supplicant.conf.
4. Some other cleanups:
a. Remove |enableNetworkWithoutBroadcast| definition/usages and
replace with |selectNetworkWithoutBroadcast|.
b. Add enableAllNetworksNative/disableAllNetworksNative methods to
just enable the network in wpa_supplicant.
c. Move all wpa_supplicant network enable/disable to a common API.
d. Fixed all the unit-test expectations.

BUG:26984166
TEST: `mmma frameworks/opt/net/wifi/tests && runtest frameworks-wifi`

Change-Id: Ib5a089f054557071ece6be25aad03b6458c0217c
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
f3e16ca77eb3fce92ef9040de577d64103cb8b7d 23-Feb-2016 Roshan Pius <rpius@google.com> Merge "Modify the wake reasons data structure(1/2)" into mm-wireless-dev
d9f96a58271313deefb135b0606429953157a5f9 19-Feb-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigStore: API for fetching PNO network list" into mm-wireless-dev
55b5d3d0e887313ece26bad8ebf8f8c25ac66e3f 19-Feb-2016 Glen Kuhne <kuh@google.com> Merge "InformationElementUtil TIM element parser" into mm-wireless-dev
947e55415eab3989f2f5cede0c03745cf9268309 09-Feb-2016 Glen Kuhne <kuh@google.com> InformationElementUtil TIM element parser

Added a parser to InformationElementUtil for the beacon frame Traffic
Indication Map element. Only current use for this is to get DTIM
interval for metrics.

BUG=25691077
Change-Id: I1aba8ca658e446ae5697b6d749687b0dd24f790d
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
5c3c06082b24f9ff0d479e82a63b52220c86598b 12-Feb-2016 Roshan Pius <rpius@google.com> WifiConfigStore: API for fetching PNO network list

Modify the existing API for retrieving PNO network list to
differentiate the list for disconnected vs connected PNO scenarios.
The network sorting orders are different for each of these PNO
scenarios. Use different comparator objects to sort the network list for
the 2 scenarios.

Also, merging the existing ePNO network class (WifiPnoNetwork) with the
supplicant based PNO network class (PnoNetworkPriority). This allows the
Connectivity manager to use a single class for all types of PNO.

While there,
Remove dead code in WifiConfigStore (buildPnoList) which was written for
ePNO.

While there,
Add back the numAssociation counter increment because we're now using
it to sort PNO list.

BUG: 27151228
Change-Id: I6d48dab367a2106eef4f1d3f396f391c57a22339
TEST: Ran unit tests
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
6bf6986d359556010638dfae332b585162f06520 18-Feb-2016 Roshan Pius <rpius@google.com> Modify the wake reasons data structure(1/2)

Changes in the android framework to use the modifed HAL API to
fetch the host wakeup reasons from the driver.

BUG: 26902794

Change-Id: Id14f8fa695ba3406392663b5d792309464a4b5bf
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
1ab129e587d334a144a0bca5323c27985397a403 17-Feb-2016 Randy Pan <zpan@google.com> Fix PNO ScanResult creation

Fixed a couple of issues with PNO scan result creation. Moved
information element field population into createScanResult(),
which simplifies data passing between JNI and JAVA. This
also helps fix the issue that IE was not populated in PNO
scan result.

Bug: 26666366
Change-Id: I5c6b060713ac9597bac8b1ec64c7c3231c8d0d51
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
63539f1283899fbbf83ab90757961b4be51d5034 04-Feb-2016 Mitchell Wills <mwills@google.com> Update scanner onScanStatus callback to include event

This now allows scanner implementations to indicate scan failues as
well.

This change also ensures that anqpLines is set in results from supplicant

Change-Id: Ibe18c9b804bf073b9152800295c40d072a41e641
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
345960237132c18a817d3aed93ab6df5906fcc97 11-Feb-2016 Mitchell Wills <mwills@google.com> Merge changes I86b5194b,Ic4150120 into mm-wireless-dev

* changes:
Add more functionality to ChannelHelper
Add scan channel helper abstraction
ac9ad3283508db15b65b1cbb89b841278973276b 28-Jan-2016 Roshan Pius <rpius@google.com> Update network priorities before PNO is triggered

The max SSID watch list size for PNO supported by wlan drivers is fixed
to a certain size. wpa_supplicant sorts this SSID watch list based on
the priorities assigned to those networks. This may result in us losing
some frequently used networks from the PNO list because they have lower
priorities. This is a side effect of how we assign priorities to
network configuration as they're added.
So before we trigger PNO, re-sort the network list based on the
'numAssociation' value and assign them relative priorities. This will make
sure that the PNO SSID watch list contains all the frequent SSID's to
which we were connected to.
PS: This change has a side-effect of ignoring the configured priorities
during PNO.

While there,
1. Add a common test utils class for common utility functions for all
tests.
2. Annotate all tests in WifiConfigStore so that
|WifiTestUtil.getTestMethod| works reliably.

BUG: 26763375
Change-Id: I2c82254b2cb83aef0dd4da9e7d9b2eb5b376bead
TEST: `adb shell am instrument -e class
'com.android.server.wifi.WifiConfigStoreTest' -w
'com.android.server.wifi.test/android.support.test.runner.AndroidJUnitRunner'`
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
ed6a985c7b63e295248fa7e8292c99b48b7a4283 04-Feb-2016 Mitchell Wills <mwills@google.com> Remove unused supplicant scan with connection setup option

We no longer want supplicant to make connection decisions by itself so
remove the option since it is dead code.

Change-Id: I53a059219e0080e4780d9a131748958049b47df2
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
3acfa01007faf85d6c3bd1efa01b0b6bd85bafe5 09-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Rename WIFI_SCAN_DISABLED event to WIFI_SCAN_FAILED" into mm-wireless-dev
71af8bb37fee5852ae458edabdef3b487d62a5b8 29-Jan-2016 Mitchell Wills <mwills@google.com> Rename WIFI_SCAN_DISABLED event to WIFI_SCAN_FAILED

disabled was not very clear as to the actual meaning of the event and
left the implication that the scan could be reenabled.

Change-Id: Id1894a43dd761624fc3839841029ceb0333647de
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
aab54686664ce47f2c41614a8460f454743d157d 09-Feb-2016 Randy Pan <zpan@google.com> Merge "Build 'capabilities' string for gscan results" into mm-wireless-dev
3571366ac36c70746b9f013ec2b54482861c9292 03-Feb-2016 Randy Pan <zpan@google.com> Build 'capabilities' string for gscan results

Populate the WiFi beacon capability information from gscan to
WifiNative. Build ScanResult 'capabilities' string based on this
value and the information elements.

Add unit tests.

Bug: 26908033
Bug: 26908558
Change-Id: I661bb501a09d3e79ee0b0a8e141e7e47c72687f7
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
712ef6246834caeac3d5b06bea08e85d6b29cd7a 05-Feb-2016 Mitchell Wills <mwills@google.com> Add scan channel helper abstraction

This will allow code to easily function without worrying about the
differences in the amount of information known about scan channels.

Currently this abstraction will only support merging channels, but more
functionality will be added as needed. Eventually this will replace all
functionality in WifiChannelHelper.

Change-Id: Ic41501204fa4ff4470491055f4204ad9a88000d4
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
68cb8c02b4ad079c54a2ffd4407da921d18c7af9 25-Jan-2016 Wei Wang <weiwa@google.com> Enable Rtt Responder Role(2/4).

Change-Id: Ib18af94fbba21c833c47336f7a92afe918dc9a89
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
3fdceeaa74e21c0ca4da52deeeef6571e7e2a6cd 01-Feb-2016 Mitchell Wills <mwills@google.com> Revert "Refactor WifiScanner support for oneshot scans"

This CL does not correctly handle devices that do not support WifiNative.getChannelsForBand

Bug: 26895774

This reverts commit 772124d1f1ddb2b9537de5efc748943808dafe80.

Change-Id: Ie49715fc89750f79c8e5f188cb42094f1076a48b
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
772124d1f1ddb2b9537de5efc748943808dafe80 04-Nov-2015 Mitchell Wills <mwills@google.com> Refactor WifiScanner support for oneshot scans

Seperate oneshot scans so they are no longer implemented using
background scans and make WifiStateMachine use WifiScanner for single
scans.

This changes requires a few parts:
1. Implement single scan logic in WifiScanningServiceImpl for merging
and executing scan requests using the single scan native interface.
2. Writing tests for the new code in 1
3. Make supplicant start scans by using WifiScanner and when it
recieves callbacks dispatch scan complete/failure messages.
4. Enable HalWifiScannerImpl and SupplicantWifiScannerImpl to listen to
supplicant scan events now that WifiStateMachine does not.

Bug: 26525037
Change-Id: Iddd6d64b35fed129048e1fd5c79acb6982bfc418
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
2a6d76f0899289cd3b96e3428f02076fdbc0363e 17-Dec-2015 Mitchell Wills <mwills@google.com> Updates for gscan HAL updates in N

This will compile, but all new functionality may not work

Change-Id: Ia87dbc753e146cd47adb814063ac217508d6caa2
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
fbb081b7c28c18f0644701061a1ab38a4627db27 15-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Store configKey in wpa_supplicant.conf

With per-user networks, the data normally present in wpa_supplicant.conf
will no longer be sufficient to reconstruct a network's configKey. The
configKey must thus explicitly be stored with each wpa_supplicant.conf
entry.

The wpa_supplicant.conf format provides a single variable for keeping
such metadata, "id_str". Since that variable is already used to store the
FQDN for Passpoint networks, it must be extended to hold both the FQDN
and the configKey. This is done by changing the variable's data format to
a serialized JSON dictionary. For future reference, the configuration's
creator UID is also added to the dictionary.

BUG=25600871

Change-Id: I2d63e21d1a87bb9645fed957479dcdb3d2642e38
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
39c3574fa3be035eafbf86462f3ca1bb859060fa 15-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Revert "Store configKey in wpa_supplicant.conf"

This reverts commit 3552d3bc8329aa9bc843f62c3a854e5ad2b41037.

Change-Id: Ib0d425baa3ac38a20d3ba660e5e5da490a1551e0
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
3552d3bc8329aa9bc843f62c3a854e5ad2b41037 14-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Store configKey in wpa_supplicant.conf

With per-user networks, the data normally present in wpa_supplicant.conf
will no longer be sufficient to reconstruct a network's configKey. The
configKey must thus explicitly be stored with each wpa_supplicant.conf
entry.

The wpa_supplicant.conf format provides a single variable for keeping
such metadata, "id_str". Since that variable is already used to store the
FQDN for Passpoint networks, it must be extended to hold both the FQDN
and the configKey. This is done by changing the variable's data format to
a serialized JSON dictionary. For future reference, the configuration's
creator UID is also added to the dictionary.

BUG=25600871

Change-Id: I01518fee6237f4cf60efa4be92c3c7a1aff32704
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
7e0315140767e6f12200f7dbbe7aff43b4f75089 13-Nov-2015 Vinit Deshpande <vinitd@google.com> Capture kernel logs with bugreport

This change captures kernel logs along with Wifi firmware
dump; since lost kernel logs have been a big reason for
unresolved bugs.

It also ensures that we dump version information regardless
of whether or not firmware debugging is ON.

Change-Id: I3e44e4b34af3d5d878de242aa344d2950d9b3b1e
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
3ff269ca67e73f66ac22049fc318b2f86eafb253 13-Jan-2016 Vinit Deshpande <vinitd@google.com> Guard against HAL returning null scan results [DO NOT MERGE]

Bug: 26374148

Change-Id: I3355f969f237fd4ba50e980f83bcbcacc7e55c84
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
17b7a795202659694aeb21e45b4dd4a4b016ac4d 15-Jan-2016 Etan Cohen <etancohen@google.com> Merge "NAN: initial service implementation for discovery" into mm-wireless-dev
956f54b391677d78379729dd14518edddf3c7660 29-Sep-2015 Etan Cohen <etancohen@google.com> NAN: initial service implementation for discovery

Initial NAN service implementation. Supports:
- Configuration
- Publish/Subscribe = Discovery
- Message passing
- Notifications

Bug: 26216681
Change-Id: I1f84a6006cec3c3ed9a4566a79b1b4f8dcecde08
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
26eebecc04b55129a902d1e7b670fe05668c14fa 07-Jan-2016 Vinit Deshpande <vinitd@google.com> Appropriately fail EAP-SIM/AKA when SIM doesn't generate good response [DO NOT MERGE]

This change instructs supplicant to terminate the eapol when bad
reponses are obtained from call to getIccSimChallengeResponse; it
ensures that the failed connections terminate early and connection
times are reduced.

(cherry-picked from master
sha1: 5ebc35f19feab2755a13cf7d5acaeff4bbc78994)

Bug: 23703236
Change-Id: I8eb8edde7a8bb310d73d1b3cc8bc060647e2375f
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
549225687bc441fff055c58c777498f83b8cc29f 13-Jan-2016 Vinit Deshpande <vinitd@google.com> Guard against HAL returning null scan results

Bug: 26374148
Change-Id: I3355f969f237fd4ba50e980f83bcbcacc7e55c84
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
5ebc35f19feab2755a13cf7d5acaeff4bbc78994 07-Jan-2016 Vinit Deshpande <vinitd@google.com> Appropriately fail EAP-SIM/AKA when SIM doesn't generate good response

This change instructs supplicant to terminate the eapol when bad
reponses are obtained from call to getIccSimChallengeResponse; it
ensures that the failed connections terminate early and connection
times are reduced.

Bug: 23703236
Change-Id: I8eb8edde7a8bb310d73d1b3cc8bc060647e2375f
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
062e3f39e37874fedc01f267de5f4cf7dbebe2b4 17-Dec-2015 Randy Pan <zpan@google.com> Wifi binary exponential back off scan support

Hook up the WiFi service and HAL to support binary exponential
back off scan.

Bug: 26236392
Change-Id: Ia176a0351a8a755f8f2b0237aab0122225094baf
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
5ea42964ba17901a8d724736b450ace6ed48880f 18-Dec-2015 Prerepa Viswanadham <dham@google.com> Declaration of native JNI call in WiFiNative.java

Change-Id: I99bae1b598ba3598413e7089bb6a9e68d9e06346
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
297c3acabe7a85eb87240fe3ccf772e57ce6aef7 23-Jul-2015 Mitchell Wills <mwills@google.com> Add multi client batch aware scheduler

WifiScanner can now schedule requests much more intelligently.

Bug: 20956158

Change-Id: Ib852d1d84d8cc798a37660850d5e6f3a206390c1
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
9ec71f6499e0e3d6f52310a41ff4a59d2fa4f8b2 23-Jul-2015 Mitchell Wills <mwills@google.com> Began implementation of supplicant based WifiScanner HAL

Added WifiScannerImpl with implementations of the HAL scanning
APIs using wpa_supplicant. If the new HAL API is supported then
it is used, otherwise wpa_supplicant is used as a fallback.

Change-Id: Ie9d26b6f0675bba03db8c3327c3e5dcf003a3b16
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
18786eca942042388748b0d98979f21c9dff4a89 20-Nov-2015 Mitchell Wills <mwills@google.com> Turn WifiNative into a singleton for each interface

Change-Id: Ida8225c1c8434f5cffbdfd2ebbc4a7b240976a15
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
2bf6258af8315ac7797dde8646a7cd7ed77b70e2 02-Dec-2015 xinhe <xinhe@google.com> WiFi not connecting to WiFi when screen OFF am: e26ad459b6
am: 8613b7330a

* commit '8613b7330a8691ea5cbd2ce0d151ef8c6e8a18e8':
WiFi not connecting to WiFi when screen OFF
e26ad459b63271548abbdeba4f8d77fcca9f88bd 19-Nov-2015 xinhe <xinhe@google.com> WiFi not connecting to WiFi when screen OFF

When framework toggle PNO too frequently, the lower layer
(supplicant and driver) can have some corner case errors.
Add minimum gap (5s) between two PNO toggle.

Bug: 24777453

Change-Id: Ic360b753c65b77831dc8395834b9ac125f1aa7a1
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
8383c1b0fbdf3eb64653849ba65e0b0f9739f190 31-Oct-2015 Mitchell Wills <mwills@google.com> Merge "Remove old API implementations"
5d31cedf4024e0f038b4dfc2081016c8631ee8fe 28-Jul-2015 Mitchell Wills <mwills@google.com> Moved Wifi InformationElement parsing to a common utility class

Change-Id: If3e58aa01ad2a75c0f4942428392c0e7f833143c
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
2afa54e3c8fa1153302a0d57b0e9b7bee35406ff 20-Jul-2015 Mitchell Wills <mwills@google.com> Moved scan result parsing from WifiStateMachine to WifiNative

Moving the parsing of the RSS (wifi scan results) command out of
WifiStateMachine and into WifiNative

Change-Id: Iafb7fa04cd0d7d848cfbb879a13f6592eff34004
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
5683efb3213ad63499399be823f47f60dd869022 15-Oct-2015 Pankaj Kanwar <pkanwar@google.com> am 7d504906: am 98f03db9: am 7af1ef61: am 7b97c836: Merge "Set hs20 property to 1 when connecting to passpoint network" into mnc-dr-dev

* commit '7d5049066cb72d12c76260f8b5dd108bb8248022':
Set hs20 property to 1 when connecting to passpoint network
d3fa2ae3b11d6260a16aff1aa9ec0cd89b0b341d 15-Oct-2015 Pankaj Kanwar <pkanwar@google.com> am 407844c1: am d1a59e62: am a29ea4f6: am 12a1007d: Merge "Fix center frequency parsing bug." into mnc-dr-dev

* commit '407844c12764def74fe9812fab21d77e15c4e49d':
Fix center frequency parsing bug.
7b97c836ad5ef97635329d09f7772f845713aea6 15-Oct-2015 Pankaj Kanwar <pkanwar@google.com> Merge "Set hs20 property to 1 when connecting to passpoint network" into mnc-dr-dev
56845c30ef2bc7ccfd92764e4c7352aee03ec3a8 14-Oct-2015 Vinit Deshpande <vinitd@google.com> Set hs20 property to 1 when connecting to passpoint network

Setting this property has some consequences - it will stop
using prohibited security parameters when connecting to AP
and will express some capabilities of the STA.

Bug: 24374083
Change-Id: I80abef812b272ce3384a13e7b3c44e56db4cffbd
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
001a98d838cf251ee4a39d1a3b1879639076f7b1 07-Oct-2015 Mitchell Wills <mwills@google.com> Remove old API implementations

All of these APIs were hidden and are no longer used by anyone. The scan
APIs are being replaced by the new WifiScanner API

Change-Id: Idae554c99ad9db6c37007d1ea066693713b71388
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
ac1f408138f092fe2a41cb5898163e05979c1cdd 13-Oct-2015 Wei Wang <weiwa@google.com> Fix center frequency parsing bug.

Bug:24881521

Change-Id: I2d4200c7f4ad03af2564fd3321205409cc2c8b84
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
851075f4f345d98de885bd2f6b833944b282097e 17-Jul-2015 Mitchell Wills <mwills@google.com> Fixed copy-paste typo in WifiNative

Change-Id: I97dd29ed17974b24edda024ba4312d9be793a3c5
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
ed34692d4c4e202748d41f90db397f1cc3dc8320 19-Sep-2015 Mitchell Wills <mwills@google.com> Make sure to cleanup rssi cmd before starting new one

Bug: 24196771
Change-Id: Ied140eac38452c4f914c188ff87c37182d79c5ff
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
9dc6bda43f0767a1ecb3f901d9be0f523e9463f1 06-Aug-2015 xinhe <xinhe@google.com> resolved conflicts for merge of ee0a0132 to mnc-dr-dev

Change-Id: I61046edb56b9b54a759e4964762fa7b01d4eaba1
ee0a0132ebb0d7e9baf42e778ea9c094966ffb14 04-Aug-2015 xinhe <xinhe@google.com> WiFi tethering AP says I can't use 5g in this country while in the US

b/22871989

Change-Id: I63c458c7353ecf84aa716118924364bb8f0f2844
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
0cc09187b578a328f945cd58f0c030c4b713d37e 05-Aug-2015 xin He <xinhe@google.com> am 69a99c03: Merge "Boot loop when SSID has non UTF-8 character in the name" into mnc-dev

* commit '69a99c03a9c78a507266c18443dc044a7b3e7869':
Boot loop when SSID has non UTF-8 character in the name
5cfd8d8b9f241dcad874125a1b5538ee0d6860fe 29-Jul-2015 xinhe <xinhe@google.com> Boot loop when SSID has non UTF-8 character in the name

b/22773761

Change-Id: I24e1579ff1aafde703d2090f93399fd5f299a75a
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
bc75cd2de4583eabd5efa2e090796ae570a31dc6 28-Jul-2015 Vinit Deshpande <vinitd@google.com> am a142187a: Merge "Fix a race in WifiNative objects" into mnc-dev

* commit 'a142187a4cd133a193675caf419ea25423eeab85':
Fix a race in WifiNative objects
8c640956f308202f9cdcc3c2a313f1d69e9e118d 23-Jul-2015 xin He <xinhe@google.com> am fbd35be2: Merge "Restart loop on MRA16G: Abort message:" into mnc-dev

* commit 'fbd35be2ee76cb2f8090f563c8f2666ce0dee607':
Restart loop on MRA16G: Abort message:
b577f391af2c484e443c19b3df1d62cc0924692a 23-Jul-2015 Vinit Deshpande <vinitd@google.com> Fix a race in WifiNative objects

disconnectFromSupplicant doesn't have any synchronization;
so it can cause problems when WifiStateMachine is disconnecting
and P2p statemachine is sending commands.

Bug: 22667667
Change-Id: I92e6ee44618813341e171f84442791a6403a5010
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
127f7244183786e6ccae09e81eeccdac31973e69 23-Jul-2015 xinhe <xinhe@google.com> Restart loop on MRA16G: Abort message:

'art/runtime/thread.cc:1320] No pending exception
expected: java.lang.ArrayIndexOutOfBoundsException

b/22591534

Change-Id: Ib8380b38fae8c3b0cb1e8980d397c9bfc98c9b81
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
aed5cb65d8eefb2eee56a29e33ac3cd8b03312e7 10-Jul-2015 Prerepa Viswanadham <dham@google.com> RSSI monitoring in Wifi state machine

Bug: 21405941
Change-Id: I016a073da3bcff9e9f878e1c6eb87bcaa233ef84
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
3bd22cebc41ed0786d0e7bd2970a634a8bb0093e 10-Jul-2015 Prerepa Viswanadham <dham@google.com> Fix code review comments in WiFi offload
CL f7fe4b25bf294f808b99b1e1f25e8a7a62817ef7

Change-Id: I5f0468cf7c84a5031fb86631c27e71c202f4f843
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
c55e88163b223db0ca6a99ed6ffe91845c30a576 02-Jul-2015 Prerepa Viswanadham <dham@google.com> WiFi keep alive offloading service implementation

Bug: 21405946
Change-Id: If7fe4b25bf294f808b99b1e1f25e8a7a62817ef7
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
af5b49884f189bb171c9dc6c6a4405d97e7912ac 16-Jul-2015 Vinit Deshpande <vinitd@google.com> Synchronize getScanCapabilities() with other commands

This is required to ensure that only one HAL command is
issued at a time by the framework.

Bug: 22480212
Change-Id: Iaf4bf7cf4c34f8804bf4522e96cb7a1903f41cf3
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
b797893fc1966803d0c013faac42e6396a37a384 26-Jun-2015 xinhe <xinhe@google.com> Use wifi_reset_log_handler to stop logging

b/22098062

Change-Id: I6bc701ba81a9dad323403a39e3cb385153d2ed88
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
6414301b7b685307e8ae8cea6976ed05cc49b254 25-Jun-2015 Vinit Deshpande <vinitd@google.com> Re-enable Driver/Firmware based logs

Change-Id: If2c929a1156d936ac1a17681d1f171ae1f9dd1bf
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
cd08c5daab08121d7f4ffc211ce477a412247bc4 23-Jun-2015 Vinit Deshpande <vinitd@google.com> Merge "Address API review comments" into mnc-dev
71d0be16c79791a005d60f9d5fa7d2d81e1f8c80 19-Jun-2015 xinhe <xinhe@google.com> fix SoftAP start failure on deb device

This is due to there is no HAL for razor and start softAp
codes need HAL API support

b/21869900
Change-Id: Ibd82dede184dc2fc80aa26961014dc68d837eff8
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
d9f37b2f3df18e96246db93ec4c2a5159b5d3915 13-Jun-2015 Vinit Deshpande <vinitd@google.com> Address API review comments

Added a flags field in ScanResult; along with flag
values and methods to read them.

Changed types of passpoint related fields.

Bug: 21342042

Change-Id: I413960de88b387853d11b9e10f92665e9c06a81b
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
c97b98d6877f6603a6a0eee820576f59e7da5e52 18-Jun-2015 Pierre Vandwalle <vandwalle@google.com> dont optimize the pno set/clear commands since framework and driver can get out of sync
Bug:21734054

Change-Id: Ib9646bb871a6cccba6cf77715d7c47b3e0b4b9c1
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
d745a52dc4f929d4a4030f205ed173bdf60eaf10 12-Jun-2015 Pierre Vandwalle <vandwalle@google.com> call setWifiLinkLayerStats
Bug:21617639

Change-Id: Idf7d066a20b96ed1e39cdd164b7159d5843c2f99
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
a6777abfc90496801e9942f57fbfa091ba85ae82 11-Jun-2015 Prerepa Viswanadham <dham@google.com> Don't log PSK or password in to bugreport

Bug: 21576757
Change-Id: If74ece7cc541075bee46cf8b80765bd0ac2d367c
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
e0f45adde26bd4d238ff157e6769650a99dc5261 05-Jun-2015 Vinit Deshpande <vinitd@google.com> am 70b75cd..09f267b from mirror-m-wireless-internal-release

09f267b prevent false wifi roaming signal Bug:21617059
0bf150b Enable ring buffer logging and auto-logging of failures
550ae08 Merge "fix overflow bug in WifiManager reportActivityInfo Bug:20232188" into m-wireless-dev
7ab5189 Merge "Make autojoin parameters configurable" into m-wireless-dev
7ff782a Make autojoin parameters configurable
f49a59b Issue start/stop HAL along with load/unload driver
c5cdba4fa88dd5653be476377ad97665fe2d4872 04-Jun-2015 Vinit Deshpande <vinitd@google.com> Remove trivial GScan logs

These helped once; but now this is just noise. Also
given that GMSCore starts/stops scans many times it is
taking too much of log real estate.

Bug: 20416721

Change-Id: I965ed919afbac56e123e8d019be84d7d33abf3f9
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
0bf150b2d69ec62df905bc6f8603437dc4caee1f 01-Jun-2015 Vinit Deshpande <vinitd@google.com> Enable ring buffer logging and auto-logging of failures

This change extracts ring buffer data from firmware; and
automatically logs driver/firmware logs when any failure
is detected.

Change-Id: I20c8cc00e8ac1d1b4f35da6d309e972cd8ea5d19
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
f49a59bda006b13e0118d144e0a4a5f569b2251e 27-May-2015 Vinit Deshpande <vinitd@google.com> Issue start/stop HAL along with load/unload driver

This ensures that HAL is enabled when driver is loaded; and
HAL is torn down when driver is unloaded.

Change-Id: Ia7a3e0a485a37b137750040aaecde7cb92eb59e4
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
6f3626faf50499dd95aa299bb1011c27ab05776d 29-May-2015 Pierre Vandwalle <vandwalle@google.com> dont use wifiscanner pauseScan/restartScan

Change-Id: Ie73fafdde61a9ff218bf6a96e5f3741f98706fad
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
a63da8065016c21cdc59c3055ce23c1de0e356da 23-May-2015 Navtej Singh Mann <navtejsingh@google.com> fix handling of command for bssid hot list

making sure to remove the command from memory
bug: 21169620

Change-Id: If5b39d2b1a16e4cf1ce0eb7cb5e5215f004c3ddb
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
04d29dfffd4c64bc0eb3f109269c1ad2bde6e363 19-May-2015 Vinit Deshpande <vinitd@google.com> Interpret scan-failed event from wpa_supplicant [DO NOT MERGE]

(cherry-picked from 9057c94158c31e040583617bbce19313adf2e58d)

Scans can fail if there are other scans going on in the
firmware. We can only find out about such failures from
supplicant (it prints out a failure event).

Bug: 20192693

Change-Id: I03fe60bb569430c041258c3a4ab8da2d6b5e9ff2
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
b66b29a00da970ee75052e24f592c8d6c16bd0ed 19-May-2015 xinhe <xinhe@google.com> turn off WifiNative DBG

Change-Id: Ic1fd2879bad202a022dcfc3d4ed707228ebc1eb0
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
98dca3397c0049d3cfb9c97e2b021c5ee3a2e1bd 19-May-2015 xinhe <xinhe@google.com> FW memory dump should be compressed

Bug:21271572
Change-Id: Icfcdcc3551c7a83fbd4903fd551dae38498d66ce
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
5caa43b34e0445ff08bff5931b84ffbc850b2a66 16-May-2015 Pierre Vandwalle <vandwalle@google.com> add ssid white list for roam offload

Change-Id: I9fad659cc6527a271251c7403852dc87ef460207
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
9ccffbb6c3fe8eaa7d70cc3076d0dc3c6a9073e7 16-May-2015 Pierre Vandwalle <vandwalle@google.com> add BSSID blacklist to autojoin/roam offload

Change-Id: I7eced80f7406de44e96bebc9a3ac3dc648a23eef
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
d7cbebf7fa9081e294ecab38cfe82709f381e1c9 11-May-2015 Vinit Deshpande <vinitd@google.com> Reduce WifiScanner logs

This change saves debug logs in log buffer; and only
dumps error/warning logs.

Bug: 20416721

Change-Id: I2a658194c45092abe490880224ead76f9297961c
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
f75cae779514830d18a3e69e03e5e4c6aa14d0b9 09-May-2015 xinhe <xinhe@google.com> Unable to turn on Portable WiFi hotspot for 5GHz band[DO NOT MERGE]

Bug:19857413
Change-Id: Ic15c5e643c2c1ed1cafab6809126555ff4a4cc56
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
31ecd2686c8c25987a062b071378f7a78c7bfe98 24-Apr-2015 Vinit Deshpande <vinitd@google.com> Fix more logspam from HAL and WifiStateMachine [DO NOT MERGE]

(cherry-picked from e73629f79c8bd59f0f0857a5101160a4d93b1190)

This change also fixes multiple HAL listening threads
and few more logs from WifiScanner

Bug: 20416721

Change-Id: I58f9940d57b27752287e594ecca394c206eb060f
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
d4c25fd76644d5490700ae69fada4669de5193a1 17-Apr-2015 Pierre Vandwalle <vandwalle@google.com> 5GHz roam configuration

Change-Id: I34a59b6de90bda5198e42c3ecf24e978efc73c93
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
03ba4a5b108ab2bbdb5d0e7be46ac45c00a6d9ff 28-Apr-2015 xinhe <xinhe@google.com> Initial bring up for debug framework

Change-Id: I0e78897d1440f0b7c56740ff7890e2f3d6a0d951
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
d57f630f6a7a5fca872d2b96fc4cce1905daee5d 15-Apr-2015 xinhe <xinhe@google.com> TDLS enhancement HAL interface update

Bug:15152152
Change-Id: I6ef4924f8db85244723cdee89166811f058fd675
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
f95649f33db0a328cb4c0bb5e10c7075e6c828f8 22-Apr-2015 xinhe <xinhe@google.com> listenning key error on RTT

Bug:20309046
Change-Id: Id0a0ee57b549984118e3e64530e2c29c87caaed7
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
d6307b404302949f6dadd14fa0860ff1aec432dc 17-Apr-2015 xinhe <xinhe@google.com> HAL crash due to debug

Bug:20299517
Change-Id: Idb60c797f620ef58fdd893d9afbe54355449760f
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
dd490cf1df37b70a8625dc4ec8e712f740dd1e4a 21-Mar-2015 Pierre Vandwalle <vandwalle@google.com> epno initial implementation

Change-Id: I47ede001aa22089bab099072810d648999104091
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
f97140d51d14ce0659d381f443c08dbd94dfea28 12-Nov-2014 Honore Tricot <honorex.tricot@intel.com> WIFI: EAP-AKA End-To-End

- Decode UMTS-AUTH form of CTRL-REQ-SIM request
- manage UMTS authentication
- cleanup useless code
- make Native API simAuthResponse usable for both
EAP-SIM and EAP-AKA

Change-Id: Ie24c59d87ba2e6a17a0da25fa3d58803aab423f9
Signed-off-by: Honore Tricot <honorex.tricot@intel.com>
Signed-off-by: Abdelmajid MLAYEH <abdelmajidx.mlayeh@intel.com>
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
ad607d99c372160c7d4b38e755e1b47d6419856e 07-Nov-2014 Honore Tricot <honorex.tricot@intel.com> EAP-SIM: handle dynamic identity request [DO NOT MERGE]

Manage the identity creation based on IMSI and 3gpp realm

Change-Id: I4e9c9e23886729592af941d11c798f2583444925
Signed-off-by: Honore Tricot <honorex.tricot@intel.com>
Signed-off-by: Abdelmajid MLAYEH <abdelmajidx.mlayeh@intel.com>
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
939177ff615062ec826601d536466875d8457375 23-Mar-2015 xinhe <xinhe@google.com> add Framework for set country code through HAL

Bug:19896389
Change-Id: Idc92e11b75db71ab6b9bc7ee54889bd41c68b9ce
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
0047ccf563baa288777e06c6fe95d3681fcf5ccd 18-Mar-2015 Vinit Deshpande <vinitd@google.com> More bug fixes to enable passpoint

Change-Id: Icbf65a731c93deecc49178f9628b1ee3a9c91a00
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
7d6301ead19afdf3de37455e9ed133c25b4938cd 19-Mar-2015 Vinit Deshpande <vinitd@google.com> Fix a runtime crash introduced by incorrect JNI mapping

Change-Id: Ie37d8a8788e8bdc3a5f52b2ff58be3506943bf9d
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
a0d34d3626bd9631039a485d2d428b1b7de390e2 19-Mar-2015 Pierre Vandwalle <vandwalle@google.com> initial logger stuff

Change-Id: Ie08d4184efe40c91969914ce84a1a6f1d255ec21
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
12cf388ecf3b2aa5ba66ed680b931fa356ab75b5 13-Mar-2015 xinhe <xinhe@google.com> Change rtt Framework interface

Bug:19735392
Change-Id: Ie64e4609c9804c904836bb37255d4efe9211f39f
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
243931f3474f6235cfcf5c1a55fa2f192ee264ae 02-Mar-2015 xinhe <xinhe@google.com> add 2 side RTT support on scan

Bug:19533713
Change-Id: I3076cba3c7c7d5f234caa7e35ab96dd3f7471aa2
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
77f2b82a2e80af8da52c22d69a76def6d4209757 14-Feb-2015 Jan Nordqvist <jannq@google.com> Integrate passpoint with existing Wifi infrastructure

This change hooks passpoint with rest of the wifi infrastructure.

It includes changes related to passing ANQP and other passpoint
information along with scan results and various fixes to parsing
and selection logic.

Change-Id: Id15ef1aea65dedab3e8e3df0c8a7515974c94021
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
d4762401ec14be6bdd2d27aff2478ddbf8d6ce2a 12-Aug-2014 Vinit Deshpande <vinitd@google.com> Introduce onLost event on bssid hotlist [DO NOT MERGE]

Change-Id: I84c3174398fea9a1456fb007586c2c559dd3fe4d
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
b830d76fbf5fa4077531b516066faa2fdbb92e81 12-Feb-2015 xinhe <xinhe@google.com> Unable to see Tethering/portable Hotspot SSID

Bug:19335638
Change-Id: I4b889841b341d3d9b24faab8bc5dd18b508070cd
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
826282265badbd85c5386573fbced1755696fe83 05-Feb-2015 xinhe <xinhe@google.com> get channel list from driver for SoftAP channel selection

Instead of hard coding the available channel list, we should
get channel list from driver

Bug:19237543
Change-Id: Ibe1fbbdc39a6cf69a0b36cfb9c6b63025d0b914d
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
0465ff513cdccf7e883a505e14c5b78758e7e458 13-Oct-2014 Vinit Deshpande <vinitd@google.com> Enable DFS

Change-Id: I4a9bc8d6587063388ee763fe31e669cddcad24d0
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
03cdd624f5da6d62cb731304aa7505921566f69d 08-Jan-2015 Dmitry Shmidt <dimitrysh@google.com> wifi: Use 'set setband' instead of private 'driver setband' [DO NOT MERGE]

Bug: 18936523

Change-Id: Idb12feb5d7dc925f63de4ab57391f5cdd35b8719
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
83a674a18c84ff4f01377bbfd8988699dec93bc2 31-Oct-2014 Vinit Deshpande <vinitd@google.com> New Additions to WifiScanner APIs [DO NOT MERGE]

Added single shot scan, and maxScansToCache. Also fixed getScanResults()
to report scan results to listeners.

Bug: 18087596
Bug: 17694040
Bug: 18059273

Change-Id: Id623ab9ee2ab89c86a35082279331fa609016347
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
e3939cb40d9ba3842be105a6e85172dc06e14758 02-Dec-2014 Vinit Deshpande <vinitd@google.com> Read all networks despite message limit of 4096 bytes

This change uses list_network last_id=x form of list_networks to
retrieve all networks saved in the system.

Bug: 18566264
Change-Id: Ie439acd98d39ca32417418944035dcce3068d44b
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
fb29a19d6401f75c72be6bacd9171fc974e3b07d 15-Nov-2014 Vinit Deshpande <vinitd@google.com> Merge "Fix a crash in parsing beacon IEs" into lmp-mr1-dev
cce360ad854cabb238ba0d9290785c26e837749c 12-Nov-2014 Vinit Deshpande <vinitd@google.com> Handle bad WifiHAL implementation

wifi_initialize() may succeed even without any wlan. This crashes
the framework. This change handles such inconsistencies.

Bug: 18337642
Change-Id: I578e0d92ea6b981a1d61469a0f4e870d87843107
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
e7b9e74a9a699e74881e5c98c684567763dfaa35 15-Oct-2014 Vinit Deshpande <vinitd@google.com> Fix a crash in parsing beacon IEs

Sometimes they aren't correct; but we shouldn't crash the system for it

Bug: 17549369
Change-Id: Idafde6a8f86b63ef157e8dbf0937cd796bee476f
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
a5283c01ac413e378e2261050cac3a6d6e9cf385 11-Oct-2014 vandwalle <vandwalle@google.com> reenable networks completely, 5 mins after DHCP failure blacklist; revert aggressive wifi to cellular handover when handing over due to link speed
Bug:17949093
Bug:17947372
Bug:17897698

Change-Id: I1d398238022fd380952cb8dc28f47cc38d0b7b06

Conflicts:
service/java/com/android/server/wifi/WifiStateMachine.java
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
e0aa0a004d161173992a0e9af1b431fae91f4a71 19-Sep-2014 vandwalle <vandwalle@google.com> - better sanity check on psk for linking config
- black list BSSID in case of repeated DHCP failures
- black list network with noInternet connectivity from autojoin
- clean up Disconnecting state transition
Bug:17512891
Bug:17395269
Bug:16480230
Bug:17518367
Bug:17545859

Change-Id: I1683a66fd58424ad2177c6508b101fd49392e22a
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
27f4b0c6ea9533e91863da48cefc80f8b5a88d1e 20-Sep-2014 Vinit Deshpande <vinitd@google.com> Synchronize access to supplicant from p2pGetDeviceAddress

Since it is not calling the native command directly, it needs to
be synchronized just like other commands.

Bug: 17516271
Change-Id: I97ecbc7dc0f476ae52524d513e47c863e6d5ddba
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
7b581f46f6c9bc6edf0edd287d47106712fb2144 17-Sep-2014 vandwalle <vandwalle@google.com> various fixes:

- additional debug logs
- allow a scan result to be associated to mulitple wifi configurations
- additional logs to track 17516271
Bug:17510471

Change-Id: I39975f17494c541989f7f0e0fd8fcf890934ee15
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
99d385e3b4d34841d6efcfd7cc9bf1d5ae25de14 16-Sep-2014 vandwalle <vandwalle@google.com> set proper link quality thresholds

Bug:17514073

Change-Id: Icf4dbd81e8547bb837c8346c9af5cfc98d7b00ab
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
efa77c1826499b0a3e57998bd6b3073b107e45d7 06-Sep-2014 Vinit Deshpande <vinitd@google.com> Implement getAvailableChannels

This API allows finding channels by band, so scanning services
can find out which channels to use.

Bug: 16652660
Change-Id: I690825333988a336efa3fc8886297e5b8baf8e1d
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
fdde6bf4dc075b4f2807a4940edc2be694b326b6 26-Aug-2014 vandwalle <vandwalle@google.com> Merge "add radio stats to link layer" into lmp-dev
200e8ee5097134010a6edee8d031bb02ff7eeb5a 19-Jul-2014 vandwalle <vandwalle@google.com> add radio stats to link layer

This CL is dependent on I3d2a230b0362520b9f1b2bc3792260116971e106

Change-Id: If7e73ae9813ea79a98744d7f0096316d241998fd

halutil updates for link layer statistics

Change-Id: I00ea13b1a932f40891a0d65026a1c87f01f09587
Signed-off-by: Chilam Ng <chilam@broadcom.com>
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
042c54bfd5144ce8e720585b2093796e7e28de5e 21-Aug-2014 Vinit Deshpande <vinitd@google.com> Set scanning mac OUI for mac address rotation

This change enables mac address rotation feature if it is
implemented. The OUI being set is Google's OUI; which should
prevent from scanning mac addresses colliding with infra mac
addresses.

This change also stops from linking to Qualcomm's and Marvell's
WifiHAL implementation - since none of the new features are
expected to work with this HAL

Change-Id: I50979a8b20c59f5d40007eb4e0ff945e529cbb49
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
88d6ab0af06fa595a7c9b3abc69f1f8b5f18e9cf 22-Aug-2014 Vinit Deshpande <vinitd@google.com> Merge "Fix a bug in setting external_sim flag" into lmp-dev
4d701eca56d62586b0ab8af6ad864bac74a1dcd0 22-Aug-2014 Vinit Deshpande <vinitd@google.com> Fix a bug in setting external_sim flag

It looks like supplicant doesn't like the lowercase
command, it needs uppercase.

Bug: 17176844

Change-Id: If8515f522384cb8ed98bb78c0d50ffc0f383c9ed
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
56d0178183460eed9afbd85e5c0d215e27d5f5bc 21-Aug-2014 vandwalle <vandwalle@google.com> fix spurious disconnect while associating, dont set AP configuration with NULL SSID

Bug:14568953
Bug:17144830

Note: this CL address cases where framework sends spurious disconnect to driver while associating, this issue was only one of the root cause of 17144830, the remaining issues in this bug are "missing scan results" and "wifi chipset disconnects from AP due to missing beacons or receiving deauth from AP"

Change-Id: If888f11bb3c66b55ca8ff991651f9e4457aaea31
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
dbd6933aae99302b75683f8463cd17df554dc599 14-Aug-2014 Vinit Deshpande <vinitd@google.com> EAP-SIM End-To-End

This change fixes all remaining issues with EAP-SIM. It now handles
multiple challenges coming from supplicant and corrects supplicant
command syntax.

Change-Id: Idc47b454863aa1990d4f53138f00f312622792d2
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
33b575ca6bee66183929f9474b5a161432918604 09-Aug-2014 Vinit Deshpande <vinitd@google.com> EAP-SIM End-to-end

Change-Id: I9478e6a492c469d57bb020b8f858e523ea6a92d1
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
c35361d54d4885c3174499e4ad46d3324387a9bb 08-Aug-2014 Vinit Deshpande <vinitd@google.com> Workaround RTT supported bug

Support for Device to AP rtt should be advertised in
wifi_get_supported_feature_set(). It is not there yet, using
a hardcoded value for now.

Bug: 16854821
Change-Id: Ib468939dc03d91d3f2848fd7ad2f6cbf6013684e
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
1814928371a30b11af31e2bbe5210c4337ed16f3 06-Aug-2014 Vinit Deshpande <vinitd@google.com> Fix multiple null pointer exceptions in WifiScanningService

Couple can happen because of race conditions and one is happening becuase
of driver failure; which will be addressed separately.

Bug: 16706416
Bug: 16732450
Bug: 16791198

Change-Id: I983cd5fd4077273802a9ad65f76d3c31452e9ebc
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
b7cc309f06da8a18224057c21ba086f8550367d6 31-Jul-2014 Vinit Deshpande <vinitd@google.com> Rename HotspotListener to BssidListener

And other usage of term Hotspot. This is to be technically correct
with the name usage, should the API become public later.

This change also fixes few outstanding requests from GScan API.These
include

a. An event with scan results when REPORT_AFTER_EACH_SCAN is set.
b. ScanSettings now takes in number of APs as an argument.

Bug: 16633917
Bug: 16631524

Change-Id: Id160f9f14193a37cce5f3ab8d6ea528344b788a0
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
02a1f98f2cecb8ae2d466d6f9fab06b473f970dd 26-Jul-2014 Vinit Deshpande <vinitd@google.com> Enable RTT End-to-end

This change includes various fixes to first RTT implementation and
enables RTT APIs end-to-end. Fixes include proper marshalling of
objects across API and service and JNI fixes.

This change also includes fix for another WifiNative bug that causes
crash on startup.

Bug: 15841411


Change-Id: Ie4ba1ffc6c5b42593e931438b3f03e201ff6be71
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
143657392bf0702a155fe688171a5abbf4c86570 01-Jul-2014 Vinit Deshpande <vinitd@google.com> Introduce RTT Manager

Change-Id: Ic9a16d587897b272f85cdb2b8c52b51bca060d18
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
a632d8a6edd350c7644b593b18eceaa5b368505b 01-Jul-2014 Vinit Deshpande <vinitd@google.com> Introduce Wifi Adapters

This change extracts all the wifi interfaces on the device; and provides
its supported features.

Change-Id: I7fbdbec684d653a6e4bf851797e3065ce222e873
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
40ff222cec1bd05879edb53abc75c6deead734ca 01-Jul-2014 vandwalle <vandwalle@google.com> handle IDENTITY message and bssid blacklist

Bug:15990551
Bug:15977507

Change-Id: I78b03915781bd6d5f9f5881c80324a2788b9e837
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
5c08cc119b92af69997af194cc8b6d0111e37d31 07-Feb-2014 Andres Morales <anmorales@google.com> piping commands for handover from supplicant

supplicant exposes methods to retrieve handover
protocol messages. need to pipe these up to NfcService.

Change-Id: I2696ed4b0ccbaa47a75a303315f554965c5c9dd4
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
36286b23c4e30f042ed753a670c2b462ebf13a48 17-Jun-2014 Vinit Deshpande <vinitd@google.com> Fix p2pGetDeviceAddress to work without p2p0 interface

Since there are devices that don't have this interface, we can't risk
failing P2p service initialization for it. This change works around
that problem by issuing STATUS request without targetting it to any
interface. Supplicant seems to be providing the correct MAC address
anyway.

Bug: 10364703
Change-Id: I2318ecc294f665dd4ea5c912e89db73d49b81a7f
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
daac2ad767f6047409987bb22812ab5f295e54df 02-Jun-2014 Vinit Deshpande <vinitd@google.com> Various WifiScanner fixes

Bug: 14960689 - WifiScanner does not clean up well
Bug: 15314698 - Scan stop working after multiple start/stops
Bug: 15017916 - null exception when Wifi is not enabled

Change-Id: I70712f3c032580341470f70b8be376e0098ec6ac
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
27355a942653264388e909a4276196ee63e57811 03-Jun-2014 vandwalle <vandwalle@google.com> remember and report network score

Change-Id: Ie54afe724a3618ec3fd557850dbbbb8bbae49ecc
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
ad7319939c424d42fa6a3791c47f613db8ef3cd8 31-May-2014 vandwalle <vandwalle@google.com> Add supplicant debug information
476bee2fef10d060c25c35858b1f7f60803d9f49 29-May-2014 Vinit Deshpande <vinitd@google.com> Accomoditing API Review feedback for WifiScanner

Main changes include

- hiding the API for LMP preview
- moved information elements to ScanResult object
- removed objects from events
- changed API names to be more consistent

cherry-picked from partner:klp-wireless-dev
SHA1 c43626f8e71455af01d8cc1131746d2a53fa688f

Bug: 15191968
Change-Id: Ibe3907366aee85f7d56021a536ae0f9f9fb28b38
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
b0b1d59786de7ff1fc98e31a16a7d710458bf549 30-May-2014 Vinit Deshpande <vinitd@google.com> Fix the stopping of scan after Wifi connection

We have code that stops kitkat batch scan while we get a new IP address
via DHCP; this exists because ARP multicast packets may be lost if the
wifi radio is off channel for scanning.

We need to do something similar for GScan as well - to avoid getting in
the same problem. This change accomplishes that.

This change also makes all HAL methods static, getting WifiNative closer
to the 'SupplicantManager' role.

cherry-picked from klp-wireless-dev
SHA1 8f343d40a55bc638872a3bb3453b95062bf838ef

Change-Id: Id2b500e37b71ea21a6bca162011abecbd41d90ec
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
21bc54cb37a0085b1c909cb4d55ebb12a2facefb 29-May-2014 vandwalle <vandwalle@google.com> dont send SSIDs to herrevad if it cannot process them

Bug:15306345

Change-Id: I149870631b875e10ad899e81aaaf65e5f0a1eb7a
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
0888ce6f90bdaeee799dd8361ea4781e23a33b87 24-May-2014 vandwalle <vandwalle@google.com> logs improvements, fix reading back networkHistory file

Change-Id: Iec4b11a3e0d8820b558abea6cc068a905199896d
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
ed9938883ae2dade81c8be6cd6ceaef3febd5239 22-May-2014 vandwalle <vandwalle@google.com> make verbose logging a wifimanager hidden API

bug: 151386707

Change-Id: Ide885ce96621fe4bab6abf10291bc8441eecad4a
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
aabe7a9f2f32915fd1f25416a6d2034a844005d6 10-May-2014 vandwalle <vandwalle@google.com> introducing link layer
cherry-picked from klp-wireless-dev-mirror
SHA1: eb8de645540caa6076c34854d8a4e7c22341783f
Change-Id: I5c736c697d38ec17dcde81bdee638048fd688073
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
f1daf9342b66bf134d13fa0a42e929a008f1ca62 14-May-2014 Vinit Deshapnde <vinitd@google.com> Enable more features on WifiScanner

This change enables full scan results and allows overriding wifichange
configuration. There are also minor API changes take relavent parameters.

Change-Id: I6ebcb49f64bd8bc9e5e0c88c3b56eb634783524e
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
741953368eafa247f2820496aaa521bc0e86e9e1 15-May-2014 Navtej Singh Mann <navtejsingh@google.com> Fix failed to start scan again without stop

Fix failed to start scan again without stop

Bug: 14991849

Change-Id: I86fb96912197c1a1926fc99504a2210e2df1898d
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
446db2d5457456743e4476029e14d7c3bb9f5bcc 10-Apr-2014 Yuhao Zheng <yuhaozheng@google.com> Hotspot 2.0 framework support -- inital implementation

Bug: 5485670
Change-Id: I48a63f5a45e0c217f5b73b4b3c45ea1acee76034
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
ecd2b88214b5d214fd1f63a9560caff9058912dd 16-May-2014 vandwalle <vandwalle@google.com> fix for devices using enableNetwork API

Change-Id: Idf886dd01892d3f7ca463a44fd76030ddadcd238
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
e4e3750390bec0a849a9153348b7c21b2cc8b843 05-May-2014 Vinit Deshapnde <vinitd@google.com> Initial implementation of WifiScanner

This change implements basic functionality of WifiScanner. Following
functionality is enabled

1. Scanning - specify a list of channels to scan
2. Significant change detection
3. AP hotlist

Change-Id: I4fbb2cccbb15df21aae7a81f5d9b17fde2bda8c0
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
7f9a15d554f69311a0db43347d6473a7c4c46e2e 08-May-2014 Vinit Deshapnde <vinitd@google.com> More HAL functionality

This change implements JNI plugs for delivering events to
WifiNative in framework. Also introduces a test utility.

Also has updated Gscan.h which is made up-to-date with the
promised functionatliy.

Change-Id: I12dd6d9f171e01e4b23ce4839b4022acd5e599cb

Conflicts:
service/Android.mk
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
f22d23092ab37286a5ef9d257d5bb32c421d2669 06-May-2014 vandwalle <vandwalle@google.com> autojoin initial implementation

Change-Id: Iea4e5c0b8e988e410d2f9885ecaf6317d34cc1d1
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
3c194cb908060978f65ae168ea0ed0606127b422 27-Mar-2014 Vinit Deshapnde <vinitd@google.com> Merge "Explicitly set update_config on supplicant"
fbba898cf24a6969eb36238edd0f9f879029cdbd 10-Mar-2014 Vinit Deshapnde <vinitd@google.com> Merge "Wifi HAL initial implementation"
0a696d168d7ad98ab5084d2a16e3d02c545a85aa 03-Mar-2014 Vinit Deshapnde <vinitd@google.com> Explicitly set update_config on supplicant

This is to ensure that supplicant always saves network information. It is
possible for this flag to be turned off because supplicant couldn't read
wpa_supplicant.conf; but we never want supplicant to not save new networks.

Bug: 13233891
Change-Id: Ia7273dd65d01c9786be2e7dedfb39d3abe9b56c2
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
7ef73dd1b6e43c72b3841723504cd86dc402a134 28-Feb-2014 Vinit Deshapnde <vinitd@google.com> Wifi HAL initial implementation

This change introduces Wifi HAL. It has basic structure that we can expect
most commands and events to follow. Only one command is implemented for
illustration.

Change-Id: I16e4b50f3034214e41ab5d363e2c3f543345609b
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
a0009d14075b5345b8f916c3fb3f2260c938cb9d 06-Feb-2014 Yuhao Zheng <yuhaozheng@google.com> Implement new API to scan a given channel set

Framework implementation for the new scan APIs. Besides implementing the API,
this CL does 2 additional changes:

1. Only count battery consumption if a scan request is accepted by supplicant,
i.e. it won't be counted if it's rejected due to another ongoing scan.

2. If a scan request is rejected, we may buffer the scan request and do it
later, to make sure the specified channels are eventually scanned. On the
other hand, we will try to combine scan requests to avoid repeated scans.
For example, a full scan serves all scan requests.

Bug: 12610436
Change-Id: Ia9edc58c7ddd7a535bfaa0f906f6faaaf5f5d439
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
3f7ef65ab71619040032aee96b5599849881d6fd 23-Jan-2014 Andres Morales <anmorales@google.com> piping supplicant commands for WPS token setup

Supplicant exposes a command for generating
NFC Wifi tokens as per the Wifi Simple Configuration
specification. This CL export this command to the
framework.

Change-Id: If34e6a71888bfb2b420048eed4fe373566835611
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
155b9d09ef9b8ead3ca617afdd91e74070d3f0cb 09-Jan-2014 Vinit Deshpande <vinitd@google.com> Revert "Revert "Move Wifi services to a new git project""

This reverts commit 862f81faba40e9af8fb80744a22e968a298e814e.

Change-Id: I7b15e266a5948749026e01a61d8581746cfd0f5f
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
862f81faba40e9af8fb80744a22e968a298e814e 08-Jan-2014 Vinit Deshpande <vinitd@google.com> Revert "Move Wifi services to a new git project"

This reverts commit a07c419913bfae2a896fbc29e8f269ee08c4d910.

Change-Id: I1cd35cea1594cdbeae800b9130bc6f885f238b28
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java
a07c419913bfae2a896fbc29e8f269ee08c4d910 18-Dec-2013 Vinit Deshapnde <vinitd@google.com> Move Wifi services to a new git project

Bug: 12175455
Change-Id: I1fa07e29c6a9aae38d9e334d519a9f2445d15613
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiNative.java