• Home
  • History
  • Annotate
  • only in /frameworks/opt/net/wifi/service/java/com/
History log of /frameworks/opt/net/wifi/service/java/com/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
218a96221c74bfe68967975c5f98167d8783f2e6 06-Oct-2017 Michael Plass <mplass@google.com> Metrics for connected wifi score

Note when switches of the default network would happen, based on score.

Increase MAX_STA_EVENTS by 50% to allow some headroom for the additional
StaEvent type.

(cherry picked from commit e6fb5b05c294b853f768caa93de509b4afa8adef)

Bug: 67429363
Bug: 71708302
Test: Unit tests
Test: Manually check dumpsys output

Change-Id: Id35695502966c96ce817322e1aa5b17f5522f5e4
Merged-In: I163d3831dd207d1dbb6d65f643f0f0418601b54b
(cherry picked from commit 929c521de00d91d269d2d4cad613904c76c366a1)
ndroid/server/wifi/WifiMetrics.java
9709abdc1183aa2fdbe373de61baf5b1bd81eb87 09-Oct-2017 Etan Cohen <etancohen@google.com> [PASSPOINT] Add metrics to determine deployment/avail of Passpoint

Add metrics which will help determine Passpoint availability in the
wild. The metrics measure the percentage of time a Passpoint network
is visible to user - by collecting historgrams of observations per
scan result.

(cherry-pick of commit 9831c1a04929d8d2cadbebbc1e6843895653bd4c)

Bug: 66951771
Test: unit test
Change-Id: I80af113f120515d86b2b6adb3e44ce37e97d5441
Merged-In: I51e05e9a075259544008107810c4489e8111cfcd
(cherry picked from commit 72ca252ebfb5d91b13627a5f95b89db7b6adc1e5)
ndroid/server/wifi/WifiMetrics.java
27eb79334960933cb82808a57c7c124baeb1390d 11-Oct-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Change self recovery log level from wtf to error" into oc-mr1-dev
aea1e2c5dc2325d2ac062bef1a7a5561ec488a7c 11-Oct-2017 Ningyuan Wang <nywang@google.com> Change self recovery log level from wtf to error

Reasons:
1. These recovery events are reported to metrics as well.
2. These recovery events are not severe and don't impact
user experiecne.
3. We usually can't get useful information from the wtf log
snippets.

Bug: 66996979
Test: compile, unit tests
Change-Id: I713a243927bf935aaf356289be42389f1ba0d5ea
ndroid/server/wifi/SelfRecovery.java
0a6b9c1199f91790606acc70c771548f079fa8f0 06-Oct-2017 Ningyuan Wang <nywang@google.com> Catch Exception on creating NetworkDetail

Bug: 67482129
Test: compile, unit tests
Change-Id: I8d6806f750a8002a0a568bb2b84d1f18ba833594
ndroid/server/wifi/WificondControl.java
87d7badd662aa84369b2b9893e990cb24197ad24 05-Oct-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Do not trigger scan for reconnect() when wifi is connected" into oc-mr1-dev
83e8a7ab59dc750f630bdd96a8e4773e4ca984ba 05-Oct-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Blame scan request from WifiManager.reconnect()" into oc-mr1-dev
98842059a66adb61a1f27fd56d92c80a77066e83 18-Sep-2017 Ningyuan Wang <nywang@google.com> Do not trigger scan for reconnect() when wifi is connected

According to the document of WifiManager.reconnect(), we only
try to connect when wifi is disconnected.
This CL adds the handling of CMD_RECONNECT in WifiStateMachine
for L2ConnectedState to avoid unnecessary scans and connection
attempts.
This also adds the handling of CMD_RECONNECT for WpsRunningState,
which just logs and ignores this command because in WpsRunningSate
we are attempting to connect and when we leave and head to disconnected
state, we will trigger a scan anyway.

Bug: 65839442
Test: compile, unit tests
Test:
1. Write a simple cts test case WifiManagerTest#testWifiReconnect
only calling WifiManager.reconnect()
2. Make sure wifi is connected
3. Run cts test using:
cts-tradefed run cts -m CtsNetTestCases -t
android.net.wifi.cts.WifiManagerTest#testWifiReconnect
4. Grab bugreport
5. Verify the following log appears:
"Ignore CMD_RECONNECT request because wifi is already connected"

Change-Id: I7aa7842653aa4eaf8d70946dc8e120d3814ffc09
ndroid/server/wifi/WifiStateMachine.java
470817b13e56d915805729ab4f51075f3fa2ec15 19-Sep-2017 Ningyuan Wang <nywang@google.com> Blame scan request from WifiManager.reconnect()

Bug: 65839442
Test: compile, unit tests
Test:
1. Write a simple cts test case WifiManagerTest#testWifiReconnect
only calling WifiManager.reconnect()
2. Make sure wifi is disconnected
3. Run cts test using:
cts-tradefed run cts -m CtsNetTestCases -t
android.net.wifi.cts.WifiManagerTest#testWifiReconnect
4. Grab bugreport
5. Verify the following logs appears:
forceConnectivityScan in request of WorkSource{...}

Change-Id: I7fa7803e90ba950c9331a55cb1268baef4ae02a8
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
db68688e4eeeeceb9ab1b3bc422f77458fba2f24 05-Oct-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "DO NOT MERGE Allow the USE_OPEN_WIFI_PACKAGE to access WifiInfo unfiltered." into oc-mr1-dev
70954f46ffb95cbf3d6c9d12495be20edf2b3530 05-Oct-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Allow connecting with no requests if we're already connected." into oc-mr1-dev
1982ffd9f5a9434623e1e6229df9d23c506e7491 18-Sep-2017 Jeremy Joslin <jjoslin@google.com> DO NOT MERGE Allow the USE_OPEN_WIFI_PACKAGE to access WifiInfo unfiltered.

Do not remove the SSID/BSSID from the WifiInfo in
getConnectionInfo() if the requester is:
* The Settings.Global.USE_OPEN_WIFI_PACKAGE
* The current user or has been granted INTERACT_ACROSS_USERS_FULL

This only applies when the device is connected to an open network.
In all other cases the SSID/BSSID will be removed unless the caller
has scan result access.

Bug: 65639900
Test: ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: Local testing with app.
Change-Id: I71eddca75a84945775be476f9ccaf1bb5c668fec
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/util/WifiPermissionsUtil.java
7ce813a6129ab0c0b812b27e332730a8a2165d43 04-Oct-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fail scan request if no channels are available" into oc-mr1-dev
9686c96d8d0c0bc21ca069e244e2570c169724e1 28-Sep-2017 Lorenzo Colitti <lorenzo@google.com> Allow connecting with no requests if we're already connected.

Currently, we drop all connection start attempts if we do not
have any NetworkRequests that we can fulfil. This can happen if
the default network has a score that's higher than our score
filter. The reason for this is that we don't want to connect a
new network if we're not already connected: if we did,
ConnectivityService would immediately request that the network be
torn down.

However, it does make sense to connect if we are already
connected, because that means that we ourselves are the
highest-scoring network - otherwise, ConnectivityService would
have torn us down. So, when deciding whether to process a
connection request, allow it if mNetworkAgent is non-null, even
if there are no NetworkRequests that we can fulfil.

In order to do this, move the check from startConnectToNetwork to
the code that processes CMD_START_CONNECT, because it's not safe
to access mNetworkAgent except from the handler thread. Moving
the check also seems more correct in general, because
the return value of hasConnectionRequests() could change between
when startConnectToNetwork is called and when the resulting
CMD_START_CONNECT is processed.

The connect requests are only allowed from the settings/sysui. We don't
allow any non-privileged apps to be able to override the user's decision
to stay connected to a network with no internet access (which causes the
mNetworkAgent.releaseNetworkFor()).

Bug: 65262556
Test: Unit tests for START_CONNECT handling for 4 scenarios:
a) START_CONNECT with the default network request.
b) START_CONNECT with no network request.
c) START_CONNECT with no network request, but already connected
d) START_CONNECT with no network request, but already connected, but
from non-privileged app.
Test: Settings can connect to a new network when wifi has a score of 100

Change-Id: Iad582b5109a81f238f335eaac3e7264c5da6e9b1
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiStateMachine.java
988256f6c383c2c6b24d295c2f2e7ce77ec9955f 04-Oct-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiConfigManager: Don't reset the userId on user stop" into oc-mr1-dev
9d7cf1434fc63dec2d63d5a9c7330c2fa37aefc5 30-Sep-2017 Roshan Pius <rpius@google.com> Merge changes I38c31645,Ib6f61b81 into oc-mr1-dev

* changes:
WifiStateMachine: Handle WifiManager.save() when wifi is off
NetworkListStoreData: Set creatorUid for all networks on load
dbaf29e09adbf2e44a598438fa8ad38f70c47b5b 29-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiMetrics: add methods to increment ONA metrics." into oc-mr1-dev
2f5d10a29d17781e903eeddedb4a547e62c55524 25-Sep-2017 Ningyuan Wang <nywang@google.com> Cherry-pick: Remove temporarily disabled networks from PNO list

This also adds corresponding unit tests.

Bug: 66910426
Test: compile, unit tests

Merged-In: I58f7061887ebc1dd78d3941218653460f80abb1f
Change-Id: I58f7061887ebc1dd78d3941218653460f80abb1f
ndroid/server/wifi/WifiConfigManager.java
a88242633e76bf3a070cfcc0a018ff7f9806f1f4 19-Sep-2017 Stephen Chen <stewchen@google.com> WifiMetrics: add methods to increment ONA metrics.

Tracks the number of notifications posted for each state of ONA, and the
number of user actions made for each notification type. Also tracks the
state of the feature setting, the size of the recommender blacklist,
recommendation update counts, and connection initiation failure counts.

Also adds additional debug logging.

Bug: 37501326
Bug: 66996715
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
and verify in dumpsys

Change-Id: Ia00ae95fbcf923ebae051ba82cd3174cfe11be31
ndroid/server/wifi/OpenNetworkNotifier.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiMetrics.java
e6b6ab66c49702d3358b4894d28e322ea9534a84 28-Sep-2017 Ningyuan Wang <nywang@google.com> Fail scan request if no channels are available

This fails scan request if no available channels could
be scanned for this request.
With this fix we can avoid the freezing of WifiScanner in
aformentioned case.

Bug: 67015387
Test: compile, unit test, integration test
Change-Id: I68654ce8d53104484c1559d8b0525585ab50b9e5
ndroid/server/wifi/scanner/WificondScannerImpl.java
d72ccc6880a1a624926b97417047d42a5aa182ef 27-Sep-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Don't reset the userId on user stop

Couple of fixes in user stop handling:
a) Only clear the network data belonging to the user that is stopped.
b) Don't reset the user Id on stop. It will be done in the user switch
handling.

Bug: 65939780
Test: Unit tests
Change-Id: Ia3ab033d893009cfd8019ee27d52a490a8040438
ndroid/server/wifi/WifiConfigManager.java
7cede48303b0faabb3b6861a1ac7229f76fca006 25-Sep-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Handle WifiManager.save() when wifi is off

Bug: 66909738
Test: Verified that you can save networks even when wifi is off using
ag/2930541.
Test: Unit tests
Change-Id: I38c316456e74ce5ad1ec43750b075f0999c28327
ndroid/server/wifi/WifiStateMachine.java
75dc8a494a00a37d19772220fdc639abc05ea3d0 27-Sep-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiStateMachine: check for null config after dhcp" into oc-mr1-dev
b73e0a91dcf3fa04cf07c2d096fb20c229d6cd28 15-Sep-2017 Roshan Pius <rpius@google.com> NetworkListStoreData: Set creatorUid for all networks on load

Some network configurations saved during N have the creatorUid set to -1.
(Not sure what was the root cause in N which introduced this issue in
saved networks)
Ensure that we set |creatorUid| for such networks with invalid uid to
SYSTEM_UID on loading. The networks with invalid creatorUid can
anyway only be modified only by settings/sysui (because they possess
NETWORK_SETTINGS permission).

Bug: 65623732
Test: Unit tests
Change-Id: Ib6f61b81e19877cdf0c42d29c9f5ae3869725517
ndroid/server/wifi/NetworkListStoreData.java
ndroid/server/wifi/WifiInjector.java
a32e2000025fb2df125c3d14c2fa55ddecd4b790 13-Sep-2017 Ningyuan Wang <nywang@google.com> Fix case for not reverting country code on cellular loss

This CL allows us to keep using last known country code
on cellular loss and |mRevertCountryCodeOnCellularLoss| is
set to false.

This also fixes simCardRemoved() to revert country code
unconditionally, and cleans up code for airplaneModeEnabled().

Bug: 65602314
Test: compile, unit tests
Change-Id: I7b15d9ae197c5e2aacd7788b505e386f970786ed
ndroid/server/wifi/WifiCountryCode.java
ee66ce102f8cf140394f71baea332eebb47ff4ae 12-Sep-2017 Ningyuan Wang <nywang@google.com> capture BR on wificond or HAL crashes

This allows us to save the most recent kernel logs
when wificond or hal crashes.
This saved log could help us debug underlying driver/kernel
issues.

Bug: 65550505
Bug: 64934608
Test: compile
Test: run frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually kill wificond and take bugreport
Find if there is a "Bug dump" section with "reason = 8"

Change-Id: Id9311cee34b3fc25400e804bd96795c7f28f537a
ndroid/server/wifi/WifiDiagnostics.java
ndroid/server/wifi/WifiStateMachine.java
bad0137ff3af9bb082382e57f0e2a4b5fbda6dbd 11-Sep-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Support multiple NAN data interfaces (NDI)" into oc-mr1-dev
f0653448fc27d0f73d58a3abf948ef38609331e4 08-Sep-2017 Stephen Chen <stewchen@google.com> Merge "ONA: Enable new UI and connection flow." into oc-mr1-dev
f0e94d946bdeb7c784a5c4a07b6d23de402958b3 08-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "ONA: Add connection related notifications." into oc-mr1-dev
e416f1b0ebc69d02147f72599fe41d5a045ca2d3 08-Sep-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: check for null config after dhcp

If a network config is removed while we are in the ObtainingIpState, we
will attempt to get the configured network from WifiConfigManager but it
will be null. As we move to the Connected state, this throws a NPE.
Instead of moving along to the Connected state, disconnect from the
network if we find out we have null for the current config. Also add an
additional null check where the NPE was thrown further down the line.

Bug: 65257934
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ibbce6491970de16cf5265b03398b50a7cdd50ba2
ndroid/server/wifi/WifiStateMachine.java
7fc4bd4bdbe70f4d1e7c471ba008c7c4f9f287e8 08-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "ONA: Implement connection attempt and failure callback." into oc-mr1-dev
b6103294dc1e6785c8ba236582e53801e1f9f2cd 08-Sep-2017 Stephen Chen <stewchen@google.com> ONA: Enable new UI and connection flow.

The new Open Network Available notification UI introduces a connection
flow in which users can connect to a recommended open network directly
by interacting with the notification. "Connect" and "See all" action
buttons are introduced to initiate the flow, and once a connection
attempt is made, the connection status will be reflected on the
notification.

Bug: 37357441
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I30231c4f71476a7417a3b423848575d5488f51f7
ndroid/server/wifi/ConnectToNetworkNotificationBuilder.java
ndroid/server/wifi/OpenNetworkNotifier.java
ndroid/server/wifi/WifiConnectivityManager.java
20361dcf2d45262685c8dec334c11f0b2c987702 05-Sep-2017 Stephen Chen <stewchen@google.com> ONA: Add connection related notifications.

This change introduces the new notifications but does not utilize them
to change the existing functionality yet. It also refactors the state
handling of the notifier to represent the new connection and
notification states.

When attempting to connect to a network, the notification will update
based on connection success and failures.

Bug: 37357441
Bug: 65257065
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I3cf188f7f0fac1ea7d1ec882c9473bdbaccccabd
ndroid/server/wifi/ConnectToNetworkNotificationBuilder.java
ndroid/server/wifi/OpenNetworkNotificationBuilder.java
ndroid/server/wifi/OpenNetworkNotifier.java
ndroid/server/wifi/WifiInjector.java
d0cafb20481fc76e546deb9d71626e79e320d440 08-Sep-2017 Roshan Pius <rpius@google.com> Merge "WifiConfigStore: Remove legacy modules" into oc-mr1-dev
d63732781d42d4401dff33c241b261c68cdb85e4 07-Sep-2017 Aleks Rozman <arozman@google.com> Handle a condition when the result of getting configured networks returns null am: 3abc7f0561 am: 3b17189719 am: 1e779938f2
am: fb9027f897

Change-Id: I2198545cb8000378e7350c9d2e580da74af2e3b9
fb9027f89709281b4c7c2573f86dcd28ceeaea35 07-Sep-2017 Aleks Rozman <arozman@google.com> Handle a condition when the result of getting configured networks returns null am: 3abc7f0561 am: 3b17189719
am: 1e779938f2

Change-Id: I29953e283339c00ddbfcfb6e23ef2c0690551285
1e779938f23cb1f26f028abcd3162694beb01dd0 07-Sep-2017 Aleks Rozman <arozman@google.com> Handle a condition when the result of getting configured networks returns null am: 3abc7f0561
am: 3b17189719

Change-Id: I6f2c96f8ef75e97e5df867a6122ee94b0060d0ad
3b1718971915fb7d486fa43d2888902a98f59bd1 07-Sep-2017 Aleks Rozman <arozman@google.com> Handle a condition when the result of getting configured networks returns null
am: 3abc7f0561

Change-Id: Icec60ffafda1366688fa3045d9be929f3cfb99cc
993059127ccaca9d2a323cbb796a8353c313a18d 07-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "ONA: Implement SSID blacklist handling for dismissed networks." into oc-mr1-dev
08ffa580f6756129929667785408da377b363787 25-Aug-2017 Stephen Chen <stewchen@google.com> ONA: Implement connection attempt and failure callback.

Bug: 37357441
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I2d531304598249dcb18bdc45492e48ee90ddff5f
ndroid/server/wifi/OpenNetworkNotifier.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
3abc7f056111caae01f0cd47f57798903bf7b054 04-Sep-2017 Aleks Rozman <arozman@google.com> Handle a condition when the result of getting configured networks returns null

Linked with ag/2842135

BUG:65267749
Change-Id: Idebc1b76f454640a2b493db9fb4bf263c0e448f5
ndroid/server/wifi/WifiStateMachine.java
a25953fc4fd640cebf57f1e33490a507af3c1db5 15-Aug-2017 Etan Cohen <etancohen@google.com> [AWARE] Support multiple NAN data interfaces (NDI)

Support all the NAN data-interfaces which the firmware supports -
based on the returned capability.

- Create the data-interfaces
- Assign data-paths to data-interfaces based on constraints of
unique [(src mac, dst mac), security config] tuples. I.e. a
single data-interface can only have a single security configuration
to a specific destination interface.

Bug: 63635857
Test: unit tests + integrated test suite
Change-Id: I4a21f3b025e8164673366e22da062d536d588148
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareNativeCallback.java
ndroid/server/wifi/aware/WifiAwareShellCommand.java
b280c399d7be7d04a245c5fc2d2897f0ddc9cc0a 09-Aug-2017 Stephen Chen <stewchen@google.com> ONA: Implement SSID blacklist handling for dismissed networks.

When ONA notifications are dismissed by the user, the recommended
network ssid is permanently blacklisted.

This change also removes the use of currentRecommendation in the
recommendation logic, because the extra stickiness is not neccesary due
to the slow scan rate that triggers a recommendation update.

Bug: 64091575
Bug: 37357441
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I27fc667ae51f9dbc4665ba9d15b18ed3e6daa058
ndroid/server/wifi/OpenNetworkNotifier.java
ndroid/server/wifi/OpenNetworkRecommender.java
ndroid/server/wifi/SsidSetStoreData.java
ndroid/server/wifi/WifiInjector.java
083b290298faaed46e3a175eb3f707a9c453d7f6 01-Sep-2017 Glen Kuhne <kuh@google.com> Merge "Add WallClockTime to StaEventList dumpsys" into oc-mr1-dev
b67a02500b56fb9f694382ee33fc50a3f12ccb0a 01-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Avoid NPEs when WifiNetworkAgent undefined." into oc-mr1-dev
a2dae3436431f3fe2ac79ad087fe62f6fcda8ad7 11-Aug-2017 Mehdi Alizadeh <mett@google.com> Adds definitions to collect wifi Pno metrics

Provide APIs from WifiMetrics to update PNO scan counters. Include these
metrics in dumpsys and update unit tests to verify deserialization of
newly added metrics.

Bug: 32842314
Test: Unit test and verify values in dumpsys
Change-Id: I536cd9081a8cfe70f044818e7febd08003ccc702
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WificondControl.java
7e7d6e549805108fb112b073b2af50ef42607b33 01-Sep-2017 Jeff Sharkey <jsharkey@android.com> Avoid NPEs when WifiNetworkAgent undefined.

Test: builds, boots
Bug: 65289840
Change-Id: I9d8ba18c1137d7679d4f4ea24f86a9747bef2ca7
ndroid/server/wifi/WifiStateMachine.java
d582c6dfdbb3989b8b761a6cba608a0a3ce35df2 30-Aug-2017 Glen Kuhne <kuh@google.com> Add WallClockTime to StaEventList dumpsys

Added wall clock timestamps into the StaEventList (previously only used
boot since milli time), to improve readability of the human readable
metrics dump. (Has no effect on the proto dump)

While I was here: Modified the human readable StaEventList dump to print
each event on a single line.

Bug: 63537531
Test: Verified manually with 'adb shell dumpsys wifi'
Change-Id: I3793844a012ec329921f6f457e72b7596ad87f4d
ndroid/server/wifi/WifiMetrics.java
a83bd15861ae7175b1f62bc2dc8de63e0dbe808e 31-Aug-2017 Roshan Pius <rpius@google.com> WifiConfigStore: Remove legacy modules

These modules were used to migrate store data out of the old store
files. Now that O is released, these classes are unused so cleaning up
dead code.

Bug: 31041781
Test: Unit test passes.
Test: Flashed a device and ensured that none of the saved networks are
lost.

Change-Id: Ib6936cace3c72408ba4be2e33226737228159a48
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStoreLegacy.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNetworkHistory.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/LegacyPasspointConfigParser.java
d2c7a6041bbdf91d3cedbcb16ca06d37f449d95a 31-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix scan result age on log dumping" into oc-mr1-dev
eb3dfcbab191efe0532294b75a5e2ce6837ce1c9 31-Aug-2017 Jeff Sharkey <jsharkey@android.com> Meteredness should reflect user opinion.

While cleaning up the original meteredness refactoring CL, I must
have dropped the usage of WifiConfiguration.isMetered() which blends
together all the various options to decide if a network should be
treated as metered or not. Fix that bug.

Also update the capabilities whenever a configuration is updated,
since the user (or tests) may have just changed their meteredness
opinion.

Test: cts-tradefed run commandAndExit cts-dev -m CtsHostsideNetworkTests
Bug: 64274313
Change-Id: I6b4df07b6222810f7b3790a5c2f1685dfe3535c9
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiStateMachine.java
f77fca37902331575d779df9754566db471db85f 26-Aug-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: use context to check network settings" into oc-mr1-dev
b7072d6c59ff67573155a0abb3a13c554dc80fa3 25-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "ScanDetailCache cleanup" into oc-mr1-dev
74a518bca1f2818f20e0b93d68d395fd77e43ecc 24-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Defer requests received while terminating an NDP" into oc-mr1-dev
049cbc49e0dfda9c12f21d8a8b5a22eddf4e1495 11-Aug-2017 Etan Cohen <etancohen@google.com> [AWARE] Defer requests received while terminating an NDP

Defer requests received while an identical (canonically)
requests is being terminated (i.e. a termination was issued
but confirmation of termination not yet received).

In such a case the request is now rejected but a flag is set which
when (any) termination confirmation is received tickles the
connectivity service to re-evaluate the requests.

Bug: 63866251
Test: unit tests and integration tests
Change-Id: I77f8fd2c8444fb50aa05c356645216622f282677
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
4faa2de343ff7ef3deb2f313cd60365d9a487f03 18-Aug-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: use context to check network settings

Instead of using the ActivityManager to check the NETWORK_SETTINGS
permission by uid, use the context. This will allow the shell
to pass the permission check.

To limit the scope of this change, the check is fixed locally in
WifiServiceImpl. WifiConfigManager also uses the WifiPermissionsUtil
helper method that checks the permission via the ActivityManager.
Switching the helper method will be a much bigger change since it would
involve plumbing the pid through several layers of calls and it is not
triggered via a shell command, so the existing permission check will
work as is.

Bug: 64683466
Test: manually verified wifi can be toggled when airplane mode is active
Change-Id: I198b364fcc9c08f4f0dc6f89141b55c9a668bb75
ndroid/server/wifi/WifiServiceImpl.java
8a9053acbeb1849702d345d317024f133c51ec77 23-Aug-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: fix logging of API calls" into oc-mr1-dev
94944ef94b8e6ec8d74be4783db4ce6c768a2683 23-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiController: Set the sleep policy to "never"" into oc-mr1-dev
e681c8a86232adf813dbd50906af6bf784f672c4 23-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Cleanup code for HAL based PNO" into oc-mr1-dev
cd13f0e77660088ac8df013a4aa52aa32f5009b6 23-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove wificond related code from RttService" into oc-mr1-dev
f6e0f26cc0823b628f887c651a906fa3ebbab070 22-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Update NETWORK_CONNECTION_EVENT netId after WPS" into oc-mr1-dev
c2775146944350a720acbf33942a583540094246 22-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Support multiple canonically identical NDP requests" into oc-mr1-dev
bd8bc092b6e2edfae44629390ac653c49047c235 18-Aug-2017 Wei Wang <weiwa@google.com> Fix Rtt unit tests failures due to permission checks.

Bug: 64819280
Test: wifi unit tests.

Change-Id: Ia52b1516f6e09c609bb26709715c7977d07119a1
ndroid/server/wifi/RttService.java
51f2ad7de7fd5b6189531a923f1666a3d8aa820b 19-Aug-2017 Roshan Pius <rpius@google.com> WifiController: Set the sleep policy to "never"

The UI to toggle this setting was removed in ag/2226326. So, stop
reading this parameter so that we don't have untested behavior on
devices that upgrade from N with this setting set to a non-default
value.

Bug: 64830584
Test: None
Change-Id: Ie5b4b97e519adca030d57dcf5d59471b17ec435b
ndroid/server/wifi/WifiController.java
8c448d091357f076a0e40371232f18f22df37746 10-Aug-2017 Etan Cohen <etancohen@google.com> [AWARE] Support multiple canonically identical NDP requests

NDP (NAN data-path) connectivity requests may be different but
resolve to the same canonic NDP request (e.g. multiple OOB requests
to the same peer with the same security - but executed through
different clients).

Adds mechanism to honor all these requests through a single NDP (can
not create multiple identical NDPs) and a single network agent.

Bug: 64125969
Test: unit-tests pass
Test: new DataPathTest:test_multiple_identical_networks + full suite
Change-Id: I98fc75ed4f8269274fbd19302386a17c59b568a1
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
529bed806618e5232cad35492307796cf1165dac 18-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Enforce location permissions on Rtt APIs." into oc-mr1-dev
bc3a847de5a76a2f1f3a75c46e1cc76d02673ada 18-Aug-2017 Ningyuan Wang <nywang@google.com> Fix scan result age on log dumping

Bug: 64812119
Test: compile, unit tests, verify it by looking at bug report
Change-Id: I4ce439e2c2e1bce19eed6ef4a80cc9fe141b4e61
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
71c03a90e2799cf95c1925431059057e80690cca 18-Aug-2017 Ningyuan Wang <nywang@google.com> Cleanup code for HAL based PNO

Bug: 64810639
Test: compile, unit tests
Change-Id: I962fc3dcecc4dd3330957318db35285981b1e979
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/scanner/HalWifiScannerImpl.java
3d8ab23deeb76ac4ec4de1cd3eb446e3c55ce732 18-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Wifi connection hysteresis" into oc-mr1-dev
2946076de20c9a6bf101eb2f453c4ef952280ff2 18-Aug-2017 Ningyuan Wang <nywang@google.com> Remove wificond related code from RttService

Bug: 64809697
Test: compile, unit tests
Change-Id: I2af9e0d6e2ad6870a3a842088f9cf1cc31efdc27
ndroid/server/wifi/RttService.java
f4274d887c5a26679849fd0e665207899e8bbad9 16-Aug-2017 Wei Wang <weiwa@google.com> Enforce location permissions on Rtt APIs.

Test: Manual
Bug: 62264080
Bug: 62344058

Change-Id: I97a0bf2eda6669d858525b95ef72343e60f860ea
ndroid/server/wifi/RttService.java
ndroid/server/wifi/aware/WifiAwareRttStateManager.java
ndroid/server/wifi/util/WifiPermissionsUtil.java
fac6568cbb329e06b22bfe07993acb263f3762ab 09-Aug-2017 Michael Plass <mplass@google.com> Wifi connection hysteresis

Making an automatic connection should not happen unless the RSSI
is a little bit above the level at which a connection is considered
to be "bad", to avoid flapping back and forth between wifi and cell.

Bug: 64422319
Test: Unit tests, manual
Change-Id: I9a148f2d66ea835d19696eb6317b682f6756f002
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiNetworkSelector.java
73c4fead1c47e82431d117bffed6ea6c843b7980 17-Aug-2017 Sohani Rao <sohanirao@google.com> Merge "Introduce new API for retrieving PNO scan results" into oc-mr1-dev
71c4c2a898a827a867564159ce78e41aedd2295b 10-Jul-2017 Sohani Rao <sohanirao@google.com> Introduce new API for retrieving PNO scan results

Create a seperation of code paths for retrieving scan results from
single scan vs those from a PNO scan. This enables the underlying
implementation to return PNO scan results from the interface that most
recently completed the scans while ensuring no changes to the way single
scan results are returned to the framework.

Bug: 63148974
Test: Unit tests, on-device test for connecting to a network found by
Offload HAL during Pno scans

Change-Id: I6002f6df05e40fe24ff12f4a49599343578873f4
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WificondControl.java
ndroid/server/wifi/scanner/WificondScannerImpl.java
df083b113b3c07274507fd66ed87b2caffb070a4 17-Aug-2017 Roshan Pius <rpius@google.com> Merge "NativeUtil: Use UTF-8 decoder" into oc-mr1-dev
69fa2e7fa12b8f4c24a27b3291a0744cd808a324 16-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes Ifa1eef1f,If59ecbd3,Ie3e640f6 into oc-mr1-dev

* changes:
ONA: Refactor notification builder and register broadcast receiver.
ONA: Rename WifiNotificationController to OpenNetworkNotifier
ONA: Recommend a network using rssi strength.
0af8182c7a421108aff122440724ecc5d1e4c6d7 16-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiConfigManager: Skip data migration if new store is present" into oc-mr1-dev
e5f9b2bbc9f9c5f34d6ad9d290bfb63e48b79587 15-Aug-2017 Roshan Pius <rpius@google.com> NativeUtil: Use UTF-8 decoder

Most of the string/hex fields that is exposed in WifiConfiguration
wrongly state that the field neeeds to be a quoted ASCII string or hex.
It turns out that the fields could be any UTF-8 encoded string.

Bug: 64586263
Test: Unit tests
Change-Id: I3c761d10018ccb944c0623935cfa6b60cedcbfd8
ndroid/server/wifi/SupplicantStaNetworkHal.java
ndroid/server/wifi/WifiConfigurationUtil.java
ndroid/server/wifi/util/NativeUtil.java
d27716a747d9cf2d86153aa9ec1b55b663808b28 09-Aug-2017 Glen Kuhne <kuh@google.com> Update NETWORK_CONNECTION_EVENT netId after WPS

Updates the netId argument of a supplicants NETWORK_CONNECTION_EVENT
message inside of WifiStateMachine's WpsRunningState, after successfully
connecting to a supplicant network, and learning the networkId from
supplicant. This allows WifiStateMachine to proceed with IP
provisioning, and fixes a bug where it would immediately disconnect from
the WPS network, then reconnect after a delay.

Bug: 37834109
Test: Manually tested WPS connection
Test: Added unit test
Change-Id: Ie261d0db8c386049329baee8319e014ed5302547
ndroid/server/wifi/WifiStateMachine.java
347faef7fe3f5df209da431eb844bc026a1ba007 15-Aug-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Skip data migration if new store is present

If the new config store files are present, skip data migration from the
older store file. The old store files may still be present in the device
if WifiConfigStoreLegacy.removeStores() failed for some reason during
the earlier migration.
Also, ensure that we attempt to delete all the store files in
WifiConfigStoreLegacy.removeStores(). Returning early on failure in that
method may leave the device in an incoherent state (some old store files
are deleted, while others are not).

Bug: 63376504
Test: Unit tests
Change-Id: If2e65a7e03677040dfccf88298887e21201aff92
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStoreLegacy.java
47678c136b1f88be3d04d89aa5898e77fa1862a3 14-Aug-2017 Ningyuan Wang <nywang@google.com> ScanDetailCache cleanup

This renames get() to getScanResult() to provide better
consistency with names of other methods.

This also adds @NonNull annotation for a few other
methods.

Bug: 64541323
Test: compile, unit tests
Change-Id: I7e61559390dd82f59b07ebfe2ae69ee9bb5152d2
ndroid/server/wifi/ScanDetailCache.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.java
579066a6f282b9d6729a93b7cce3b18980a0a61d 27-Jul-2017 Stephen Chen <stewchen@google.com> ONA: Refactor notification builder and register broadcast receiver.

Refactors the posting of the ONA notification by using a notification
builder from the framework facade. The notification building is isolated
in a helper class. OpenNetworkNotifier registers a broadcast receiver to
listen to user actions like swiping to dismiss and notification content
clicks. Also plumbs in a clock to stop using System#currentTimeMillis.

Bug: 38460614
Bug: 37357441
Bug: 62410249
Bug: 63544378
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: Ifa1eef1f17c3f3271ec4a11f4311ea00a2698be3
ndroid/server/wifi/OpenNetworkNotificationBuilder.java
ndroid/server/wifi/OpenNetworkNotifier.java
ndroid/server/wifi/WifiInjector.java
ce76a17ac5010e0b7ff5dcf6d8c9db8b48280f9c 26-Jul-2017 Stephen Chen <stewchen@google.com> ONA: Rename WifiNotificationController to OpenNetworkNotifier

Bug: 37357441
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: If59ecbd3078452f05e156091df1d098c8469a66a
ndroid/server/wifi/OpenNetworkNotifier.java
ndroid/server/wifi/OpenNetworkRecommender.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNotificationController.java
e699623dae17803bc8fb5dd56b3d6b17f64f9cc7 19-Jul-2017 Stephen Chen <stewchen@google.com> ONA: Recommend a network using rssi strength.

This recommendation is not currently used to alter the existing
functionality of ONA. It will be used when UI changes are made to
surface and connect to the recommended network.

Bug: 37357441
Bug: 37472257
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ie3e640f6b3863f2640ea763aee3924cb76394933
ndroid/server/wifi/OpenNetworkRecommender.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNotificationController.java
85c806c0d32bb30f421ebc372a59b2f3ea2dce41 06-Jul-2017 Sohani Rao <sohanirao@google.com> AIDL changes for Offload HAL metrics collection

Implement new APIs in IPnoScanEvent AIDL interface that report data
related to Offload HAL scan metrics.

Bug: 32842314
Test: Unit tests, on-device test for connecting to a network found by
Offload HAL during Pno scans

Change-Id: Id02dd045684b4e0f3fd95f58fb9793b0c8e8f3cb
ndroid/server/wifi/WificondControl.java
8f5c6f25e0b8266b3bae3540e854d67442bc60d2 10-Jul-2017 Sohani Rao <sohanirao@google.com> WificondControl: SSID field verification in scan result

SSID field of the scan result from wificond is being verified against
the SSID extracted from the IEs. When scan results are obtained from
Offload HAL, no IEs are available. Remove this check to avoid dropping
the scan results erroneously

Bug: 63148974
Test: Unit tests, on-device test for connecting to a network found by
Offload HAL during Pno scans

Change-Id: Ia5e6a85ba497ae3ac47729dddddf7ad45d263e55
ndroid/server/wifi/WificondControl.java
c58d1f9688017d616e0ec8fb7a36ed3aadde6769 11-Aug-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: fix logging of API calls

With the default settings, WifiServiceImpl does not log messages about
API calls. This CL changes the API calls from mLog.trace to mLog.info.

Bug: 64542778
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually verified calls were logged with verbose logging off
Change-Id: Ibb60305353b4ab4f072a09e3a68a8a3983fe666d
ndroid/server/wifi/WifiServiceImpl.java
e97e21f1f14e4ef16dd5d675b17615aef3a80301 27-Jul-2017 Peter Qiu <zqiu@google.com> Re-add network to supplicant when EAP identities changes

Update WifiConfigurationUtil#isSameNetwork to check changes in
both EAP identity and anonymous identity. So that the network
parameters in wpa_supplicant will get reloaded when the EAP
identities changed.

Bug: 63979263
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: Verify connection to a EAP-SIM network will fail after SIM card
is replaced

Change-Id: I592018de52c2515dbd64aea0138b5bc88b70fec7
(cherry picked from commit 8e08c5d97b1608e1b173867998dd82e6f44d1d13)
ndroid/server/wifi/WifiConfigurationUtil.java
72019f1d6afbd98efdd0d9feb54d0e2e43aff111 10-Aug-2017 Ningyuan Wang <nywang@google.com> Merge "Update frequency of WifiInfo upon connection or roam" into oc-dr1-dev
am: 5a19b6b8f6

Change-Id: Ia29839b9c739cc0cd3e4160d0ceb222fef4b8e46
5a19b6b8f6b4a123371c6a2023a96e9d4f8d6aac 10-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Update frequency of WifiInfo upon connection or roam" into oc-dr1-dev
7c1d8685a863b53995be056a3a5a334306fe39d8 10-Aug-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiStateMachine: disable attempt to id gateway" into oc-dr1-dev
am: c60208a6ff

Change-Id: Ie01be9cf597f7d8668505ca0583fe803252cad4c
c60208a6ffebf37285f758151663493391fa145e 10-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiStateMachine: disable attempt to id gateway" into oc-dr1-dev
f30b8a95e4e2ab07ec6535c4afb12d56ea0417c5 09-Aug-2017 Glen Kuhne <kuh@google.com> Merge "METRICS: histograms of scanresult sums in scan" into oc-dr1-dev
am: 26f0c1ee6a

Change-Id: Id1a087ca02cd44e016cbe8e870995f6f41d2b4b1
26f0c1ee6a8aea5719a88aabd968eb1881687307 09-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "METRICS: histograms of scanresult sums in scan" into oc-dr1-dev
b5af570f326aae7bc63d57ac3aef6142cadcc30f 03-Aug-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: disable attempt to id gateway

When transitioning to ConnectedState from L2ConnectedState, we attempt
to identify the gateway. This is intended to be used for linking SSIDs
(overly simplified: different SSIDs that are from the same AP).

This call is doomed to fail and has not been working since
multi-networking support was added. The consequence of this call is
that we can process messages related to mode switches out of order and
end up "stuck" on or off.

This call is commented out in this CL and further cleanup will be done
with the WifiStateMachine refactor. A bug was filed to track work to
implement this functionality with information from ConnectivityService.

Bug: 64118984
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: integration tests

Change-Id: I65ea02cd9b53b2e563d221e59581c7c11a9c6a43
ndroid/server/wifi/WifiStateMachine.java
08631913ff641047b1d56288bd194a1fa7c390e1 25-Jul-2017 Glen Kuhne <kuh@google.com> METRICS: histograms of scanresult sums in scan

Generate histograms counting the size of 5 different ScanResults
subsets within a scan. Subsets include: total, open,
saved, open-or-saved, or passpoint related scan results. The size is
counted for unique BSSIDs & unique SSIDS, generating two histograms.

This metric is useful for determining the frequency of N-way
network-selection decisions (where N is the number of connectable
networks).

Exempt-From-Owner-Approval: Prior approval by owners (rpius)
Bug: 36819798
Test: Added unit test
frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: I4825a778d45f9306f3e83b2418a047b8809c1802
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiNetworkSelector.java
f7443e9d5cab764fbe57581c48e9df65e7790adb 08-Aug-2017 Glen Kuhne <kuh@google.com> Merge "Move ScanResultMatchInfo to its own class" into oc-dr1-dev
am: 60b2a0be06

Change-Id: Id54cbfda0f25d4df53ce575292d55ab3b61bbbb4
60b2a0be06e7629ef48c6841ec5f5086d61001ba 08-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Move ScanResultMatchInfo to its own class" into oc-dr1-dev
68eb30cc4e4d1af1dae499c7d865705c6528231d 08-Aug-2017 Roshan Pius <rpius@google.com> Merge "RELAND: HalDeviceManager: Get IWifi proxy immediately" into oc-dr1-dev
am: 9ef40c234c

Change-Id: I020ab94920c37cb9af4bc2103a227f7bf0737015
9ef40c234c4d9399f3c63e5fb30247e1019605fa 08-Aug-2017 Roshan Pius <rpius@google.com> Merge "RELAND: HalDeviceManager: Get IWifi proxy immediately" into oc-dr1-dev
7e91548e461e52af8e78ba2e968395caf29b55bf 02-Aug-2017 Roshan Pius <rpius@google.com> RELAND: HalDeviceManager: Get IWifi proxy immediately

Try to get IWifi proxy as a part of HalDeviceManager.initialize()
directly instead of waiting for the IServiceMAnager callback.

When HalDeviceManager.initialize() is invoked:
a) If the wifi service is up at that point, we will get the proxy immediately
and IServiceManager callback will be ignored.
b) If the wifi service is not up at that point, we will get the proxy as a part
of the IServiceManager callback.

Bug: 64226605
Test: Unit tests
Test: Regression test request.
Change-Id: I3d6b89edb3f446bb39984d1ebb3caeb53011bec9
ndroid/server/wifi/HalDeviceManager.java
d582d8801229bce8be8995afe8b544bc057ae238 05-Aug-2017 Guang Zhu <guangzhu@google.com> Merge "Revert "HalDeviceManager: Get IWifi proxy immediately"" into oc-dr1-dev
am: a7c7f879ba

Change-Id: Id40102adf00adc10138d7cc5be771a042d0672db
a7c7f879ba83a04562d0f83306f27b394512f74a 05-Aug-2017 Guang Zhu <guangzhu@google.com> Merge "Revert "HalDeviceManager: Get IWifi proxy immediately"" into oc-dr1-dev
80061fc40ae7e1ead239364eeb1e3ea0d88bcc23 05-Aug-2017 Guang Zhu <guangzhu@google.com> Revert "HalDeviceManager: Get IWifi proxy immediately"

Bug: 64399946
Bug: 64226605

This reverts commit 899b14464fc6591010a5893142b470a466598f96.

Change-Id: I2af550600529835fa78e7011f1bbedd056140d46
ndroid/server/wifi/HalDeviceManager.java
d383bda9ecef4780b955368ceae911d30943cfa6 03-Aug-2017 Ningyuan Wang <nywang@google.com> Update frequency of WifiInfo upon connection or roam

This CL allows WifiStateMachine to update the frequency
field of WifiInfo upon connection event, supplicant
state changed event, and associated bssid event.

This also adds corresponding unit tests. In order to make
ScanDetailCache mockable, change the interesting methods to
explicit 'public'.

Bug: 64308543
Test: compile, unit tests

Change-Id: I4b886b2c81af1d4f17236d8413654c59cb102d10
ndroid/server/wifi/ScanDetailCache.java
ndroid/server/wifi/WifiStateMachine.java
0add17aba7742e5e742f2013a9c7c4b955314f5e 05-Aug-2017 Michael Plass <mplass@google.com> Merge "[WifiScoreReport] Include scores in dumpsys" into oc-dr1-dev
am: 681fe95822

Change-Id: Ief179bcf52c07d8f414bdc62d175843f07bfedb8
681fe95822bc05ae0c3119229b96cc89427ab523 04-Aug-2017 Michael Plass <mplass@google.com> Merge "[WifiScoreReport] Include scores in dumpsys" into oc-dr1-dev
2343695189af037ec9ba7e601db94b1ae159b959 04-Aug-2017 Roshan Pius <rpius@google.com> Merge "WifiStateMachine: Always return a copy of WifiInfo" into oc-dr1-dev
c5b54baefbe1a27de65f78eb3c0147b5a9aed077 04-Aug-2017 Roshan Pius <rpius@google.com> Merge "HalDeviceManager: Get IWifi proxy immediately" into oc-dr1-dev
am: abf2037020

Change-Id: Ic44883a039ae0e3cc7385739c61b097d081c8231
6ac3793325c1e4255eac0ed4a922590ef3b34fa5 04-Aug-2017 Roshan Pius <rpius@google.com> Merge "WifiStateMachine: Pass in looper to PhoneStateListener" into oc-dr1-dev
am: 211a7d59f4

Change-Id: Ie81d811753491ab4e0b04178fc413ca0cdd7db6c
abf203702036541f4a7704a630edf59d310dd2c3 04-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "HalDeviceManager: Get IWifi proxy immediately" into oc-dr1-dev
211a7d59f4e750f3724d0122beb58fd806dd14bf 04-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiStateMachine: Pass in looper to PhoneStateListener" into oc-dr1-dev
b50651e390c1494d6abba1039361d4f5caf0eaae 04-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix various issues of getConnectionInfo" into oc-mr1-dev
eaad2273924e57b361c31d2f97c07409f41ac85e 03-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Restore WifiP2pDevice.primaryDeviceType formatting" into oc-mr1-dev
d8cab05bd605e4255dd6f77293329fbeb65b3249 03-Aug-2017 Ningyuan Wang <nywang@google.com> Merge "Dump latest unfiltered scan result" into oc-dr1-dev
am: 784d5bf21e

Change-Id: Ic4996a875179ed615fd8a71bdb3b10b566cbc08b
784d5bf21e29baab7c8c5a815897ffc476d6b099 03-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Dump latest unfiltered scan result" into oc-dr1-dev
d79fe7b2896c389d9304919763066a49913219db 03-Aug-2017 Tony Mak <tonymak@google.com> Fix various issues of getConnectionInfo

1. We should pass through the "op package name" instead of
resolving the UID to package name.
2. ActivityManager.getCurrentUser() requires INTERACT_ACROSS_USER
permission, clearing calling identity before calling it..

Bug: 64245163
Test: Verify QR provisioning is now possible
Test: runtest -x frameworks/opt/net/wifi/tests/
Test: runtest -x runtest -x cts/tests/tests/net/src/android/net/wifi/cts/WifiInfoTest.java

Change-Id: Id4dd9e7b38120e7b5867b71472a5aa24c288a47e
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/util/WifiPermissionsUtil.java
24454215adb6d9bc4dab4c259977c6fa8b4483be 03-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Re-add network to supplicant when EAP identities changes" into oc-mr1-dev
6ff9b60d474d928e6258a8c54b92c56321e6b74e 03-Aug-2017 Roshan Pius <rpius@google.com> Merge "WifiStateMachine: Always return a copy of WifiInfo" into oc-mr1-dev
cdd37192567ccf51d78dd13ffd72ab1c19363869 03-Aug-2017 Ningyuan Wang <nywang@google.com> Merge "Stay on network during ongoing traffic" into oc-dr1-dev
am: d4bbe1d2b4

Change-Id: Ic5a7b6352c0f1eb704943a3339939bf715ba210c
d4bbe1d2b40990f7281cbf038ecf3052f1821bc4 03-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Stay on network during ongoing traffic" into oc-dr1-dev
5bf1c66cfc5099801abe53fd54cef661740b24b5 02-Aug-2017 Glen Kuhne <kuh@google.com> Restore WifiP2pDevice.primaryDeviceType formatting

This CL restores the formatting of the primaryDeviceType string in
WifiP2pDevice, which was broken when the HAL moved to Treble instead of
wpa_supplicant ctrl-iface (which was applying the appropriate
formatter).

Bug: 63657840
Test: Manually verified, & unit tests updated
Change-Id: Ia86d74801020bf9098a3b7721e464201f99047f5
ndroid/server/wifi/p2p/SupplicantP2pIfaceCallback.java
ndroid/server/wifi/util/NativeUtil.java
a49af7fd6bf5d51ef7c34fbf2d71ee10c0f7d1dd 02-Aug-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Always return a copy of WifiInfo

WifiStateMachine#syncRequestConnectionInfo() should always return a copy
of WifiInfo to prevent external services directly accessing a local
variable in WifiStateMachine. Binder calls within the same process
doesn't parcel objects, hence this is needed to prevent other threads in
system_server directly using a local object within the wifi service.

Bug: 64207440
Test: Unit test that checks for object returned from
WifiStateMachine#getWifiInfo() vs
WifiStateMachine#syncRequestConnectionInfo().

Change-Id: I3d709a09d3d10a1d133fd79eeee430830eb008b2
ndroid/server/wifi/WifiStateMachine.java
806de232ff2a295ef27ff4450e4bdf5e989528bd 02-Aug-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Always return a copy of WifiInfo

WifiStateMachine#syncRequestConnectionInfo() should always return a copy
of WifiInfo to prevent external services directly accessing a local
variable in WifiStateMachine. Binder calls within the same process
doesn't parcel objects, hence this is needed to prevent other threads in
system_server directly using a local object within the wifi service.

Bug: 64207440
Test: Unit test that checks for object returned from
WifiStateMachine#getWifiInfo() vs
WifiStateMachine#syncRequestConnectionInfo().

Change-Id: I3d709a09d3d10a1d133fd79eeee430830eb008b2
Merged-In: I3d709a09d3d10a1d133fd79eeee430830eb008b2
ndroid/server/wifi/WifiStateMachine.java
d493cd415eaf76851f17e186b9066e89340d9a2f 27-Jul-2017 Glen Kuhne <kuh@google.com> Move ScanResultMatchInfo to its own class

This class is a useful way of grouping scan results into the networks
they represent, agnostic of BSSID. Shifting it so it can be used in
WifiMetrics.

Bug: 36819798
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ie4fdb488c7a7cb198e16cd5ba72c354045fbc312
ndroid/server/wifi/ConfigurationMap.java
ndroid/server/wifi/ScanResultMatchInfo.java
899b14464fc6591010a5893142b470a466598f96 02-Aug-2017 Roshan Pius <rpius@google.com> HalDeviceManager: Get IWifi proxy immediately

Try to get IWifi proxy as a part of HalDeviceManager.initialize()
directly instead of waiting for the IServiceMAnager callback.

When HalDeviceManager.initialize() is invoked:
a) If the wifi service is up at that point, we will get the proxy immediately
and IServiceManager callback will be ignored.
b) If the wifi service is not up at that point, we will get the proxy as a part
of the IServiceManager callback.

Bug: 64226605
Test: Unit tests
Test: TBD: Regression test request.
Change-Id: I9160af8ef0479ec1fefddb03ec81172c94d583bb
ndroid/server/wifi/HalDeviceManager.java
33d55307b8e4a03b7ace877968585002ec37dbea 01-Aug-2017 Michael Plass <mplass@google.com> [WifiScoreReport] Include scores in dumpsys

To help diagnose problems in connected-network scoring, include the
computed scores (currently legacy and aggressive) in the output
of dumpsys wifi.

While here, discard any samples that might happen before the clock
is set on a newly flashed device, to avoid confusion due to the
fluffy timestamps.

Also bump the session number only once in the case of back-to-back
reset() calls, since these are quite common.

Bug: 63862121
Test: wifi unit tests
Test: adb shell dumpsys wifi WifiScoreReport
Change-Id: I299a04cd0cf35d81cc179ae9fee6760daf3d8a59
ndroid/server/wifi/WifiScoreReport.java
b1d6ef28f4a40b4b7384859b52b176d55f7d4bae 01-Aug-2017 Stephen Chen <stewchen@google.com> Merge "WifiNetworkSelector: Use ScanResultUtil to filter for open networks." into oc-dr1-dev
am: 29702d5f6b

Change-Id: I4685aaeb46613c38375f88b641d68f3f7e784e60
29702d5f6bf0b83837778377f765d393bdfcf5c1 01-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiNetworkSelector: Use ScanResultUtil to filter for open networks." into oc-dr1-dev
e8e7612e88d62d8c1e3fe0dc148b5287978b78a8 01-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Require location permission to access wifi SSID, BSSID" into oc-mr1-dev
ca73c0c00bda1fc592bab9dd54c90fd59c46bfd2 28-Jul-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Pass in looper to PhoneStateListener

Pass in wifi state machine's looper to the PhoneStateListener created.
This should also fix the unit test failures reported.

Bug: 64143471
Test: Unit tests pass (Will need to verify that it also fixed the
automated test failures since I'm unable to reproduce it locally).

Change-Id: I1aae7535dc23460a666d263d8042a72d63e16c27
ndroid/server/wifi/WifiStateMachine.java
c6e7fd8b76398114980a43c5d90197939c1ddfeb 25-Jul-2017 Ningyuan Wang <nywang@google.com> Dump latest unfiltered scan result

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

Change-Id: I090aaacb00c3a774edd5c353037f2265f3bf138f
ndroid/server/wifi/scanner/HalWifiScannerImpl.java
ndroid/server/wifi/scanner/WifiScannerImpl.java
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
ndroid/server/wifi/scanner/WificondScannerImpl.java
616ef85715c2d86e0f5c53397e45c3d6b8007e5c 28-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic 'carrier_network' into oc-mr1-dev

* changes:
Update ScanResult with carrier network info
Add support for maintaining carrier Wi-Fi network configurtion
0efc22982a14a2d65ba124904d226ab5c1301bd4 28-Jul-2017 Sohani Rao <sohanirao@google.com> Merge "Prevent apps from toggling Wifi when in Airplane mode" into oc-dr1-dev
am: 069e700d31

Change-Id: I810fe42f18a3db4bcd38cd788b3821c5feae6c75
069e700d31025487dd8a43e90cb02044824f708d 28-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Prevent apps from toggling Wifi when in Airplane mode" into oc-dr1-dev
78f769ee241ce5d4a0e592ef9fb0ec63054592bc 28-Jul-2017 Roshan Pius <rpius@google.com> Merge "wifi(framework): Modify the SAR power levels interface" into oc-dr1-dev
am: 3673d53dea

Change-Id: I30fde20315fbdacdf64bce45d159db70ac932da8
3673d53dea03d18e5b28ce248b9911f81e3f8638 28-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "wifi(framework): Modify the SAR power levels interface" into oc-dr1-dev
0753c5118317683fe5f4864e74b3ba9c015a6e4f 21-Jul-2017 Sohani Rao <sohanirao@google.com> Prevent apps from toggling Wifi when in Airplane mode

The callers of setWifiEnabled must have NETWORK_SETTINGS permissions
to able to enable Wifi in Airplane Mode.
Add unit tests to verify the newly introduced code paths.

Bug: 63515218
Test: Unit tests, mannual testing with an app
Change-Id: Id5e6941a9748619b0c2b54102fb244178dd47472
ndroid/server/wifi/WifiServiceImpl.java
b7f35c58029fe5dce64813271ad4e8b1b6ea8893 25-Jul-2017 Roshan Pius <rpius@google.com> wifi(framework): Modify the SAR power levels interface

Modifying the interface used to lower the tx power level for meeting SAR
requirements based on recommendation from the nexus hardware team. The
previous interface passed in a single power value in dBm for meeting SAR
requirements. However, the SAR requirements are more complex than that.
Based on the connection mode (802.11 a,b,g,n,ac) and the number of
streams that are active (MIMO), the SAR power levels are very
different. Using the previous interface would mean that we will have to
use the lowest power level among all the connection modes to meet the SAR
requirements. This would however result in us lowering the power much
more than needed (~2 dBm) for many connection modes.
Instead, we're switching to a more generic interface where the framework
informs the wifi chip that we're entering a special tx power mode scenario
(today, there is only 1 for voice call). The chip can then lookup the
extensive table of power levels for different connection modes which are
pre-populated by the OEM's in the BDF file to set the power level (depending
on the scenario framework sends and the active connection mode).

Bug: 62437848
Test: Unit tests.
Test: Manual tests.
Change-Id: I26737259cf56b44ab18d907ab23603e14a7e3739
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiVendorHal.java
3cf27a7144be15b7ca400412e4f1bc31daa8be13 26-Jun-2017 Ningyuan Wang <nywang@google.com> Stay on network during ongoing traffic

Changing network might result L3 disconnection, causing
disruptive user experience.
We should change network less aggressively in the presence
of heavy traffic, which implies streaming activities.

This adds the corresponding unit tests. As a result, this
also modifies the existing test helper method |testStayOrSwitch|
and adjusts some other related unit tests.

Bug: 62428282
Test: compile, unit tests, integration tests

Change-Id: Ib285d42b7191e45e2124b2385fb0802c9fc55f71
ndroid/server/wifi/WifiNetworkSelector.java
8e08c5d97b1608e1b173867998dd82e6f44d1d13 27-Jul-2017 Peter Qiu <zqiu@google.com> Re-add network to supplicant when EAP identities changes

Update WifiConfigurationUtil#isSameNetwork to check changes in
both EAP identity and anonymous identity. So that the network
parameters in wpa_supplicant will get reloaded when the EAP
identities changed.

Bug: 63979263
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: Verify connection to a EAP-SIM network will fail after SIM card
is replaced

Change-Id: I592018de52c2515dbd64aea0138b5bc88b70fec7
ndroid/server/wifi/WifiConfigurationUtil.java
8978e2582b00882d04765f3970b05e7f2888a2e4 21-Jul-2017 Michael Plass <mplass@google.com> Require location permission to access wifi SSID, BSSID

BSSID/SSID can be used to deduce location, so require the same
location permissions for access to these WifiInfo fields
requested using WifiManager.getConnectionInfo() as for
WifiManager.getScanResults().

If the application does not have a location permission,
the returned object will have a BSSID of 02:00:00:00:00:00
and <unknown ssid>.

Bug: 36770596
Test: New unit tests
Change-Id: Iab5ae21719206260f4993631ee78714019a925fa
ndroid/server/wifi/WifiStateMachine.java
31a9e140105fe0c763fc72dd075d7bd876f17989 27-Jul-2017 Etan Cohen <etancohen@google.com> Merge "[RTT] Add cleanup on app death" into oc-mr1-dev
70c7ab31fcd865a6a701c1dd89e569c1f1401054 27-Jul-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiApConfigStore: add initial apconfig validation" into oc-dr1-dev
am: cbd123b938

Change-Id: Ie4da75f0aaef1c12016d6b63021922e54b6b7485
cbd123b9385eb4319676567051d92947fc911d78 27-Jul-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiApConfigStore: add initial apconfig validation" into oc-dr1-dev
32559d8738dfe5b8aa3c22a82303ef56e2e0241c 25-Jul-2017 Etan Cohen <etancohen@google.com> [RTT] Add cleanup on app death

Add a binder death listener to register for app death and execute
cleanup code.

This is a replacement for the death listener added to the AsyncChannel
which caused a memory leak in apps.

Bug: 37443149
Test: verified using test app ResponderToolActivity
Change-Id: I90b28fcb2d7d61cf40807960c3bf56a262b595b9
ndroid/server/wifi/RttService.java
ndroid/server/wifi/aware/WifiAwareRttStateManager.java
4eef41ced6143fe7228cf1f06f8a1f45aa8a2b1f 20-Jul-2017 Peter Qiu <zqiu@google.com> Update ScanResult with carrier network info

Bug: 30988281
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manual
Change-Id: I77cab53d71772bc9503dc5cdfab621a8b30804f6
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WificondControl.java
74390d669cf29f102a7a3804cfffc5934a39d4bc 20-Jul-2017 Peter Qiu <zqiu@google.com> Add support for maintaining carrier Wi-Fi network configurtion

The carrier Wi-Fi network configurations are based on the current
active subscriptions.

Bug: 30988281
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manual
Change-Id: I35f8f26510184240f4cbe6ee55e089145705ab86
ndroid/server/wifi/CarrierNetworkConfig.java
9ef6adef90d2907c9fe20f34405f3e9eb6810e27 27-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Support multiple NDPs on an NDI" into oc-mr1-dev
0cafbe0c8e1bb5b9900908a44df232251c2042ea 19-Jul-2017 Rebecca Silberstein <silberst@google.com> WifiApConfigStore: add initial apconfig validation

Add initial validation for values in the supplied SoftAp config. The
initial checks will not fully validate the supplied settings, but they
will do a high level sanity check.

Initial items verified:
1 - ssid string set
2 - ssid string not empty
3 - ssid string does not exceed max length
4 - open networks do not have a password
5 - password protected networks do have a password
6 - if applicable, passwords within min/max range

Future extensions would include additional parameters and validating the
bytes in the ssid and password fields.

Bug: 37280779
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: I1a9338ce92c60c88ff3992d024a00ab1c6c4ec5e
ndroid/server/wifi/WifiApConfigStore.java
e15765c974de614090f13e5dc39a5899c8e9cb96 26-Jul-2017 Peter Qiu <zqiu@google.com> Merge "Update landing activity for wrong password notification" into oc-dr1-dev
am: eed767c193

Change-Id: I3d549fc0ea01a1275ef85ed0a4a049a5d96c705c
eed767c1935faf0747e7c6a82074532442c9949c 26-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Update landing activity for wrong password notification" into oc-dr1-dev
0f2d9e8da0a64cb397aaac94cf1f66b077761ea6 26-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Simplify Aware data-path states" into oc-mr1-dev
ffc474dc21b6120c732cf5f3b1900425a5c08d9e 26-Jul-2017 Stephen Chen <stewchen@google.com> WifiNetworkSelector: Use ScanResultUtil to filter for open networks.

Bug: 63999197
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I7794b0926a407e2690289d11c827ea2aaeed2e32
ndroid/server/wifi/WifiNetworkSelector.java
86ce666f62db6b464536d68944780b46996af04b 20-Jul-2017 Etan Cohen <etancohen@google.com> [AWARE] Support multiple NDPs on an NDI

Support multiple NAN data-paths (NDPs) on a single NAN data-interface
(NDI). Interface bring-up and bring-down should be tied to first NDP
and last NDP.

Bug: 63635780
Test: unit tests and integrated (sl4a) tests pass (or bugs filed)
Change-Id: I05ac824e551d33897eba7b7e0d5ab45b56492558
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareNativeCallback.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
29da253de531bde521dc6fb1cd727c099f1e74ca 25-Jul-2017 Peter Qiu <zqiu@google.com> Update landing activity for wrong password notification

Update the landing activity for the notification to show
the password dialog when the notification is tapped.

Bug: 33245941
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manual test

Change-Id: Ieac2a5e41ab411fb1f8c5cab5f62243281eaabef
ndroid/server/wifi/WrongPasswordNotifier.java
0d8aa539a5617f20c3f68d1742ec817235f1d6af 25-Jul-2017 Stephen Chen <stewchen@google.com> Merge "ONA: Track screen state in WifiNotificationController." into oc-dr1-dev
am: 425676edcb

Change-Id: I5f93dcdd884c26f4da5caa06ff88c52cc705f519
81d5f8644b7614ca1741be69010e9203131056c7 25-Jul-2017 Stephen Chen <stewchen@google.com> Merge "ONA: Change ONA controller to directly handle scan results from WifiConnectivityManager." into oc-dr1-dev
am: 6db34c0303

Change-Id: I17358c6b6918f534a37080086ca817a7a587c81a
425676edcb8853bd5aff996a0be6974b06246e46 25-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "ONA: Track screen state in WifiNotificationController." into oc-dr1-dev
6db34c0303b84c1c212a8f013ec90b257fb96052 25-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "ONA: Change ONA controller to directly handle scan results from WifiConnectivityManager." into oc-dr1-dev
a305257d7c3b3421d47fb8f00799749aae9645a2 24-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiStateMachine: Dont repeatedly call sendExplicitlySelected" into oc-dr1-dev
18681d03460f476814aadbb678b20e1fc4153297 24-Jul-2017 Roshan Pius <rpius@google.com> Merge "HalDeviceManager: Lock the service manager callback" into oc-dr1-dev
am: f289d0be14

Change-Id: I1f5531e2cb09a263c0b3ea75d9d4ee6541ac2f00
f289d0be14c14fa1f332e62471565bbc4c725fa0 24-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "HalDeviceManager: Lock the service manager callback" into oc-dr1-dev
06dcab2ee1a5d1293c9142f40cb65b52ffa2a5d6 14-Jul-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Dont repeatedly call sendExplicitlySelected

Use the last selected network timestamp
(WifiConfigManager.getLastSelectedTimestamp) to limit the invocation of
NetworkAgent.sendExplicitlySelected. The current expiration is set at 30
seconds to prevent the user from receiving notifications about lack of
internet connectivity repeatedly on the same network.

Bug: 62503737
Test: Added a unit test for the helper function. Ideally would have
wanted to use a mock WifiNetworkAgent and capture the interaction on it,
but because of the way WSM is designed currently, it's impossible to use
a WifiInjector to mock it out.

Change-Id: I342b617769141c3e8071e5aba89efebe42c97390
Merged-In: I342b617769141c3e8071e5aba89efebe42c97390
ndroid/server/wifi/WifiStateMachine.java
0f41a6a3df4a2cedcad60324d91e1fffc968cfbb 18-Jul-2017 Stephen Chen <stewchen@google.com> ONA: Track screen state in WifiNotificationController.

The Open Networks Available notification should not be shown when the
screen is off.

Bug: 38460614
Bug: 37357441
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I445f95a624009f492c3abd8a9f815706e221ea44
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiNotificationController.java
3f8483262cf59572d0c0b3c42e72d8ce65a096ff 06-Jun-2017 Stephen Chen <stewchen@google.com> ONA: Change ONA controller to directly handle scan results from WifiConnectivityManager.

The controller will post and clear ONA notifications based on calls made
from WifiConnectivityManager.

Bug: 38460614
Bug: 37357441
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ib3483e8974d37b165249a211306118b83dc4edc4
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNotificationController.java
ndroid/server/wifi/WifiServiceImpl.java
d5bf7032c696ad8f6a607050a33c42fdd7eff944 24-Jul-2017 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Change to NETWORK_SETTINGS permission check" into oc-dr1-dev
am: d739840cdb

Change-Id: If45b09b2a6f01e3c7f571c42e94537c82d8f0923
d739840cdb84bb0312d0cc83f00a4aa64a984949 24-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiConfigManager: Change to NETWORK_SETTINGS permission check" into oc-dr1-dev
aa46f5da451c7e911d92a461eaca15d99ca229ad 24-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiStateMachine: Dont repeatedly call sendExplicitlySelected" into oc-mr1-dev
36afabb6c8b769d2266800f2f362bf7ab70fef9b 21-Jul-2017 Roshan Pius <rpius@google.com> HalDeviceManager: Lock the service manager callback

We should hold the lock when we set mWifi to a non-null value and
should only unlock once we finish all the processing needed (which
includes a IWifi.stop() invocation). This should prevent any other
threads to proceed while this callback is being handled in the hwbinder
thread.

Bug: 62511857
Test: Device boots up and connects to wifi networks.
Test: Will send for regression tests.
Change-Id: I393455f4aea618d110c158cb2c4b3350e2ab5376
ndroid/server/wifi/HalDeviceManager.java
ed3eb18b3896a107e2356b90713425fe3e2a2924 14-Jul-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Dont repeatedly call sendExplicitlySelected

Use the last selected network timestamp
(WifiConfigManager.getLastSelectedTimestamp) to limit the invocation of
NetworkAgent.sendExplicitlySelected. The current expiration is set at 30
seconds to prevent the user from receiving notifications about lack of
internet connectivity repeatedly on the same network.

Bug: 62503737
Test: Added a unit test for the helper function. Ideally would have
wanted to use a mock WifiNetworkAgent and capture the interaction on it,
but because of the way WSM is designed currently, it's impossible to use
a WifiInjector to mock it out.

Change-Id: I342b617769141c3e8071e5aba89efebe42c97390
(cherry-picked from 674c12b8a66d2961cf9a5930b1e0fab4dda86152)
ndroid/server/wifi/WifiStateMachine.java
f984e2531bdd28a6e9bd34f005badb4b5da172a4 07-Jun-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Change to NETWORK_SETTINGS permission check

Bug: 63911026
Test: Unit tests
Change-Id: Iaed6aceb8e8b4e586925a396a420d457d826d8ff
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/util/WifiPermissionsUtil.java
271b0adaa95d114abcd7f1a56087338fa6971e24 21-Jul-2017 Etan Cohen <etancohen@google.com> Merge "[HAL] Shut down HAL before tearing down wlan interface" into oc-dr1-dev
14d34bdb35f658175ad85a98799660ffc9e4e9d7 20-Jul-2017 Etan Cohen <etancohen@google.com> Merge "[HAL] Shut down HAL before tearing down wlan interface" into oc-mr1-dev
d2b34d876c5b21790a4b98a94ae69cc95d2f5521 19-Jul-2017 Etan Cohen <etancohen@google.com> [AWARE] Simplify Aware data-path states

Merge common states for Initiator and Resonder. Simplifies code.

Bug: 63635780
Test: unit tests + integration tests passing
Change-Id: I19c3718179e3044090b08d80fa5a01b57e5ea698
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareMetrics.java
43d042f5fe899676f02b609975575efad7796fac 20-Jul-2017 Rebecca Silberstein <silberst@google.com> Merge "OWNERS: update wifi OWNERS" into oc-dr1-dev
am: 1a4e1cd6f1

Change-Id: If5ddd09cb438d9fad0b4211e224fa6f62515dfbf
1a4e1cd6f18824529f2b030cdf42b5bcdbd07e2e 20-Jul-2017 Rebecca Silberstein <silberst@google.com> Merge "OWNERS: update wifi OWNERS" into oc-dr1-dev
c498e3582171f477ff2ec6fff6f7b08b583b7a18 18-Jul-2017 Etan Cohen <etancohen@google.com> [HAL] Shut down HAL before tearing down wlan interface

Change the order of shutdown so that HAL shutdown is called
before the wlan interface is torn down. This allows pre-
shutdown commands to be sent down through the interface
before it is torn down.

Bug: 63704506
Test: NAN test passes
Test: Kill wificond: system recovers/works correctly
Test: Full regression suite
Change-Id: Ibd4e127b424cdb0d079d74ec33156fe0bd0e52d9
ndroid/server/wifi/WifiNative.java
7b038e3159fe4469d4d4f3fd85bb5de53fb309f2 20-Jul-2017 Peter Qiu <zqiu@google.com> Merge "Display notification when wrong password error is detected" into oc-dr1-dev am: 96e29a8bc2
am: 5adcd54d95

Change-Id: I9afa128d0113ccb30f28200c7a0ca0dc1e6d4769
96e29a8bc2b03c301658ce3831e64113b060c427 20-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Display notification when wrong password error is detected" into oc-dr1-dev
024e5248373c2c3b7b9117a28b06a17d90c28436 19-Jul-2017 Rebecca Silberstein <silberst@google.com> OWNERS: update wifi OWNERS

Update OWNERS and add second owner to all per-file specifications.

Bug: 63849283
Test: None
Change-Id: I4834cbdfce5f79db76fecbfb9a8f2bec1fb18ddf
ndroid/server/wifi/OWNERS
7246a9b3a1f20ab0fdb1ce532f36a2ab0e44fe2a 19-Jul-2017 Stephen Chen <stewchen@google.com> Merge "WifiNetworkSelector: cache filtered scan results" into oc-dr1-dev am: 9cffbf45e2
am: dad9e0f432

Change-Id: I93db4e87c002d9f3c66e4e642ff0838a78082444
9cffbf45e26339f87536fbc07f750b8fdbd5b9cf 19-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiNetworkSelector: cache filtered scan results" into oc-dr1-dev
eb04ff08fe0985acd105a92ae397cbcd7ab91266 21-Jun-2017 Stephen Chen <stewchen@google.com> WifiNetworkSelector: cache filtered scan results

The filtered scan results removes the need to check for blacklisted
bssids, low signal strength, and invalid SSIDs before showing ONA
notifications.

Exempt-From-Owner-Approval: Owners file out of date
Bug: 37357441
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I5ac71fa366c8c45377857c18f392aa34d9cbd88f
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiNetworkSelector.java
e15195bc7f5b8397fc2cdd8e41a9c8041a9296bf 19-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Cache last association failure reason for config"
8e03a147b1d9ca721e1fe4f95b6b67491cfd7084 18-Jul-2017 Etan Cohen <etancohen@google.com> [HAL] Shut down HAL before tearing down wlan interface

Change the order of shutdown so that HAL shutdown is called
before the wlan interface is torn down. This allows pre-
shutdown commands to be sent down through the interface
before it is torn down.

Bug: 63704506
Test: NAN test passes
Test: Kill wificond: system recovers/works correctly
Test: Full regression suite
Change-Id: Ibd4e127b424cdb0d079d74ec33156fe0bd0e52d9
ndroid/server/wifi/WifiNative.java
754646a82f4f4272f25ed8686ae5ad7589847b59 19-Jul-2017 Roshan Pius <rpius@google.com> Merge "WifiVendorHal: Add support for plumbing out RTT feature flags" into oc-dr1-dev am: 0d76fe49f8
am: 58e9f048c0

Change-Id: I077b35219d97afbd5526a2413b97ebc73377f0b5
0d76fe49f81fc1f8768983a0627a8c22b56f02da 19-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiVendorHal: Add support for plumbing out RTT feature flags" into oc-dr1-dev
cd8ee2c95e2546f2392ae8ad3fdaeb7a4929f47d 27-Jun-2017 Glen Kuhne <kuh@google.com> Cache last association failure reason for config

Added functionality into WifiStateMachine and WifiConfigManager to allow us
to cache Association Rejection Statuses that we may want to surface to the
UI. This failure reason is cleared whenever a config has a
NETWORK_CONNECTION_EVENT or any other kind of AUTHENTICATION or
ASSOCIATION failure event.

Test: Added unit test
Bug: 62915994
Change-Id: Ie8b72cbc424017ac20a6834cd7e476fbefcefa4d
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiNetworkHistory.java
ndroid/server/wifi/WifiStateMachine.java
b64920fd57ae954c97bdb0d78056832252ba0744 18-Jul-2017 Etan Cohen <etancohen@google.com> [AWARE] Allow a previously enabled Aware am: 859f9739d7
am: 04834cf224

Change-Id: I085034f45249c8d16018b4d7a6f9d49e89448909
859f9739d760dc66fea3966d2c004b21c0f326cd 18-Jul-2017 Etan Cohen <etancohen@google.com> [AWARE] Allow a previously enabled Aware

Current behavior assumes that the firmware is always in sync with
the host - thus the host knows when Aware is disabled on the firmware
and does not expect an 'aware already enabled' error code when trying
to enable Aware.

However, this may not always be the case (e.g. firmware may not disable
aware on wifi getting disabled). Change:

- Considers 'aware already enabled' to be a success
- But prints out a WTF to track (need to make sure that firmware does
disable Aware when expected)

Bug: 63773428
Test: integrated (acts/sl4a) AttachTest:test_attach_disable_wifi_attach_again
Test: unit tests pass
Change-Id: I940a2ff3e5c24434a1bb2bdf21263b2f8e9769a0
ndroid/server/wifi/aware/WifiAwareNativeCallback.java
a00f77a8534ea344e497581f4e6c282d7f132ed2 18-Jul-2017 Mukesh Agrawal <quiche@google.com> Merge "WifiStateMachine: improve command name"
5858a3401ecd9368af7363b7bfad8df036856205 17-Jul-2017 Roshan Pius <rpius@google.com> WifiVendorHal: Add support for plumbing out RTT feature flags

Bug: 63545934
Test: Unit tests
Change-Id: Ie40debc937310030322a6378119ce975ee1603b8
ndroid/server/wifi/WifiVendorHal.java
24ebfc10ac1bf59fa0d91d68a0f1ae359f1b5cde 17-Jul-2017 Glen Kuhne <kuh@google.com> Merge "Only auto-disqualify 2.4GHz NWs when 5GHz NWs are available" into oc-dr1-dev
3b518300cd177eb84b9fb65c98e2e52ab959d123 14-Mar-2017 Nathan Harold <nharold@google.com> Only auto-disqualify 2.4GHz NWs when 5GHz NWs are available

The WifiSelector logic automatically disqualifies 2.4GHz
networks so that we always go looking for a candidate 5GHz
network. This is the right thing to do so long as there are
5GHz candidates. For 5GHz candidates to be available:
1) 5Ghz must be supported by the device
2) 5GHz networks must be found by a scan
3) 5GHz must be enabled by the user (not always configurable)

Thus, for cases where 5GHz networks aren't available for
whatever reason, we should only disqualify 2.4GHz networks
using the established RSSI-based logic that is applied in
other cases.

Exempt-From-Owner-Approval: Owners file out of date
Bug: 36226123
Test: test2GhzQualifiedNo5GhzAvailable,
test2GhzHighQuality5GhzAvailable,
test2GhzNotQualifiedOther2GhzAvailable,
test5GhzNotQualifiedLowRssi,
test5GhzQualified
Merged-In: I3632e056c9890c7ac6607f72b21e42d34ec0386d
Change-Id: I3632e056c9890c7ac6607f72b21e42d34ec0386d
ndroid/server/wifi/WifiNetworkSelector.java
d2f402a6246ac829693486dd0d1ccad2314783b8 17-Jul-2017 Glen Kuhne <kuh@google.com> Merge changes from topic 'reinvokeP2p' into oc-dr1-dev am: 8b4aaec7a3
am: 72eee6661e

Change-Id: I8fa41093657babe2dfa65f84f622db066c267524
7b3e0c46dad8340f4cda0a3985349b3bd1499bee 17-Jul-2017 Tomoharu Hatano <Tomoharu.Hatano@sonymobile.com> Remove double-quotation from SSID am: d72d2f4c0f
am: 5e5bff6fff

Change-Id: If2a6fc507ec9f7df12247a2e5af9b07a03cd3cb5
e1a797f701b55943372d14d58d0e6e01e1f225e9 17-Jul-2017 Tomoharu Hatano <Tomoharu.Hatano@sonymobile.com> Reload P2P group list am: 29649855cb
am: 33f36fd7eb

Change-Id: Ia7c03ca4af3a653f2291215355634afcc0018f52
6a6f268804de594b4abb07886208bddf8dedbf8f 17-Jul-2017 Tomoharu Hatano <Tomoharu.Hatano@sonymobile.com> Fallback when invitation failed with unknown device am: cc6736a33f
am: e3a0a423ed

Change-Id: I63595252404758f5e0e4f8486c6e4964f706832f
72eee6661ecf34a16b077c5b0608e52b66eb2202 17-Jul-2017 Glen Kuhne <kuh@google.com> Merge changes from topic 'reinvokeP2p' into oc-dr1-dev
am: 8b4aaec7a3

Change-Id: I1529a5e6c07ad350daae045c73646994a71956e2
5e5bff6fff32c40b26b0c21f90071390a736aa75 17-Jul-2017 Tomoharu Hatano <Tomoharu.Hatano@sonymobile.com> Remove double-quotation from SSID
am: d72d2f4c0f

Change-Id: I35d627d01b2b054a682a26bc7f0df49d138bafa0
33f36fd7eb631daab2d6840186a2a69dd125193b 17-Jul-2017 Tomoharu Hatano <Tomoharu.Hatano@sonymobile.com> Reload P2P group list
am: 29649855cb

Change-Id: I333e9c32d10063c6d71aaafbe2c3ed438ebde86b
e3a0a423eda38599b3e1a4d7ae8684e02c9268ac 17-Jul-2017 Tomoharu Hatano <Tomoharu.Hatano@sonymobile.com> Fallback when invitation failed with unknown device
am: cc6736a33f

Change-Id: I0626db473e35d49809e75ffb6aa53f0e8f929ca5
0b23b1445f2f45a4e1c2c466dfb9ec0788634715 17-Jul-2017 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Method to remove all transient networks" into oc-dr1-dev am: c9f254bcdf
am: acf2243b21

Change-Id: I69249e9f7f04c3664ef06be81a100e3cb50d4934
8b4aaec7a360d1889ea80cc7158b6bd35eeccc6b 17-Jul-2017 Glen Kuhne <kuh@google.com> Merge changes from topic 'reinvokeP2p' into oc-dr1-dev

* changes:
Set correct P2P device address of GO
Remove double-quotation from SSID
Reload P2P group list
Fallback when invitation failed with unknown device
acf2243b213c160eeeed47e88a688f40f394417f 17-Jul-2017 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Method to remove all transient networks" into oc-dr1-dev
am: c9f254bcdf

Change-Id: I06fa4c45ba4db716d8179ffcdc125baa2b4f72a4
654ba3541b834d8e4d0516842dd0dc591b8344a7 17-Jul-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Remove transient networks from PNO list am: 77315558f3
am: 23a8701224

Change-Id: Icc3df851d6451c9aaddd4d0a767e9bd9bb2c81a9
3ce12580c2b867253e5188595be254e4f840649e 17-Jul-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Abort data-path setup if there are no data-interfaces" into oc-dr1-dev am: f44c3b64d5
am: 40ebe8cecf

Change-Id: I25f1c3569e7849307bd5b43203a447c72f919449
c9f254bcdf9a1f2b535626a85b416de56a615610 17-Jul-2017 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Method to remove all transient networks" into oc-dr1-dev
23a870122497d94c83da9bdf7eee06f6eadb275f 17-Jul-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Remove transient networks from PNO list
am: 77315558f3

Change-Id: Ib7e729c1997dba4c24a640ded31d42d03bfbbe62
40ebe8cecf9eda79c986386e3bfbc4ee83a17cbd 17-Jul-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Abort data-path setup if there are no data-interfaces" into oc-dr1-dev
am: f44c3b64d5

Change-Id: I558e7e49202b48c8d12953385ea15bd9de2749a0
77315558f37f2ddc71ed029e262deffe0de52b70 30-Jun-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Remove transient networks from PNO list

The network configuration (WifiConfiguration) objects created for
ephemeral/passpoint networks are valid only for the duration of a
particular connection attempt. These are generally deleted every time we
disconnect from such a network. However, there are cases where such
transient network configs linger on in the internal database after a
connection failure, for example. So, ignore such networks in the PNO list
because we don't want the device to wakeup for attempting connection
to such networks.

PS: Such transient network configs will eventually be removed from the
internal database on the next disconnection (Using a lazy removal
approach).

Bug: 62841520
Test: Unit tests
Test: Will send for regression tests.
Change-Id: I8265c32a4195e75903affc63dc70804237ce2dd8
ndroid/server/wifi/WifiConfigManager.java
f44c3b64d5228f3f8029749a23a3a29fb4a3354f 17-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Abort data-path setup if there are no data-interfaces" into oc-dr1-dev
e9d6e6722d8e4724b42f4c1dffa02bed05ee8b0a 30-Jun-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Method to remove all transient networks

Add a new method to remove all transient (ephemeral or passpoint)
configured networks after every disconect. This is a lazy handling of
the removal of any lingering ephemeral networks in the database. For
example, if we encounter an assoc-reject while trying to connect to an
ephemeral network, this config will now be removed in the next
disconnect.

The alternative is to check and remove the ephemeral network whenever
the connection attempt fails, or if it's ignored after addition because
of the connection rate limiter in WifiConnectivityManager, etc. We chose
the passive removal implementation to balance the tradeoff of fixing the
issue and CL size.

Bug: 62841520
Test: Unit tests
Test: Manual tests with WFA.
Test: Regression tests (b/63663462).
Change-Id: I708955bf6ff59a757b2d4ef7dfbb02b383d8e4d8
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.java
0eb389dd4a9bf3d8a5c72ffb2aa893aa91f981a6 15-Jul-2017 Michael Plass <mplass@google.com> Merge changes Ia5c42c7c,Ie8362f6d into oc-dr1-dev am: 1ab69dfa7c
am: 3359479d09

Change-Id: I77d4be85fda2c07f85cfec09ec7b8df8c58dd212
3359479d092caebc1e5c27cfbb7d378d6b6007ee 15-Jul-2017 Michael Plass <mplass@google.com> Merge changes Ia5c42c7c,Ie8362f6d into oc-dr1-dev
am: 1ab69dfa7c

Change-Id: If253a9439bef887b4b106e2e3403af1faa22a8c3
1ab69dfa7cf08e9e92477268b7f82de2ac4c35e0 15-Jul-2017 Michael Plass <mplass@google.com> Merge changes Ia5c42c7c,Ie8362f6d into oc-dr1-dev

* changes:
WifiScoreReport - refactor existing scorers
WifiScoreReport - separate scoring classes
ce34be7342265e27bce865b88f03b3a7aee0702c 15-Jul-2017 mukesh agrawal <quiche@google.com> WifiStateMachine: improve command name

Rename CMD_RSSI_THRESHOLD_BREACH, to make it clearer that
the command is an event notification. (The current naming
might be misunderstood to mean that we're configuring the
threshold.)

Bug: 63716903
Test: compile
Change-Id: I7009999d14fa48bfd61a6335dd92aceaae04c0b7
ndroid/server/wifi/WifiStateMachine.java
e24b61801dbf5c1470254e946e1b2f47f9392fda 14-Jul-2017 Etan Cohen <etancohen@google.com> [AWARE] Abort data-path setup if there are no data-interfaces

Data-interfaces are currently checked only when the data-path setup
process starts. Add checks when actually using data-interface name
and abort process if a data-interface is no longer available.

Bug: 63702690
Test: unit tests + integration tests passing
Change-Id: I922e157228762fc923fd26b350b625724b94ef06
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
b1365c5f66d2cb0bad528b5c94666a7a5c433af5 15-Jul-2017 Etan Cohen <etancohen@google.com> Merge changes I3934b68b,Ic1b3a97b into oc-dr1-dev am: 65af05ee2e
am: 2dba40e37d

Change-Id: Icad42e9550ca5c97ee58fed43716c224043dc8de
2dba40e37dcac62c94298ebfc7585c9067203f68 15-Jul-2017 Etan Cohen <etancohen@google.com> Merge changes I3934b68b,Ic1b3a97b into oc-dr1-dev
am: 65af05ee2e

Change-Id: I988e22a1c6fc8e8a5097e3d7a0cb46a1ffc09a48
65af05ee2ee44aeb56d42790c80c003b82f4ea55 15-Jul-2017 Etan Cohen <etancohen@google.com> Merge changes I3934b68b,Ic1b3a97b into oc-dr1-dev

* changes:
[AWARE] Restrict number of data interfaces and paths
[AWARE] Create a locally maintained peer ID instead of firmware ID
3dd02f1e60b930f59d33c462aa2daefb4baf65e5 13-Jul-2017 Etan Cohen <etancohen@google.com> [AWARE] Restrict number of data interfaces and paths

Restrict the number of supported data-interfaces (NDIs) to 1 and
the number of data-paths (NDPs) per NDI to 1. Limit will be
removed (in steps) once framework support is added.

Bug: 63633579
Bug: 31940045
Test: TBD - fails, bug outstanding to partner
Change-Id: I3934b68b121f0d72b2ff4595653129c689183e64
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareNativeCallback.java
eddf3faabf426d18b7d3dff187ec91fe6a96665d 13-Jul-2017 Etan Cohen <etancohen@google.com> [AWARE] Create a locally maintained peer ID instead of firmware ID

The firmware provides a peer requestor ID + peer MAC to identify the
peer. The peer requestor ID alone is insufficient.

Original code used the peer requestor ID as the only identifier. This
failed once started testing with >2 devices.

Allocate a local (unique) peer ID which is mapped to the peer requestor
ID and peer MAC by the framework.

Bug: 63642354
Test: all unit tests + integration (sl4a) tests
Change-Id: Ic1b3a97b9675be8d8561f4500e8c777ddff42950
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareDiscoverySessionState.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
e81e74137b3da0254cc7d77a5773ea9bff67d5f8 07-Jul-2017 Peter Qiu <zqiu@google.com> Display notification when wrong password error is detected

A new notification will be generated and displayed when the wrong
password error is detected for the current connection.
It will be dismissed when:
- the user manually dismiss it or tap on it
- attempting a new Wi-Fi network connection
- timeout, currently set to 5 minutes

The current landing page for the notification is the network list page,
it will be updated when the new landing page is ready (dialog prompting
for the new password).

Bug: 33245941
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manual testing
Change-Id: Iaa75bff6d96ed8c9e9d8472a840d03c54f9f2c52
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WrongPasswordNotifier.java
b9e124906bd309f246cbb5fde791944fd26313d7 14-Jul-2017 Jeff Sharkey <jsharkey@google.com> Merge "Move "metered" persistence to WifiConfiguration."
526b27be758c9606036ce78fa896792f9154b922 14-Jul-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Set Tx power limits during calls am: ec0922425c
am: efb72c6db2

Change-Id: Ia8e385939dd5ebed46ccae1275bfdb653140361e
efb72c6db235111193308d0a32f0d46dc79e352d 14-Jul-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Set Tx power limits during calls
am: ec0922425c

Change-Id: I99c89350b77b1d497f0cfab7927e824b2bf483b5
4befdc216d00e2dce59097fb1f8195afe489fd32 12-Jul-2017 Jeff Sharkey <jsharkey@android.com> Move "metered" persistence to WifiConfiguration.

For a long time we've had a nasty tangled dependency between Wi-Fi
and NPMS, since they both persisted different details for configured
networks. As part of preparing for new carrier data plan APIs, move
the tracking of meteredness over to WifiConfiguration.

Persist both meteredHint and meteredOverride, and flesh out more
documentation for them both. Allow them to be mutated to support
both upgrade from NPMS and modification by Settings.

When we notice a strong signal that a network is metered, persist
that fact in meteredHint for future reference to be as conservative
as possible; user always has the option to override.

More explicit setting of values in updateCapabilities().

Bug: 63391323
Test: builds, boots, Wi-Fi policy is upgraded
Change-Id: Id7c282b007a23892ee739bd2132c3b63243bd0ce
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiNetworkHistory.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/util/XmlUtil.java
d9730aa504ed133340267051f35743d102f192df 13-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: PasspointNetworkEvaluator: update network candidate for current network"
1bb08811f24863da710dd621f6c613ea2a104f2d 29-Jun-2017 Michael Plass <mplass@google.com> WifiScoreReport - refactor existing scorers

Bug: 62622378
Test: Unit tests pass

Change-Id: Ia5c42c7c1e0c8c5c2e29ad1e2b196b94686759aa
ndroid/server/wifi/AggressiveConnectedScore.java
ndroid/server/wifi/LegacyConnectedScore.java
ndroid/server/wifi/WifiScoreReport.java
5521a7cfd3cf6bf93d95a3207c32ecb6833e0dc8 19-Jun-2017 Michael Plass <mplass@google.com> WifiScoreReport - separate scoring classes

Move various wifi connected-link scoring algorithms in WifiScoreReport
into separate classes.

This commit introduces the abstract base class.

Bug: 62622378
Test: Compiles
Change-Id: Ie8362f6d521c072a960dacfb0a62d68ab5e05ae1
ndroid/server/wifi/ConnectedScore.java
ec0922425c007ba22527e0cacad1445d5f0d0ad8 07-Jul-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Set Tx power limits during calls

Listen to telephony's call state change events so that we can set/reset
the tx power level to meet SAR requirements in STA mode.
a) When the call is in progress (OFFHOOK), set the tx power limit to
specified level.
b) When the call is done (IDLE), reset the tx power limit (will fallback
to default).

The set/reset is sent to the driver using the 2 new HIDL API's added to
the 1.1 wifi HAL package.

Also, this is an optional feature and we don't need to this unless the
|config_wifi_framework_enable_sar_tx_power_limit| is set on the device.

Bug: 62437848
Test: Manual tests.
Test: Unit tests to be added.
Change-Id: I990f867ce045dfc5f18833afdc9168ec10d929fa
ndroid/server/wifi/WifiStateMachine.java
ceaba988f7c8febc7404262002dd4e886e0eae16 12-Jul-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Configure a Service Name for OOB NDP with PMK" into oc-dr1-dev am: 80f9ea680d
am: 1ade6e7384

Change-Id: I03e1de87336750bf6b8b648fdb240e838522924d
1ade6e7384c4b36a5cbed7e74917273ea5a9168f 12-Jul-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Configure a Service Name for OOB NDP with PMK" into oc-dr1-dev
am: 80f9ea680d

Change-Id: I3351c30a50a5016905ba3bf843fd65289f4ac696
80f9ea680d1fc7a2e343c8b5df0505cca5c3bc7f 12-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Configure a Service Name for OOB NDP with PMK" into oc-dr1-dev
a05703c308bd2e3df59824488daebf75757e4c1e 12-Jul-2017 Roshan Pius <rpius@google.com> Merge "WifiServiceImpl: Add permission check for async message handling" into oc-dr1-dev am: e8e6d8b116
am: c34c7eed97

Change-Id: I670a65747c68b0bd9a56d5c7b4392fdbc4b2e51b
c34c7eed97cb403efaaf3153d8630c8ed69c5d7a 12-Jul-2017 Roshan Pius <rpius@google.com> Merge "WifiServiceImpl: Add permission check for async message handling" into oc-dr1-dev
am: e8e6d8b116

Change-Id: Ie27c31866eda8400eb06953c5bbd5242e9d7ba81
e8e6d8b116df0eec9ab44f2073ff3f6e80f3c008 12-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiServiceImpl: Add permission check for async message handling" into oc-dr1-dev
467ad9b2e48b20ae087da3cd4d8a4ffb97822f90 12-Jul-2017 Roshan Pius <rpius@google.com> Merge "WifiVendorHal: Add support for new SAR related HAL API's" into oc-dr1-dev am: 94e6a40d25
am: f96c17f4f1

Change-Id: I90b4e71e3b61af95f2ccd08facd0d949d9243e75
f96c17f4f142156b04346368f9d6c1bd2f2e60c8 12-Jul-2017 Roshan Pius <rpius@google.com> Merge "WifiVendorHal: Add support for new SAR related HAL API's" into oc-dr1-dev
am: 94e6a40d25

Change-Id: Iabfd333e2b9632778a9f6723135dc1a7269e04a9
94e6a40d256aa94f13b334c08cd1e60a92886da1 12-Jul-2017 Roshan Pius <rpius@google.com> Merge "WifiVendorHal: Add support for new SAR related HAL API's" into oc-dr1-dev
fcbfa80a8deed21b2c7e6f43f9b1305f73b89132 12-Jul-2017 Peter Qiu <zqiu@google.com> Merge changes from topic 'passpoint_metrics' into oc-dr1-dev am: 209007db2b
am: 61a44929dc

Change-Id: I9ab6f20a65e3620b2bf50e39afaad1ea98909c2e
d983cadcacb9270f08d9b3fa064e20fe2eca0d47 12-Jul-2017 Roshan Pius <rpius@google.com> Merge "WifiStateMachine: Increment startup failure metrics" into oc-dr1-dev am: 9c785b63e3
am: 93899df2b6

Change-Id: I6b9a90579b9fc3dc96603dd0ad0b53a8ffdea092
61a44929dc78c8bfc85816c31d0608ab9469457b 12-Jul-2017 Peter Qiu <zqiu@google.com> Merge changes from topic 'passpoint_metrics' into oc-dr1-dev
am: 209007db2b

Change-Id: I08afc678a80917226afa31244a34df64313fb2a6
93899df2b606f76038aebc72f501faa2023d36c4 12-Jul-2017 Roshan Pius <rpius@google.com> Merge "WifiStateMachine: Increment startup failure metrics" into oc-dr1-dev
am: 9c785b63e3

Change-Id: I1badd1051c1322c46b1ce6f327e25419a1adb974
209007db2b1f561b39a79e443e8ab82e9c67b8b0 12-Jul-2017 Peter Qiu <zqiu@google.com> Merge changes from topic 'passpoint_metrics' into oc-dr1-dev

* changes:
hotspot2: track number of providers that connected successfully
WifiMetrics: add support for Passpoint related metrics
ba89009ba7554d5073c0b93c04f167c3a11667fa 07-Jul-2017 Roshan Pius <rpius@google.com> WifiVendorHal: Add support for new SAR related HAL API's

Adding support in WifiVendorHal to invoke the 2 new HAL API's added in
IWifiChip in the 1.1 package. The framework needs to be backward
compatible with 1.0 HAL service as well, so these new wrapper methods
return failure if the device is running the 1.0 HAL.
Also, added the plumbing for the new feature bit for this feature:
WifiManager.WIFI_FEATURE_TX_POWER_LIMIT.

TODO: Integrate this with WifiStateMachine in a separate CL which
listens to voice call progress intents.

Bug: 62437848
Test: Unit tests
Change-Id: I9d2b5ba297a5b757933db773eb1b9f067ad80e15
ndroid/server/wifi/HalDeviceManager.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiVendorHal.java
9c785b63e3ddd34dbfb5fd736328019633ad9885 12-Jul-2017 Roshan Pius <rpius@google.com> Merge "WifiStateMachine: Increment startup failure metrics" into oc-dr1-dev
49357a30edf5786c8db4bad6f5dbe62545751cc6 23-Jun-2017 Peter Qiu <zqiu@google.com> hotspot2: track number of providers that connected successfully

Add boolean field "hasEverConnected" to PasspointProvider to indicate
if the given provider had ever provided a successful network connection.
The added field is persisted to the config file.

Update the associated metric for the given provider after it was used
to successfully connect for the first time.

Note that PasspointManager#onPasspointNetworkConnected can be expanded
in the future to keep track of connected SSIDs for a given Passpoint
provider, as an additional input to the network selection algorithm.

Bug: 36358031
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually verify the provider's "hasEverConnected" is set to true
in the config file after a success connection

Change-Id: I6ef4ec801f78f34ff2ca9df97ab06188e1cc0324
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/PasspointConfigStoreData.java
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointProvider.java
d89cc8dced4dda3da4d7123233d6196f473b8e59 11-Jul-2017 Etan Cohen <etancohen@google.com> [AWARE] Configure a Service Name for OOB NDP with PMK

Configure a Service Name (dummy) when creating an out-of-band
NAN data-path (NDP) using a PMK. This was already done for Passphrase,
same code and (dummy) Service Name used for PMK as well.

Rationale: the key generation (from the PMK) requires a hash of
the service name.

Bug: 63581297
Test: DataPathTest:test_oob_pmk_specific passes (and other PMK tests)
Change-Id: If8e3b8263ccd98c86f2c218324ea4ab0159f4217
ndroid/server/wifi/aware/WifiAwareNativeApi.java
26b97ef6a6d8e755e7db541afa84aacd807599d7 22-Jun-2017 Peter Qiu <zqiu@google.com> WifiMetrics: add support for Passpoint related metrics

The support for tracking number of Passpoint providers that
provided successful network connection will be added in the upcoming
CL.

Bug: 36358031
Test: frameworks/wifi/tests/wifitests/runtests.sh
Change-Id: Id0dc3bc6a3d30785c883b8a478be9b23911d3747
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/PasspointManager.java
a1d0199c4ba304e0c36315083a4c23862ed05307 11-Jul-2017 Nathan Harold <nharold@google.com> Only auto-disqualify 2.4GHz NWs when 5GHz NWs are available
am: 98f550c524

Change-Id: I60fd81c84802c2f442b87099e77e56290c892251
fc2a6d71179e969bde3011e1a0601757c081af40 07-Jun-2017 Tomoharu Hatano <Tomoharu.Hatano@sonymobile.com> Set correct P2P device address of GO

A peer device receives invitation request with 00:00:00:00:00:00
as go_dev_addr from GO. As a result, invitation is rejected.
That's because wpa_supplicant doesn't set go_dev_addr for onGroupStarted
when device becomes GO, so correct P2P device address of GO needs to be
set.

Bug: 62009675

Change-Id: If3d717ea5f1ddc527e9719c931f063ab293beba9
Singed-off-by Daisuke Niwa <daisuke.x.niwa@sonymobile.com>
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
a082e33e3f96e2b8394ae42b89601cad3f28679c 09-Jun-2017 Roshan Pius <rpius@google.com> WifiServiceImpl: Add permission check for async message handling

The async messages received from WifiManager API's are not being checked
for any permissions. So, add a permission check for all such messages to
prevent unauthorized apps from triggering wifi operations.

Bug: 62350187
Test: Unit tests
Change-Id: Ic855f6503671766cc2397df7bb393ca957375c40
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/util/WifiPermissionsUtil.java
ndroid/server/wifi/util/WifiPermissionsWrapper.java
ce1de180e7652e2b2313b401451ca3d9d027b372 21-Jun-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Increment startup failure metrics

Increment the metrics for wifi native start failure reasons.
WifiNative.setupForClientMode() and WifiNative.setupForSoftApMode() have
been modified to return the reason for failure. WifiStateMachine can now
use these reason codes to increment the corresponding metrics.

Bug: 38457087
Test: Unit tests
Change-Id: I94c4283bac1566c1edd3985d96e6f39b7dd56910
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
d72d2f4c0feb70c5f088e3109c2d940c05482d06 17-May-2017 Tomoharu Hatano <Tomoharu.Hatano@sonymobile.com> Remove double-quotation from SSID

P2P device always uses ProvisionDiscovery even though a peer device is
a known device as existing persistent GO. That's because
WifiP2pGroupList has SSID without double-quotation but getSsid returns
SSID with double-quotation.

Bug: 62007016

Change-Id: I70e5068f2072fb2fb34df6add8fe713c9c3b4e51
Singed-off-by Daisuke Niwa <daisuke.x.niwa@sonymobile.com>
ndroid/server/wifi/p2p/SupplicantP2pIfaceHal.java
29649855cbfa438c81bfb7dd85d230f75791a70f 16-May-2017 Tomoharu Hatano <Tomoharu.Hatano@sonymobile.com> Reload P2P group list

WifiP2pGroupList doesn't clear when group is started.
And then, WifiP2pGroupList updates existing member.
In this case, framework updates LruCache by new member same as existing
member.
As a result, LruCache.put() calls entryRemoved for new member
and it calls removeNetwork.
So when P2P_GROUP_STARTED_EVENT is received, updatePersistentNetworks
should be called with "RELOAD" to avoid to call removeNetwork.

Bug: 62007204
Bug: 62007016

Change-Id: Ie009e3f7e33201fa274923b0f6153eeb07525b18
Singed-off-by Daisuke Niwa <daisuke.x.niwa@sonymobile.com>
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
cc6736a33f43ba6949d880260f929e351e5dd9be 17-May-2017 Tomoharu Hatano <Tomoharu.Hatano@sonymobile.com> Fallback when invitation failed with unknown device

Connection fails when GO invites P2P device whose credential
is already forgotten. Framework needs to trigger connection
again when wpa_supplicant already removes client device from
p2p_client_list.

Bug: 62007204

Change-Id: Icfdf0941b3adc99bc7fe2f1def6dcf1d2e8d08bc
Singed-off-by Daisuke Niwa <daisuke.x.niwa@sonymobile.com>
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
98f550c5246c01ce6fd3bb936489dd69d15a74f3 14-Mar-2017 Nathan Harold <nharold@google.com> Only auto-disqualify 2.4GHz NWs when 5GHz NWs are available

The WifiSelector logic automatically disqualifies 2.4GHz
networks so that we always go looking for a candidate 5GHz
network. This is the right thing to do so long as there are
5GHz candidates. For 5GHz candidates to be available:
1) 5Ghz must be supported by the device
2) 5GHz networks must be found by a scan
3) 5GHz must be enabled by the user (not always configurable)

Thus, for cases where 5GHz networks aren't available for
whatever reason, we should only disqualify 2.4GHz networks
using the established RSSI-based logic that is applied in
other cases.

Bug: 36226123
Test: test2GhzQualifiedNo5GhzAvailable,
test2GhzHighQuality5GhzAvailable,
test2GhzNotQualifiedOther2GhzAvailable,
test5GhzNotQualifiedLowRssi,
test5GhzQualified
Change-Id: I3632e056c9890c7ac6607f72b21e42d34ec0386d
(cherry picked from commit 59236109a719b9897bca1ac5216292a3f7e97104)
ndroid/server/wifi/WifiNetworkSelector.java
f99d34c8ac453b43071ef8e83b4c9e29020b7905 06-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Use legacy TYPE_NONE network type"
cf2568bf332f7e4e98e6bdbc346f8f786d3a400e 05-Jul-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Update metrics dumpsys" into oc-dr1-dev am: f695dc1941
am: b0d92396ba

Change-Id: I1a03c9b2688d0e25aef52db8cd08b9fa7c3075b5
7816e9860a66904c46ca5a58364350262dfc1bc4 05-Jul-2017 Etan Cohen <etancohen@google.com> Merge changes I30d7a841,Idbc526df,Ie90ec6e9,Ib0316663 into oc-dr1-dev am: fde238c66f
am: 1ebdcf312e

Change-Id: Iccdd9971353183b3273163d9f058c5abd471009c
f695dc1941b90bbfa555f311b05f3eeab9d7ecc1 05-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Update metrics dumpsys" into oc-dr1-dev
fde238c66f81feccb1900ed182c7d859e8ec47ac 05-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes I30d7a841,Idbc526df,Ie90ec6e9,Ib0316663 into oc-dr1-dev

* changes:
[AWARE] Add metrics for data-path session duration
[AWARE] Add NDP (data-path) creation duration metrics
[AWARE] Add NAN data-path (NDP/NDI) metrics
[AWARE] Simplify Discovery Session metrics collection
130ace4a87f3163f9ba99ebf218e897936eb7ae9 05-Jul-2017 Rebecca Silberstein <silberst@google.com> Merge "SoftApManager: support hidden ap configs" into oc-dr1-dev am: cca4b57c80
am: 186d64f7dd

Change-Id: I0e46a26a6dc8da8aa490b415c0aecaf86606ac0e
cca4b57c80ceb087a0bd37fa2cbc0bcca483f3d0 05-Jul-2017 Rebecca Silberstein <silberst@google.com> Merge "SoftApManager: support hidden ap configs" into oc-dr1-dev
6a2c8514358b7cbf4ba1dca0208e0f955a184225 24-May-2017 Etan Cohen <etancohen@google.com> [AWARE] Use legacy TYPE_NONE network type

Use TYPE_NONE to specify the legacy network type. Indicates that
Aware is not a legacy network (legacy vis-a-vis the code base) and
should not be tracked as such.

Bug: 30088447
Test: unit test, integration (sl4a) tests.
Change-Id: I6bc4b5f3c05e54bf4b0255deb1b8806f1030f034
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
94c43d81023461dd3216770c1b6f6b1bbcbd23d2 05-Jul-2017 Glen Kuhne <kuh@google.com> Merge "Limit SelfRecovery wifi restarts to some amount" into oc-dr1-dev am: 35eb2c8f64
am: 98af073fb3

Change-Id: I8068163ba9ddb6b902a1e5ec9489b5302ba5f908
35eb2c8f6479eec50cf681c23f1a21a8ce14a691 05-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Limit SelfRecovery wifi restarts to some amount" into oc-dr1-dev
5c5b37f9cc52daff34b8509dbda68e754fbbcacb 29-Jun-2017 Rebecca Silberstein <silberst@google.com> SoftApManager: support hidden ap configs

WifiConfigurations for hostapd may set the hiddenSSID flag to true,
intending to start softap without advertising the network. While this
is not a valid option through the UI, it can be very useful in a test
environment. This CL adds support to start hostapd with the hidden
network flag set.

Note: an integration test will be added to verify the behavior, but this
requires additional plumbing in the test code. Tracking that work with
Bug 63141761.

Bug: 34209778
Test: ran modified integration test to verify the ssid is not broadcast
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: If5fef73bc069f155572257e4a9c81efd00dccacf
ndroid/server/wifi/SoftApManager.java
40828b4273f3d33a0a731a9348afc15650f9071f 01-Jul-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Metrics for Aware enable/disable cycle" into oc-dr1-dev am: 2f09c3602b
am: ce6c236914

Change-Id: Ic064013cec67867b43f80f829162862569be7afb
2f09c3602b5207d8e8a46b7b9fabe17b42b02315 01-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Metrics for Aware enable/disable cycle" into oc-dr1-dev
5de3baeffa8c83ed390e6357ffaab710235a68f2 01-Jul-2017 Etan Cohen <etancohen@google.com> [AWARE] Update metrics dumpsys

Catch up Aware metrics dumpsys to include all metrics.

Bug: 26565416
Test: unit tests passing, integration tests passing, shows data
Change-Id: I4797c1f4c40aa751ee6b1509d2b3754de0f1db25
ndroid/server/wifi/aware/WifiAwareMetrics.java
7a44d3fab050e1aca22317a604a68016c79f5925 29-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Add metrics for data-path session duration

NPD (NAN data-path) session duration metrics: measured from
a successful completion (confirm) to termination notification.

Bug: 26565416
Test: unit tests passing
Change-Id: I30d7a8417789789662e9252fcafbd626a9377d23
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareMetrics.java
dca9963c7292e17318f5ba0dee6c3683c7c9f941 29-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Add NDP (data-path) creation duration metrics

Collect information on how long it takes to create a NAN
data-path (NDP): starting from initiator request to confirm
or from responder getting a request to confirm.

Bug: 26565416
Test: unit tests passing
Change-Id: Idbc526df1bb94af88247e9780925d0c312101a3a
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareMetrics.java
f28f838f3fe502fff47bcb3098098556b167ed88 29-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Add NAN data-path (NDP/NDI) metrics

Add metrics on the number of Wi-Fi Aware (NAN) data-paths,
data-interfaces, and status codes.

Bug: 26565416
Test: unit tests passing
Change-Id: Ie90ec6e94d4124d66d8f80f2035bb0af3d1cd592
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareMetrics.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
34c8241b4b1d68cf98fad51cd0e56295e2721c6d 28-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Simplify Discovery Session metrics collection

Simplify metric collection - there's no need to keep an ongoing datbase
of information since that is already kept by the state machine. Simply
calculate updated max on every metric update.

Bug: 26565416
Test: unit tests passing
Change-Id: Ib0316663b37def153640eb2ed1c746c11423e755
ndroid/server/wifi/aware/WifiAwareMetrics.java
da389f4b673e0f3fe54dc5b1123221037eb96e42 27-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Metrics for Aware enable/disable cycle

Bug: 26565416
Test: (new) unit tests passing
Change-Id: I3c3d11354032ebbfa650cdbe5c120dc1b416a5fd
ndroid/server/wifi/aware/WifiAwareMetrics.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
541112a663292bb91edd203c0a9d49ec3b4e1d60 29-Jun-2017 Roshan Pius <rpius@google.com> Merge "WifiConfigurationUtil: PSK hex string length should be 64" into oc-dr1-dev am: 53c826dec7
am: 59ff08c1a5

Change-Id: I7a3ec1f784907beef66687814d2a99e1ee814dfa
3459e9095c803d8ddc559d3915c2721071c83545 29-Jun-2017 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Separate validation criteria for update" into oc-dr1-dev am: 05a1834e30
am: 268143cc31

Change-Id: I25f7de966794ff1c87911a50c947bb03857d70c7
2940e4b1659db5d566b0c429f1b81d1d479bd708 28-Jun-2017 Roshan Pius <rpius@google.com> WifiConfigurationUtil: PSK hex string length should be 64

The length check was using an incorrect value of 128 in validatePsk().

Bug: 62987438
Test: Unit test
Change-Id: I04c985946cec18cd07d40d35f22b3c14130abee2
ndroid/server/wifi/WifiConfigurationUtil.java
edec779524a0563580432fb2a7bb4cd75a6883ff 24-Jun-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Separate validation criteria for update

For network config updates, the WifiConfiguration is expected to be a
sparse object with only the fields being updated being filled in. So,
separate out the network config validation criterions for the 2 cases.

Current special cases for update are:
1. SSID's are allowed to be null (because it may not be updated).
2. preSharedKey are allowed to be "*" (This is apps screwing up and sending
back the masked password back to us in an update).

Bug: 62955649
Test: Unit tests
Change-Id: I0c77af06503548f0887c41b02777f288f8a9d013
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigurationUtil.java
ed8190078f8c74501df7318eea52536d5a43a158 28-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Metrics for discovery sessions am: d8135fd177
am: 54abd3ae1e

Change-Id: I6a0df57a4afbbe049fc8f488320e019f308ee66c
e8cf3b95869b71ff4719b037f79d74b74d2a2fc3 23-Jun-2017 Glen Kuhne <kuh@google.com> Limit SelfRecovery wifi restarts to some amount

This prevents wifi from getting into an extreme restart loop if there's
some repeated HAL or WIFICOND crash. Currently limits it to ~48 per day.

Added a buffer logging restarts for HAL_CRASH and WIFICOND_CRASH.
If buffer has more than 2 restarts logged in the last 2 hour time
window, further restarts are ignored. Buffer is cleaned up on every
trigger.

Bug: 62835400
Test: Unit tests
Change-Id: Idb0bc060424423f1a27782868689bff5ed2c0520
ndroid/server/wifi/SelfRecovery.java
ndroid/server/wifi/WifiInjector.java
d8135fd1779f30c7934d87fd65fbfa678db14548 27-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Metrics for discovery sessions

Bug: 26565416
Test: (new) unit tests passing
Change-Id: I0d3f2eb159c8f517156431fb0b09deb4c90fd4b9
ndroid/server/wifi/aware/WifiAwareClientState.java
ndroid/server/wifi/aware/WifiAwareDiscoverySessionState.java
ndroid/server/wifi/aware/WifiAwareMetrics.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
c00117b5d0d24db9bd6121e1d7213958d879d702 23-Jun-2017 Etan Cohen <etancohen@google.com> Merge changes I35d96419,I8ce5b2e6 into oc-dr1-dev am: c7f423cc67
am: eacfb969ac

Change-Id: Ic3e67d3da3cfca69097ac160f6815379769bf191
8345f77720c49b9d7e082094a106ccb23ea906bb 23-Jun-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Move initialization from main system server thread" into oc-dr1-dev am: db83149363
am: 972db8f5f7

Change-Id: Iae31c22bcc72558e2a44b8d366878bddd43dddd0
c7f423cc67f1efb697c7b22fd844d759da2ef23a 23-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes I35d96419,I8ce5b2e6 into oc-dr1-dev

* changes:
[AWARE] Add debug hooks to obtain count of event callbacks
[AWARE] Mask passphrase/pmk information
db8314936368507b367b42dc0a36e967432e98f8 23-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Move initialization from main system server thread" into oc-dr1-dev
2a43452d959e87ad47b9b4a5e16d56050ca0d56a 23-Jun-2017 Peter Qiu <zqiu@google.com> Merge "Permanent disable network with wrong password" into oc-dr1-dev am: 6560e4d203
am: a1b28a6249

Change-Id: I5c72bd770fc001d3d684aec556cc37cadc65d504
6560e4d203ffc5c1306b466921833e466cf2b5a7 23-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Permanent disable network with wrong password" into oc-dr1-dev
9572e8b6de6cb7912df530ae2376452bf1469b33 22-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Add debug hooks to obtain count of event callbacks

Count Aware event callbacks and provide a shell command to
retrieve and reset data.

While callbacks may be percolated up through the framework and
detected - that is not always the case. Some of the callbacks are
masked by the framework. It is still interesting to know when
callbacks occur - to detect invalid wakeups of the host.

Bug: 31940045
Test: manual shell cmd execution validates data
Change-Id: I35d96419342c330f2d64a422b9b39369311aa09e
ndroid/server/wifi/aware/WifiAwareNativeCallback.java
ndroid/server/wifi/aware/WifiAwareNativeManager.java
ndroid/server/wifi/aware/WifiAwareService.java
efadd5383b5a98dcc249d3b8700142d3d748989f 21-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Mask passphrase/pmk information

Bug: 62866763
Test: validated that logs don't show pmk/passphrase anymore
Change-Id: I8ce5b2e6192af05f8748bee51e13312b65185a1d
ndroid/server/wifi/aware/WifiAwareStateManager.java
f001b85339f5695a4b8fc983fb4e4855163762bc 23-Jun-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Ignore masked EAP passwords am: 327bd42531 am: 0ff336df32
am: 2cfb75e974

Change-Id: I6c64ba6573072de6e9b80ba784984175dec2bea7
0ff336df32d1a657e5578ede99ade1e1f126a97a 23-Jun-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Ignore masked EAP passwords
am: 327bd42531

Change-Id: I634165bae53faab3a777fa0dafcbb48ed3e21db4
327bd4253115abc757ebaf5f1bddd9f5ad2253e4 22-Jun-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Ignore masked EAP passwords

Whenever an app retrieves one of the saved network configuration using
the WifiManager API's, we mask out the |preSharedKey|, |wepKeys| and
|enterpriseConfig.getPassword()| fields. These apps may however pass the
same network configuration (with some changes) back to the
framework via WifiManager.updateNetwork() or WifiManager.connect() API's.
Since the current update API does not specify which field within the
WifiConfiguration is modified, framework tries to copy over all the
fields sent in thus overriding the real password with the masked value
sent by the app.

Ideally the apps should create a new WifiConfiguration with just the
fields that they want to modify and send it via
WifiManager.updateNetwork(). But, since this is a very common mistake
we have some protection against this in the framework for the
|preSharedKey| and |wepKeys|. But, we're missing this protection for the
|enterpriseConfig.getPassword()| fields.

Bug: 62893342
Test: Unit tests.
Test: Manual test to ensure that masked password sent from settings is
ignored.
Test: Regression tests.

Change-Id: I163c8c44b2717364aff88cb7ca1b2faa3aa6cce9
ndroid/server/wifi/WifiConfigManager.java
4e4dfa5a4fb051b07afbeea05b4754a2c86def8f 22-Jun-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Increase NDP creation timeout from 5 to 20 secs" into oc-dr1-dev am: cf26794139
am: 3fa7afa8df

Change-Id: I1eaa01607458d3dae0b88dee8e14a2c9f7bb8625
cf26794139d7166550bdfb9f7d0d06be2a14ac6e 22-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Increase NDP creation timeout from 5 to 20 secs" into oc-dr1-dev
9b37a65ec7b89ca58639443fd899824b28d04191 22-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Move initialization from main system server thread

Finalize the move of all potentially blocking operations from
the main system server thread to a delayed initialization on the
Aware thread.

Bug: 62890610
Test: unit tests, boot and verify Aware service up
Change-Id: Iba45fa6ca170cfe79c896822992662ba7e5b6064
ndroid/server/wifi/aware/WifiAwareNativeManager.java
ndroid/server/wifi/aware/WifiAwareService.java
04a28216641bf293a200aa06d7f996334c2d9c5c 22-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiStateTracker: handle RejectedExecutionException" into oc-dr1-dev
81bfa8b9310f7a33345e17737dd12f9efac771f5 22-Jun-2017 Wei Wang <wvw@google.com> WifiStateTracker: handle RejectedExecutionException am: a4a7244fea am: 4a86732c95 am: a41c1f9227
am: 46a741d7da

Change-Id: If624f336cfbb3414586062b32e97b17ddef356fe
46a741d7dae5115b6c1e9746e85805b4ec438cf2 22-Jun-2017 Wei Wang <wvw@google.com> WifiStateTracker: handle RejectedExecutionException am: a4a7244fea am: 4a86732c95
am: a41c1f9227

Change-Id: I33b24858a0270a4acbb72777923bcf9b224a0da7
a41c1f922772269a121e51dd69c628f363412b23 22-Jun-2017 Wei Wang <wvw@google.com> WifiStateTracker: handle RejectedExecutionException am: a4a7244fea
am: 4a86732c95

Change-Id: I5d4941355b8ebc472751ab83782342a025f5459e
3ee9c5a0673fdf963f7be80a64d96e21796f4350 20-Jun-2017 Wei Wang <wvw@google.com> WifiStateTracker: handle RejectedExecutionException

RejectedExecutionException can be ejected from BatteryStats during
shutdown which caused runtime reboot during shutdown.

Bug: 62594574
Test: Build and Boot
Change-Id: I4da425b449745b9a0b7b414e37a891e552377141
(cherry picked from commit a4a7244fea03df223af726b0e8a4028593bd8e4b)
ndroid/server/wifi/WifiStateTracker.java
a939bad4d61d9e750994b0fa4e0caa2e6cddefc7 21-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Increase NDP creation timeout from 5 to 20 secs

The framework gives an uppper timeout for NDP (NAN data-path)
negotiation to complete. The original value of 5 seconds is too
low for:
- Secure NDPs (requires additional message transmission)
- Low power modes (slots are further apart)

Increase to 20 seconds.

Bug: 62844546
Test: integration tests passing (high & low power modes)
Change-Id: Id7d09c74cfa5129ff3cddfc811744609f5f694d5
ndroid/server/wifi/aware/WifiAwareStateManager.java
4ab2a8ac0bd91f40c1175f89aee9074e619c1da8 21-Jun-2017 Roshan Pius <rpius@google.com> WifiScanningService: Cache only results of full single scans am: 23216ca333 am: a2f60dca3a
am: cebe986861

Change-Id: I99b51435731977c0a80d6e2204cbdcdf210d8ec8
cebe986861bc1405afd7f333dbc6996107deb14b 21-Jun-2017 Roshan Pius <rpius@google.com> WifiScanningService: Cache only results of full single scans am: 23216ca333
am: a2f60dca3a

Change-Id: Ie3d7eb1636f6c7687dc36517c8350dcc8af0b519
4e4877e53cfa499204bf4603c7b79b6caa83df76 21-Jun-2017 Roshan Pius <rpius@google.com> WifiScanningService: Cache only results of full single scans
am: 23216ca333

Change-Id: I593c96a014aba48bf647000cfabda1d359b2fb36
a2f60dca3aeb71d6e8a86b9e2bd856242fa797e9 21-Jun-2017 Roshan Pius <rpius@google.com> WifiScanningService: Cache only results of full single scans
am: 23216ca333

Change-Id: I142f5ed6751469a0aaedf1a2202598c879025a25
8e11beb83ee550fd88700e40aefa7e27245842ca 21-Jun-2017 Roshan Pius <rpius@google.com> Merge "WifiLastResortWatchdog: Clear failure counts on HAL init" into oc-dr1-dev am: 1783029791
am: 0df2d9ad62

Change-Id: I66a12d807c6a42add27a0a90740dec894b4775cc
1783029791a5ab6cda5de3d92c040fa3a11a62bd 21-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiLastResortWatchdog: Clear failure counts on HAL init" into oc-dr1-dev
c05cf1bbe87776b96a2f1442347c7fa6e2351e56 20-Jun-2017 Roshan Pius <rpius@google.com> WifiNative: Stop the Hal even if wificond stop fails am: 7130816d6c
am: e225278d9d

Change-Id: I80f2ebac52851b29ae2c6fdf0f212398915021dd
45bcb686a29fba3131773f358dfabe4179c22321 20-Jun-2017 Roshan Pius <rpius@google.com> SupplicantHal: Add locks to all methods am: c0203e2c4f
am: dcf9e3b0f2

Change-Id: I269b379febcb38cc77d8abc0d68976f9ff7d373f
a4a7244fea03df223af726b0e8a4028593bd8e4b 20-Jun-2017 Wei Wang <wvw@google.com> WifiStateTracker: handle RejectedExecutionException

RejectedExecutionException can be ejected from BatteryStats during
shutdown which caused runtime reboot during shutdown.

Bug: 62594574
Test: Build and Boot
Change-Id: I4da425b449745b9a0b7b414e37a891e552377141
ndroid/server/wifi/WifiStateTracker.java
23216ca333dc411e6ce0829f777ca29992388443 13-Jun-2017 Roshan Pius <rpius@google.com> WifiScanningService: Cache only results of full single scans

Change the single scan results caching logic inside WifiScanner:
1. Only cache scan results if they were for full scans. We've expanded
the meaning of "full scans" to include both 2g + 5g and 2g + 5g + dfs.
2. Filter out any scan results from the cache if they're over 3 minutes
old.

The motivation of this CL is to solve these problems:
1. Do not overwrite full scan results requested by an external app (ex.
Settings) with results from a partial scan
(ex. from WifiConnectivityManager).
This avoids the race condition where the settings app performs
a scan and gets a partial list of results back because it was ovewritten
by an internal partial scan request in between.
2. Scan results retrieved by apps will not contain stale scan
results. In N, wpa_supplicant evicted any scan results which were older
than 3 minutes from the cache. So, this CL restores that behavior.

Bug: 38212080
Test: Verified that both the settings and wifi wake is working properly
with the fix.
Test: Will send for full regression tests (b/62711875).
Test: New unit tests to verify that the partial scan results don't
override the cache.
Test: Modified existing unit tests to account for the change in
behavior. The broadcast (and cache) is now only updated on full scans.
Some of the tests were modified to produce full scan results, while the
other tests expectations were modified for partial scan results.

Change-Id: I4d6fb994d50995434f76218386272aa2562476fe
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
ndroid/server/wifi/scanner/WificondScannerImpl.java
c5e71bfd00163a0efe3f469a04d303cfb4dcc617 12-Jun-2017 Peter Qiu <zqiu@google.com> Permanent disable network with wrong password

When connecting to a network for the first time, an indication
of "wrong password" from supplicant is a strong indication that
it is a wrong password. We will permanently disable such network
in this case to avoid any retries and allow us to prompt the user
immediately. The network will be re-enabled when the user manually
trigger the connection again (most likely with a new password).

In the case when the network had been connected before, we are
assuming that we are attempting to connect to a wrong network (same
SSID different password). Thus, the failure is assumed to be temporary.
The other scenario is when the user actually changed the password
on the AP, which is an unlikely scenario, so it is being ignored for now.

Bug: 62444625
Test: manually connect to a WPA network with wrong password, verify
error message is display after first try and no more retries
Test: integration test

Change-Id: I2ab543e5b63546744291e87ec9d083e115aa9931
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.java
7130816d6c62e07d6d41150805515d7fd56f1f0d 19-Jun-2017 Roshan Pius <rpius@google.com> WifiNative: Stop the Hal even if wificond stop fails

Changes in the CL:
1. Even if wificond.tearDownInterfaces() fails, we should still go ahead
and attempt to the stop the hal.
2. WifiNative.tearDown()'s return value is unused currently. So, make it
void.

These are needed for the wifi stack to recover correctly from a wificond
crash.

Bug: 36586897
Test: Verified that we're able to connect back to a wifi network after
triggering a wificond crash.
Test: Unit tests

Change-Id: Id5b3833b84d5d0a4016321f6c77757af8a3db009
ndroid/server/wifi/WifiNative.java
c0203e2c4ffeae355c88939fb180c2e1913c108d 02-Jun-2017 Roshan Pius <rpius@google.com> SupplicantHal: Add locks to all methods

Make the use of locks consistent across all the methods in
SupplicantStaIfaceHal & SupplicantStaNetworkHal.

Bug: 62097169
Test: Device boots up and connects to wifi networks.
Test: Unit tests
Test: Passed regression tests
Change-Id: I8558245c3bd3819f956224e1b8afe920fed82369
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStaNetworkHal.java
4640b5a5825007cb79fc796adee1d48385b2ad7c 17-Jun-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Fix NAN/P2P concurrency failure" into oc-dr1-dev am: bb2ab212b4
am: d928bcf0f3

Change-Id: I19c417b4f1ec01e3abbbb7c6fd82014f856ebc68
bb2ab212b47ff2dc65e06048684cfe50c1d543bc 17-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Fix NAN/P2P concurrency failure" into oc-dr1-dev
60bc5b759aac3c5a5270d6406c133ab00c32f3a4 16-Jun-2017 Rajeev Kumar <rajekumar@google.com> Add error handling to
WifiConnectivityManager$PnoScanListener.onPnoNetworkFound method to skip
the scan results with null information elements.
Bug: 62540222

Change-Id: Ia631e21007cebdbab893f733d51ec06aded1f43c
ndroid/server/wifi/WifiConnectivityManager.java
ef6de4b88b850e9df98a9ffe51c71ac493f6c51b 15-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Fix NAN/P2P concurrency failure

NAN doesn't register for an onAvailable listener if Wifi enabled
at startup. Causes it to not receive callback later when p2p is
enabled/disabled.

Bug: 62632805
Test: integration non-concurrence test cases NonConcurrencyTest
Change-Id: I1409e829ecdc1e6076faea81cabcb7bea846505e
ndroid/server/wifi/aware/WifiAwareNativeManager.java
9f6385709309cfdfdc5fd4ef0ac84609ba002ff6 15-Jun-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Replace possibly legit error code log wtf with e" into oc-dr1-dev am: d15e710b67
am: 47e5d6499e

Change-Id: I1f9c20ad91641eb5bb3a99687c0c7289464f274c
d15e710b6789a05b36ea92a8e5843a5af618db48 15-Jun-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Replace possibly legit error code log wtf with e" into oc-dr1-dev
631e2feb66df8ddb529b8ed42636e04e86739454 15-Jun-2017 Michael Plass <mplass@google.com> Merge "[WifiScoreReport] Add dumpsys for scoring data" into oc-dr1-dev am: 1af2a63459
am: eb48f6b7cd

Change-Id: Ifd43e5bc707ceecf358123ef57b54c5ae19711f5
1af2a6345963b5dbf6404b78e212a1b67e28c2dc 15-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[WifiScoreReport] Add dumpsys for scoring data" into oc-dr1-dev
279abf6c5af5d42f6deb8e8738c7f030521976ef 06-Jun-2017 Michael Plass <mplass@google.com> [WifiScoreReport] Add dumpsys for scoring data

Add a dumpsys handler to capture the data used for calculating
wifi scores.

The logged data is limited to about 12 hours, to conserve memory.

Timestamp formatting is consistent with (most) of the other
timestamps used in bugreports.

Bug: 62448744
Test: manual, new unit tests
Change-Id: Iba3f3dc4911e7939a5afacb5902f425415bbc5f0
ndroid/server/wifi/WifiScoreReport.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
58fd79def4955fada2ed9fcd36bfc266ae917ef3 14-Jun-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Add command to reset parameters" into oc-dr1-dev am: ae733ef1ea
am: c1c83d01a7

Change-Id: Ie51242641e2f57a1ffce459c99b8eb3a4f7075ab
d087cd9cef52f82d863e261375acd67a98f2b581 14-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Replace possibly legit error code log wtf with e

The disable command should not fail - but if it does there could
be legit reasons - e.g. NAN already disabled. No reason to spread
WTFs around.

Bug: 62619907
Test: builds, runs without messages
Change-Id: I06c8c90d7566c21d04c97a131bb29d42c960c99b
ndroid/server/wifi/aware/WifiAwareStateManager.java
ae733ef1ea87e66b1c02184434372103a19a5920 14-Jun-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Add command to reset parameters" into oc-dr1-dev
26e07d0ed09031f6f1e165b45e338f6ef632e344 14-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic 'osu_provider_api' into oc-dr1-dev

* changes:
WifiServiceImpl: add support for retrieving Hotspot 2.0 OSU providers
hotspot2: PasspointManager: add support for retrieving OSU providers info
hotspot2: anqp: OsuProviderInfo: friendly name and service description selection
59a6f9692b2497c946100b1e6e671c17ec3918f1 14-Jun-2017 Michael Plass <mplass@google.com> Merge "[WifiScoreReport] Simplifed scorer/quick handover" into oc-dr1-dev am: f932bcf61f
am: 905822cbbf

Change-Id: I81b56836fdb72d36ce21a5c81bbbf5df6077d806
f932bcf61f7dfc559d0287c438b8cedea8bd9092 14-Jun-2017 Michael Plass <mplass@google.com> Merge "[WifiScoreReport] Simplifed scorer/quick handover" into oc-dr1-dev
e802d02eb96d3cbe774110c432f957976deb92b3 20-Apr-2017 Michael Plass <mplass@google.com> [WifiScoreReport] Simplifed scorer/quick handover

Introduce a simplified scorer for the currently-connected wifi.
For now, this is only in effect when the developer preference for
aggressive handover of wifi to cellular is in effect.

Bug: 37577414
Test: manual, added unit tests
Change-Id: I7a27c5d3686a4fbb9429f68497d47e6ea9ae7a85
ndroid/server/wifi/WifiScoreReport.java
c176cab279c371db0baabc0d98706b649b0103c6 13-Jun-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Add test mechanism to specify default DW spec" into oc-dr1-dev am: 613bc28a67
am: 8e0c004c4d

Change-Id: Ia7cef776023c73f18839c11aec1e9a69ea39656d
613bc28a67c43005f61a617611c6d228a7d25ba5 13-Jun-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Add test mechanism to specify default DW spec" into oc-dr1-dev
b26271a52b97ea0a028351a3eef95d53f9339de3 06-Jun-2017 Peter Qiu <zqiu@google.com> WifiServiceImpl: add support for retrieving Hotspot 2.0 OSU providers

For an R2 Passpoint AP, there might be zero or more OSU providers
associated it. Add an API to retrieve the associated OSU providers.

Bug: 62235301
Test: manual test by exercising this API in WifiTracker and verify
the content of the OSU provider

Change-Id: I5d9b7d86176bccf39a44f4a39e7f273c2bc2a210
Merged-In: I5d9b7d86176bccf39a44f4a39e7f273c2bc2a210
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ac4ab1bfb7f7cdd4e1d9dd9eb8107aef1b960df2 06-Jun-2017 Peter Qiu <zqiu@google.com> hotspot2: PasspointManager: add support for retrieving OSU providers info

The OSU provider icon data is included, will be added when icon
data retrieval/caching support is added.

Bug: 62235301
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ifbddc3c3626063b3c89361c09c7adbf0b054692d
Merged-In: Ifbddc3c3626063b3c89361c09c7adbf0b054692d
ndroid/server/wifi/hotspot2/PasspointManager.java
2d511b3ad304301a3459f434b973525a23107ad1 06-Jun-2017 Peter Qiu <zqiu@google.com> hotspot2: anqp: OsuProviderInfo: friendly name and service description selection

An OSU provider might contain multiple friendly names and
service descriptions in different languages. In this case,
the value that's in the default language will be preferred.

Bug: 62235301
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ie6065a494e6a5c9aa1cc05621ab9627628efb446
Merged-In: Ie6065a494e6a5c9aa1cc05621ab9627628efb446
ndroid/server/wifi/hotspot2/anqp/OsuProviderInfo.java
9a4b9d97dc46509222e6192596fbdb37a2b8fca6 13-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Add command to reset parameters

Add the 'reset' command which resets all configurable parameters
to their default values.

Bug: 31940045
Test: test parameters from command line
Change-Id: I78a7adb579197d3ad5548c0f33339e11af724d72
ndroid/server/wifi/aware/WifiAwareNativeApi.java
ndroid/server/wifi/aware/WifiAwareShellCommand.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
69fe3dabdbd59c0da5e0114884b44794172e65d6 13-Jun-2017 Glen Kuhne <kuh@google.com> Merge "Stop 'Invalid SupportedRates' logspam" into oc-dr1-dev am: afade3dff9
am: 23b1ee7c9d

Change-Id: I38dcfaa5d22f114b08fb4f644ef09666f19e185b
afade3dff996ca74fba3908b9325c62f006cca5d 13-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Stop 'Invalid SupportedRates' logspam" into oc-dr1-dev
1d094527e82f2e1e4ca1c8883eaf2384ddd7d9dc 13-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic 'osu_provider_api'

* changes:
WifiServiceImpl: add support for retrieving Hotspot 2.0 OSU providers
hotspot2: PasspointManager: add support for retrieving OSU providers info
hotspot2: anqp: OsuProviderInfo: friendly name and service description selection
8fc0def5fcd65c8ef1368c6dd2ddca0652f0db09 12-Jun-2017 Glen Kuhne <kuh@google.com> Stop 'Invalid SupportedRates' logspam

This change cleans up an old warning level log that was spamming logcat
with 'Invalid SupportedRates!!!' messages for scan results that don't
provide supported rates information (This is actually quite normal).
ScanResult Supported Rates parsing in framework is only used to
determine 80211 mode being used (a/b/g/n/ac) and support metrics. The
parser is not particularly load bearing, and the log statement is
entirely unnecessary.

Bug: 62391468
Test: Builds, no longer see this particular logspam
Change-Id: Iac7f88ae592f08d77dc3c49c5fa3fc7caddf99ad
ndroid/server/wifi/hotspot2/NetworkDetail.java
5d9084369696b10cd6fdfc90326f16ed6212f159 09-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Add test mechanism to specify default DW spec

Add test (cmd) hooks to configure the default DW specs for
both 2.4 and 5 bands.

Bug: 31940045
Test: unit tests
Change-Id: Ief0cad28da1d9711c348fb87e515b0bc4255f150
ndroid/server/wifi/aware/WifiAwareNativeApi.java
3c26d024b2f694c5c6225f74834fffc5775c2e45 09-Jun-2017 Michael Plass <mplass@google.com> Merge "[Matrix] Add some basic matrix support"
f4fd7126a13cdf0a3f0e683b4891ae21add85d86 09-Jun-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: check app status for startLOHS" into oc-dev am: 8ec0ba59c2
am: fd97a990e1

Change-Id: Ic4522e44a6a5c3d5f65fccb64552a20e9e845d85
519f8b12c73981cbf74920e13453c6570c88ef0f 09-Jun-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: check app status for startLOHS" into oc-dev
am: 8ec0ba59c2

Change-Id: Ie607ba700952ccc6ab34b663d86e734fda02852d
fd97a990e1c1467a5f1e9634885f5a34c1e66e5c 09-Jun-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: check app status for startLOHS" into oc-dev
am: 8ec0ba59c2

Change-Id: Id2a629c5363fb024abc4406a91ae60d0ae343d8b
8ec0ba59c20b8266d735912fb71575834c991acc 09-Jun-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: check app status for startLOHS" into oc-dev
95571223c1eece592650e67c894e4a9f95c2d5ae 09-Jun-2017 Mukesh Agrawal <quiche@google.com> Merge "add adb hooks for tweaking RSSI poll frequency" into oc-dr1-dev
91f98fddf00d3098c90e35816aed9cf45ad77dd3 09-Jun-2017 Mukesh Agrawal <quiche@google.com> Merge "WifiVendorHal: improve handling of debug events" into oc-dev
am: 221b119b60

Change-Id: Icb61d0cdce6a8f35b624b309da19c1bb9314ad05
b4f2651a4c0958f7604561070773fbd67e70145e 09-Jun-2017 Mukesh Agrawal <quiche@google.com> Merge "WifiVendorHal: improve handling of debug events" into oc-dev
am: 221b119b60

Change-Id: I901d932974782345ca9650213efe90b94e44da15
221b119b6044721dfe3c43efe706ec3ef11ea9ff 09-Jun-2017 Mukesh Agrawal <quiche@google.com> Merge "WifiVendorHal: improve handling of debug events" into oc-dev
075bd7d36827139944a2f4e67f2c68fbb884d189 09-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Add test mechanism to set randomization interval" into oc-dr1-dev
f32019cb98bf0fe9a64a7be0d5bf0bd66c1b4199 09-Jun-2017 Roshan Pius <rpius@google.com> Merge "WifiBackupRestore: Backup networks from apps holding CONFIG_OVERRIDE" into oc-dev
am: 61c5552cd9

Change-Id: I6f12505367bd4233949674310f1979590aee1b26
ab3461bcc61148f833806d244cd038df13310ad7 09-Jun-2017 Roshan Pius <rpius@google.com> Merge "WifiBackupRestore: Backup networks from apps holding CONFIG_OVERRIDE" into oc-dev
am: 61c5552cd9

Change-Id: Iabebd04e93c6c0a5ec3b806fe074956b432391d7
514937d796749a19eb886e24fb749e3c63c2b36b 09-Jun-2017 Roshan Pius <rpius@google.com> Merge "WifiMonitor: Connect to wpa_supplicant more aggressively" into oc-dev
am: 3655a6ed78

Change-Id: I75c45d5fb5dfb80925fe1e925e1119b3a3c968de
75c12fe98a1f55aa9d7591adc424183951a7f3dc 09-Jun-2017 Roshan Pius <rpius@google.com> Merge "WifiMonitor: Connect to wpa_supplicant more aggressively" into oc-dev
am: 3655a6ed78

Change-Id: Id3a8431ecb16c9a94603af431aa0c97663975d7e
61c5552cd973827fc035334d580c1082456f9b21 09-Jun-2017 Roshan Pius <rpius@google.com> Merge "WifiBackupRestore: Backup networks from apps holding CONFIG_OVERRIDE" into oc-dev
3655a6ed786cbcad87bc0827b42e1811076a68b1 09-Jun-2017 Roshan Pius <rpius@google.com> Merge "WifiMonitor: Connect to wpa_supplicant more aggressively" into oc-dev
9a7f1d1ab15b33b117fc5e35bb7f607076651617 08-Jun-2017 Roshan Pius <rpius@google.com> Merge "WifiBackupRestore: Change to |NETWORK_SETTINGS| permission" into oc-dev
am: 95bad763cf

Change-Id: I47494cf5efac696438a5e19002b7bbecdafcdaed
98059785be60ff6aa8c842cef44ab68e5665bad2 08-Jun-2017 Roshan Pius <rpius@google.com> Merge "WifiBackupRestore: Change to |NETWORK_SETTINGS| permission" into oc-dev
am: 95bad763cf

Change-Id: Ib44fdd4706751bdc92410d1444c95a102eb6e123
95bad763cff555fcf37442d5d3129f777bb0b978 08-Jun-2017 Roshan Pius <rpius@google.com> Merge "WifiBackupRestore: Change to |NETWORK_SETTINGS| permission" into oc-dev
b97757e4930ae6e9a5319e071d383c464fcb5546 08-Jun-2017 Roshan Pius <rpius@google.com> WifiMonitor: Connect to wpa_supplicant more aggressively

Instead of waiting 1 second between retries, check if wpa_supplicant's
HIDL interface is up every 100 ms after starting wpa_supplicant.

Bug: 62439299
Test: Verified from logs that the time for wifi enable is reduced now.
Change-Id: Ibb8acf3bbe794b6ee2e9fa7b1cdb41e66f023d71
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/p2p/WifiP2pMonitor.java
df4a12cfd5bf077f2295f96d8afa2a6b330237eb 07-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Add test mechanism to set randomization interval

Add command-line options to configure the NMI (NAN management
interval) randomization interval.

Bug: 31940045
Test: Configuration succeeds
Change-Id: I20cfc3fbda3da4a445de19fc1d9bebc0f1a9ccdf
ndroid/server/wifi/aware/WifiAwareNativeApi.java
6fe5d5a2c296ba5f3b7b0492d5c8c1a0dccf5216 07-Jun-2017 mukesh agrawal <quiche@google.com> add adb hooks for tweaking RSSI poll frequency

One of the significant power draws, when the
screen is on, is the periodic RSSI poll (and,
presumably, the associated link-layer stats
fetch).

Given this, we want to experiment with different
RSSI poll intervals, to balance power vs.
whatever benefit the RSSI / link-layer stats
provide.

So add adb commands which let a user get and
set the RSSI poll frequency.

Bug: 38342148
Test: tests/wifitests/runtest.sh (on bullhead)
Test: manual (see below)

1. adb root
2. adb shell cmd wifi get-poll-rssi-interval-msecs
WifiStateMachine.mPollRssiIntervalMsecs = 3000
3. turn on screen, wait 15 seconds
4. adb shell dumpsys wifi | grep CMD_RSSI_POLL
-> expect one line like the following, every 3 seconds
rec[80]: time=06-06 23:36:18.201 processed=L2ConnectedState org=ConnectedState dest=<null> what=131155(0x20053) !CMD_RSSI_POLL rt=618277/618277 4 0 "GoogleGuest" 9c:1c:12:e8:70:f2 rssi=-59 f=5500 sc=56 link=300 tx=0.0, 0.0, 0.0 rx=0.0 bcn=4463 [on:3085 tx:0 rx:3 period:111] from screen [on:25363 period:27771] score=56
5. adb shell cmd wifi set-poll-rssi-interval-msecs 10000
6. turn on screen, wait 30 secods
7. adb shell dumpsys wifi | grep CMD_RSSI_POLL
-> expect one line like the following, every 10 seconds
rec[104]: time=06-06 23:37:40.921 processed=L2ConnectedState org=ConnectedState dest=<null> what=131155(0x20053) CMD_RSSI_POLL rt=700997/700997 6 0 "GoogleGuest" 9c:1c:12:e8:70:f2 rssi=-62 f=5500 sc=56 link=270 tx=0.0, 0.0, 0.0 rx=0.0 bcn=4665 [on:0 tx:0 rx:0 period:1] from screen [on:0 period:3162]
8. adb shell cmd wifi set-poll-rssi-interval-msecs 0
-> Invalid argument to 'set-poll-rssi-interval-msecs' - must be a positive integer
9. adb shell cmd wifi set-poll-rssi-interval-msecs not-a-number
-> Invalid argument to 'set-poll-rssi-interval-msecs' - must be a positive integer

Change-Id: Ibb2268cef81ef986fd71f848e889a4d7a94b901d
ndroid/server/wifi/WifiShellCommand.java
ndroid/server/wifi/WifiStateMachine.java
9e83c3b65710cef6e04015565974750ee67200f1 26-May-2017 Roshan Pius <rpius@google.com> WifiBackupRestore: Backup networks from apps holding CONFIG_OVERRIDE

We currently backup only networks created by system apps. Change that
to instead backup only networks created by apps holding the
|CONFIG_OVERRIDE| permission.
This will let us backup networks from apps like SetupWizard which
holds the |CONFIG_OVERRIDE| permission. Since such apps have the permission
to modify any network in the device, it doesn't matter that the |creatorUid|
info is lost during the restore process.

PS: See the discussion in b/29201888 for why the creatorUid cannot be
preserved across restore.

Bug: 38041584
Test: Unit tests
Test: 'bmgr backup com.android.provider.settings'
Test: 'bmgr restore <sha> com.android.provider.settings'
Change-Id: I550631d11f34942e408a6e4068bcb45ce22cb8e6
ndroid/server/wifi/WifiBackupRestore.java
ndroid/server/wifi/WifiInjector.java
2946ae3bfbf8399af2bc829c77aedb1178116498 08-Jun-2017 Roshan Pius <rpius@google.com> Merge "Revert "WifiScanningService: Don't cache results of partial scan"" into oc-dev
am: 04977155d7

Change-Id: Ia6d23845accb6b06666fded6a6f7bf5dcc971cf2
12f18f1708c4d27388478230c03fd51a59e22f98 08-Jun-2017 Roshan Pius <rpius@google.com> Merge "Revert "WifiScanningService: Don't cache results of partial scan"" into oc-dev
am: 04977155d7

Change-Id: I02702b6579ac10edc773b55e0e7de23cdb7c6d9a
04977155d75180c629a6c44b9db1fa9d2e250e76 08-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "WifiScanningService: Don't cache results of partial scan"" into oc-dev
a6e534fc17203d535ec786b25aad9ff65afdbbea 08-Jun-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: check app status for startLOHS

When apps register a request for LOHS, they should be the foreground app
at the time of the request. If the requesting app is not the foreground
app, the ERROR_INCOMPATIBLE_MODE error will be returned.

Bug: 62356000
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: softap integration tests locally
Test: in progress LOHS integration tests locally
Test: cts-tradefed run cts-dev --module CtsNetTestCases -t
android.net.wifi.cts.WifiManagerTest

Change-Id: Ic51bbc28478f90983555943a45f4fd70f4b2b385
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiServiceImpl.java
0419ded5c1e245358b205efee2599c58f894616c 08-Jun-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Add length checks on PMK/Passphrase" into oc-dr1-dev
5e6aea460e272ef7c70029abe9f0e5a695ad119e 10-May-2017 mukesh agrawal <quiche@google.com> WifiVendorHal: improve handling of debug events

Move processing of debug events (onRingBufferDataAvailable
and onDebugErrorAlert) from a HWBinder thread, to the
WifiStateMachine thread.

The idea here is to quickly free up shared resources: the
thread on which we receive the HIDL event, and the HWBinder
async buffer space that is used to queue pending upcalls.

The reason we want to free up these resources more quickly
is that, in some cases, the debug events need to wait
100-200msec to acquire the WifiDiagnostics object's
intrinsic lock.

A risk of this change is that we might use a large amount
of memory by queuing up large amounts of ring-buffer data
callbacks on the Looper's MessageQueue. However, I think
that is a better risk to take, than the risk of starving
other HALs of access to HWBinder resources.

Bug: 38182372
Test: tests/wifitests/runtests.sh # on bullhead
Test: adb shell dumpsys wifi | grep TIMEOUT # expect no match

Change-Id: I7ec24f8b862cfb8ac100b1c975d732a886ed09fe
ndroid/server/wifi/WifiVendorHal.java
815dbc39bb667779f67804b7c324db507eb27ab8 06-Jun-2017 Roshan Pius <rpius@google.com> WifiLastResortWatchdog: Clear failure counts on HAL init

These counters should be reset whenever we restart wpa_supplicant and
initialize the HAL.
This is to clear these counters on wifi stack restarts (internal or user
initiated).

Bug: 38422186
Test: Unit tests
Change-Id: Icf7e558cbc667da37eb471a7d98ac11b5d8f073d
ndroid/server/wifi/WifiLastResortWatchdog.java
ndroid/server/wifi/WifiStateMachine.java
5b0fa1e4851b9f4a8fd8efe7afa89b575be727bd 19-May-2017 Michael Plass <mplass@google.com> [Matrix] Add some basic matrix support

Bug: 37577414
Test: Unit tests

Change-Id: I05f797a794f73671236b5ecf0bf9394f6e371351
ndroid/server/wifi/util/Matrix.java
ae5d7343534f7f41c53f98a1782183405ff32a0d 08-Jun-2017 Roshan Pius <rpius@google.com> Revert "WifiScanningService: Don't cache results of partial scan"

This reverts commit 24dc6bb288a15516c89ab507bb86511556824144.
BUG: 62394341

Change-Id: Ice9c5d34a374d5a600e0797504d3c4774e4b2ace
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
7129906ca44d7eb60687d6ba9cd4e4aa87ff200d 08-Jun-2017 Ningyuan Wang <nywang@google.com> Merge "Remove WTF log for WificondScannerImpl" into oc-dev
am: 91d916a538

Change-Id: I19e379689f424da04b6411a62841249c0fa566c8
a24dbac317641403205e5309cbb451a9ed100284 08-Jun-2017 Ningyuan Wang <nywang@google.com> Merge "Remove WTF log for WificondScannerImpl" into oc-dev
am: 91d916a538

Change-Id: I688a7b015c3fc063438f90f1b65f54480a662ffd
91d916a5380ef1f2cd431a555ff071a0f69d127a 08-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove WTF log for WificondScannerImpl" into oc-dev
2439f9fd566ed2a72036f163abc1c8c854cbf746 07-Jun-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiApConfigStore: set LOHS wifi config networkId" into oc-dev
am: 875a7dcc0d

Change-Id: I5fd0f4e1c29e2881ee76462f7b0c85d17c50d0c8
b9d049a6eeecc9df423c028f17fd346dde122042 07-Jun-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiStateMachine: add mode to softap update" into oc-dev
am: dea3f9fb31

Change-Id: I3d080fbb4521d94cb75bf46d76f0f2b80774ae9a
029090da069d71d0eee54e60beeaa385309430f5 07-Jun-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiApConfigStore: set LOHS wifi config networkId" into oc-dev
am: 875a7dcc0d

Change-Id: I3f6af8579695e66944d0e5b2710679f558876e7c
854d0e5f85b7190169d5268e675700fa7a6a50cb 07-Jun-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiStateMachine: add mode to softap update" into oc-dev
am: dea3f9fb31

Change-Id: I5970aceb5e878ad43e43fa0cae34d415a1ff5f40
875a7dcc0db5b82c49a02741e779395388cf44c6 07-Jun-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiApConfigStore: set LOHS wifi config networkId" into oc-dev
dea3f9fb315088dba8f6f5830b5c1917d5d29054 07-Jun-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiStateMachine: add mode to softap update" into oc-dev
46f30cdced5319c794b3f5d4afd3f6794264718d 07-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Add length checks on PMK/Passphrase

Bug: 62376042
Test: unit tests + integrated (sl4a) tests
Change-Id: Idcf3aeae369c5dad28db79f208747d9da43561f0
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
0bb87ee68b2e35f7f442c009d81263f63ba9a426 07-Jun-2017 Ningyuan Wang <nywang@google.com> Remove WTF log for WificondScannerImpl

This changes the log type from wtf to warning for
inconsistent scan event log because we already have
a fix for this.

Bug: 62019591
Test: compile
Change-Id: Ib0bd86f8d591905fc9d87c2de291cc3664bff7b7
ndroid/server/wifi/scanner/WificondScannerImpl.java
f72e85a9bc4cb54b489e6c72dba122b7c8a22df5 07-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiConfigurationUtil: Ignore masked passwords"
2fd51661e2e6a50e7d1de53ab590114d9f4e6789 07-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Enforce permissions for Aware data-path PMK usage"
eb6343516fb91c3f7651e5979e047306aaf04554 06-Jun-2017 Roshan Pius <rpius@google.com> WifiConfigurationUtil: Ignore masked passwords

This is the case of apps retrieving WifiConfiguration from WifiManager
API's and passing it back to use for a network update. This is already
ignored in WifiConfigManager's update handling.

Bug: 62385845
Test: Unit tests
Test: Able to force connection to existing saved PSK network.
Change-Id: I0277dcca401335db21ad0f360f044e9634956829
ndroid/server/wifi/WifiConfigurationUtil.java
159f2184beb39cfe0d786105cc69e54265747e56 01-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Enforce permissions for Aware data-path PMK usage

The Aware data-path using PMK API is system-only. Add code to
actually enforce that restriction.

Add test coverage for PMK/Passphrase code path.

Bug: 62266163
Test: unit tests, integration tests
Change-Id: Id833cbf81518df67f0fec4c8d944767b8c46ab82
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareService.java
ndroid/server/wifi/aware/WifiAwareServiceImpl.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
94ea8c951f0dd81563e7ea22f878397e75487746 06-Jun-2017 Peter Qiu <zqiu@google.com> WifiServiceImpl: add support for retrieving Hotspot 2.0 OSU providers

For an R2 Passpoint AP, there might be zero or more OSU providers
associated it. Add an API to retrieve the associated OSU providers.

Bug: 62235301
Test: manual test by exercising this API in WifiTracker and verify
the content of the OSU provider

Change-Id: I5d9b7d86176bccf39a44f4a39e7f273c2bc2a210
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
c56add5be84ea0cf85bc77d5efc0494a68466570 06-Jun-2017 Peter Qiu <zqiu@google.com> hotspot2: PasspointManager: add support for retrieving OSU providers info

The OSU provider icon data is included, will be added when icon
data retrieval/caching support is added.

Bug: 62235301
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ifbddc3c3626063b3c89361c09c7adbf0b054692d
ndroid/server/wifi/hotspot2/PasspointManager.java
2d02c0b588eb19935ad87b8dae9d6a9839e667c2 06-Jun-2017 Etan Cohen <etancohen@google.com> Merge "[P2P] Clean-up on requestor death"
0169c9350c355acbfe790859a1cc77a1594b4c1b 06-Jun-2017 Peter Qiu <zqiu@google.com> hotspot2: anqp: OsuProviderInfo: friendly name and service description selection

An OSU provider might contain multiple friendly names and
service descriptions in different languages. In this case,
the value that's in the default language will be preferred.

Bug: 62235301
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ie6065a494e6a5c9aa1cc05621ab9627628efb446
ndroid/server/wifi/hotspot2/anqp/OsuProviderInfo.java
c75b04438e296b818ff3eb315e0ec2093d86d85c 06-Jun-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiStateMachine: add iface name to ap updates" into oc-dev am: 70126fea67
am: 1e34b97fcf

Change-Id: Ia008e5608ea91f336be4656636965df3ac0ff2da
1e34b97fcfdc4c78817f15985a168f279b100afa 06-Jun-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiStateMachine: add iface name to ap updates" into oc-dev
am: 70126fea67

Change-Id: I3b2c8050b8ddcb035194853861a679b7f4017adb
70126fea6716aa051d433306ebababb6fe3a45d5 06-Jun-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiStateMachine: add iface name to ap updates" into oc-dev
1fdb6151dcc85c990483492e2d9cbd9b7c243164 01-Jun-2017 Rebecca Silberstein <silberst@google.com> WifiApConfigStore: set LOHS wifi config networkId

The WifiConfiguration object used to connect to a locally started LOHS
needs a networkId that signals to ConnectivityService that the
application wants to use the LOHS to talk to co-located devices.

Bug: 62076211
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh -e class
com.android.server.wifi.WifiApConfigStoreTest
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh -e class
com.android.server.wifi.WifiServiceImplTest
Test: manually tested with in-progress integration test

Change-Id: Ic316250184eae0f04dc0fb83efb9710d5d65f0af
ndroid/server/wifi/WifiApConfigStore.java
1f6626d7488bba014b42bab8bbcd4720694df485 25-May-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: add mode to softap update

Plumb the softap target mode in to WifiStateMachine so we can add it to
the softap state change broadcast.

Also cleaned up some of the error and stopping states noticed due to the
mode updates and tests. This removes extra calls to clear the requests
and uses the ap state change broadcast to notify registered callers
about the LOHS stopping instead of attempting to get intermediate state.

Bug: 62076211
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Icff0a9b30e1eb9e5aa945d289d274da7ec8910eb
ndroid/server/wifi/SoftApModeConfiguration.java
ndroid/server/wifi/WifiController.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
d8fe6e83c6abb4819715c2d5acd18cc0d8e81bfd 06-Jun-2017 Randy Pan <zpan@google.com> Merge "Log disabled networks only" into oc-dev am: 90bdf19e29
am: cbcfdbfcb8

Change-Id: Ifd88b24e501aaa5ff2710433e32dfcd0bc7a110a
cbcfdbfcb8be58d6bcb0e4e486ef01ac0116799b 06-Jun-2017 Randy Pan <zpan@google.com> Merge "Log disabled networks only" into oc-dev
am: 90bdf19e29

Change-Id: I546a3b187b612d475c5f77e37256c219247f2217
252dbd59df86e3fb329ce6712ce76c2a970330c8 25-May-2017 Etan Cohen <etancohen@google.com> [P2P] Clean-up on requestor death

Register for requestors death (binder death) as well as providing
an API to clean-up requests.

Bug: 33040182
Test: unit tests, run-time behavior
Change-Id: I8ae7e459d1642459171d7d49ef86b8f297f912a3
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
90bdf19e29900ad48a8df1fbfbb10bec862319d7 06-Jun-2017 Randy Pan <zpan@google.com> Merge "Log disabled networks only" into oc-dev
8eaa7b85c7eccea62f5e75aeec6fbf81afdd4f84 06-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: handle invalid BSSID when perform provider matching"
f1a0272c0fb3f11bc338e97481d8cb73cfe74641 06-Jun-2017 Roshan Pius <rpius@google.com> WifiBackupRestore: Change to |NETWORK_SETTINGS| permission

Use the new |NETWORK_SETTINGS| permission for all backup/restore
changes.

Bug: 62353755
Test: 'bmgr backup com.android.provider.settings'
Test: 'bmgr restore <sha> com.android.provider.settings'
Test: Unit tests
Change-Id: I5c62ed1b4cb6a6445755aaf0fd1a3b67f0a25501
ndroid/server/wifi/WifiServiceImpl.java
5096b161da96dd77ca8f0b5d4f80d08c6c4aff36 06-Jun-2017 Roshan Pius <rpius@google.com> Merge changes Ib119e6f9,I73e312fd

* changes:
ConfigurationMap: Remove unused elements and methods
WifiConfigManager: Optimize scan result to config lookup
2f47b2755faffaa1a011ddeb8527bd9c99bb6106 25-May-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: add iface name to ap updates

When softap mode changes state, add the interface name to the
ap state change broadcast. This will be used by ConnectivityService to
properly track interface updates and changes.

Bug: 62076211
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: softap integration tests locally
Test: manually toggled and confirmed in logs
Test: wifi integration tests
Change-Id: I655dbdbf522c582973bb3fa8a2c42dadceb85a8d
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
8a59eab5e32e37da1962119b5c3afe216f63021d 05-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Delete all possible NDIs - not just those framework thinks exists"
b3758272b4cf39f1aa2cf842080206f2c1b801c6 05-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Power reduction parameters: non-interactive, idle"
33c3ae8858bc8f483b6dfe62482486e5448b2012 02-Jun-2017 Peter Qiu <zqiu@google.com> hotspot2: handle invalid BSSID when perform provider matching

Also update PasspointManager#getMatchingWifiConfig to ignore
non-Passpoint APs.

While there, remove the unnecessary string escape when logging
SSID and handle null in the BSSID parsing code.

Bug: 62246303
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I07379ff0fc5e14ff411204424e295fc51bddce9f
ndroid/server/wifi/hotspot2/ANQPNetworkKey.java
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/Utils.java
eb558d6b74ba14a5ff08866166b109dda8e0ab20 05-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Power reduction parameters: non-interactive, idle

Set default power saving parameters:
- Non-interactive: disable 5G + increase latency on 2.4G
- Idle: disable

May be modified based on later power measurements.

Bug: 30771807
Test: Verified Aware not available on doze
Change-Id: I8f50f3228edd574cfd6005a20ac5a60f01cc433b
ndroid/server/wifi/aware/WifiAwareNativeApi.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
f7b6244a4f5f6541266018312352e92243157851 03-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Delete all possible NDIs - not just those framework thinks exists

Currently The Aware framework keeps track of interfaces it created
and deletes those. If for some reason it loses track of a created
interface it will never delete it - stuck.

New: Just as for creating interfaces - where uses capability to create
all possible interfaces, use the same mechanism to delete all possible
interfaces - whether or not they exist. If they don't exist then will
get a failure (which we ignore).

Bug: 62276043
Test: no instance of left-around interfaces observed
Change-Id: Icb5f1f792448d2b16885645ca2ade4cd462b162e
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
1ae3d0751da16ec52ef434e1717109ceebf9e328 03-Jun-2017 Ningyuan Wang <nywang@google.com> Merge "Report single scan failure on inconsistent event" into oc-dev am: ce59c9965c
am: 26834d6051

Change-Id: I74ed89deb9c742b2ccd4ecc379233f642346a037
26834d60518e5f7d7255efb67c7f2af2003f96ad 03-Jun-2017 Ningyuan Wang <nywang@google.com> Merge "Report single scan failure on inconsistent event" into oc-dev
am: ce59c9965c

Change-Id: I270bb0405e66ecbd2af8a88137cd687d3ee7442c
ce59c9965c0b9de1baeb1a55903ca21b96232711 03-Jun-2017 Ningyuan Wang <nywang@google.com> Merge "Report single scan failure on inconsistent event" into oc-dev
d4c567a0b6e6270c19c29a1296a6bfe4c6790ccf 02-Jun-2017 Roshan Pius <rpius@google.com> ConfigurationMap: Remove unused elements and methods

1. |mPerFQDNForCurrentUser| is no longer in use because passpoint
management has been moved out of WifiConfigManager.
2. |getEnabledNetworksForCurrentUser| and |getEphemeralForCurrentUser|
is now only used in tests. So, move it to the test.

Bug: 62291781
Test: Unit tests
Change-Id: Ib119e6f991a822a52d70a2290fd24157c1f68945
ndroid/server/wifi/ConfigurationMap.java
98086f240b93fc059d0d2adf9ad93c06a10f8fba 31-May-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Add a validate method

This method will check for all known errors in WifiConfiguration passed
from external application. This will now deprecate the existing
WifiServiceImpl.isValid() method used for validating any incoming
WifiConfiguration object for STA operations (still used for soft ap
operations).

Also,
Fixed a general unit test issue in WifiConfigManagerTest discovered:
Clear all the invocations before we attempt to add/update network and
verify if the network is present in broadcast & config store data. This
might otherwise fetch old invocations.

Bug: 36903005
Test: Unit tests
Change-Id: I35d7c7c21c7ce74c189e001154899d8e44bc78cf
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigurationUtil.java
ndroid/server/wifi/WifiServiceImpl.java
3b8907610813e28f0be4bb28afa3ed1d3745bd5b 26-May-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Optimize scan result to config lookup

Use a hashmap to store the configured networks SSID & security type.
This will ease the lookup for networks from the provided scan result and
removed the unnecessary M (num scan results) * N (num saved networks) loop
for lookup.

Bug: 31489297
Test: Manual tests
Test: Existing WifiConfigManager Unit tests for matching passes.
Test: Some new tests in ConfigurationMap.
Change-Id: I73e312fd3c1684981748b11d1e22479d45e9b510
ndroid/server/wifi/ConfigurationMap.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/util/ScanResultUtil.java
c2d50aed7d8bc49a079e28ead3ea24b4b6fd1e1b 02-Jun-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Delegate channel selection to HAL"
4b75a72b3ef6d8f5dc8b01ebad0e79f74b1d82b4 02-Jun-2017 Randy Pan <zpan@google.com> Merge "SavedNetworkEvaluator: ignore ephemeral networks" into oc-dev am: a1c5c10247
am: 1f13f35e55

Change-Id: Ie79fe2799f9014360a023c0a652bb505ee155874
1f13f35e55d99b6147b77889347ddc7a53aad3f1 02-Jun-2017 Randy Pan <zpan@google.com> Merge "SavedNetworkEvaluator: ignore ephemeral networks" into oc-dev
am: a1c5c10247

Change-Id: Ibf726c426685dfcc7e65bca5f56669425edec5e2
a1c5c10247d9e00f740956ce949b3ca0d9401e60 02-Jun-2017 Randy Pan <zpan@google.com> Merge "SavedNetworkEvaluator: ignore ephemeral networks" into oc-dev
05a9a73b519a68ee7def7472dad6c6570f2fed86 02-Jun-2017 Ningyuan Wang <nywang@google.com> Merge changes from topic 'supplicant_sta_iface_hal_network_change' into oc-dev am: 9da08e0146
am: 7e1def214f

Change-Id: Icf6dcc740c6fd9ed31fbf038f5d7e714b1b9fd3c
7e1def214f0031c8c596928d0e9b3738cf4e2648 02-Jun-2017 Ningyuan Wang <nywang@google.com> Merge changes from topic 'supplicant_sta_iface_hal_network_change' into oc-dev
am: 9da08e0146

Change-Id: Icbf8bcd610bbed4de6ab093ad7bad71b28c60ffe
9da08e01464d39de3f14fe09f535660635d39c42 02-Jun-2017 Ningyuan Wang <nywang@google.com> Merge changes from topic 'supplicant_sta_iface_hal_network_change' into oc-dev

* changes:
Remove network from supplicant when it is disabled
Do not remove and add the same network
13610da7d3a18a66e505b299c63f93e080ad7f9a 02-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Perform delayed initialization on Aware thread"
9fc0418bd441b14c465c3fe35e07bceac10208be 11-May-2017 Etan Cohen <etancohen@google.com> [AWARE] Delegate channel selection to HAL

Aware data-path operational channel selection: HAL provides
API for framework to: delegate, recommend, or require channel.
The framework currently doesn't have a mechanism to select the
channel so this CL explicitly delegates selection to HAL.

Bug: 36905549
Test: unit-tests & integration (sl4a) tests
Change-Id: I8152e9a1fc262fe856b24002762b1c69891dbcf7
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ffad8da00fefb79505636a7044483650113a7f8b 01-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiConfigManager: Rename scan result to network lookup method"
39d6bdc92f98fd7100382d8fb5f7f7044dbcb083 01-Jun-2017 Randy Pan <zpan@google.com> Log disabled networks only

Previously a network could be logged as disabled before it has
actually reached the max failure threshold.

Bug: 62238322
Test: enter wrong password for a network, examine the bug report
Change-Id: I18db0543a74fb619041e44193198f1c8ceb36708
ndroid/server/wifi/SavedNetworkEvaluator.java
c5742a340a7cc7d1d66b12d35103fa6b0a6633c5 01-Jun-2017 Etan Cohen <etancohen@google.com> [AWARE] Perform delayed initialization on Aware thread

Currently performed all intialization on main system server thread
during boot phases. Move some of the initialization to a delayed action
(new command) on the local Aware thread.

This moves contention for the HIDL interface from the main thread to
a local thread - reducing impact on system server start-up time.

Bug: 62238717
Test: unit tests, integration (sl4a) tests
Change-Id: Iec6bacebb07cba8b519d5b1d0cbb6c59778ff8f7
ndroid/server/wifi/aware/WifiAwareService.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
81828c08033d37ae90167d7dcde3f3335c4c038c 01-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[HDM] Fix access to HDM before Wi-Fi is started"
e7ec898b26f04fca3390b2219965f365036b15ce 01-Jun-2017 Ningyuan Wang <nywang@google.com> Report single scan failure on inconsistent event

When mLastScanSettings is set for single scan but a
pno scan event comes, we should report single scan failure
event, so WifiSingleScanStateMachine won't stick in
ScanningState forever.

Bug: 62019591
Test: compile, unittests, manual tests, integration test
Change-Id: I96bcc3fedf1eeb47e662225724ead1713e1a7ce2
ndroid/server/wifi/scanner/WificondScannerImpl.java
03c73237cb1f8ddb5f2b5dbb37b8cb233a3177d6 01-Jun-2017 Ningyuan Wang <nywang@google.com> Merge "Dump SingleScanStateMachine events" into oc-dev am: e2e66be742
am: 69f87e6940

Change-Id: Ib98b3fad42613c72388ed75574c8293de06b6053
69f87e6940bbfe769a1022f767e01428a488e402 01-Jun-2017 Ningyuan Wang <nywang@google.com> Merge "Dump SingleScanStateMachine events" into oc-dev
am: e2e66be742

Change-Id: Ib635d8b0a2863205cfd1ccfd09d603c857eeb471
e2e66be742947c65f882dd1fe6a267b1acf97001 01-Jun-2017 Ningyuan Wang <nywang@google.com> Merge "Dump SingleScanStateMachine events" into oc-dev
03c23584f072aef576736044c1fa12ddcb2d882b 31-May-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Rename scan result to network lookup method

Rename from |getSavedNetworkForScanDetailAndCache| to
|getConfiguredNetworkForScanDetailAndCache| because the method might
also return the configured ephemeral network matching the scan result.

Bug: 62202610
Test: Unit tests
Change-Id: I6fa4c23bde017c412b10b31a350b5c780fc8a672
ndroid/server/wifi/SavedNetworkEvaluator.java
ndroid/server/wifi/ScoredNetworkEvaluator.java
ndroid/server/wifi/WifiConfigManager.java
5b98efa341aae055ea9b718218aa9792d1667f31 01-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[HDM] Use correct key for caching interfaces - name"
4fe311c774d6880c2eb9aa38ece9f9a5a60f7bd7 01-Jun-2017 Etan Cohen <etancohen@google.com> [HDM] Fix access to HDM before Wi-Fi is started

A couple of synchronization issues:
1. Wifi vendor queries features even before Wi-Fi is started. HDM
cannot be accessed without it - caused invalid chip ID messages.
2. Added synchronization and log printouts to additional public HDM
methods.

Bug: 62238717
Test: observed issue resolved based on logs
Change-Id: I771b6f040127814bab5a71f8ee9ebf2d7771ae7b
ndroid/server/wifi/HalDeviceManager.java
ndroid/server/wifi/WifiVendorHal.java
e29b548574b1dac325038659834d0a8fd28da01f 01-Jun-2017 Ningyuan Wang <nywang@google.com> Dump SingleScanStateMachine events

This is useful for single scan debugging.
This also reduces the PnoScanStateMachine's locallog size, so
as a result we won't increase the total log size.

Bug: 62019591
Test: compile, unit tests, manual tests
Change-Id: Ia59f24a977d332d7993448c0df41b4df6d038922
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
855b441bf2cf87885dd933e55035843871b4c30e 01-Jun-2017 Roshan Pius <rpius@google.com> Merge "WifiScanningService: Don't cache results of partial scan" into oc-dev am: 71d33fa108
am: a66583bb31

Change-Id: Ia5b2d386729b9b6fc0485b992023b95bd2ffb124
a66583bb31e80d7b113167556dddd78b91ee1a48 01-Jun-2017 Roshan Pius <rpius@google.com> Merge "WifiScanningService: Don't cache results of partial scan" into oc-dev
am: 71d33fa108

Change-Id: Ib246a3d9b4691e8e8109a2f0459df3937dec21e1
71d33fa108f651995ba0af00ad7b38749daef8dd 01-Jun-2017 Roshan Pius <rpius@google.com> Merge "WifiScanningService: Don't cache results of partial scan" into oc-dev
84fc22eaa83774f25fcd3667655b1ff46677d0b8 01-Jun-2017 Etan Cohen <etancohen@google.com> [HDM] Use correct key for caching interfaces - name

Interface cache used the interface itself as a key. However, the
interface object is not constant - it will be created on every query.
Instead use the interface name which is constant.

Bug: 62230725
Test: unit tests, run aware & p2p concurrently
Change-Id: I50f1eaf6c64308742981e4e2bc368a8e219c679c
ndroid/server/wifi/HalDeviceManager.java
32a2c670100b84fb049f55ad5a8a300c60a48aa5 31-May-2017 Randy Pan <zpan@google.com> SavedNetworkEvaluator: ignore ephemeral networks

Ephemeral networks should be evaluted by ScoredNetworkEvaluator.
Otherwise, an ephemeral network might be chosen over a saved
network. Plus, the SaveNetworkEvaluator's scoring algorithm
is different from the ScoredNetworkEvalutor, so the result
coming out from these two evalutors can be very different.

Bug: 62197617
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I3237b4ca50dd6964dd8678011e6a9940c0ca1d0b
ndroid/server/wifi/SavedNetworkEvaluator.java
15252723876bb9d82edb6b24edbc40db11103ae2 01-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: anqp: add parsing support for Icon File ANQP element"
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
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConnectivityHelper.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiNative.java
ff27ddf1923d9d4d4cfa8cc1a1ddb8748d0f2426 08-May-2017 Ningyuan Wang <nywang@google.com> Do not remove and add the same network

This patch allows SupplicantStatIfaceHal to skip the "remove
and add" process for supplicant network if there is already
the same network saved in supplicant.

This will be helpful when phone reconnects to a EAP-SIM
network. In that case, EAP state parameters will not be cleared by
removing network, so supplicant can take advantage of those
parameters for fast-reauth.

Bug: 37529849
Test: compile. unit test, integration test, manual test

Change-Id: I4326e9f60f4f8a64674a52d1dbbcd34c5e709064
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/WifiConfigurationUtil.java
da01689b7c7062e5bf9613d2b6c93e035b50dc00 31-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[HDM] Store callback to prevent GC"
24dc6bb288a15516c89ab507bb86511556824144 30-May-2017 Roshan Pius <rpius@google.com> WifiScanningService: Don't cache results of partial scan

These partial scan requests are initiated by the wifi stack when
connected to a network for network selection purposes. This might
interfere with full scan requests made by external apps. So, don't cache
such partial scan results. The apps will always get results of the last
full scan request made.

Bug: 38212080
Test: Unit tests
Test: Verified manually that the WifiManager#getScanResults() no longer
outputs partial scan results.

Change-Id: I5e320435e34c6bd74639dd13a480bb26ecea1edb
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
b50dbf503aacef67ec5de1e60066893eba6f65db 31-May-2017 Peter Qiu <zqiu@google.com> Merge "Add support for installing Passpoint profile via overloaded API" into oc-dev
am: 0697df2e29

Change-Id: I3e8b72f948a02f8ae2f994f1ab6080ec207ab0c3
0697df2e29a3255620760667e9192d82102cd85c 31-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add support for installing Passpoint profile via overloaded API" into oc-dev
3ac5a2c4fbd7a8f66aa219b7e0e4d5c91b3efdf5 31-May-2017 Etan Cohen <etancohen@google.com> [HDM] Store callback to prevent GC

Callback objects need to be stored in non-local variable to prevent
them from being GC'd. The generated HAL code keeps a reference to them
but if they are GC'd by the framework then a callback to a null object
is made.

Bug: 62219781
Test: builds/runs with DBG on
Change-Id: Ibe42e7db915569b3d98ce1468d7d92712ed867e1
ndroid/server/wifi/HalDeviceManager.java
2d8abd558985a89a44b6cc537a2f3463360be164 31-May-2017 Randy Pan <zpan@google.com> Merge "Use partial scan trigger configurable parameteters"
d35cddaf72ba0d679143fa07e07df330c6893574 25-May-2017 Peter Qiu <zqiu@google.com> Add support for installing Passpoint profile via overloaded API

In N and earlier, WifiManager#addNetwork was used for adding/installing
Passpoint profiles. In O, we've refactored the Passpoint support
and provided dedicated APIs. In order to be backward compatible
with existing apps, we need to continue support installing Passpoint
profile using WifiManager#addNetwork.

Bug: 62142779
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: Manually update WifiInstaller to use WifiManager#addNetwork
to install Passpoint profile, and verify it works.

Change-Id: I4a91273dccef5521c2bbca2a83e2ff08ce109a14
Merged-In: I4a91273dccef5521c2bbca2a83e2ff08ce109a14
ndroid/server/wifi/WifiServiceImpl.java
eaa885f034561ba8dd63623af84347858c8b290f 31-May-2017 Roshan Pius <rpius@google.com> Merge changes I1c24c60d,I1e8998c9 into oc-dev am: ab73d041b3
am: 6f41401a38

Change-Id: I33e8eecbc8f7ab339f2f8089bd26f5cbe4f7e2b5
6f41401a3847a08183e995d9d1a9c70b72e0c4f5 31-May-2017 Roshan Pius <rpius@google.com> Merge changes I1c24c60d,I1e8998c9 into oc-dev
am: ab73d041b3

Change-Id: I44dc6be9dd53ae6244123f2b3b0d362c222126cc
ab73d041b30848ba20e69244418fbfa9b4975383 31-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes I1c24c60d,I1e8998c9 into oc-dev

* changes:
WifiStateMachine: Reset network ID for WPS
InformationElementUtil: Handle malformed scan results
e4606e0f9532d250a1e06e8aba5fb48556225773 31-May-2017 Randy Pan <zpan@google.com> Use partial scan trigger configurable parameteters

Instead of hard coding the values in WifiConnectivtyManager.java,
now get the values from the config.xml.

Bug: 31180330
Test: runtest.sh
Change-Id: I7cfd715253ad9c041a4a6f11d79204be5758815a
ndroid/server/wifi/WifiConnectivityManager.java
4cdbb41feb0a8f7c29fdf8173ad81a1ea2c0bda1 30-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: setWifiEnabled permission check" into oc-dev
am: 06917c95b5

Change-Id: Ia31e6633270315039b403ed58841b2babb5ec8d8
06917c95b568c01e30edab40a1149bf8e2ae1962 30-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: setWifiEnabled permission check" into oc-dev
6f91c8e110e38d1856b2006f4d60437dcaade5d8 30-May-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Reset network ID for WPS

|WifiNative.migrateNetworksFromSupplicant| retrieves the network ID of
the configuration from wpa_supplicant. This is useful for migration of
config store from N to O, but we don't need this network ID information
for WPS operations since the network ID's allocated by wpa_supplicant
will clash with network ID's allocated by framework. So, reset the
network ID before we add it to WifiConfigManager.

Bug: 62156507
Test: Unit tests
Change-Id: I1c24c60dc2de2d039b3c372d52d10d55cc4d0241
ndroid/server/wifi/WifiStateMachine.java
3e80f5fa9e07c935c328fd06de555cfd5f43ed26 30-May-2017 Roshan Pius <rpius@google.com> InformationElementUtil: Handle malformed scan results

Malformed scan results will leave the |protocol|, |keyManagement| and
|pairwiseCipher| fields in inconsistent after IE parsing. Handle this
in the |generateCapabilitiesString()| method.
This CL restores the handling of these malformed scan results prior to
ag/2285932.

Bug: 62154614
Test: Unit tests
Change-Id: I1e8998c9d951c7dc4e2d7163c80091fd40ca3672
ndroid/server/wifi/util/InformationElementUtil.java
d01882a64facb9824327b06daf9931a32b0e0494 30-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: setWifiEnabled permission check"
8923371600eaa1eebf79b16a9ce669c24d870958 27-May-2017 Roshan Pius <rpius@google.com> SelfRecovery: Module for initiating internal stack restarts
am: 54a43675ba

Change-Id: I621a0b6178955bb86a4ca36bc010a9e42bbfed56
fa72bad238e1ac43501e0a2e27b50624e1431db7 27-May-2017 Peter Qiu <zqiu@google.com> hotspot2: anqp: add parsing support for Icon File ANQP element

Bug: 38351209
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I524c676a76a64cf0ed42a57141f769ef50d9169d
ndroid/server/wifi/hotspot2/anqp/Constants.java
ndroid/server/wifi/hotspot2/anqp/HSIconFileElement.java
5ce18b038080b06e5ae5b13d3b3aa88f52c8fe72 27-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add support for installing Passpoint profile via overloaded API"
1545f9403866abab36163eea9df7d18d3a388e98 25-May-2017 Peter Qiu <zqiu@google.com> Add support for installing Passpoint profile via overloaded API

In N and earlier, WifiManager#addNetwork was used for adding/installing
Passpoint profiles. In O, we've refactored the Passpoint support
and provided dedicated APIs. In order to be backward compatiable
with existing apps, we need to continue support installing Passpoint
profile using WifiManager#addNetwork.

Bug: 62142779
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: Manually update WifiInstaller to use WifiManager#addNetwork
to install Passpoint profile, and verify it works.

Change-Id: I4a91273dccef5521c2bbca2a83e2ff08ce109a14
ndroid/server/wifi/WifiServiceImpl.java
de6ff4c1fc87364efc5fa15de31325b4450548b0 25-May-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: setWifiEnabled permission check

Instead of using the package name to determine if the caller of
setWifiEnabled is from settings or sysui, switch over to use the
NETWORK_SETTINGS permission. This permission check will be done to
avoid stopping softap mode by third-party apps.

Bug: 38163947
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually tested attempting to enable wifi from settings, quick
settings and quick quick settings when wifi tethering was active
Test: cts-tradefed run cts-dev --module CtsNetTestCases -t
android.net.wifi.cts.WifiManagerTest#testSetWifiEnabledByAppDoesNotStopHotspot

Merged-In: I05a3cab6bc2b4b725badcbb7416f3f5bcd0dc3e9

Change-Id: I05a3cab6bc2b4b725badcbb7416f3f5bcd0dc3e9
ndroid/server/wifi/WifiServiceImpl.java
54a43675ba622c77dbbcc4ff12fa2c4a92578683 18-May-2017 Roshan Pius <rpius@google.com> SelfRecovery: Module for initiating internal stack restarts

Adding a new module for initiating stack restarts when we detect some
kind of failure internally. This module essentially moves the
|restartWifiStack| functionality out of WifiLastResortWatchdog so that it
can be reused by WifiStateMachine for HAL/wificond crashes.
The 3 reasons for triggering self recovery currently are:
1. Last resort watchdog bite.
2. HAL crash.
3. Wificond crash.

TBD: We could potentially perform the same recovery on a supplicant crash.

Bug: 36586897
Test: Manual tests by crashing the HAL & wificond.
Test: Unit tests.
Change-Id: Id3e0c2cc7b339ff02ae4a5597a1f2009cb946125
ndroid/server/wifi/SelfRecovery.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiLastResortWatchdog.java
ndroid/server/wifi/WifiStateMachine.java
96a9dbeb3a622e44c13ff7be8decf36d06ff7dbb 18-May-2017 Roshan Pius <rpius@google.com> SelfRecovery: Module for initiating internal stack restarts

Adding a new module for initiating stack restarts when we detect some
kind of failure internally. This module essentially moves the
|restartWifiStack| functionality out of WifiLastResortWatchdog so that it
can be reused by WifiStateMachine for HAL/wificond crashes.
The 3 reasons for triggering self recovery currently are:
1. Last resort watchdog bite.
2. HAL crash.
3. Wificond crash.

TBD: We could potentially perform the same recovery on a supplicant crash.

Bug: 36586897
Test: Manual tests by crashing the HAL & wificond.
Test: Unit tests.
Change-Id: Id3e0c2cc7b339ff02ae4a5597a1f2009cb946125
ndroid/server/wifi/SelfRecovery.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiLastResortWatchdog.java
ndroid/server/wifi/WifiStateMachine.java
3032286ca3dccf48de56d1738ec0beaf4b2c9216 26-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes Idc15c4b0,I14f26966

* changes:
hotspot2: parse OSU Providers ANQP element
hotspot2: anqp: add parsing support OSU Providers List ANQP element
ee6798b35c709aa38e433c163602998466c151e5 26-May-2017 Ningyuan Wang <nywang@google.com> Merge "Support parsing WPS for scan result capabilties string" into oc-dev am: db8076ffdc
am: d4fe938689

Change-Id: I8b85ef881cde99bb057cf5fd3c06d51204907fc0
d4fe9386898c98ea6d79bb35dd618b63fa950559 26-May-2017 Ningyuan Wang <nywang@google.com> Merge "Support parsing WPS for scan result capabilties string" into oc-dev
am: db8076ffdc

Change-Id: Ie455dc1ad3ca92e01d35cb9a28f58a3aea0d7136
db8076ffdc48cbf332a4745d5776cc3dbce90f4d 26-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Support parsing WPS for scan result capabilties string" into oc-dev
f7364b4baea06722022b7c6519ace0556481cc06 26-May-2017 Ningyuan Wang <nywang@google.com> Support parsing WPS for scan result capabilties string

This CL allows InformaitonElementUtil to parse WPS information
element and append [WPS] to the capabilities string.

This also removes a few lines of unused code.

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

Change-Id: Ic4ccd58ba3aaf268a81516888815bec8e4b32330
ndroid/server/wifi/util/InformationElementUtil.java
4c29caec80ebfc32a3c4047679082dca52cc18cc 25-May-2017 Peter Qiu <zqiu@google.com> hotspot2: parse OSU Providers ANQP element

Instead of storing OSU providers list as raw bytes,
parse it using the HSOsuProvidersElement.
Also do not broadcast the raw bytes to the app, since it
will be parsed by us now.

The app will be able to retrieve the parsed information
via a new API in the future (to be implemented).

Bug: 38351209
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manual testing with Boingo Passpoint AP, verify
via debug logs

Change-Id: Idc15c4b00580d65133bde57ba43be590d50321c0
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/anqp/ANQPParser.java
efe18a90941645b907fa2b50d922e7373303613e 24-May-2017 Peter Qiu <zqiu@google.com> hotspot2: anqp: add parsing support OSU Providers List ANQP element

Bug: 38351209
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I14f26966b073e44291241bd69c4160b91a47e264
ndroid/server/wifi/hotspot2/anqp/HSOsuProvidersElement.java
bcbabd9b007a0ab39dbed13d13e56c46ee0f25c3 26-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: anqp: parsing support for OSU Provider info"
714dc9dc6f7c57ecd4df08ada74cc9942b709437 26-May-2017 Roshan Pius <rpius@google.com> HalDeviceManager: Reduce severity of error log in isSupported() am: c780fa1770
am: a94ffe778b

Change-Id: I9cc1d0d059c4914b03c1562a9a2eaa40089a415c
a94ffe778b0c3090f8e1eb81026c9882164559fd 26-May-2017 Roshan Pius <rpius@google.com> HalDeviceManager: Reduce severity of error log in isSupported()
am: c780fa1770

Change-Id: I3c21db8a4bca650441a9c22fb7b913b94833eef7
f67e8594343510063cce6c7b89cee65906870024 25-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WCM: Remove unnecessary usage of |Long|"
584a9023ae5f9c88593a2f5c5c2451a26729cc53 25-May-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: setWifiEnabled permission check

Instead of using the package name to determine if the caller of
setWifiEnabled is from settings or sysui, switch over to use the
NETWORK_SETTINGS permission. This permission check will be done to
avoid stopping softap mode by third-party apps.

Bug: 38163947
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually tested attempting to enable wifi from settings, quick
settings and quick quick settings when wifi tethering was active
Test: cts-tradefed run cts-dev --module CtsNetTestCases -t
android.net.wifi.cts.WifiManagerTest#testSetWifiEnabledByAppDoesNotStopHotspot

Change-Id: I05a3cab6bc2b4b725badcbb7416f3f5bcd0dc3e9
ndroid/server/wifi/WifiServiceImpl.java
a570580925407f8e01358a5b2f0f9f611a77b0c2 25-May-2017 Roshan Pius <rpius@google.com> WCM: Remove unnecessary usage of |Long|

Bug: 28860433
Test: Unit tests
Change-Id: Ie5d676b1bcd698f50e2f08c6c5ae21353d35b5d7
ndroid/server/wifi/WifiConnectivityManager.java
c780fa17703f9bb34f370e9b9161721f20c3f733 25-May-2017 Roshan Pius <rpius@google.com> HalDeviceManager: Reduce severity of error log in isSupported()

When WSM class is initialized by WifiServiceImpl, we first try to
cleanup state by invoke WifiNative.teardown(). This in turn invokes
HalDeviceManager.isSupported() even before HalDeviceManager.initialize()
is invoked. So, don't raise wtf's for this error to prevent unnecessary
wtf spamming on every device boot up.

Bug: 62089978
Test: Verified that only an error log is seen now on bootup.
Change-Id: I809c706717e25c784ffe7364d4351fa44ea2707d
ndroid/server/wifi/HalDeviceManager.java
0c4d7ee1dfb496217a90675b37d15ff8e33accd4 25-May-2017 Etan Cohen <etancohen@google.com> Merge changes from topics 'metrics_attach', 'metrics'

* changes:
[AWARE] Attach metrics
[AWARE] Metrics framework
9fa8195087be42baed9f21ebdedadda9f509c7c6 24-May-2017 Peter Qiu <zqiu@google.com> hotspot2: anqp: parsing support for OSU Provider info

An OSU Providers List ANQP element will contain zero or
more OSU Provider Info.

Bug: 38351209
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I73d84400f4232e8ebbfd1d4d11f173daee7c9745
ndroid/server/wifi/hotspot2/anqp/OsuProviderInfo.java
a83967f56939392072253162731bfe090c2e7709 08-May-2017 Etan Cohen <etancohen@google.com> [AWARE] Attach metrics

Attach attach session metrics.
Fix bug in framework which causes an incorrect identity change
value to be used in session configuration.

Bug: 26565416
Test: builds + unit-tests
Change-Id: I6cd1d39eeffcf176c82629cc235a2f39aa029366
ndroid/server/wifi/aware/WifiAwareClientState.java
ndroid/server/wifi/aware/WifiAwareMetrics.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
910fdc720f0bf62b5529cb37a5f001ae585a5c59 26-Apr-2017 Etan Cohen <etancohen@google.com> [AWARE] Metrics framework

Plug-in to the Wi-Fi metrics framework. Metrics proto and hooks
created but not populated.

Bug: 26565416
Test: builds + unit-tests
Change-Id: I4a8eb76342c140767279aa46753d604b37af613e
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareMetrics.java
ndroid/server/wifi/aware/WifiAwareService.java
ndroid/server/wifi/aware/WifiAwareServiceImpl.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
a661d5bb1d13d5c7b719d9a2c55fbd86a54e659d 25-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Forward correct MAC address to host"
8ac7ea1dacfdc16c16e81fdfdfdd5ee567f0ea8f 24-May-2017 Roshan Pius <rpius@google.com> Merge "WifiMetrics: Add methods to increment new hal/cond metrics" into oc-dev
am: 78156cd914

Change-Id: I8a09a1176d5cbaac72d341dfa1cdff7f5a05236c
78156cd914c78f7bd427b85d4b5ebf338d8166c3 24-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiMetrics: Add methods to increment new hal/cond metrics" into oc-dev
375a4fbced9ea86e5b30b457b6f324c63b937dda 05-May-2017 Peter Qiu <zqiu@google.com> hotspot2: PasspointNetworkEvaluator: update network candidate for current network

When evaluating ScanResults while connected, PasspointNetworkEvaluator
might decide to stay with the current active network based
on the ScanResults and installed providers. In this scenario,
we need to update the selected BSS info for the current active
network, since it is possible to have multiple BSSes associated
with a given network. It is up to the caller to decide if it wants
to initiate a new connection when new BSS is selected.

Bug: 38031353
Test: manual test
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I9c43edae23264d779dfa34809590aeae12685faf
ndroid/server/wifi/hotspot2/PasspointNetworkEvaluator.java
aef0f465f0e1aec8c1ff555b9ef45ab15e92875c 24-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Clean-up after session if fw indicates it no longer exists"
475637585ac0b80e5c9c3a137c722f1d88916d51 24-May-2017 Etan Cohen <etancohen@google.com> [AWARE] Forward correct MAC address to host

Code forwards cluster ID rather than interface ID to host. Probably
a no-change since this code path doesn't seem to be executed - but
good to clean-up for now.

Bug: 38509770
Test: unit tests + integration tests
Change-Id: Ie9f40bfb5fa0b6916a7254cb976a0025b03655f0
ndroid/server/wifi/aware/WifiAwareClientState.java
e87bf1618fb88b6fcc874e1528662e595a7ee3ac 24-May-2017 Randy Pan <zpan@google.com> Merge "WifiConfigManager: convert BSSID to lower case" into oc-dev am: 42e4920fdc
am: 9ba0cdce88

Change-Id: I60d1ef0c73f9dabe9c13efc7dc5d3572f4a1b3ac
9ba0cdce88bd776e4fa3f0d799be996f72d0fe1f 24-May-2017 Randy Pan <zpan@google.com> Merge "WifiConfigManager: convert BSSID to lower case" into oc-dev
am: 42e4920fdc

Change-Id: I06c8477d69f81332e8513852efd373bf1193a438
42e4920fdc3ad70f437f7a5967169b06116f1c62 24-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiConfigManager: convert BSSID to lower case" into oc-dev
15e67cbe12ce8ef15a5c3cf0420749211fe611ff 24-May-2017 Etan Cohen <etancohen@google.com> [AWARE] Clean-up after session if fw indicates it no longer exists

When a session terminates and informs the host, it's state is
cleaned-up (erased). However, if the session is configured not
to inform the host (e.g. for power saving) then it's state still
exists. An attempt to reconfigure such a session will be passed to
the fw which will call back a failure with a specific 'invalid ID'
error code. In such a case clean up the state.

Bug: 62054202
Test: Discovery:test_ttl* pass, unit-tests pass.
Change-Id: I89d751cb5bee4e2cfb5519f3d3965922f5215eda
ndroid/server/wifi/aware/WifiAwareStateManager.java
9158c11a7af31aef7f1c115af53949397208bddc 24-May-2017 Ningyuan Wang <nywang@google.com> Merge "Abort scan before connection" into oc-dev am: 48807b36bc
am: b4a6453d37

Change-Id: I106ba573c782c1a29633e622fe54b5fa51fb3f30
4ebb0d3daedb29cb47ec34f670e97580d41e2dcc 24-May-2017 Ningyuan Wang <nywang@google.com> Merge "Support coexistence of wpa and wpa2 IEs in scan result" into oc-dev am: 2bfc3924e0
am: 4fb8b1a49d

Change-Id: I948d479981ffa92c7b7ecba196b6862f83e020cc
d5451e3494151fb83773c31a4144be80f5358326 24-May-2017 Ningyuan Wang <nywang@google.com> Rename ChannelHelper.getSupplicantScanFreqs() am: 9dc9a8750e
am: dd798b8777

Change-Id: I65e59b11301cf35b022b2f37a8e002ca8677c0ed
b4a6453d37b24671a586508a66d1f3cd456d5f30 24-May-2017 Ningyuan Wang <nywang@google.com> Merge "Abort scan before connection" into oc-dev
am: 48807b36bc

Change-Id: I9e41ba1e29d8c43fd4d2b3873b40e65156d05951
4fb8b1a49da049cdbaf589c1904b456aebc4772e 24-May-2017 Ningyuan Wang <nywang@google.com> Merge "Support coexistence of wpa and wpa2 IEs in scan result" into oc-dev
am: 2bfc3924e0

Change-Id: I684404da371e52450f9b5ae18ab9e54c9c8ffbab
dd798b8777d21082ae75d6ea388c343a2572d8fc 24-May-2017 Ningyuan Wang <nywang@google.com> Rename ChannelHelper.getSupplicantScanFreqs()
am: 9dc9a8750e

Change-Id: I37d859c695b1eae7cade6420b7d90a2c01dd29f8
48807b36bcc3d518ed12389e4889e5583fc8d672 24-May-2017 Ningyuan Wang <nywang@google.com> Merge "Abort scan before connection" into oc-dev
2bfc3924e0c811ac7771d76d6a5c3164205add33 24-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Support coexistence of wpa and wpa2 IEs in scan result" into oc-dev
2a0ad34fff0956b85afa702617a3322ca85c3dca 16-May-2017 Roshan Pius <rpius@google.com> WifiMetrics: Add methods to increment new hal/cond metrics

Bug: 36586897
Test: Unit tests
Change-Id: Ic3bca30e59111923f6c7b65e8955b4d37046b2e0
(cherry picked from commit bd2cff58fca2f3d9a0cd6df8526b23f48d9d44ec)
ndroid/server/wifi/WifiMetrics.java
f826552e97798aff9f6a66235ea40369b70b1d12 23-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Avoid selecting EAP-SIM/AKA/AKA' networks when SIM is not ready"
9dc9a8750ecd1ab25c5b4c7d17c8930ca2ffb6c3 23-May-2017 Ningyuan Wang <nywang@google.com> Rename ChannelHelper.getSupplicantScanFreqs()

We no longer use supplicant for scanning, so we need
to rename this helper function.
Since this helper function is not specifically for supplicant,
this CL just removes the 'Supplicant' part in its name.

This also fixes a few comments related to supplicant.

Bug: 36031295
Test: compile, unit tests, manual tests
Change-Id: Iabbf20e07b52ea015db227984511affaa055f205
ndroid/server/wifi/scanner/ChannelHelper.java
ndroid/server/wifi/scanner/KnownBandsChannelHelper.java
ndroid/server/wifi/scanner/NoBandChannelHelper.java
ndroid/server/wifi/scanner/WificondScannerImpl.java
e7dfd69fbe21902b89124b99d914ed3c90ba8baf 10-Apr-2017 Peter Qiu <zqiu@google.com> Avoid selecting EAP-SIM/AKA/AKA' networks when SIM is not ready

Avoid continuous authentication failure caused by selecting
EAP-SIM/AKA/AKA' networks when SIM card is not ready.
Should check SIM card status before selecting EAP networks.

Bug: 38357575
Test: Manual

Change-Id: I2358ce89dabdad8d3fc8eb363fb0ff653739bdc9
ndroid/server/wifi/SavedNetworkEvaluator.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/PasspointNetworkEvaluator.java
ndroid/server/wifi/hotspot2/PasspointProvider.java
cf0214972d1b9196f301e18c4c2a4f2dd1344310 23-May-2017 Etan Cohen <etancohen@google.com> [AWARE] Fix extra call to HAL re-configure API

Code was not checking correctly whether state changed and called
HAL API even when no change was needed. The current state of identity
required configuration was compared against the requested configuration,
should have been compared to the configuration of all current clients.

Bug: 31940045
Test: AttachTest:test_attach_multiple_sessions shows correct behavior.
Change-Id: Ic62c6b143b91c3673a336653a16b9440f8fd1c50
ndroid/server/wifi/aware/WifiAwareStateManager.java
a37ddaead71747d1efe44504efd4ebaebe3a825c 22-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: add packageName to startLOHS call" into oc-dev am: f9b25d48b7
am: 1244b39da5

Change-Id: I925cb2fb80f54d7f5c2bf9b8074866e65cc8d893
1244b39da5cdf42266ab7da3848007f8e781e923 22-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: add packageName to startLOHS call" into oc-dev
am: f9b25d48b7

Change-Id: I63d5b193f833521b3461ba9063e6ab8396b5d2c2
f9b25d48b7cadff8cb8eead96114f8b6725cc800 22-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: add packageName to startLOHS call" into oc-dev
358e8c074bb379ddb27c9f8cf1651eceaf69f8d3 22-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: anqp: update parsing code for IconInfo"
56d9a00176f55c3862acc38e6c02f7934bcf2f5e 22-May-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Adds logs for debugging"
dc4d1b495e2d1e16fa43b1e06d58848a1c8b2f40 21-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: implement startLOHS" into oc-dev am: a3e8c64fb1
am: 3a0eab454b

Change-Id: I8bc4ab7dbc9ff5e3a3fab1fc74eb2ccef55722bd
3a0eab454bb4596be85dcdad32501a248ec1baff 21-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: implement startLOHS" into oc-dev
am: a3e8c64fb1

Change-Id: I9664d22daa17be0afef54289d9bf48c5b908f0cf
a3e8c64fb19018c0a5ed0c8faf1dfe22a49aa17b 21-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: implement startLOHS" into oc-dev
2e04caf24c6aea008fc945fb5c1a1ca18d6adee2 20-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: implement stopLOHS" into oc-dev am: 85c2015666
am: 6bd16f20d6

Change-Id: If9550c9f7672cb9a509feaf81f9bd8fda3de1a8f
6bd16f20d6e69021b9d7652cd6551dfe14e07a46 20-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: implement stopLOHS" into oc-dev
am: 85c2015666

Change-Id: Ifb89b147cba13884a99f1061f070d73b12b54bf4
85c2015666f37e7ea2df69ef9962de0b6ccc7cf8 20-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: implement stopLOHS" into oc-dev
a8bea9aed9c0e8a16e51568541b90f0900edb9ef 20-May-2017 Randy Pan <zpan@google.com> WifiConfigManager: convert BSSID to lower case

When application specifies a particular BSSID for a
WifiConfiguration, the passed in string can be in any format.
When storing this BSSID field, we now always convert it lower case
to match the format of how BSSID is presented in scan results.

Bug: 38439640
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ic39d35694ee766cf83366fe7f00560684a18ac02
ndroid/server/wifi/WifiConfigManager.java
c66d00cefbd32ec2fbefcf1fd54c1aaf50b5ce5a 19-May-2017 Ningyuan Wang <nywang@google.com> Support coexistence of wpa and wpa2 IEs in scan result

When there are both wpa1 and wpa2(rsn) ies in scan result,
InformationElementUtil.generateCapabilitiesString() should
handle it and generate capabilties string correctly.

Bug: 37653951
Test: compile, unit tests, manual test, integration test
Change-Id: I7160fcbbd75c07f4fe02de62a3e4539fa628eab3
ndroid/server/wifi/util/InformationElementUtil.java
0ff45ee2c0016ae616a70b56d2957eb55427bcc3 20-May-2017 Glen Kuhne <kuh@google.com> Merge "P2P: Fix onServiceDiscovery callback param parsing" into oc-dev am: 70df7749fe
am: 8a64cef9e5

Change-Id: I3ddedbb7f0cd44eb65bbc3b106fa3814fc52c668
8a64cef9e59b1553d07f5bc113371c99ccb10423 20-May-2017 Glen Kuhne <kuh@google.com> Merge "P2P: Fix onServiceDiscovery callback param parsing" into oc-dev
am: 70df7749fe

Change-Id: I5dd91b4145a8911711e691c3964ee22b30e19289
70df7749fe3dc574c1ef7713d48b51afc79787fb 20-May-2017 Glen Kuhne <kuh@google.com> Merge "P2P: Fix onServiceDiscovery callback param parsing" into oc-dev
8d74c0b9b9588baa5fa7065340276202cd60dc84 19-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiMetrics: Add methods to increment new hal/cond metrics"
0815a50864d8da6ba375fea0794330849027094f 19-May-2017 Peter Qiu <zqiu@google.com> hotspot2: anqp: update parsing code for IconInfo

IconInfo contained Icon Metadata subfield in the OSU Providers
List ANQP element. Clean up the parsing/creation logic and
added unit tests.

Bug: 38351209
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ib2e709369660ab32d3cd07768e8314e11588be1a
ndroid/server/wifi/hotspot2/anqp/IconInfo.java
8f49ede47036020fa10e40f2b507aa90735ff420 19-May-2017 Etan Cohen <etancohen@google.com> [AWARE] Adds logs for debugging

Bug: 31940045
Test: unit tests, integration (sl4a) tests
Change-Id: Ibd3fe7a66f3b5c5a8d8638efe19c5363e9443d57
ndroid/server/wifi/aware/WifiAwareNativeApi.java
ndroid/server/wifi/aware/WifiAwareNativeCallback.java
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WificondControl.java
bd2cff58fca2f3d9a0cd6df8526b23f48d9d44ec 16-May-2017 Roshan Pius <rpius@google.com> WifiMetrics: Add methods to increment new hal/cond metrics

Bug: 36586897
Test: Unit tests
Change-Id: Ic3bca30e59111923f6c7b65e8955b4d37046b2e0
ndroid/server/wifi/WifiMetrics.java
0f257d8ab5787450bdd24119ad809ffdfd29f98d 18-May-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add packageName to startLOHS call

Add the caller's packageName to the startLOHS call. This gets the
packageName from the caller's context for permissions checks. Tests
were also update to reflect this change.

This will be submitted as a topic with a change in frameworks/base.

Bug: 31466854
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I34ba7e4a9485fbfe295acaa9977b2adcd17343c5
ndroid/server/wifi/WifiServiceImpl.java
a39790ac184ea4b5fb5422c06d0aea0f03fbc6db 12-May-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: implement startLOHS

When an application requests LOHS, check current state for incompatible
modes, outstanding requests and then register a request object for that
caller. If this is the first caller, WifiServiceImpl will then trigger
WifiController to start softap mode. When the softap mode switch
completes, callers will be notified of the outcome via the
LocalOnlyHotspotCallback api.

Bug: 31466854
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: If54756914f4daf5aab1663e6d747ead68d42fd1e
ndroid/server/wifi/WifiServiceImpl.java
a2cbd2429606052cf6f2306c54f8c590d7a55174 11-May-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: implement stopLOHS

When a requestor is done with LOHS, closing the callback will trigger
stopLocalOnlyHotspot. This CL implements the logic to unregister the
request and stop softap mode - if that caller was the last registered
requestor.

In this CL, LocalOnlyHotspotRequestInfo was also updated to use a
different key to track the requests. This was done to support apps
calling with shared uids.

Bug: 31466854
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I585ec1cbd4284e40e068bb47d12f80fc445d9270
ndroid/server/wifi/WifiServiceImpl.java
ad5cadd4b6bc3f020eb5d0775fc3575bdfe05da9 19-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: act on interface ip mode changes" into oc-dev am: 3a27fefe1b
am: e72b71564f

Change-Id: Icd1a3bff3bd14f84f94ad63b45e1abe1d7d734b7
16bfc9b791c07bb60bf70ac844bef2683c0b57fe 19-May-2017 Glen Kuhne <kuh@google.com> Merge "P2P: fix add upnp service version number parsing" into oc-dev am: 7bedba03d1
am: d25a33d68c

Change-Id: I2dd69c4118b367d88a6d70853e8dcf09c32d51a2
e72b71564fa42be979331b998849f59d0608889f 19-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: act on interface ip mode changes" into oc-dev
am: 3a27fefe1b

Change-Id: I8e8a978a2e7fde90df9f9e8ef1f44e9d23598edb
d25a33d68ce0b9d435b5af5522c4a6bc9b69f156 19-May-2017 Glen Kuhne <kuh@google.com> Merge "P2P: fix add upnp service version number parsing" into oc-dev
am: 7bedba03d1

Change-Id: Ic45f8366161ce5c0bd1d78268cf30091e17fde8c
3a27fefe1b7643e56f0e61786714d219dfbe4b82 19-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: act on interface ip mode changes" into oc-dev
7bedba03d13fb5f010040d16146100e93e35c9e0 19-May-2017 Glen Kuhne <kuh@google.com> Merge "P2P: fix add upnp service version number parsing" into oc-dev
f75ddf3dbdb871fb7aeee69fdebab17251c08d63 19-May-2017 Michael Plass <mplass@google.com> Merge "WifiStateMachine: Complain about empty messages"
15a6b018a14c85d89059660f9915e5b6b5ae3037 19-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: listen and act on softap changes" into oc-dev am: 22dfcc6ab2
am: 0f7b54ebfc

Change-Id: I78326f652e5cb8ddc9b232c6f3af73aa43aedf8e
0f7b54ebfc9258e9615d3ad55f665da09d53ad7b 19-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: listen and act on softap changes" into oc-dev
am: 22dfcc6ab2

Change-Id: Ibaf265979f663a665b75c8c93921147ff4d34c24
22dfcc6ab20d260c0318090386af91ea95724e99 19-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: listen and act on softap changes" into oc-dev
5045731ab2b33651d05979e0df26fb22e591e23c 19-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[AWARE] Add shell command to obtain HAL capabilities"
0129c4db52b510b4abcd640d18100496f4adf47b 19-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: check caller for watchLOHS" into oc-dev am: 56a5f2f6e0
am: 9e06f5ded2

Change-Id: I83a5a02586ae7cafb64d4a89c279998e5e664050
3c89ee84736eee5e90a7a8a9cc2a8dbbcaea45f4 19-May-2017 Roshan Pius <rpius@google.com> Merge "WifiNative: Add VINTF check for vendor HAL" into oc-dev
am: f4232f9036

Change-Id: I8e80ac6e39bb104250ef2f98474cfa4a914208ee
9e06f5ded23b7110dffe27ffc35fcdea7cf2ba96 19-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: check caller for watchLOHS" into oc-dev
am: 56a5f2f6e0

Change-Id: I76af109d8df016aad6ee7d14e6ebd7a1796c05b4
f4232f9036f66fd505786dff0a3d6e84f78c8168 19-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiNative: Add VINTF check for vendor HAL" into oc-dev
56a5f2f6e07086346829c5681ba37395c1521d2e 19-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: check caller for watchLOHS" into oc-dev
6983f28ae9a4b81a63b6811b11637920b6d57fa5 19-May-2017 Glen Kuhne <kuh@google.com> Merge "P2P: Fix cancelServiceDiscovery mis-cast" into oc-dev am: 59a3ed4989
am: 61274d029f

Change-Id: Ifdb3ee6e33d82c196f257f7bc24f896589d31d9b
61274d029f2fba9a116cfb516fa113e26adb577d 19-May-2017 Glen Kuhne <kuh@google.com> Merge "P2P: Fix cancelServiceDiscovery mis-cast" into oc-dev
am: 59a3ed4989

Change-Id: I4cc116ecc2d425c00d39834c38e5182693d5c708
59a3ed49892642ee146f7f140fc55c39fda7b7ea 19-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "P2P: Fix cancelServiceDiscovery mis-cast" into oc-dev
571652b491d11ca5437840ecc224fb37e52f95e8 19-May-2017 Etan Cohen <etancohen@google.com> [AWARE] Add shell command to obtain HAL capabilities

Print out capabilities as a JSON string. Useful for debugging
and for automated scripts trying to test the upper limits of
capabilities.

Bug: 31940045
Test: builds, runs manually, runs through script
Change-Id: I62d13d85e4492adee956d27bc6d10188ac34754e
ndroid/server/wifi/aware/WifiAwareStateManager.java
31e464cf7677c438151cc33384d524652e923234 18-May-2017 Etan Cohen <etancohen@google.com> [AWARE] Disable any service discovered callbacks on Publisher

Solicited publish gets an indication that a subscriber matches it.
The use-case and API do not need such a notification - disable it at
the firmware level to reduce host wake-ups.

Bug: 38421130
Test: integration (sl4a) tests logs confirm API not triggered
Change-Id: Icd21249417f3920593227c16ffa34a99b61e88c7
ndroid/server/wifi/aware/WifiAwareNativeApi.java
4c33382bf90796653e57cc9db9f93f5dfd53f888 18-May-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Fix update publish/subscribe"
0d8e6a7d72e6bd953939dc6976c00eafc08b8fce 18-May-2017 Etan Cohen <etancohen@google.com> [AWARE] Fix update publish/subscribe

When updating an existing publish/subscribe discovery session the
native API must take the session ID of the existing session. The code
provided 0 - which was an indication to create a new discovery session.

Bug: 38397363
Test: unit tests and integration (sl4a) tests
Change-Id: I8657493a39fe39d12a55af2bdee140b850351c1f
ndroid/server/wifi/aware/WifiAwareDiscoverySessionState.java
ndroid/server/wifi/aware/WifiAwareNativeApi.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
a42d526f8a53b25c58062fed33db5fedda8ceee1 16-May-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: act on interface ip mode changes

When Connectivity service notifies WifiService of interface ip mode
changes, we should use them to update our registered LOHS requestors.
When the LOHS is ready to use, we will be notified about the LOCAL_ONLY
mode and trigger the onStarted callback. If tethering starts, we should
notify the requestors via the onFailed call with an INCOMPATIBLE_MODE
error. In the unlikely case of an IP failure, we should also trigger
the onFailed callback with the GENERIC error.

This CL also adds tests and handling for cases where additional LOHS
requests are added after the hotspot is already up and running.

Bug: 31466854
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I1c6a25eca7b23f161ea4403a980292e82968c4c1
ndroid/server/wifi/WifiServiceImpl.java
878e0cccd652ea556680b9cc101b01142e9ad919 16-May-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: listen and act on softap changes

The registered callers of LocalOnlyHotspot need to be updated when the
hotspot fails or stops. This is currently implemented by having
WifiServiceImpl listen for WIFI_AP_STATE_CHANGE broadcasts. When
updates about softap failures or stopping (disabling or disabled) are
received, appropriate messages are constructed and sent to registered
callers. This CL additionally adds tests confirming this behavior. An
additional helper methods were added to aid testing for sending the
broadcasts and sending messages to the registered LOHS requestors.

Bug: 31466854
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I5ade861423c7ea25690a084e9e4c7c9861f1dbcd
ndroid/server/wifi/LocalOnlyHotspotRequestInfo.java
ndroid/server/wifi/WifiServiceImpl.java
cd1587091a7a9c0b175fc64f33b6f17e62215829 03-May-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: check caller for watchLOHS

Add a check to see if a caller has the signature only NETWORK_SETTINGS
permission before registering them to watch LocalOnlyHotspot changes.

Bug: 36760523
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ie52613269d1a0e9e361ff0a96039ee2b894a2204
ndroid/server/wifi/WifiServiceImpl.java
abdcba9e379041311f353c1abf05b45cd7ba1f20 18-May-2017 Peter Qiu <zqiu@google.com> Merge "SupplicantStaIfaceHal: reset current network info when removing all network" into oc-dev am: f546e73b75
am: 664f7b477f

Change-Id: Ia3cb59bf0d0c5994a0f42214c58ee03f4814d492
664f7b477ff05349510a14855e41220b411d9ff8 18-May-2017 Peter Qiu <zqiu@google.com> Merge "SupplicantStaIfaceHal: reset current network info when removing all network" into oc-dev
am: f546e73b75

Change-Id: I1ced136dd2e6d5b2eccfb0c5e298dcdb81be96cf
f546e73b75f8b2a0eb4e4fc37b226c566956da34 18-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "SupplicantStaIfaceHal: reset current network info when removing all network" into oc-dev
49c5b299dbeefd39c6a2ed7b65b5f92262e7688b 18-May-2017 Roshan Pius <rpius@google.com> Merge "WifiBackupRestore: Tighten key checks in string parsing" into oc-dev am: 526ca05b3f
am: 648915b024

Change-Id: Icd565145e9d7e7263306b50aa218498cd172939e
648915b024ce8a8aa35431b8d388fb6745407ba3 18-May-2017 Roshan Pius <rpius@google.com> Merge "WifiBackupRestore: Tighten key checks in string parsing" into oc-dev
am: 526ca05b3f

Change-Id: I2c459a55d06409b83ab23898f668eb89ce6f37bc
526ca05b3fe1f92a49c55411cd4901ef0f787782 18-May-2017 Roshan Pius <rpius@google.com> Merge "WifiBackupRestore: Tighten key checks in string parsing" into oc-dev
fd9a6d5607bd6c92045f80046ae344a1275a06d7 18-May-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add binder death callback impl am: 0c96f88c6d
am: 58f2ade07f

Change-Id: I9c6734588737e89815d4eba0306d48deee64ef19
58f2ade07f35ccdbfb2a97367e329447271f6706 18-May-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add binder death callback impl
am: 0c96f88c6d

Change-Id: Idc4f6a6c79411d64f31437a4ca5be1658ddf5e52
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)
ndroid/server/wifi/HalDeviceManager.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiVendorHal.java
ed0226aa5f8d64617858b20671be7ea51b17e3f3 17-May-2017 Etan Cohen <etancohen@google.com> Merge changes Ia939ae22,Idc4622ca

* changes:
[AWARE] Delay aware_data* interface creation until aware enabled
[AWARE] Wait for disable
2178f60b508f34f618d123da5fb00c545b464504 15-May-2017 Etan Cohen <etancohen@google.com> [AWARE] Delay aware_data* interface creation until aware enabled

Currently Aware NDI (data-interfaces) are created when Aware becomes
available (e.g. on Wi-Fi being enabled). This CL moves the creation
to when Aware is actually enabled (and destroys them when aware is
disabled).

Purpose: reduce aware interaction surface with infra mode.

Bug: 38271432
Test: unit tests, integration (sl4a) tests, cts (known issues), CtsVerifier
Change-Id: Ia939ae22a1e37822e74f5f85a77ab1b253d77376
ndroid/server/wifi/aware/WifiAwareStateManager.java
72d03f1feaec8829be3b9a8c1286dbcd79910b37 10-May-2017 Etan Cohen <etancohen@google.com> [AWARE] Wait for disable

The NAN disable command now waits for a response from the HAL. This
introduces a slight ordering in disable/enable sequences - which can
prevent some driver/firmware race conditions. Though it is not perfect
in that we are not waiting for the down indication (the state machine
isn't set up for that).

Intended to work-around a system crash regression observed by running
Cts SingleDeviceTest#testAttachDiscoveryAddressChanges which executes
rapid enable/disable cycles. Does not solve issue - but a good safety.

Bug: 38195097
Test: unit tests and integration (sl4a) pass
Change-Id: Idc4622ca69e7e1c1591a8bb1f6872f2d071c6e84
ndroid/server/wifi/aware/WifiAwareNativeCallback.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
0c96f88c6d9f031ab76392cdb1255bd249212ad3 30-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add binder death callback impl

Binder objects for requesting applications are tracked in
LocalOnlyHotspotRequestInfo objects. When a binder death is detected,
this object calls back in to WifiServiceImpl so the request can be
removed and the hotspot can shutdown if there are not any outstanding
requests.

Added a test to verify behavior when there are not any pending requests,
further testing will be added when we start tracking the startLOHS
requests.

Bug: 31466854
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ida9cf996683acca03e5478845721501d12ee1a7f
ndroid/server/wifi/WifiServiceImpl.java
748932d87b7084ae33f7eb6453e30076b0e20524 17-May-2017 Glen Kuhne <kuh@google.com> P2P: fix add upnp service version number parsing

Fixed an error introduced in the p2p hal, where the add service hal was
incorrectly decoding a upnp service version as a decimal number instead
of hexadecimal.

Bug: 38174469
Test: Updated unit tests
Change-Id: Ibf085498e2dfe0190810bd96a7868e1f5dacd94d
ndroid/server/wifi/p2p/SupplicantP2pIfaceHal.java
7b5e49330904ad3db564b57ef3cff1fc63b911b7 16-May-2017 Peter Qiu <zqiu@google.com> SupplicantStaIfaceHal: reset current network info when removing all network

So that we don't propagate stale framework network info when receiving
events from supplicant.

Bug: 38252586
Test: manual test
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: integration regression test

Change-Id: I9414bdc332b02a024f3d31d6c9d3504749c7245a
ndroid/server/wifi/SupplicantStaIfaceHal.java
c5f4b2597df6284d35d2f3af8fb35f72e140c5a7 13-May-2017 Glen Kuhne <kuh@google.com> P2P: Fix onServiceDiscovery callback param parsing

onServiceDiscovery was incorrectly constructing a legacy style
supplicant ctrl-iface event string to pass to
WifiP2pServiceResponse.newInstance.
Modified newInstance to just receive the raw HIDL parameters, and skip
the string construction and deconstruction.

Bug: 38174469
Test: CtsVerifier Service Discovery Requester & unit test
Change-Id: I7872d3575f44e8a29b43dffd8fb083022a5a415f
ndroid/server/wifi/p2p/SupplicantP2pIfaceCallback.java
9a69bf6474f3999c8a83255bd2d08dd607820328 16-May-2017 Roshan Pius <rpius@google.com> Merge "SupplicantP2pIfaceHal: Restore listenChannel behaviour" into oc-dev am: 5420aa3143
am: 13e373e9b0

Change-Id: Ia102c564c7d214837de0628cf2d379c96ceca11b
13e373e9b0c5a870f9e7b05c7973f8c372b35e23 16-May-2017 Roshan Pius <rpius@google.com> Merge "SupplicantP2pIfaceHal: Restore listenChannel behaviour" into oc-dev
am: 5420aa3143

Change-Id: I686c654c4471bf2ec7aa01cd7e2876073e380309
5420aa3143c2a21ed2b06cd4db2d9d6f5d0af562 16-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "SupplicantP2pIfaceHal: Restore listenChannel behaviour" into oc-dev
fca23374ee6adf1d9087e8d7fed44e64585299f8 16-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiNative: Add VINTF check for vendor HAL"
627ce4dfa3e4893a08ab246011f8c1c4f3e51f8b 15-May-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Return false when disableNetwork fails am: b1ccc1af4a
am: 30a57b3d25

Change-Id: I22b449cce79d7b21f773430775d9262ea1c49ccc
30a57b3d25b70affea41940b1ce80955c303805d 15-May-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Return false when disableNetwork fails
am: b1ccc1af4a

Change-Id: Idcaa75f094985d63d55acd99b7c312b586b8dcb2
30f34829e0e7e49dc09c897c72dd0ded7d9805eb 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
ndroid/server/wifi/HalDeviceManager.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiVendorHal.java
b1ccc1af4a8023f351baf2983adadf372eedcbd5 12-May-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Return false when disableNetwork fails

This was returning the wrong result when WifiConfigManager fails the
operation. WifiConfigManager in previous releases would always return
success for the operation and hence the bug was masked.

Bug: 37976256
Test: Unit tests
Change-Id: I69939d935d91b894cf5b8e35e5d40282de21838b
ndroid/server/wifi/WifiStateMachine.java
9d965a48e9c3556f282ec377d89ceb3ecc2e5e38 11-May-2017 Michael Plass <mplass@google.com> WifiStateMachine: Complain about empty messages

Report any instances of empty messages getting sent to WSM (as in the
case where a message is recycled while being sent to multiple handlers).

This is to catch any regressions in case the recycled message problem
pops up again.

Bug: 37953612
Test: relevant unit tests pass
Change-Id: I468c1b65b20c65d8d30dc7bcc254755777699794
ndroid/server/wifi/WifiStateMachine.java
df725bb6f191473558d5e3ab06a09a3e546824c8 13-May-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Add a fixed service-name for OOB passphrase-protected data-path"
d3b9ca7c0e12b83841295b4ebe0023f54de04e0f 12-May-2017 Roshan Pius <rpius@google.com> WifiBackupRestore: Tighten key checks in string parsing

When the wpa_supplicant.conf file received during restore is parsed, we
look for specific known keys which we use to identify the network type.
Instead of checking for lines starting with "<KEY>", check for lines
starting with "<KEY>=" which is the general format for all wpa_supplicant
params in the network block.

PS: This fixes the associated bug because the backup data contained an
unknown field called "eapRetryCount" which would have previously matched
out check to see if it's an EAP network.

Bug: 38248167
Test: Unit tests.
Change-Id: Ib4e158c8ed4cd10db694d389e5296e280363f9c9
ndroid/server/wifi/WifiBackupRestore.java
b7d05adc1f96fe0b0397e21d91696096322641d5 12-May-2017 Ningyuan Wang <nywang@google.com> Merge "Do not cancel scan timeout alarm on PNO scan result" into oc-dev am: e9b2112d2f
am: 4584366f7e

Change-Id: Icb57a44bc1f34b19f2b8beeee37020b1286e3375
4584366f7e40d2282d2323aab0028b6e7f805c73 12-May-2017 Ningyuan Wang <nywang@google.com> Merge "Do not cancel scan timeout alarm on PNO scan result" into oc-dev
am: e9b2112d2f

Change-Id: I1b3b76b554f87fe595150774776314ef91aaa322
e9b2112d2fe1c9b87c1bab2c52d3b33e6b3bcfb5 12-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Do not cancel scan timeout alarm on PNO scan result" into oc-dev
f2344ef55a71f1b2e47a7913c756f0af546d0cb1 12-May-2017 Etan Cohen <etancohen@google.com> [AWARE] Add a fixed service-name for OOB passphrase-protected data-path

PMK generation from Passphrase uses passphrase + service name + PMI.
However, service name is not available for OOB setups. In such a case
use a fixed string.

Already added for initiator. This CL adds it for the responder as well.

Bug: 38171946
Test: unit tests + existing integrated (sl4a) tests + CtsVerifier
Change-Id: I175fe524dc16363f663a8fb10c200831b11ceaf9
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareNativeApi.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
3af7d54afce3e72a8ccf037dd8e4fa30c8ccf878 12-May-2017 Roshan Pius <rpius@google.com> SupplicantP2pIfaceHal: Restore listenChannel behaviour

Bug: 38246261
Test: Manual tests with curator app.
Test: Unit tests.
Change-Id: I05e6d8d98e7875d1789e27fe0a34062784c69081
ndroid/server/wifi/p2p/SupplicantP2pIfaceHal.java
c8be052d8a92ea8a6400004e29dd3da5ff5bfb81 12-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: add objects to track LOHSrequests" into oc-dev am: 728bf64cfc
am: 181e613402

Change-Id: Ifeb56be02ca4700092fb8fb0c4aff95b09d9b435
181e6134025aa82c94ae5e4931981b535d4e956a 12-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: add objects to track LOHSrequests" into oc-dev
am: 728bf64cfc

Change-Id: Ic09089d007dda0ad6662a5ad15b1675e5837f622
728bf64cfc9881eeb06cbe8745b1a356db980abe 12-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: add objects to track LOHSrequests" into oc-dev
d97a85f3ae5f5ff8213827a4389ba188b99f528a 12-May-2017 Amin Shaikh <ashaikh@google.com> Merge changes from topic 'onarevert' into oc-dev am: 506d139a53
am: 1824dda8ee

Change-Id: I6549893819dff8f8e085f82321c1c5850e5c1165
7e672c90b423d9e49ed4ee56e1f49622a1e80e72 12-May-2017 Glen Kuhne <kuh@google.com> Merge "P2P: handle null p2p_dev_address sta auth/deauth" into oc-dev am: 88d77863cb
am: d8c6cda12a

Change-Id: I8a96e11c00222db74ba6cf03bbeb4d00cdfabbbd
1824dda8eeaec6038cb6c9af39c0b188cce605ad 12-May-2017 Amin Shaikh <ashaikh@google.com> Merge changes from topic 'onarevert' into oc-dev
am: 506d139a53

Change-Id: I4e9b674a5355f7359c63391c447427992a409ef2
506d139a5358e00e208f02eb6f84be7790525f53 12-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic 'onarevert' into oc-dev

* changes:
Move ONA back into the wifi framework.
Revert "Move WifiNotificationController to NetworkRecommendation"
d8c6cda12ac48ab79c12898fa7391d3f1a98c41f 12-May-2017 Glen Kuhne <kuh@google.com> Merge "P2P: handle null p2p_dev_address sta auth/deauth" into oc-dev
am: 88d77863cb

Change-Id: Ie17920b067c19e9e417757462984e5a574230517
cb90e9415a66b9328d5e091317262151e83be823 12-May-2017 Glen Kuhne <kuh@google.com> P2P: Fix cancelServiceDiscovery mis-cast

cancelServieDiscovery was mis-parsing/casting a long into an int, and
throwing a NumberFormatException.

Bug: 38245447
Test: CTS Verifier, updated unit tests
Change-Id: I3978f74a9898ad7af0fadf72f8067f89d3fed180
ndroid/server/wifi/p2p/SupplicantP2pIfaceHal.java
88d77863cb2caeb3a994f7931a08bded96efa71b 12-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "P2P: handle null p2p_dev_address sta auth/deauth" into oc-dev
2b8d172f337298ac1da2f9a69662474529e11bc1 12-May-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Initial power optimization framework - hooks & config"
c760a66378bbd844eb421658799b4d55c76b98fa 25-Apr-2017 Etan Cohen <etancohen@google.com> [AWARE] Initial power optimization framework - hooks & config

Create hooks in Wi-Fi Aware service to respond to power state
change events: interactive on/off (aka screen on/off) and
idle (doze).

Initial implementation transitions to higher latency (assumed
to be lower power) discovery duty cycles.

Bug: 35457252
Test: unit tests
Change-Id: I3a2a67db3e0b47ab982d7c67326e7fa20e429fad
ndroid/server/wifi/aware/WifiAwareNativeApi.java
ndroid/server/wifi/aware/WifiAwareNativeManager.java
ndroid/server/wifi/aware/WifiAwareService.java
ndroid/server/wifi/aware/WifiAwareServiceImpl.java
ndroid/server/wifi/aware/WifiAwareShellCommand.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
6fc3eb35ecb986259c19142166deffdcd2b03b14 11-May-2017 mukesh agrawal <quiche@google.com> Merge "WifiDiagnostics: disable ring-buffers on |user| builds" into oc-dev
am: f72eaac0e3

Change-Id: I5df8304315a1eec36826d984adfdbab253a3932e
f72eaac0e38a0f4682839fc1826651015f2c94a9 11-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiDiagnostics: disable ring-buffers on |user| builds" into oc-dev
813bba29bf7d48c1d829841457cf27365e0aaa68 11-May-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Inform app of attach failure when aware isn't available"
7e9eafab778c3920732a965ca9a0b330c6c676d6 04-May-2017 Glen Kuhne <kuh@google.com> P2P: handle null p2p_dev_address sta auth/deauth

This fixes an issue introduced with the HIDL interface, legacy STA
devices have a null p2p device address, and only use a src address.
The pre-HIDL behaviour was to use the srcAddress if the p2pDeviceAddress
was unavailable, this CL restores that.

Bug: 37961262
Test: Manual verification with LINKS app, added unit test
Change-Id: Ib270228e8a2d1f90423c7057052623115f586f64
ndroid/server/wifi/p2p/SupplicantP2pIfaceCallback.java
ndroid/server/wifi/util/NativeUtil.java
2739f73dec628d2493e5447b71a83fe59c143fbd 11-May-2017 Ningyuan Wang <nywang@google.com> Do not cancel scan timeout alarm on PNO scan result

mScanTimeoutListener is only used for single scan timeout.
Canceling this time out alarm on PNO scan result may leave
WificondScannerImpl in the state where it is waiting for a
single scan result event forever.
This causes problems because it prevents processPendingScans()
to accept any new single scan requests.

Bug: 38139817
Test: compile, unit tests, manual tests, integration tests
Change-Id: I7a4ab04a7702986cd2de53f595dd958704cef95f
ndroid/server/wifi/scanner/WificondScannerImpl.java
fa24af4890f04d0ccb94e1127667d3ea5d82e5ce 11-May-2017 Randy Pan <zpan@google.com> Merge "SavedNetworkEvaluator: logging" into oc-dev am: f062167f6c
am: e33ffb2359

Change-Id: I6f3b75d6f761d23df965675ef291ae77949c5a02
e33ffb2359d2ed4a975aac2b9f8c0237894a7bef 11-May-2017 Randy Pan <zpan@google.com> Merge "SavedNetworkEvaluator: logging" into oc-dev
am: f062167f6c

Change-Id: If1169cb23f1ec6ae7a4959f4c700377a9ab46659
f062167f6cd72fac62ad7ca87186492f4f3b4e63 11-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "SavedNetworkEvaluator: logging" into oc-dev
77d47d4250ee148e0934cd00de72d40c8464475f 11-May-2017 Etan Cohen <etancohen@google.com> [AWARE] Inform app of attach failure when aware isn't available

When Aware is disabled there's a broadcast informing apps. This
also implies to app that all operations they have pending will
fail - whether or not they get callbacks for them (the whole service
is effectively shut down).

This change adds a failure callback in such a scenario for attach
create. Minor change which makes the interface a bit richer (app
doesn't have to coordinate two different information streams), and
is useful for test scripts validating such a flow.

Bug: 31940045
Test: unit tests + integration (sl4a) tests passing
Change-Id: I76985cc0ec24150bf3f6128e7f37e40c243ea717
ndroid/server/wifi/aware/WifiAwareStateManager.java
7e39ddac8d7451985b6a6a753c9e7f6336f2b15e 11-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiStateMachine: properly update wifi enabling" into oc-dev am: 4d31977e4f
am: 31b90afeba

Change-Id: Ic94b3f7fdb341710b3b417964c20009f07c564ec
31b90afebaa66d7b5570aff5cfd8a51a0f5529f7 11-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiStateMachine: properly update wifi enabling" into oc-dev
am: 4d31977e4f

Change-Id: I712896a720310517e1da65d87dabf4be4cff4373
4d31977e4f161e91d9b3bcbc830d72edfaaa1753 11-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiStateMachine: properly update wifi enabling" into oc-dev
ab68b41871ffaa9ac24042536c6f74c1bd306f1c 11-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiDiagnostics: disable ring-buffers on |user| builds"
d584ef11369ec96038179d7fa733cc2e6d30f71e 11-May-2017 Randy Pan <zpan@google.com> Merge "SavedNetworkEvaluator: improve logging" into oc-dev am: 2cd1b16e18
am: 11d3a5ccc9

Change-Id: I80d5afee03eda7a36dd82e6cd0607e2a072d9261
20fa980d3dcc1be2e073f97d944a23936cbdd45e 11-May-2017 Glen Kuhne <kuh@google.com> Merge "Fix P2P provision discovery config method" into oc-dev am: 24c6c56164
am: e4c3459195

Change-Id: Ie2f1acc45df2d6adcf3bd3876e91056887238d33
11d3a5ccc9dc19f2908a4e257f280938a2f4d6d2 11-May-2017 Randy Pan <zpan@google.com> Merge "SavedNetworkEvaluator: improve logging" into oc-dev
am: 2cd1b16e18

Change-Id: Id27720afb34b82f63a15d85bd52e1c1676299c21
e4c345919566617ed37dd5dcb8e498c43bcf1bd4 11-May-2017 Glen Kuhne <kuh@google.com> Merge "Fix P2P provision discovery config method" into oc-dev
am: 24c6c56164

Change-Id: Ia50023c23600253f547c3b8dab3162bb498a979a
31fb63c47b21d369059023532ff8959d12ae4235 06-May-2017 mukesh agrawal <quiche@google.com> WifiDiagnostics: disable ring-buffers on |user| builds

We've seen ring-buffer events cause a number of problems
due to overload or deadlock. While the ring-buffers events
aren't necessarily the root cause of these problems, the
ring-buffer events _are_ a significant factor.

Mitigate risk for end-users, by disabling ring-buffers
on |user| builds.

Note: this CL differs from the automerge-parent CL in
oc-dev. The difference is that we do not remove the
ringBufferSizeIsSmallByDefault() test. The reason for
this difference is to make it easier to revert
ag/2116039, when the time comes (b/36811399).

(When we revert ag/2116039, we might want to allow
ringbuffers for user builds on DR. And if we do allow
ringbuffers on user builds, we'll want to have the
ringBufferSizeIsSmallByDefault test.)

Bug: 37756562
Test: tests/wifitests/runtests.sh
Test: manual test (see below)

Manual test: (on bullhead)
1. install |user| build
2. connect to GoogleGuest
3. adb shell pgrep system_server
4. adb shell dumpsys wifi | grep "ring-buffer ="
-> expect no matching lines
5. adb shell pgrep system_server
6. PIDs from steps 3 and 5 should match
7. install |userdebug| build
8. connect to GoogleGuest
9. adb shell pgrep system_server
10. adb shell dumpsys wifi | grep "ring-buffer ="
-> expect at least one match
11. adb shell pgrep system_server
12. PIDs from steps 9 and 11 should match

Change-Id: Ib7cf1f9e9442ed3c3191d2b20b0812afbbf62930
ndroid/server/wifi/WifiDiagnostics.java
f4efccec8a7f8c871dbf0b7360f44d28e0a6db6d 04-May-2017 Amin Shaikh <ashaikh@google.com> Move ONA back into the wifi framework.

- This is the minimum change to restore the "Open networks available"
feature from N and fulfill O requirements without causing regressions
- Post the "Open networks available" using the NETWORK_AVAILABLE
NotificationChannel. Note that the feature is still enabled/disabled by
toggling Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON
- Before showing a notification, check if the current user has the
DISALLOW_CONFIG_WIFI restriction. See b/35996959 for details.
- Add tests for the UserManager check in WifiNotificationController

Bug: 37794067
Test: ./tests/wifitests/runtests.sh
Change-Id: I0266f63acafc56b995f71420af726933908ce8a0
ndroid/server/wifi/WifiNotificationController.java
32f4de6e3cd333c657ac3aff078028a1d52600e3 10-May-2017 Randy Pan <zpan@google.com> SavedNetworkEvaluator: logging

Shorten the firmware roaming equivalent BSSID bonus scoring
string.

Bug: 36872201
Test: Build, flash and boot.
Change-Id: Iad46c50ecf30356ddf7af3a2221ae4a9f410d890
ndroid/server/wifi/SavedNetworkEvaluator.java
2cd1b16e18f6ed80b57044141dca449165fb0d2e 10-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "SavedNetworkEvaluator: improve logging" into oc-dev
a3458ecb3c1b1a7dae295a6c728242dcc06a04f3 05-May-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: properly update wifi enabling

When switching modes, WifiStateMachine should only update the wifi state
to enabling when actually heading to connect mode. This is currently
not the case and we end up seeing the UI update the wifi icon to show
that wifi is starting up.

Bug: 37925273
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ie3a092c7805b64316c42f2781b14deb3986d2572
ndroid/server/wifi/WifiStateMachine.java
24c6c561641948da3315f9f8124fc960b65a70a8 10-May-2017 Glen Kuhne <kuh@google.com> Merge "Fix P2P provision discovery config method" into oc-dev
acfa5dbe0fc7684c6e80316bd07d293e6cc367c4 10-May-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Add a fixed service-name for OOB passphrase-protected data-path"
ca614a7314230e93a69110c94e7ea2d38b3f87a1 10-May-2017 Ningyuan Wang <nywang@google.com> Merge "Add retry logic for wifi Hal starting failure" into oc-dev am: e64cc58a5b
am: 818eb4a8be

Change-Id: Id66c01cb9f76864631cb42103a87a65a3609ee35
818eb4a8becad4aeb8ae86ac389bb300413f404a 09-May-2017 Ningyuan Wang <nywang@google.com> Merge "Add retry logic for wifi Hal starting failure" into oc-dev
am: e64cc58a5b

Change-Id: Ieacb0ba618954af50fb15abce5a6f321e3d9087f
cee93a796f42939b2d4f2e3e5491c3d951694662 28-Apr-2017 Joe LaPenna <jlapenna@google.com> Revert "Move WifiNotificationController to NetworkRecommendation"

This reverts commit fcbdc7fdb5612e82991494832a95c73bcc898f12.

Bug: 37794067
Test: ./tests/wifitests/runtests.sh

Change-Id: I6c4b876fc50d35fbec03dab58fb26caa6e4d1655
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNotificationController.java
ndroid/server/wifi/WifiServiceImpl.java
ff05cbcaccc03d1f64d1cb232a3c40a664c4be57 09-May-2017 Etan Cohen <etancohen@google.com> [AWARE] Add a fixed service-name for OOB passphrase-protected data-path

PMK generation from Passphrase uses passphrase + service name + PMI.
However, service name is not available for OOB setups. In such a case
use a fixed string.

Bug: 38171946
Test: unit tests + existing integrated (sl4a) tests
Test: CtsVerifier still fails - but a separate issue
Change-Id: Ic1d92438b242aa1264c0589af8ad333c172a2cbf
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareNativeApi.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
82313852d1b6408d01cb2445ddfa3cadb8a59206 09-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: use system feature flag to guard Passpoint APIs"
e64cc58a5ba045a3e6b81994614e2b0a95c7add4 09-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add retry logic for wifi Hal starting failure" into oc-dev
4de361cb58da0b0c410c8c41dc97fb87f687d270 09-May-2017 Randy Pan <zpan@google.com> SavedNetworkEvaluator: improve logging

Instead of dumping every field of ScanResult, print SSID, BSSID
and RSSI only. Shorten the scoring string as well.

Bug: 36872201
Test: Build, flash the image and examine the new log.
Change-Id: I7fb8075f0f011ca4965a92802728bf4d919fe68f
ndroid/server/wifi/SavedNetworkEvaluator.java
c343b5ceff3a1153db772a4c0ffb24c6870c3db0 06-May-2017 mukesh agrawal <quiche@google.com> WifiDiagnostics: disable ring-buffers on |user| builds

We've seen ring-buffer events cause a number of problems
due to overload or deadlock. While the ring-buffers events
aren't necessarily the root cause of these problems, the
ring-buffer events _are_ a significant factor.

Mitigate risk for end-users, by disabling ring-buffers
on |user| builds.

Bug: 37756562
Test: tests/wifitests/runtests.sh
Test: manual test (see below)

Manual test: (on bullhead)
1. install |user| build
2. connect to GoogleGuest
3. adb shell pgrep system_server
4. adb shell dumpsys wifi | grep "ring-buffer ="
-> expect no matching lines
5. adb shell pgrep system_server
6. PIDs from steps 3 and 5 should match
7. install |userdebug| build
8. connect to GoogleGuest
9. adb shell pgrep system_server
10. adb shell dumpsys wifi | grep "ring-buffer ="
-> expect at least one match
11. adb shell pgrep system_server
12. PIDs from steps 9 and 11 should match

Change-Id: Ib7cf1f9e9442ed3c3191d2b20b0812afbbf62930
ndroid/server/wifi/WifiDiagnostics.java
d37cf4983e33284fc00f2e8cab05214bd044d6a4 08-May-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Add wifiaware shell command interface"
4a5bd37a54b45b5ec76fdd4ddf0fba4a0eede3bf 08-May-2017 Ningyuan Wang <nywang@google.com> Merge "Update anonymous identity upon EAP network connection" into oc-dev am: cdd40445c5
am: 6c5d03c7e9

Change-Id: I6b67a40273be7d884503f51d257d5f310e45e714
6c5d03c7e9136523cb48bc9a8ec2deb78dbd49fe 08-May-2017 Ningyuan Wang <nywang@google.com> Merge "Update anonymous identity upon EAP network connection" into oc-dev
am: cdd40445c5

Change-Id: I690163eeda95a83ce26c5c159bfa881f360b9526
cdd40445c5f08de39b1c412f53eb775f03211880 08-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Update anonymous identity upon EAP network connection" into oc-dev
87ac618aa0ccfe488c4601d7d26cfc9a9ef71785 30-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add objects to track LOHSrequests

This CL only adds the objects and lock that will be used to track
LocalOnlyHotspot requestors. CLs will follow to use these objects.

A comment was also added to a private helper method.

Bug: 31466854
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I84554c20adb1668d8ba321f82d7ec86b56fc1eda
ndroid/server/wifi/WifiServiceImpl.java
5a843c0d793abf48de2c77e0b1a54fded88bb018 05-May-2017 Glen Kuhne <kuh@google.com> Fix P2P provision discovery config method

Fixes some more bugs introduced with HIDL. When using a PIN for
provision discovery, the target config method should be the opposite of
the role (KEYPAD or DISPLAY) that the sender is using.
This flips the role for the target config method when sending the
request, and sends the correct broadcast when completing the
provisioning on both devices.

Bug: 38002403
Test: Manually tested via Links app, CTS GO Negotiation Test (PIN),
updated unit test
Change-Id: Ic6f775030c6dd1476f56677fb79c895d59bb25b4
ndroid/server/wifi/p2p/SupplicantP2pIfaceCallback.java
ndroid/server/wifi/p2p/SupplicantP2pIfaceHal.java
0cb7ccda98c48bd45af272d2a888220f8b26e1c8 06-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use correct P2P GO intent value" into oc-dev
e1fcc9d881760bf9926fc1e4b988a5a661218575 05-May-2017 Peter Qiu <zqiu@google.com> hotspot2: use system feature flag to guard Passpoint APIs

A system feature flag FEATURE_WIFI_PASSPOINT is added for
indicating Passpoint support. So use it to guard the Passpoint
APIs.

Bug: 36886243
Test: Manual test
Change-Id: Idbcf3e5ec4df929210b8694c52b966e14da04daa
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiServiceImpl.java
d303ba3891c4ebd2bc0ea8f3125a7358cf1d9018 18-Apr-2017 Tomonori Nanbu <tomonori.nanbu@sonymobile.com> Use correct P2P GO intent value

Use correct P2P GO intent value.

Bug: 37533486
Test: Manual test

Merged-In: I3286f3daaf32a1e22e0b8c6349ca8b67ad2012fd
Change-Id: I3286f3daaf32a1e22e0b8c6349ca8b67ad2012fd
ndroid/server/wifi/p2p/SupplicantP2pIfaceHal.java
02ccc222de3107231d0c57518d0767361e052089 05-May-2017 Randy Pan <zpan@google.com> Merge "Fix how WifiMonitor/WifiP2pMonitor sends a message" into oc-dev am: b45a7dca63
am: d59be019ce

Change-Id: I5e4441e0a4bea390954e76ae78ab00a50750750e
d59be019ceeadc38b96473b96e93020f3c8f792f 05-May-2017 Randy Pan <zpan@google.com> Merge "Fix how WifiMonitor/WifiP2pMonitor sends a message" into oc-dev
am: b45a7dca63

Change-Id: I62fd2dc367cf5f924b4998a6c9476d10342fdaca
b45a7dca630092f56363d16d2ba14d10f69845bf 05-May-2017 Randy Pan <zpan@google.com> Merge "Fix how WifiMonitor/WifiP2pMonitor sends a message" into oc-dev
7a76b2468e879e44e546bf2023b8e5cb3e9a0a5f 01-May-2017 Etan Cohen <etancohen@google.com> [WIFI] Add adb shell cmd wifi interface

Add hooks for 'adb shell cmd wifi' commands. Replace original
version using dumpsys.

Bug: 37856680
Test: builds and runs
Change-Id: I77295ef910bb1d0414024ea718c139309c585bca
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiShellCommand.java
098640f533f3fc04cb49cb860f9dc45ad8a19e69 02-May-2017 Randy Pan <zpan@google.com> Fix how WifiMonitor/WifiP2pMonitor sends a message

A message can potentially have multiple handlers. Looper recycles
the message after one handler is done with it. Sending/copying the
recycled message to another handler is problematic. Fix the issue
by always sending a copy of the original message.

Bug: 37714369
Test: runtest.sh
Change-Id: I2f4a4903ac8da94816341def969878f888154b6c
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/p2p/WifiP2pMonitor.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
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStaNetworkHal.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
3895a16e00aa5899e90c014566e4fe33a63e3619 29-Apr-2017 Ningyuan Wang <nywang@google.com> Add retry logic for wifi Hal starting failure

This add the retry logic for starting the wifi HAL because
wifi HAL might still be in the process of stopping.

Bug: 37681479
Test: compile, unittests
Test: manual test toggling the hotspot mode quickly

Change-Id: If87d8a0ebdcdf8a0aca233808b9d84393d21f738
ndroid/server/wifi/HalDeviceManager.java
d6992944c7011c0a68b208dfd042fe61aa48e702 04-May-2017 Randy Pan <zpan@google.com> Merge "Wifi network selection logging improvement" into oc-dev am: bd6f2f3e73
am: e212ec5833

Change-Id: Ibbaf629372200e7af300ab4181525e323aad4865
9d79780441b335d9f3e052de1483019c00467715 04-May-2017 Randy Pan <zpan@google.com> Merge "WifiConnectivityManager: logging improvement" into oc-dev am: abdaf2dfae
am: 335b495e51

Change-Id: I484e6bb2860ac11a11c8b828257924bb01a005c2
d8d5bd3feb9f34cfface31cd3a26cba6964db2a1 04-May-2017 Glen Kuhne <kuh@google.com> Merge "Fix potential NPE in WifiService dump" into oc-dev am: 1e9f3c08bf
am: 192d6f87be

Change-Id: I57ca3f9c1c1b657639d8c21702b311ea3341d0a9
e212ec5833a5d4bb4b5cb68af4ae0a0626a32ad5 04-May-2017 Randy Pan <zpan@google.com> Merge "Wifi network selection logging improvement" into oc-dev
am: bd6f2f3e73

Change-Id: If7b92106f082814d6f8b6f2a1132f313ca4293e2
335b495e51d92ea20d29476fa4f753157f19c5ba 04-May-2017 Randy Pan <zpan@google.com> Merge "WifiConnectivityManager: logging improvement" into oc-dev
am: abdaf2dfae

Change-Id: Iaeba51cf93c698bcddb3dac899fed82930c7e099
192d6f87beca307313dcaf1f4abab417afe0c31f 04-May-2017 Glen Kuhne <kuh@google.com> Merge "Fix potential NPE in WifiService dump" into oc-dev
am: 1e9f3c08bf

Change-Id: Id4ef584acb1bcee43ac95af3b7975191f5ad7ef8
bd6f2f3e73224237808660fc89c6251797412caf 04-May-2017 Randy Pan <zpan@google.com> Merge "Wifi network selection logging improvement" into oc-dev
abdaf2dfae12e1a61f62261719443f41aa23dc9a 04-May-2017 Randy Pan <zpan@google.com> Merge "WifiConnectivityManager: logging improvement" into oc-dev
1e9f3c08bff48d5a743888b8445432592aece22f 04-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix potential NPE in WifiService dump" into oc-dev
7b05f07824221a960e62f9aebf8bf9caef1a879d 04-May-2017 Ningyuan Wang <nywang@google.com> Remove networks from supplicant before starting PNO scan am: b47a0de674
am: d754743161

Change-Id: Idfdc3edef238263a7f1ca35c4b06b25479885853
d75474316115eb905acee43705414339f3044ba9 04-May-2017 Ningyuan Wang <nywang@google.com> Remove networks from supplicant before starting PNO scan
am: b47a0de674

Change-Id: I29e774676a2bc857b23d2981cc191a42e35677cb
b47a0de674df76df087f0a0d642aea2603bbf6ab 27-Apr-2017 Ningyuan Wang <nywang@google.com> Remove networks from supplicant before starting PNO scan

We only start PNO scan when network is disconnected and screen
is off.
In the case we get disconnected from an AP, supplicant will keep
triggering scan and reconnect to that network.
This behavior is useful for immediate reconnection. However, when
PNO scan is on, the supplicant's single scan and PNO scan would
usually fail each other because they share the same radio resource.
This is causing power regression.
With this patch, we remove networks from supplicant so supplicant
will not keep scanning for reconnection when PNO scan is on.

Bug: 37744179
Test: unit tests, manual test, integration test

Change-Id: I03d4dea3b7f1acb51d716126f1057c13cd3ee9be
ndroid/server/wifi/scanner/WificondScannerImpl.java
74196d24e936be52b75f5b3e3ceecda0fa12bfdd 03-May-2017 Glen Kuhne <kuh@google.com> Merge "Use correct P2P GO intent value" am: 33d887d7bd am: 3eb6016c90 am: fbeb9fdd2b
am: 9fb23cf57d

Change-Id: I5e6c8d77ef62bcbe461a403846a999aaabad17e6
9fb23cf57d37d987be9ebc6ee6d2f7942e519375 03-May-2017 Glen Kuhne <kuh@google.com> Merge "Use correct P2P GO intent value" am: 33d887d7bd am: 3eb6016c90
am: fbeb9fdd2b

Change-Id: Ie88ffaa8483af096a5c351d820c59d37591a8a71
33d887d7bd60284426008b359e635358352e5342 03-May-2017 Glen Kuhne <kuh@google.com> Merge "Use correct P2P GO intent value"
ba2ed785e496402c48b534ba6480eb980215e302 03-May-2017 Michael Plass <mplass@google.com> Merge changes I2cb3160c,Ie98f2afa,Iebf4b1c3 into oc-dev am: 8b484d08ba
am: 1a96bfa4c7

Change-Id: I402e74dd68a300fab8be331d85e0369a27c878d4
1a96bfa4c7cfb451aca65f90fa49461bcf679b4a 02-May-2017 Michael Plass <mplass@google.com> Merge changes I2cb3160c,Ie98f2afa,Iebf4b1c3 into oc-dev
am: 8b484d08ba

Change-Id: I3142218d6d855c6da6010be3b23cba2a167c58ec
8b484d08ba97fd99dfe56dba4bf2fd1bd81e3cde 02-May-2017 Michael Plass <mplass@google.com> Merge changes I2cb3160c,Ie98f2afa,Iebf4b1c3 into oc-dev

* changes:
[WifiScoreReport] cleanups
WifiScoreReport housecleaning
[WifiScoreReport] restructuring
031cdffdaf223772d4ea52569ec7a08d00013208 02-May-2017 Glen Kuhne <kuh@google.com> Fix potential NPE in WifiService dump

Added nullchecks to WifiServiceImpl & WifiMetrics dump methods usage of
args.
This is a precaution to similar null pointer exceptions that were occuring in
statemachine dump methods.

Bug: 37907061
Test: Added some unit tests
Change-Id: I0ab74421cddc31f7270cdd314fb86678194be0f0
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiServiceImpl.java
f1121f5224fcf1b6b6ef107ef96c555148d2415e 02-May-2017 Erik Wolsheimer <ewol@google.com> DO NOT MERGE Add missing null check to WifiStateMachine#dump
am: 0dffd1db07

Change-Id: I905f4e948536e16a2b7f081994123d055d72320d
0dffd1db0778b502198256e3d7a7a75976867cef 02-May-2017 Erik Wolsheimer <ewol@google.com> DO NOT MERGE Add missing null check to WifiStateMachine#dump

Bug: 33932575
Change-Id: If84866598eb4b0482f93dc3256c4dcb4d5182469
ndroid/server/wifi/WifiStateMachine.java
5213be94c3b27fff928f5f221e5951c7ede1058b 26-Apr-2017 Randy Pan <zpan@google.com> Wifi network selection logging improvement

1) Only log saved networks which are disabled. Print the disable
reason and count in a human readable fashion.
2) Log user connection preference only if it affects network
selection.

Bug: 36872201
Test: runtest.sh
Test: Flash, run connection tests and check the bug reports
Change-Id: I56df97e43ef01ff8d14e79a26bf98bb60abedee2
ndroid/server/wifi/SavedNetworkEvaluator.java
ndroid/server/wifi/WifiNetworkSelector.java
c74b5616d457fc0208b4c3f5d6a1032a011bbe31 02-May-2017 Jeff Sharkey <jsharkey@google.com> Merge changes from topic 'LOHSapi' into oc-dev am: 8472ba8095
am: ff7ae7581d

Change-Id: I087cb9fa88305402a57df8dbb8bf19637e456e69
710c5c8431be00839e1465a5262a90790969219b 02-May-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add tethering check for LOHS am: b09edccf20
am: 909ad15e03

Change-Id: I7446cf68df2b6b80f5976aaea96c7490e28afc34
8a0adb85524d01b5a235a9ae95154cbc389d4cf8 02-May-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add LOHS permission checks am: 2fd9436184
am: 8d1925ab9c

Change-Id: I3f5b8977e41b9dc5d653b0b71711033bdf7aa91a
25a5dee0ddf8b6b93f5cd37399eca5b4ba78565d 26-Apr-2017 Randy Pan <zpan@google.com> WifiConnectivityManager: logging improvement

1) Convert Wifi state information from integer to string.
2) Deleted the messages that indicate scans were successfully
scheduled.
3) Deleted the onPnoNetworkFound() message as handleScanResults()
already logs the listener name.
3) Cleaned up a couple of messages related to watchdog and
scan band settings.

Bug: 36872201
Test: Load the image, run connection tests and check the BR.
Change-Id: I8eee28399b38cc4efa3b39c4c13e7f600993d09b
ndroid/server/wifi/WifiConnectivityManager.java
ff7ae7581d2eefd94882a7f56d1b408afc470ada 02-May-2017 Jeff Sharkey <jsharkey@google.com> Merge changes from topic 'LOHSapi' into oc-dev
am: 8472ba8095

Change-Id: Iab5c3b50745b614423d1a249f47da8746dcd8e12
909ad15e03f4145c444310498dcaf453bebf7f1f 02-May-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add tethering check for LOHS
am: b09edccf20

Change-Id: Ide41733117eeb58e3d2cbf810a8c05b083a29bc7
8d1925ab9cce5ad312987272bca1fb838c93de8c 02-May-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add LOHS permission checks
am: 2fd9436184

Change-Id: I6b098c1178ff573202f2f8ae3ad9c7b1b28f7140
8472ba80953fbbb0227eff5faac497e1bca067b0 02-May-2017 Jeff Sharkey <jsharkey@google.com> Merge changes from topic 'LOHSapi' into oc-dev

* changes:
WifiServiceImpl: update API for LOHS
WifiServiceImpl: add tethering check for LOHS
WifiServiceImpl: add LOHS permission checks
ab6d0d4b35673dcca253255362f048bce7370a4d 02-May-2017 Peter Qiu <zqiu@google.com> hotspot2: update method name for timestamp related APIs am: 8f4f48b96b
am: 56452404cf

Change-Id: Ic408c955e7bcdb69d10438b6c55bff30ff8eee79
56452404cffee1d4ca70262abecc3df2c765e800 02-May-2017 Peter Qiu <zqiu@google.com> hotspot2: update method name for timestamp related APIs
am: 8f4f48b96b

Change-Id: Ie8039b47de71e720c619907f6bfb384b5acbfc3f
0025465e311fe9504cd79610523a1b8171995acc 30-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: update API for LOHS

Add a return code for disallowed tethering for the user. Since this
needs to be a new failure mode, the return type for starting LOHS needed
to change. Updated tests to reflect this as well.

This CL will be part of a topic - there is a corresponding WifiManager
change.

Bug: 37073685
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I22d1fcf755d1384d482bd03dbc9a6388dfa4d3db
ndroid/server/wifi/WifiServiceImpl.java
dc929704e04d634eff04dfd55024b18578be9717 28-Apr-2017 Etan Cohen <etancohen@google.com> [AWARE] Add wifiaware shell command interface

Add support for 'adb shell cmd wifiaware ...'. No commands are
added - just the framework.

Bug: 37780855
Test: builds, able to execute command
Change-Id: I8cd66c3522ba97d96808dfadce389de942ef4063
ndroid/server/wifi/aware/WifiAwareServiceImpl.java
ndroid/server/wifi/aware/WifiAwareShellCommand.java
8f4f48b96b690aa099f85aad7a361cf39e431f42 01-May-2017 Peter Qiu <zqiu@google.com> hotspot2: update method name for timestamp related APIs

Bug: 37514629
Test: build
Change-Id: Ib8ade875bd51df6b8fd0f1acb6b730cc545aa084
ndroid/server/wifi/hotspot2/PasspointXmlUtils.java
2ec4d5ae4550794037c357137148331552180da9 30-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add empty calls for LOHS am: aaa03cbbf8
am: 5a66aee25c

Change-Id: I2f87226597e497acbcfe731a01f5cf38bcf3fbd4
5a66aee25c49bbe89184ca1ef2a9c7fcf40268fd 30-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add empty calls for LOHS
am: aaa03cbbf8

Change-Id: Ib31225d9d287981072863c92d30b5f19db3c9d77
b09edccf2056d1106da4b901e1e8b26841a02a61 30-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add tethering check for LOHS

Before starting up local only hotspot, first make sure we aren't already
tethering. If we are, return null since it is not a valid mode change.
If not, continue to throw UnsupportedOperationException.

Bug: 36765661
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I9a371c4c8ecbbcc658ab8dd844f87b8705bced3c
ndroid/server/wifi/WifiServiceImpl.java
2fd9436184ea37a297f2abd5e884d30d0014b620 29-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add LOHS permission checks

The new calls to start/stopLocalOnlyHotspot and
getLocalOnlyHotspotConfig need to have permission checks to make sure
only valid callers can turn the hotspot on since that disables wifi.
Enabling LocalOnlyHotspot also requires the location permission and that
Location services are enabled. A utility was added to ease testing.

This CL also adds tests verifying the permission checks.

Bug: 36760523
Bug: 37082656
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: I91b28ccb44113bb6233a50f643db785e0a509d53
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/util/WifiPermissionsUtil.java
bf5350d91af230847a2386a131fb51acea865356 30-Apr-2017 Rebecca Silberstein <silberst@google.com> LocalOnlyHotspotRequestInfo: track LOHS requests am: 768b7a7cb8
am: 1b09af17da

Change-Id: I191559cc3524006163cc514ce3e34d32c38e8694
1b09af17da633a28caf2ee3544bdba332eaac541 30-Apr-2017 Rebecca Silberstein <silberst@google.com> LocalOnlyHotspotRequestInfo: track LOHS requests
am: 768b7a7cb8

Change-Id: I0b897fe94ba957052a65e72e4b3a0727b92c224a
a0d3add5b566811ffb1b56ddd0614d45c281a51e 30-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: store iface modes am: 003b695597
am: dc301d9696

Change-Id: I355e14a2ab7b352c64c2bc3c87fd95479c73bc69
dc301d96963d3132765f0a49dc0975542a9a17fc 30-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: store iface modes
am: 003b695597

Change-Id: Ic18d0e2ae2e394d806d1ca75d42362acc9506431
aaa03cbbf831e3518d849d0742539fdf39f0627c 29-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add empty calls for LOHS

Add new calls to start/stopLocalOnlyHotspot and start/stop observing
hotspot updates. The calls will be exposed in a later CL. The calls
throw the UnsupportedOperationException until the implementation is
complete.

Also added tests to verify the exceptions are thrown.

Bug: 36704763
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh

Change-Id: If6895534ecd1db5fafb3a451b26e2d3018cd60df
ndroid/server/wifi/WifiServiceImpl.java
768b7a7cb87525e92eb1a59a7a3e0c98b9f6f238 29-Mar-2017 Rebecca Silberstein <silberst@google.com> LocalOnlyHotspotRequestInfo: track LOHS requests

Add a new class to keep track of apps Binder instances that request
LocalOnlyHotspot. When the app dies, it will trigger a callback to
remove the request. We will also unlinkToDeath when the app calls to
stop using LocalOnlyHotspot. This object also contains a Messenger that
will allow WifiServiceImpl to communicate updates to WifiManager for the
requesting app.

Bug: 36732530
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: Ia366a3cc7339cdea94a137d62905b15b72cf05c0
ndroid/server/wifi/LocalOnlyHotspotRequestInfo.java
003b695597a1f010724662fbf4ac76953a71e3b8 26-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: store iface modes

ConnectivityService calls to update locally store state for interface
mode updates will now be tracked in WifiServiceImpl. Using this
information will be in a later CL. Tests will also be added as the
information in these updates is used.

Bug: 31466854
Test: compiles
Change-Id: Iffdcf50841e397b8c02cc89887d0457fc19d4fb7
ndroid/server/wifi/WifiServiceImpl.java
4341220c8fbf9aa96ffa218975772d8fc35f10a3 28-Apr-2017 Glen Kuhne <kuh@google.com> Merge "P2P: Modify loadGroups & fix NPE" into oc-dev am: bb65f9709f
am: bcf40a0404

Change-Id: I0a5e7d8e1219eeee4b62fdb1908c809f6b2c3d98
bcf40a0404cb6a490d7c1b30f1b2b1f10cea9569 28-Apr-2017 Glen Kuhne <kuh@google.com> Merge "P2P: Modify loadGroups & fix NPE" into oc-dev
am: bb65f9709f

Change-Id: I45933768aea19a5afcbfebe9df34cf7ff98ebcd9
bb65f9709f0e32e0b592e547815538247cf6e169 28-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "P2P: Modify loadGroups & fix NPE" into oc-dev
a1de371a88302e58f7e736c46fbcd8feb13a55af 28-Apr-2017 Ningyuan Wang <nywang@google.com> Merge "Do not reset anonymous identity for PEAP" into oc-dev am: 5ff70c1e74
am: 9cfe6e849e

Change-Id: I50bd94cc7ed69d53f2c036954bd18268bcf4a867
9cfe6e849ee4b95e9e68c7cfb7366cb144631055 28-Apr-2017 Ningyuan Wang <nywang@google.com> Merge "Do not reset anonymous identity for PEAP" into oc-dev
am: 5ff70c1e74

Change-Id: I6e01d74495d3349426dd8ef094b5687f20c35a99
42b563da5849270ba76275390ad00739ca927a35 28-Apr-2017 Erik Kline <ek@google.com> Merge "WifiServiceImpl: add updateInterfaceIpState" into oc-dev
5be1372a78bd45091d1fd656ef71578d530cda82 28-Apr-2017 Wei Wang <weiwa@google.com> Merge "Throttle wifi scan requests from background apps (2/2)." into oc-dev am: a6ff93d77c
am: 1ddaf32d5c

Change-Id: Id77304dc8f987653cc4820b3ca9ee336befb179a
1ddaf32d5cbac5c9237a86eb214397df7c33bc00 28-Apr-2017 Wei Wang <weiwa@google.com> Merge "Throttle wifi scan requests from background apps (2/2)." into oc-dev
am: a6ff93d77c

Change-Id: Ib741036249cf104041f304f7bbf82583f423182d
5ff70c1e7439427f3ab79d80158b65eb4dd5ccee 28-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Do not reset anonymous identity for PEAP" into oc-dev
a6ff93d77ccfdf527221f3dfa877303c14cea25d 28-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Throttle wifi scan requests from background apps (2/2)." into oc-dev
cf8874a2205eeaf926ce88a472ffd2cde156eca1 27-Apr-2017 Wei Wang <weiwa@google.com> Merge "Clean up after RTT operations finished. (2/2)" into oc-dev am: b37f46b4ae
am: dfe0a41f66

Change-Id: I138a757c0aba76c3132c8518a13898d9feb0a3c3
dfe0a41f66f12bf7424481dc9928b8ec026a1454 27-Apr-2017 Wei Wang <weiwa@google.com> Merge "Clean up after RTT operations finished. (2/2)" into oc-dev
am: b37f46b4ae

Change-Id: I8cb36cb5069cfdbb764a04b9c63ac33cd72e41e5
b37f46b4ae7c9e9961a5303adb772c56532d45f4 27-Apr-2017 Wei Wang <weiwa@google.com> Merge "Clean up after RTT operations finished. (2/2)" into oc-dev
c9aab08c8e0eb78f8da4e1ffe962b09a9cf0a8a1 21-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add updateInterfaceIpState

Add a call to WifiService protected by the NETWORK_STACK permission that
allows ConnectivityService to provide interface mode change updates.

A corresponding CL will be added to WifiManager.

Bug: 31466854
Test: make
Change-Id: Iab5aa71c10f86bf1485239a453aae363f7ae3b9c
Merged-In: I61af09409d9b5308116a956b8899c304a198489c
Merged-In: Iebef8024bfe1d470abab457b58719c9178ced5dc
ndroid/server/wifi/WifiServiceImpl.java
1711409f11610d2d646036306ec8de4fb2f69712 22-Apr-2017 Wei Wang <weiwa@google.com> Clean up after RTT operations finished. (2/2)

Uses a single callback for RTT event.

Bug: 36185358

Test: Manual with RTT app.

Change-Id: I2840aafd39ae23427a069d689ff36f84eea00d33
ndroid/server/wifi/WifiVendorHal.java
b7517c9cbe0093c59c68c163551016f82e13a82d 26-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add updateInterfaceIpState am: 455cc203f0 am: f3eb07b0fd am: f83c516ab1
am: 34f59c4004

Change-Id: I61af09409d9b5308116a956b8899c304a198489c
34f59c4004c9afd39e257396c3c98bcbde026d49 26-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add updateInterfaceIpState am: 455cc203f0 am: f3eb07b0fd
am: f83c516ab1

Change-Id: Iebef8024bfe1d470abab457b58719c9178ced5dc
f98c74c146254de084f8f8f9f15ed8aaae2b0d20 19-Apr-2017 Michael Plass <mplass@google.com> [WifiScoreReport] cleanups

Remove references to unused config item
config_wifi_framework_cellular_handover_enable_user_triggered_adjustment
is no longer used. Don't fetch it.

Remove other declared constants that are no longer used.
Rename some misnamed constants.

Bug: 33085022
Bug: 33013630
Bug: 36364366
Test: unit tests pass
Change-Id: I2cb3160c13f3dbc2a51d37db25973770af224203
ndroid/server/wifi/WifiScoreReport.java
d350a59494f8b54d46e253fffc48a49ac78fc069 18-Apr-2017 Michael Plass <mplass@google.com> WifiScoreReport housecleaning

Remove version with legacy debugging code and convoluted logic, along
with some now-obsolete tests.

Bug: 36364366
Test: Unit tests pass

Change-Id: Ie98f2afacce617d27a14caac39bc13be94872866
ndroid/server/wifi/WifiScoreReport.java
9b256a5cb87062b7ae1696324e2bd7c9b1ceca27 04-Nov-2016 Michael Plass <mplass@google.com> [WifiScoreReport] restructuring

This version has both the cleaned-up version of the scoring calculation,
along with the old. Any differences are logged.

Some bugs in the 'old' version are also fixed, to eliminate the diffs.

The unit tests now use a real WifiInfo instead of a mock.

Test: Unit tests pass
Test: Manual test walking away from AP until disconnect, check for diffs
Bug: 36364366
Change-Id: Iebf4b1c31004f7c101189d98180b91e532ff7aba
ndroid/server/wifi/WifiScoreReport.java
b8adfb745a2c1540db40af204f7de9b1a815071f 22-Apr-2017 Glen Kuhne <kuh@google.com> P2P: Modify loadGroups & fix NPE

Some of the loadGroups logic was incorrectly transformed from socket to
HIDL supplicant calls, (isCurrent vs !isCurrent). Fixed that.

startWpsPbc no longer accepts a null value as a wildcard, and causes a
NPE. Fixed that too.

Bug: 37286961
Test: Manual + CTS Verifier + new unit test
Change-Id: Ie24e89f7bc9d0f03511ace2e5c0ac1cbbe31e359
ndroid/server/wifi/p2p/SupplicantP2pIfaceHal.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
455cc203f08e4713eafa6acd26a74a7db9c95a40 21-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add updateInterfaceIpState

Add a call to WifiService protected by the NETWORK_STACK permission that
allows ConnectivityService to provide interface mode change updates.

A corresponding CL will be added to WifiManager.

Bug: 31466854
Test: make
Change-Id: Iab5aa71c10f86bf1485239a453aae363f7ae3b9c
ndroid/server/wifi/WifiServiceImpl.java
6390486a62185ef03df9d73db33faa11b0d64908 25-Apr-2017 Amin Shaikh <ashaikh@google.com> Merge changes from topic 'experio-scoring' into oc-dev am: a208bbfb1b
am: 570478da56

Change-Id: If4b1c1affa798cb3a298e1b8469904157b9f5821
1cd9e7bd982aa73b3434f1421a1c154b5384d832 25-Apr-2017 Amin Shaikh <ashaikh@google.com> Remove CURATE_SAVED_OPEN_NETWORKS am: 2cf3661d14
am: 5d8bb242d8

Change-Id: I46f87368b00e23216a8b61cc1a90363b27468e84
570478da56dd5181da0394e40cc94c9a3a610f5a 25-Apr-2017 Amin Shaikh <ashaikh@google.com> Merge changes from topic 'experio-scoring' into oc-dev
am: a208bbfb1b

Change-Id: I753014cc81cc13eb76e33d9255a2ad7d0e897a29
5d8bb242d898fc014011fe19c56b4c039805014e 25-Apr-2017 Amin Shaikh <ashaikh@google.com> Remove CURATE_SAVED_OPEN_NETWORKS
am: 2cf3661d14

Change-Id: Idf70ebb5792079372d2f03341617730417e5f3bc
a208bbfb1b4755327c54bc3fcb8bce954f3d76f5 25-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic 'experio-scoring' into oc-dev

* changes:
Create ScoredNetworkEvaluator.
Remove CURATE_SAVED_OPEN_NETWORKS
fc927dffb22be14b003e3343646982cd2dab2d4e 25-Apr-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Add UID checking to WifiAware network specifier" am: 960b599df6 am: 7a8a570d36 am: d1d46404fe
am: d4965bdcb7

Change-Id: I0be89376ebf13f55a87f6e6a495641be59fe67e2
d4965bdcb7c0ac8c443b058ea8eec9f232ea69e5 25-Apr-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Add UID checking to WifiAware network specifier" am: 960b599df6 am: 7a8a570d36
am: d1d46404fe

Change-Id: Ic02cb3057bb85a05cc82607c5f6d86406ac7d8b9
8c9f6f1ea469f8c6252228f9fd9b9029a486dd14 25-Apr-2017 Ningyuan Wang <nywang@google.com> Do not reset anonymous identity for PEAP

Bug: 37492360
Test: compile, integration test
Change-Id: I9db7f7dfb7c78ab3dcb2261624f8caa01c457230
ndroid/server/wifi/WifiConfigManager.java
3fe2643aff2fda817167e3274252ae183ecbbd85 25-Apr-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Specify a match of only the first discovery" into oc-dev am: 84a08e7fc9
am: 5896b01cb2

Change-Id: Ie6fe6cb28a22b6bea12ae3277758e46fa47450e7
5896b01cb26e71c1102d17a0fa7baacd6e4d963a 25-Apr-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Specify a match of only the first discovery" into oc-dev
am: 84a08e7fc9

Change-Id: I1399ac43636c4ecdce6859e7aa0fdd16677a480d
84a08e7fc9d72a92935286c2deecad10109f03b8 25-Apr-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Specify a match of only the first discovery" into oc-dev
a84a8d948173001e1ba9265e15b8a93aad312201 25-Apr-2017 Glen Kuhne <kuh@google.com> Merge "New Wifi Metrics Connection Event logging" into oc-dev am: a0123342c2
am: e2bd998b5a

Change-Id: I3bf3368c00ee19c1d4acefb115549c564120bd27
e2bd998b5a9aa0748c5de85a5e39839a54028f0a 24-Apr-2017 Glen Kuhne <kuh@google.com> Merge "New Wifi Metrics Connection Event logging" into oc-dev
am: a0123342c2

Change-Id: I15c652fc86deb67e2cc24c5d9cce533d050af5f1
a0123342c22401f06fa847da475fc44fa19013ba 24-Apr-2017 Glen Kuhne <kuh@google.com> Merge "New Wifi Metrics Connection Event logging" into oc-dev
0b31edb987c0552b75667e05f0d589937a16f1ad 24-Apr-2017 Etan Cohen <etancohen@google.com> [AWARE] Fix race condition of Aware state machine & HAL

The Wi-Fi Aware HAL was started before the Aware state machine
was ready. In case where the HAL was able to obtain a handle on
the NAN interface it would attempt to enable Aware through the
state machine - resulting in an NPE.

Added an explicit start method to the Aware HAL which is called
in order.

Bug: 37613363
Test: unit tests and integration (sl4a) test
Change-Id: I66698bd926ca5d4bdb19b3025ed2f26c61028d21
ndroid/server/wifi/aware/WifiAwareNativeManager.java
ndroid/server/wifi/aware/WifiAwareService.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
b44557082dfab11dcd4b4344dfa6de7259058297 24-Apr-2017 Etan Cohen <etancohen@google.com> [AWARE] Fix crash of system service due to race condition with Aware

Aware service registers for callback with HalDeviceManager before it is
fully initialized.

This CL fixes the crash but not the underlying bug - will be fixed in a
subsequent CL.

Bug: 37613363
Test: builds
Change-Id: Ic6d77157a2287abcb7a31cf2aa4a98e253792bd6
ndroid/server/wifi/aware/WifiAwareStateManager.java
2f602bbee8993732300e45007a1948b53ecf3f2e 22-Apr-2017 Ningyuan Wang <nywang@google.com> Merge "Revert "Abort ongoing STA scan to prioritize P2P scan"" am: 440ef98fc5 am: 9bc7bf37ea am: 5f701750d6
am: 08d0b641b0

Change-Id: Ibadf44201f38f080f7bcb0f12d959f1ba883913c
08d0b641b062df7a5844d0ada28001b57e937db4 22-Apr-2017 Ningyuan Wang <nywang@google.com> Merge "Revert "Abort ongoing STA scan to prioritize P2P scan"" am: 440ef98fc5 am: 9bc7bf37ea
am: 5f701750d6

Change-Id: I4d7a0790ee57318d5fbbf44c5ba49660ee0e651a
440ef98fc59ce8558e200d8024e34c2c0c23114d 21-Apr-2017 Ningyuan Wang <nywang@google.com> Merge "Revert "Abort ongoing STA scan to prioritize P2P scan""
834fc3a1535214ec38c2186b50f0a20975c5f73c 21-Apr-2017 Ningyuan Wang <nywang@google.com> Revert "Abort ongoing STA scan to prioritize P2P scan"

Let's get it fully tested before checking in.

This reverts commit 75342748e40b4674fa744c8f1904793af571b0d7.

Change-Id: I9288a61f19183c182eaf487c780caa5621230199
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WificondControl.java
ndroid/server/wifi/p2p/WifiP2pNative.java
bd9567280457848b9829ad0500fdfeff7933efee 21-Apr-2017 Ningyuan Wang <nywang@google.com> Merge "Abort ongoing STA scan to prioritize P2P scan" am: 40c24317a3 am: 0b67f4912e am: c99fc3b102
am: 8d55e9da2b

Change-Id: I33afe795fa7b8cec2b5fe2d2d188af5267d6a0b6
8d55e9da2b98eac379272a5df5f8d5692e702d83 21-Apr-2017 Ningyuan Wang <nywang@google.com> Merge "Abort ongoing STA scan to prioritize P2P scan" am: 40c24317a3 am: 0b67f4912e
am: c99fc3b102

Change-Id: I322226158e0e3a7e007075632fc2f9dc52e1cfc5
40c24317a32327a653dddb038b45e04649f9cdd6 21-Apr-2017 Ningyuan Wang <nywang@google.com> Merge "Abort ongoing STA scan to prioritize P2P scan"
56b2395f396741bf667c085d69fc8689df15b0f8 04-Apr-2017 Etan Cohen <etancohen@google.com> [AWARE] Add UID checking to WifiAware network specifier

Wifi Aware networks are tied to a specific session - which
is tied to a specific UID. Change verifies that a network
requestor is only using session contexts which are owned by
the same UID.

Bug: 36053921
Test: integration (sl4a) tests
Change-Id: Ife235e3d3f509d3425614ef1392c20f2b127c88f
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
41326bbeb2fe5c54ac051487c1e28eae822d1720 21-Apr-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: add new methods to start softap" into oc-dev
49f29f155e729fd02eeae18b98cfc6ee4910ad3f 21-Apr-2017 Etan Cohen <etancohen@google.com> [AWARE] Specify a match of only the first discovery

Configure all subscriber service discovery to wake up the host only
on the first match. Reduce power.

Bug: 37547045
Test: unit tests and integration (sl4a) tests passing.
Change-Id: If94462579244f87e624534e75e1707474588eda0
ndroid/server/wifi/aware/WifiAwareNativeApi.java
edabcd4004fe1ad46e58ee973906913cc3edc79e 23-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add new methods to start softap

Add the implementations for two new methods to control softap mode.
These methods will be called by other methods in WifiServiceImpl and
also by ConnectivityService. The calls are not intended to be called by
applications and will be protected by the NETWORK_STACK permission.

Note: this CL is adding the calls, they will be used in an upcoming CL.

Bug: 36540346
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh

Change-Id: I6bc664a32c5df03db1dffb8db20330d9dc904113
Merged-In: I6bc664a32c5df03db1dffb8db20330d9dc904113
Merged-In: If1ab98324b4f860efa93286637a4fdcec7d8f775
ndroid/server/wifi/WifiServiceImpl.java
bdac915b98217c63284b47a7925f0719c8e40844 18-Apr-2017 Wei Wang <weiwa@google.com> Throttle wifi scan requests from background apps (2/2).

Background apps cannot start wifi scans more frequent than once every 30
minutes.

Bug: 37320631

Test: Manual test. Unit tests with runtest.sh.
Change-Id: I4473dbfa6a9efcb889cca78ed77ff483174be276
ndroid/server/wifi/WifiServiceImpl.java
f14e4b8fdd949b4ba0feb63dded4d9b233859300 15-Apr-2017 Amin Shaikh <ashaikh@google.com> Create ScoredNetworkEvaluator.

- Bring back WifiNetworkScoreCache into the wifi framework
- Replace RecommendedNetworkEvaluator with ScoredNetworkEvalutor, which
is the same as the previous ExternalScoreEvaluator (ag/1865733) with some
changes:
* Check whether a ScanResult matches the current network by comparing
the matching WifiConfiguration instead of the current bssid
* Only create untrusted WifiConfigurations for open networks
* Set candidate ScanResults for all WifiConfigurations - not only the
final chosen WifiConfiguration
* Mark newly created ephemeral WifiConfiguration as enabled for network
selection
* Log a maximum of one LocalLog line per round of network selection

Bug: 37357981
Test: ./test/wifitests/runtests.sh
Change-Id: I99da4edb371928efb7ca7a9dcd28ddaca9209da8
ndroid/server/wifi/RecommendedNetworkEvaluator.java
ndroid/server/wifi/ScoredNetworkEvaluator.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiInjector.java
2cf3661d146e2bdd0d761028e91df775c8eabca3 14-Apr-2017 Amin Shaikh <ashaikh@google.com> Remove CURATE_SAVED_OPEN_NETWORKS

- Update SavedNetworkEvaluator to no longer reference this setting.
- Update SavedNetworkEvaluatorTest#setCandidateScanResultsForAllSavedNetworks
to ensure that candidate ScanResults are added to saved secure networks in
addition to useExternalScores saved networks and open networks

Bug: 37356724
Test: ./tests/wifitests/runtests.sh
Change-Id: I87794f339a9910fb343d1994910320efe0feafa2
ndroid/server/wifi/SavedNetworkEvaluator.java
ndroid/server/wifi/WifiInjector.java
d4ab575f29527b85c203df43d6bd2b5dd0b87f8f 20-Apr-2017 Erik Kline <ek@google.com> Merge "Make tetherChangePermission to be secured for AppOps permission" am: 4753dd1d9e am: 4f527100f6 am: 142bf3ad3a
am: e436b9a3b3

Change-Id: Ic66fd9947fd9581eef06a249b9f8b71ff6d3277a
c9aaadc9b0a2d22f87e0e3afa1987fcb84cd82f2 18-Apr-2017 Tomonori Nanbu <tomonori.nanbu@sonymobile.com> Use correct P2P GO intent value

Use correct P2P GO intent value.

Bug: 37533486
Test: Manual test

Change-Id: I3286f3daaf32a1e22e0b8c6349ca8b67ad2012fd
ndroid/server/wifi/p2p/SupplicantP2pIfaceHal.java
e436b9a3b3f21210117bcb9f8d11e08ce2788020 20-Apr-2017 Erik Kline <ek@google.com> Merge "Make tetherChangePermission to be secured for AppOps permission" am: 4753dd1d9e am: 4f527100f6
am: 142bf3ad3a

Change-Id: Ib832240f7d5d42d1e552e60d6e5a78c9d6565904
4753dd1d9e157bfcc42e1a2fecede38c23d427b2 20-Apr-2017 Erik Kline <ek@google.com> Merge "Make tetherChangePermission to be secured for AppOps permission"
fd9b2a515491854d378dc944cf43ded62475888c 20-Apr-2017 Ningyuan Wang <nywang@google.com> Merge "Handle CMD_DISABLE_P2P_WATCHDOG_TIMER in default state" into oc-dev am: 59870df7cf
am: 890a724719

Change-Id: Ia5122b3afad1727e354919cec4b9a4803cb84b12
890a724719037f0262ae9e43c468801f3b6537de 20-Apr-2017 Ningyuan Wang <nywang@google.com> Merge "Handle CMD_DISABLE_P2P_WATCHDOG_TIMER in default state" into oc-dev
am: 59870df7cf

Change-Id: Ia247dc69fa96aa838cbe505b7b51de0ca71b380a
59870df7cfc1c2af89e3de31a1ebbb0419f59c0c 20-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Handle CMD_DISABLE_P2P_WATCHDOG_TIMER in default state" into oc-dev
46c84f9fd984cc4b67f5252e30bce7f756be558c 01-Mar-2017 Glen Kuhne <kuh@google.com> New Wifi Metrics Connection Event logging

Created a new StaEventList which logs all commands & messages from
Supplicant, Framework and the API that can modify the state of a STA
connection. Upto 512 of these are listed atomically and added to the
WifiMetrics report.

This enables metrics about the full lifetime of a Connection.

Bug: 35799311
Test: Added Unit tests
Change-Id: I11f75995f15203c9d38f78fe175de0fc4702e3b2
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiStateMachine.java
b9da2489b01de340779718265a39212007a6554f 19-Apr-2017 Ningyuan Wang <nywang@google.com> Handle CMD_DISABLE_P2P_WATCHDOG_TIMER in default state

Bug: 37311259
Test: compile, manual test and wifi works
Change-Id: Ic83bc8c6dbe0783bc22b24df19011acd7e697abf
ndroid/server/wifi/WifiStateMachine.java
3871ff67f4a6970f1831fc8951392746c9e2bfa2 13-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: setWifiApEnabled unit tests

Add unit tests to cover setWifiApEnabled. This did require a small
change to check a tethering permission and add the user manager.

Bug: 37294233
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I7bdfdcbdfa60605bc2e61f18aa8abeb4bcaf5c56
Merged-In: I77413789b1b2a19c9330f4c9b9978c4a0f5b5bf8
Merged-In: I33ae84d7282dea967a53a644018e20eb2902eca3
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/util/WifiPermissionsUtil.java
75342748e40b4674fa744c8f1904793af571b0d7 06-Apr-2017 Daisuke Niwa <daisuke.x.niwa@sonymobile.com> Abort ongoing STA scan to prioritize P2P scan

When P2P scan is requested while STA scan is ongoing, it takes time to
get P2P scan result. STA scan should be stopped when P2P scan is
requested.

Bug: 37227357
Test: Manual test

Depends-On: Ifc4b81de8ec1d75467edf497abfe348c4ce1b283

Change-Id: I2fdb8307ae5b79dd205b3c2169f4e3ef579920a1
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WificondControl.java
ndroid/server/wifi/p2p/WifiP2pNative.java
51a3fde8c51c2040184addd928cd319ecdb31ff8 18-Apr-2017 Shunta Sato <shunta.sato@sonymobile.com> Make tetherChangePermission to be secured for AppOps permission

Symptom:
AppOps verified the incorrect package of calling tether state
changing API.
It threw SecurityException by mistake.

Solution:
Pass the correct package name to enforceTetherChangePermission.

Bug: 32931147
Change-Id: Ief21324eee02d6215d9bff681ccad435815bea04
ndroid/server/wifi/util/WifiPermissionsUtil.java
fdc5deaef5eeb9c9641ec791801fb666283d7d9b 03-Apr-2017 Glen Kuhne <kuh@google.com> Fix null exception error

Added a missing null check that was causing rare framework reset bug.

Bug: 36625896
Test: Existing Unit tests
Change-Id: I3aac9b8e629bbe288d191aef783651837f36095e
Merged In: I3aac9b8e629bbe288d191aef783651837f36095e
ndroid/server/wifi/WifiStateMachine.java
bd0447ff06c5719494960e2e3ec95b84941baf2a 30-Mar-2017 Etan Cohen <etancohen@google.com> [AWARE] Implement custom network specifier

Implement support for Wi-Fi Aware custom network specifier.
Simplifies code (no string parsing) and provides infrastructure
for additional controls on network matching (to be added later).

(cherry-pick of commit fed87ea776ae79754b001a0a8cf5cd7d6a312139)

Bug: 36275276
Bug: 36053921
Test: unit tests and integration (sl4a) tests.
Merged-In: If526f80f3d0a76002b0b5f8a013f8d188b14e456
Change-Id: If526f80f3d0a76002b0b5f8a013f8d188b14e456
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
fe30628f67c1398ee3bbcac2acafe843515ad3b0 18-Apr-2017 Lorenzo Colitti <lorenzo@google.com> Merge "[AWARE] Implement custom network specifier" am: 8ab4881b57 am: 79327970e5 am: bd41467855
am: 7f40dc9ed3

Change-Id: I57bd375325a10bc1efe4c09b3285afc976aaeceb
7f40dc9ed31156257e6a8b45a6694b042cc256cc 18-Apr-2017 Lorenzo Colitti <lorenzo@google.com> Merge "[AWARE] Implement custom network specifier" am: 8ab4881b57 am: 79327970e5
am: bd41467855

Change-Id: If5d49c810a013b554a9a59e4aec2203b454eda14
8ab4881b5771ddd8ab3fa475362ac42efccff9c4 18-Apr-2017 Lorenzo Colitti <lorenzo@google.com> Merge "[AWARE] Implement custom network specifier"
9598644f66920ee6c4c32ba5da4dbcb1080f09d2 17-Apr-2017 Rebecca Silberstein <silberst@google.com> Merge changes I11475732,I8de27f2b into oc-dev

* changes:
WifiServiceImpl: check calls to enable wifi
WifiServiceImpl: test setWifiEnabled
8826d4af0e7634b895333cad7c71f88fbfff3dbf 17-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add new methods to start softap am: b7c333ba6d am: d5805c08f6 am: 43cf52a0f4
am: c7bd131eb1

Change-Id: I262b155a863a13f89f8cd00e9e9e31d1ac798dfb
c7bd131eb110b599e913136ef08030687309a326 17-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add new methods to start softap am: b7c333ba6d am: d5805c08f6
am: 43cf52a0f4

Change-Id: If1ab98324b4f860efa93286637a4fdcec7d8f775
b7c333ba6d7480d7531a2db3e84ad934187204a5 23-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: add new methods to start softap

Add the implementations for two new methods to control softap mode.
These methods will be called by other methods in WifiServiceImpl and
also by ConnectivityService. The calls are not intended to be called by
applications and will be protected by the NETWORK_STACK permission.

Note: this CL is adding the calls, they will be used in an upcoming CL.

Bug: 36540346
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh

Change-Id: I6bc664a32c5df03db1dffb8db20330d9dc904113
ndroid/server/wifi/WifiServiceImpl.java
ddc421324e011c407a205c6596d8ec1f328e86ee 16-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: setWifiApEnabled unit tests am: 198804eb25 am: eb00f87e10 am: d13cd95984
am: 536a9c2b67

Change-Id: I33ae84d7282dea967a53a644018e20eb2902eca3
536a9c2b67c5977d3bd567c44e4d16aa3c89e4fe 16-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: setWifiApEnabled unit tests am: 198804eb25 am: eb00f87e10
am: d13cd95984

Change-Id: I77413789b1b2a19c9330f4c9b9978c4a0f5b5bf8
198804eb25f071f6a5a33a0bf442b49cc87a8484 13-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: setWifiApEnabled unit tests

Add unit tests to cover setWifiApEnabled. This did require a small
change to check a tethering permission and add the user manager.

Bug: 37294233
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I7bdfdcbdfa60605bc2e61f18aa8abeb4bcaf5c56
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/util/WifiPermissionsUtil.java
ca71a341baaf38de49d0a6bacdc9a7f1a65db598 16-Apr-2017 Rebecca Silberstein <silberst@google.com> Merge changes I11475732,I8de27f2b am: ff62ee9239 am: e97aa5d43d am: 4eca1d9357
am: 4f3b0d84df

Change-Id: I81078e36b5d5bd73cf571473bcbe1192246c85aa
4f3b0d84dfc064b7cb40713007bf606c3969a743 16-Apr-2017 Rebecca Silberstein <silberst@google.com> Merge changes I11475732,I8de27f2b am: ff62ee9239 am: e97aa5d43d
am: 4eca1d9357

Change-Id: I9739e34ba637aa18f0898e0f2d7583677f335d93
05d6ff7612ee795daf3a6fd0ee5a99e01c7a8685 03-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: check calls to enable wifi

When the user has entered softap mode, apps should not be able to toggle
wifi on. This leaves the user with unexpected behavior. This CL adds
checks for softap mode to make sure only Settings and SysUI (Quick and
QuickQuick settings) can toggle wifi on.

Bug: 36358238
Test: manually
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: wifi integration tests
Change-Id: I114757324b529a43c411dc8a01afcb05a23489ee
Merged-In: I114757324b529a43c411dc8a01afcb05a23489ee
ndroid/server/wifi/WifiServiceImpl.java
184a4207f60c2255486c28b45724c71738d087b7 31-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: test setWifiEnabled

Before adding mode checks, add unit tests to check current behavior.

Bug: 36358238
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I8de27f2bceebb589b173d91d79dfa3a5afe6a675
Merged-In: I8de27f2bceebb589b173d91d79dfa3a5afe6a675
ndroid/server/wifi/WifiServiceImpl.java
ff62ee923988e6226af808aeedebbc9174c74f64 16-Apr-2017 Rebecca Silberstein <silberst@google.com> Merge changes I11475732,I8de27f2b

* changes:
WifiServiceImpl: check calls to enable wifi
WifiServiceImpl: test setWifiEnabled
5303b9cb6acc2149b454e8aad58f33d8df88ba78 26-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiApConfigStore: create temp sharing AP config

Create a temporary config for use by local only hotspot. These configs
are generated by the WifiApConfigStore, but will not be stored.

Bug: 36704784
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: I3470708a274e97f6e4a752ea1863cfa86bfbf8b6
Merged-In: I3470708a274e97f6e4a752ea1863cfa86bfbf8b6
ndroid/server/wifi/WifiApConfigStore.java
11df4062d7a5a7ed192a0de8f7fd19817048e9b1 15-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiApConfigStore: create temp sharing AP config am: 1e5c1abdeb am: 7fa3919c94 am: b487bcbf34
am: 021255a7c1

Change-Id: I1547dd3026c0b10c3448418df53a0e160e43035b
021255a7c135ae7ee1680e9c72301dfc55151fd7 15-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiApConfigStore: create temp sharing AP config am: 1e5c1abdeb am: 7fa3919c94
am: b487bcbf34

Change-Id: I08cc4612344d7539ad47ac755cec5b8bec512858
1e5c1abdeb4e3e180e5344c777f7a7db2095c246 26-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiApConfigStore: create temp sharing AP config

Create a temporary config for use by local only hotspot. These configs
are generated by the WifiApConfigStore, but will not be stored.

Bug: 36704784
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: I3470708a274e97f6e4a752ea1863cfa86bfbf8b6
ndroid/server/wifi/WifiApConfigStore.java
9440acb666a0ec018fb9e0a6ff682d97ca97c076 28-Mar-2017 Etan Cohen <etancohen@google.com> Make the NetworkSpecifier a class instead of a string.

Bug: 27533960
Bug: 36053921
Bug: 36275276
Test: unit tests (wifi), integration (aware) tests
Change-Id: I6524e678a2f116ec8799c4c029bb3823dd889b2b
Merged-In: I9a52ccc70177a86d70cb8f24246109672837875c
Merged-In: Ic9fe860aa016d27a981cd76cf4f4214ce2d2bd69
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
c05f9c79177ef3cc7e5f86b176e40440412dc592 13-Apr-2017 Roshan Pius <rpius@google.com> Merge changes Ie40bfecf,I26352317 into oc-dev am: 6abf3c0c86
am: 676815948d

Change-Id: I479142c59b303afa062abf3fd9b5ce42f9b4b617
676815948d9ce6adf17b8c28574712b4c382a8ac 13-Apr-2017 Roshan Pius <rpius@google.com> Merge changes Ie40bfecf,I26352317 into oc-dev
am: 6abf3c0c86

Change-Id: Ie020bfb9558f4d234f293121cecc47562a4e8790
6abf3c0c866f93ca91c52559283d6ff33abdd295 13-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes Ie40bfecf,I26352317 into oc-dev

* changes:
SupplicantP2pIfaceCallback: Remove quotes around network name
SupplicantStaIfaceHal: Change the order of broadcasts
d5a56317c4697aab6fc8c277ba33dbce6542db79 13-Apr-2017 Roshan Pius <rpius@google.com> SupplicantP2pIfaceCallback: Remove quotes around network name

This is needed to maintain backward compatibility with previous
releases.

Bug: 37286961
Test: Unit tests
Change-Id: Ie40bfecfbb302cb4f5e93695d9a2e60f8c405c56
ndroid/server/wifi/p2p/SupplicantP2pIfaceCallback.java
231b0fbec4be64c4651566c54560fd57ec8b0290 13-Apr-2017 Lorenzo Colitti <lorenzo@google.com> Merge "Make the NetworkSpecifier a class instead of a string." am: 8c8188a1e8 am: adc933f525 am: 6055a6d756
am: 6ac4be5156

Change-Id: Ic9fe860aa016d27a981cd76cf4f4214ce2d2bd69
6ac4be51565b2c0de7ee4928104692b19111910c 13-Apr-2017 Lorenzo Colitti <lorenzo@google.com> Merge "Make the NetworkSpecifier a class instead of a string." am: 8c8188a1e8 am: adc933f525
am: 6055a6d756

Change-Id: I9a52ccc70177a86d70cb8f24246109672837875c
f3d15360a4daa786d795868c96a53527eb56b8c6 13-Apr-2017 Glen Kuhne <kuh@google.com> Merge "Fix null exception error" into oc-dev am: c7bed201a7
am: e99729e3b1

Change-Id: Idd2b1eda1247b9ea4b27b44046d99bbf45c38cee
8c8188a1e8b4b784d47500272135305735d1c54c 13-Apr-2017 Lorenzo Colitti <lorenzo@google.com> Merge "Make the NetworkSpecifier a class instead of a string."
c7bed201a7192667b20e6d166d7f55844ba9ec4e 12-Apr-2017 Glen Kuhne <kuh@google.com> Merge "Fix null exception error" into oc-dev
c90564bcec223b69abe7e31d9471aa20479b69e7 03-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: check calls to enable wifi

When the user has entered softap mode, apps should not be able to toggle
wifi on. This leaves the user with unexpected behavior. This CL adds
checks for softap mode to make sure only Settings and SysUI (Quick and
QuickQuick settings) can toggle wifi on.

Bug: 36358238
Test: manually
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: wifi integration tests
Change-Id: I114757324b529a43c411dc8a01afcb05a23489ee
ndroid/server/wifi/WifiServiceImpl.java
997a8743cd5be5812ec176fe15c5fa0fa0d55495 12-Apr-2017 Glen Kuhne <kuh@google.com> Merge "Fix START_WPS null exception" into oc-dev am: e4a99c6c3d
am: dc22e5f22e

Change-Id: Ia2446a9efbfbd79c17dd0e66d1a1a8202e1109d2
e4a99c6c3d3ce34ac33c7fb63fc4202468580a91 12-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix START_WPS null exception" into oc-dev
911facd2a26141efe5f242e11a07a9d84a45749a 06-Apr-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Change the order of broadcasts

WifiStateMachine has some assumptions on the order of broadcasts
received. It expects the STATE_CHANGE broadcast before
NETWORK_CONNECTION one. This was true in the old socket interface
ordering of events. So, restore that ordering.

This reordering was causing WSM to not set the |meteredHint| and
|ephemeral| flags in WifiInfo.

Bug: 36840555
Test: Unit tests
Change-Id: I26352317f755e114489501c6b7de95c61e06c7d0
ndroid/server/wifi/SupplicantStaIfaceHal.java
7df23a4c0aee6166602225af8e7220395b349e52 31-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: test setWifiEnabled

Before adding mode checks, add unit tests to check current behavior.

Bug: 36358238
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I8de27f2bceebb589b173d91d79dfa3a5afe6a675
ndroid/server/wifi/WifiServiceImpl.java
6232408a5fc660b2d8642d56747e05c15c6255b8 05-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: fix failing test

Fix failing unit test due to a change in the implementation of
registerContentObserver. This method is final so our mock was not being
called. The implementation change uses a static method, ultimately the
source of the failure.

Bug: 36919372
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I15d680fdf1211c1171708a3305bdcdcf4b916961
Merged-In: I15d680fdf1211c1171708a3305bdcdcf4b916961
ndroid/server/wifi/WifiServiceImpl.java
36f52ffb5fd16c89f022dead27d8df9e51874160 21-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: check device encryption at boot

When a device is booting, it may need to be decrypted. This extra step
will restart system services, including wifi. If this restart happens
while we are creating interfaces or loading firmware, we can get odd
exceptions end up crashing. To avoid this, we add a check to see if the
device needs to be decrypted. If it does, we do not start wifi.

Added unittests to cover both decrypted and encrypted boot. Also with
and without wifi enabled.

Bug: 35416881
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: wifi integration tests
Change-Id: I8d471c7d0345611f90782dd3bc1b2261957eee73
Merged-In: I8d471c7d0345611f90782dd3bc1b2261957eee73
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiServiceImpl.java
38d74b3205d3a01818f25244a49a9456c004842d 10-Apr-2017 Jeremy Joslin <jjoslin@google.com> Clarify a local log statement and reduce spam. am: ed71d5209d
am: 39b716d0d5

Change-Id: I2cb7d6b44d4f9f3ed54db69d83290457d20c4e94
39b716d0d5c750173276798bea7dadf723521334 10-Apr-2017 Jeremy Joslin <jjoslin@google.com> Clarify a local log statement and reduce spam.
am: ed71d5209d

Change-Id: I50f1770ff17873fdf062ebf820ea913230cd16d4
781fa6d27f15a1e3b8cc3d3cd7aaa63b38c8d56e 07-Apr-2017 Glen Kuhne <kuh@google.com> Fix START_WPS null exception

Fixed an uncaught null being passed in through the startWps API.

Bug: 36491634
Test: Added a unit test
Change-Id: Ic8f5cec9d43332b4c8701582455e662a6f885f20
ndroid/server/wifi/WifiStateMachine.java
ed71d5209d66544a46a7dc543a0ee94e1be39eab 04-Apr-2017 Jeremy Joslin <jjoslin@google.com> Clarify a local log statement and reduce spam.

Fixed an incorrect key name in a log statement and reduced spam by
only logging at verbose.

Test: runtests.sh
Bug: 36963842
Change-Id: I540879e8bbf0f788ff94357d1ea532a6eff14b03
ndroid/server/wifi/WifiConfigManager.java
4776ec875d92edd7ed00d739720ed08c7894bc8a 08-Apr-2017 mukesh agrawal <quiche@google.com> WifiDiagnostics: enlarge ring-buffers for dogfood

During early dogfooding, we need larger ring-buffers,
to help partners diagnose issues with the HAL, driver,
and firmware.

In particular, I'm hoping that the larger buffers
will help with any recurrences of b/36599054.

Make it so.

Bug: 36811396
Test: manual (see below)
Change-Id: I54b82407d130d387646bfa443f6dd78c7dfcce15

Manual test:
$ adb reboot bootloader && fastboot flashall
$ adb shell dumpsys wifi \
| awk '/driver_prints/ { found = 1; next }
/^$/ { found = 0 }
(found) { print }' \
| base64 --decode \
| pigz --zlib -d \
| wc -c
-> result should be >32768
ndroid/server/wifi/WifiDiagnostics.java
124d8a17ef2853554dafb64e28fe0a8b1204d6cd 08-Apr-2017 Mukesh Agrawal <quiche@google.com> Merge "WifiStateMachine: exclude CMD_RSSI_POLL for LogRecs" into oc-dev
fed87ea776ae79754b001a0a8cf5cd7d6a312139 30-Mar-2017 Etan Cohen <etancohen@google.com> [AWARE] Implement custom network specifier

Implement support for Wi-Fi Aware custom network specifier.
Simplifies code (no string parsing) and provides infrastructure
for additional controls on network matching (to be added later).

Bug: 36275276
Bug: 36053921
Test: unit tests and integration (sl4a) tests.
Change-Id: If526f80f3d0a76002b0b5f8a013f8d188b14e456
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
b81eb91076f713e800415d26d57a8109d4f35037 28-Mar-2017 Etan Cohen <etancohen@google.com> Make the NetworkSpecifier a class instead of a string.

Bug: 27533960
Bug: 36053921
Bug: 36275276
Test: unit tests (wifi), integration (aware) tests
Change-Id: I6524e678a2f116ec8799c4c029bb3823dd889b2b
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
9a89f4f412a0bac946ad842b437ab9e5e3b59828 28-Mar-2017 mukesh agrawal <quiche@google.com> WifiStateMachine: exclude CMD_RSSI_POLL for LogRecs

Due to the frequency with which we execute CMD_RSSI_POLL
(every 3 seconds, when the screen is on), the CMD_RSSI_POLL
LogRecs often crowd out more useful information.

To resolve this problem: don't include CMD_RSSI_POLL
in the log records maintained by StateMachine. But, to
facilitate debugging of CMD_RSSI_POLL issues, _do_
include CMD_RSSI_POLL when verbose logging is enabled.

Ideally, we'd solve this in some other way, so that the
LogRecs include all commands processed by the WifiStateMachine.
My hope is that we don't lose too much relevant information with
this change, because the consumers of the RSSI data do their
own logging.

Bug: 26960649
Test: unit tests
Change-Id: Icea22f9fe23c29cb5d2ad97b10955b74977d5e1a
ndroid/server/wifi/WifiStateMachine.java
f48695bc11357bc31fe313efb033ef0902360625 06-Apr-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: fix failing test" am: c258cac284 am: 87bbb7718a
am: 6acf1cd8e4

Change-Id: I69ea4d3416af1508d97386fd63213858a5e1792d
add9d4668ae3ec9116823bd518f3c12f75a42970 05-Apr-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: fix failing test

Fix failing unit test due to a change in the implementation of
registerContentObserver. This method is final so our mock was not being
called. The implementation change uses a static method, ultimately the
source of the failure.

Bug: 36919372
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I15d680fdf1211c1171708a3305bdcdcf4b916961
ndroid/server/wifi/WifiServiceImpl.java
6b1209d5f2066d9f17074f2572333f29679d0e0b 05-Apr-2017 Glen Kuhne <kuh@google.com> Merge "Check validity of staticIpConfigurations" into oc-dev
am: a805f151c7

Change-Id: I60ff78aac5d429c4a828355d308b13c68b02aeaa
a805f151c790272d2c016cf59b89b052981bb7ae 05-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Check validity of staticIpConfigurations" into oc-dev
c46316ffd330a903c70734dc7922410951a0f7a8 03-Apr-2017 Glen Kuhne <kuh@google.com> Fix null exception error

Added a missing null check that was causing rare framework reset bug.

Bug: 36625896
Test: Existing Unit tests
Change-Id: I3aac9b8e629bbe288d191aef783651837f36095e
ndroid/server/wifi/WifiStateMachine.java
03e86a9700434d0a8938479610a4b091ed94dbdf 05-Apr-2017 Ningyuan Wang <nywang@google.com> Merge "Add a watch dog for WaitForP2pDisableState" into oc-dev
am: e08dd98aa0

Change-Id: I31de98c580601739d0cb31ac497a36ad93bd8405
e08dd98aa0f94d479f2b81120e76ef8c0ec779db 05-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add a watch dog for WaitForP2pDisableState" into oc-dev
81d73518dbbfbbfdf6a2d6c08a3101088fd5e722 05-Apr-2017 Roshan Pius <rpius@google.com> Merge "WSM: Support add/update/enable network in any state" into oc-dev
am: 24ee320f5e

Change-Id: I619924b8ba11fbc8186c11d2d0e127bd8ef37083
24ee320f5ef7359514bd5167a4a11e31813e5019 05-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WSM: Support add/update/enable network in any state" into oc-dev
7b8a36d10b5f8b855854cbf344774c1d0a12a6ab 05-Apr-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: check device encryption at boot" am: 9b5f1c811b am: 21dea68199
am: ae66570add

Change-Id: Ie55b9572e7fee79727d2b878fb43101328cb3e12
87160e59e366f16e94cc8aeebe5c7eafde0bbee2 04-Apr-2017 Randy Pan <zpan@google.com> Merge "Update PNO scan network list upon network update" into oc-dev
am: 19c1d955a4

Change-Id: Ida0575357ccb478f7e88a96a9eed4457698e2465
19c1d955a4784f12c49714662569c022b51707e6 04-Apr-2017 Randy Pan <zpan@google.com> Merge "Update PNO scan network list upon network update" into oc-dev
2ca15f4ac6f4f88bbc76f329ab38d52a62a204aa 04-Apr-2017 Peter Qiu <zqiu@google.com> Merge "hotspot2: fix parsing of IMSI from legacy Passpoint config file" into oc-dev
am: 140de55c01

Change-Id: I568dcc7c9b339b70002a191d077ec67111c64c29
140de55c011751c1add7644425d4bd87fa3e0e68 04-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: fix parsing of IMSI from legacy Passpoint config file" into oc-dev
e715b1db887a96db66a366b34b37faeb642c12a8 04-Apr-2017 Peter Qiu <zqiu@google.com> Merge "[Reland] hotspot2: track creator UID for installed providers" into oc-dev
am: e87ca83103

Change-Id: I8359c4ba292b601b8e314ecd5d1a252f99d19f3c
ab83ab09b554e4012af5cf439efe081504a29b88 03-Apr-2017 Peter Qiu <zqiu@google.com> hotspot2: fix parsing of IMSI from legacy Passpoint config file

The parsing of IMSI form the legacy Passpoint config file is incorrect.
The IMSI field is under "Credential/SIM" node instead of "Credential" node.

Bug: 36531896
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manual upgrade device with EAP-SIM Passpoint profile from N to O
Change-Id: If6ff9facfb380def84818a4c03c80c0bad4c08a9
ndroid/server/wifi/hotspot2/LegacyPasspointConfigParser.java
e87ca83103d68c0b9d0166069ccbfa52da533d88 04-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[Reland] hotspot2: track creator UID for installed providers" into oc-dev
ef0b931720a26a0aa59e2aa6cf4dcab765c5de75 21-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: check device encryption at boot

When a device is booting, it may need to be decrypted. This extra step
will restart system services, including wifi. If this restart happens
while we are creating interfaces or loading firmware, we can get odd
exceptions end up crashing. To avoid this, we add a check to see if the
device needs to be decrypted. If it does, we do not start wifi.

Added unittests to cover both decrypted and encrypted boot. Also with
and without wifi enabled.

Bug: 35416881
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: wifi integration tests
Change-Id: I8d471c7d0345611f90782dd3bc1b2261957eee73
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiServiceImpl.java
c57b84c8da4c8170c6354fa08c3f521a43114bde 04-Apr-2017 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Persist immediately on enable/disable network" into oc-dev
am: e271dc73cc

Change-Id: I54459818bc7415d4982232cc96904baa16bd4be8
5d0addadb370bcbb8900414fb9597bd415e6fea0 03-Apr-2017 Randy Pan <zpan@google.com> Update PNO scan network list upon network update

Add a listener interface in WifiConfigManager to notify events
such as network being enabled, disabled, blacklisted or
un-blacklisted.

WifiConnectivityManager listens to the above events and update
the PNO scan network list if necessary.

Bug: 30399964
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I75523a3a53ff62b14d485fd722354c4d6c3b18c1
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConnectivityManager.java
6f1055408a43428ababffc1d1fa928c825924680 04-Apr-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Persist immediately on enable/disable network

The change in network state due to public API calls should be
immediately persisted (not wait for the buffered write from
updateNetworkSelectionStatus to kick in after 10 seconds).

This was detected in the test: |test_reboot_configstore_reconnect| which
connects to a network and immediately reboots the device. This prevents
the last buffered write (for enabling network) to be flushed out and
hence the network is reloaded as disabled.

Bug: 35811529
Test: Unit tests
Change-Id: I6f769429df67d83ad014ef552901a7b1419c7721
ndroid/server/wifi/WifiConfigManager.java
07816a4745b8030911869ceb58fa735e47834fe4 03-Apr-2017 Peter Qiu <zqiu@google.com> [Reland] hotspot2: track creator UID for installed providers

This is purely for debugging purpose. It is not used for restricting
apps that can update/remove configs. Since for Passpoint configuration,
the app that's responsible for adding a config might not be the app
that's responsible for removing that config.

Bug: 36566563
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: verify Creator UID in the output of "adb shell dumpsys"
and the config store file

Change-Id: I5c651fb204b6e07c2b1d6324350d63d25a38c894
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/PasspointConfigStoreData.java
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointObjectFactory.java
ndroid/server/wifi/hotspot2/PasspointProvider.java
dc5eab67d9ca3e0453318071746e76b5d16990d6 30-Mar-2017 Roshan Pius <rpius@google.com> WSM: Support add/update/enable network in any state

WifiConfigManager can support network addition/updation as soon as the
config store is read at bootup. So, add support for it in WSM.

ENABLE_NETWORK handling is duplicated because when wifi is off, we don't
want to trigger a connection request (when disableOthers is true).

Bug: 36773940
Test: Unit tests.
Change-Id: Ib4089e45e61062e1043329b2b77d1d19579cb3c0
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.java
5b01b20886b8702570651f56c7413dfd94089d43 02-Apr-2017 Peter Qiu <zqiu@google.com> Merge "hotspot2: request ANQP element for OSU Providers" into oc-dev
am: 31eb1e8997

Change-Id: I5f08f928acdec21f41a4e424529e4731843b4184
31eb1e8997a0ee98df33f6d8b3b907e0fcb070ed 02-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: request ANQP element for OSU Providers" into oc-dev
f3e692154964b83188537f046487a5f447a7551a 02-Apr-2017 Peter Qiu <zqiu@google.com> Merge "hotspot2: initiate disconnect when updating current network's provider" into oc-dev
am: 39521e6d10

Change-Id: I0f11bef0161483e8816d1f0f628068287452d68b
39521e6d1069bcaea1865452dc456dea357cf322 02-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: initiate disconnect when updating current network's provider" into oc-dev
ace3b44de5691c5b3d4097f29ef3001b3754f125 01-Apr-2017 Peter Qiu <zqiu@google.com> Merge "Revert "hotspot2: track creator UID for installed providers"" into oc-dev
am: 9eacd39e43

Change-Id: I02670ba449c43d14cfb578b0554cf4248dd34b91
9eacd39e43a93090038e24b6145735408b774387 01-Apr-2017 Peter Qiu <zqiu@google.com> Merge "Revert "hotspot2: track creator UID for installed providers"" into oc-dev
f3fd8c5cdaa66dbaceecbe52a125a4657e0c68c4 01-Apr-2017 Peter Qiu <zqiu@google.com> Revert "hotspot2: track creator UID for installed providers"

This reverts commit 2e60a41775fc66f245e7413db72002aebe69e823.

Change-Id: Ifa60c015adb2bac7d91d000ea21e53d1217bb72f
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/PasspointConfigStoreData.java
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointObjectFactory.java
ndroid/server/wifi/hotspot2/PasspointProvider.java
d2dba288d79962fea5bfa6057faa8ee786a66c61 01-Apr-2017 Peter Qiu <zqiu@google.com> Merge "hotspot2: track creator UID for installed providers" into oc-dev
am: 27f7157806

Change-Id: I36162ffe53b8f5fd62aead09a46f9105c5fac834
27f71578063f5cf8bc500610091fdbf72cca4bae 01-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: track creator UID for installed providers" into oc-dev
39f753b0eb657bcc2a2aae45f02255cdee15588d 01-Apr-2017 Peter Qiu <zqiu@google.com> Merge "hotspot2: verify CA certificate before installing Passpoint provider" into oc-dev
am: 968b1098f6

Change-Id: Ie1ebb13f3c51ea2a39248d85e105c047273067fa
5977cdeb8ae55ec0fdc1cc1f69417a06544dd6b2 01-Apr-2017 Peter Qiu <zqiu@google.com> Merge "hotspot2: set domain_suffix_match for Passpoint network" into oc-dev
am: bfeb0f81cf

Change-Id: Ib480eadc6fbb173758cf717f8f79966e518ab7ca
968b1098f6389047b075abacbfa316a012c722a5 01-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: verify CA certificate before installing Passpoint provider" into oc-dev
bfeb0f81cfc23628978146cb84626cc20ef21b11 01-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: set domain_suffix_match for Passpoint network" into oc-dev
26aa3fc00792c1e0ec7671d2ab905e19990901d3 01-Apr-2017 Roshan Pius <rpius@google.com> Merge "SupplicantP2pIfaceHal: Fixed the usage of the wrong enum" into oc-dev
am: c77b158ce8

Change-Id: I661b64b24ef587c2d877765bffab8099cc6e191b
08e67125d8b18ebc16537a67f5857a79294420f7 01-Apr-2017 Roshan Pius <rpius@google.com> XmlUtil: Restore networks with CURRENT status as ENABLED
am: d44fca25d3

Change-Id: Ibca1e7383d599e1e966a8ee54828759aed26015d
7f7b374b3e75a929ab0d46426daf9a5e92c2d85b 31-Mar-2017 Roshan Pius <rpius@google.com> SupplicantP2pIfaceHal: Fixed the usage of the wrong enum

The enum used to compare the onProvisionDiscoveryCompleted callback's
configMethods mask was wrong. It should be the WpsConfigMethods enum
values.

Bug: 36805671
Test: Unit tests
Change-Id: I48ff9b9872db45dfa54d27553f6de34191e0a50f
ndroid/server/wifi/p2p/SupplicantP2pIfaceCallback.java
d44fca25d34d80d98c242423c3a5504a325553ab 31-Mar-2017 Roshan Pius <rpius@google.com> XmlUtil: Restore networks with CURRENT status as ENABLED

When the device reboots while connected to a network, they might have
their status saved as CURRENT in the xml store file. When this is being
restored, we need to set this network status as ENABLED (since it is not
connected at the point of restore).

Bug: 35811529
Test: Unit tests
Change-Id: I282f56a1c5c3e78b98fb23913772636be68e0f20
ndroid/server/wifi/util/XmlUtil.java
b687f772eacbc984f5ac4a46e19cacaebde84f4e 01-Apr-2017 Peter Qiu <zqiu@google.com> Merge "hotspot2: set WifiConfiguration#isHomeProviderNetwork for Passpoint networks" into oc-dev
am: 63a874bf77

Change-Id: Ic5b02133c47b2abacfef45f1307356219bf08980
63a874bf77ec9b59ae6113e17fd90221c64125fb 01-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: set WifiConfiguration#isHomeProviderNetwork for Passpoint networks" into oc-dev
9f974d5cc1ec8648bf2727fe5dd4c3c8e3e0de0e 30-Mar-2017 Ningyuan Wang <nywang@google.com> Add a watch dog for WaitForP2pDisableState

If WifiStateMachine get stuck in this state, it will never have a
chance to resume.
This patch fixes it by adding a watch dog for WaitForP2pDisableState.

Bug: 36675092
Test: compile, unit tests, manual test
Change-Id: I7ac2fa4a07a5b9a7326f929ac50a53d7960c9e5b
ndroid/server/wifi/WifiStateMachine.java
218b74e298e14936f013563716d7e486e23d844c 31-Mar-2017 Randy Pan <zpan@google.com> Merge "WifiConnectivityManager: Disable linked networks" into oc-dev
am: e3cd4cb3f6

Change-Id: I28314e4393d7a3cf5d3b5f06c1429450bac011aa
e3cd4cb3f6d6429ebf34d0817f467dc6cbf3d7ea 31-Mar-2017 Randy Pan <zpan@google.com> Merge "WifiConnectivityManager: Disable linked networks" into oc-dev
d6ba42b153a41a19c9ce4fb8e63abbe859ad67e9 27-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: set WifiConfiguration#isHomeProviderNetwork for Passpoint networks

When creating a WifiConfiguration for a Passpoint network, set
isHomeProviderNetwork based on the matching status, set to true
when matching a home Passpoint provider.

Bug: 36592220
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ibe0d9b2f19f9d563547788dba45cee9bcde6a233
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointNetworkEvaluator.java
8c55f3b9b1739cc677c7c53fac7704cfe7450c88 31-Mar-2017 Sohani Rao <sohanirao@google.com> Merge "Send Auth failure reason in broadcast intent" am: 61219faed0 am: 3d6747dcee
am: af688137a5

Change-Id: I3606095d0fecd50ff2d8c6925c99b308829ddaaf
61219faed07c3213c97c416265531f4d660b5c72 31-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Send Auth failure reason in broadcast intent"
efab6719309021b890dc39b1a7434ea6b7f7bb64 06-Feb-2017 Sohani Rao <sohanirao@google.com> Send Auth failure reason in broadcast intent

SupplicantStateChange broadcast intent for authentication failure
doesn't capture the reason for authentication failure. To indicate this
reason to the user, use the newly defined (but hidden), auth failure
codes to make the intent richer.

Bug: 33245941
Test: Unit test
Change-Id: I76496cfc7365103d9ec74b12d60bde772fcba801
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStateTracker.java
ndroid/server/wifi/WifiMonitor.java
96c4e4d724bd9e666adf177722eb7136ab340185 30-Mar-2017 Randy Pan <zpan@google.com> WifiConnectivityManager: Disable linked networks

Bug: 36786113
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I9f9294e29d8a6bb97e1822a6ffa0159a19e7a6ef
ndroid/server/wifi/SavedNetworkEvaluator.java
ndroid/server/wifi/WifiConnectivityManager.java
a1bd029ff3ddca5144e18e18afa1d3e13753df1a 30-Mar-2017 Randy Pan <zpan@google.com> Merge "Clean up saved network score calculation" into oc-dev
am: 6236c87501

Change-Id: I8b804ecb421dc40898f18d95148a5b7fb1008d25
6ecd7a8dcde46e3524c15c4a07075ca06ab681b5 30-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: initiate disconnect when updating current network's provider

When a Passpoint provider configuration that's being used for
the current network connection is updated, we should initiate
a disconnect from the current connection so that updated
provider configuration (e.g. credential) will be used.

Bug: 36777009
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: verify WiFi is disconnect then reconnect when updating
Passpoint provider that's used for the current connection

Change-Id: Id5ed0883a75ef8b0ca6d238f4e8e52d7a4d36ea7
ndroid/server/wifi/WifiStateMachine.java
6236c87501a724cdb4e727b1631ee11db106460c 30-Mar-2017 Randy Pan <zpan@google.com> Merge "Clean up saved network score calculation" into oc-dev
13fb8e99c1a793c42e102e4f16f63de02f6eeed3 29-Mar-2017 Randy Pan <zpan@google.com> Clean up saved network score calculation

1) Apply band specific RSSI saturation threshold.
2) Remove the no internet penalty since the network should have
been blacklisted because of DISABLED_NO_INTERNET.
3) Clean up a couple of line indents.

Bug: 36223866
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I9e5a9dda5ba38248ae0d6ed3ac64c46d655c4280
ndroid/server/wifi/SavedNetworkEvaluator.java
fab2bc6d0df6f2523d0b8a5ecfebaf1ee936bcee 30-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Cherry-picl: Remove bssid hotlist from framework" into oc-dev
6459709af0e494f81c0b792566d9e8bee4b19d95 06-Feb-2017 Sohani Rao <sohanirao@google.com> Send Auth failure reason in broadcast intent

SupplicantStateChange broadcast intent for authentication failure
doesn't capture the reason for authentication failure. To indicate this
reason to the user, use the newly defined (but hidden), auth failure
codes to make the intent richer.

Bug: 33245941
Test: Unit test
Change-Id: I76496cfc7365103d9ec74b12d60bde772fcba801
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStateTracker.java
ndroid/server/wifi/WifiMonitor.java
66f0fa89b17190e9d1cafb7b10ee4a92dc35c6af 30-Mar-2017 Michael Plass <mplass@google.com> Merge "Remove bssid hotlist from framework" am: 2047d8e7eb am: c80c5df568
am: d0aa7b4ebc

Change-Id: Ie219597de63be654b6296f512333f17a0707be4e
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiVendorHal.java
ndroid/server/wifi/scanner/HalWifiScannerImpl.java
ndroid/server/wifi/scanner/WifiScannerImpl.java
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
ndroid/server/wifi/scanner/WificondScannerImpl.java
2047d8e7eb723819844afa472e33fd65ed147a99 30-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Remove bssid hotlist from framework"
6cefa2cbcd88793a84aefb3dee2b24e1d76a8eb6 30-Mar-2017 mukesh agrawal <quiche@google.com> WifiStateMachine: exclude CMD_RSSI_POLL for LogRecs am: ad71cfd481 am: d41c59923b
am: 96fc484be6

Change-Id: I705e160e81e73f812238bd39eddafbf53375fd7c
882e8e105f9052354529671f562df4e7ea69c9a3 30-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove WifiNative.setLinkLayerStats" into oc-dev
ad71cfd481443b600b06e4421e8971e09fb44de7 28-Mar-2017 mukesh agrawal <quiche@google.com> WifiStateMachine: exclude CMD_RSSI_POLL for LogRecs

Due to the frequency with which we execute CMD_RSSI_POLL
(every 3 seconds, when the screen is on), the CMD_RSSI_POLL
LogRecs often crowd out more useful information.

To resolve this problem: don't include CMD_RSSI_POLL
in the log records maintained by StateMachine. But, to
facilitate debugging of CMD_RSSI_POLL issues, _do_
include CMD_RSSI_POLL when verbose logging is enabled.

Ideally, we'd solve this in some other way, so that the
LogRecs include all commands processed by the WifiStateMachine.
My hope is that we don't lose too much relevant information with
this change, because the consumers of the RSSI data do their
own logging.

Bug: 26960649
Test: unit tests
Change-Id: Icea22f9fe23c29cb5d2ad97b10955b74977d5e1a
ndroid/server/wifi/WifiStateMachine.java
a9f1ae87b694f7057adf460fdf194524cfc75ac3 29-Mar-2017 Michael Plass <mplass@google.com> Remove WifiNative.setLinkLayerStats am: eb37292950 am: 92797f5565
am: 23c94c1232

Change-Id: I90c84e53bdcc4c041537cc0032e03e317be758af
8149a50728c1394e11a4441a1d76eb6d965a9097 24-Mar-2017 Michael Plass <mplass@google.com> Remove bssid hotlist from framework

Bug: 30147676
Test: Relevant unit tests pass, wifi functions
Change-Id: Iac6a4c3d4a9e842e73b6122218fe0842126e43e7
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiVendorHal.java
ndroid/server/wifi/scanner/HalWifiScannerImpl.java
ndroid/server/wifi/scanner/WifiScannerImpl.java
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
ndroid/server/wifi/scanner/WificondScannerImpl.java
ace82ee060e3e7408cdbba195eab9d0309769ef4 29-Mar-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Restrict publish/subscribe count configuration API" into oc-dev
d1feac0f2bba2bab45ce34204c66a64dfe4754f0 29-Mar-2017 Glen Kuhne <kuh@google.com> Merge "Cleanup isRoaming & mAutoRoaming" into oc-dev
am: 21a4d89281

Change-Id: I81201f0215e4056f2902bbc229598e4d6d654949
72bafe6eab4f6d9659a1c53b02f4e88188206068 29-Mar-2017 Glen Kuhne <kuh@google.com> Merge "Reset & Stop updating WifiInfo outside ConnectMode" into oc-dev
am: bab957bb20

Change-Id: Ibe529ff8d35022a83d77ece12155cb2600b64bf2
21a4d8928152444035c8549c508e4e154ae3d890 29-Mar-2017 Glen Kuhne <kuh@google.com> Merge "Cleanup isRoaming & mAutoRoaming" into oc-dev
bab957bb2055ee595f66bf4a87614efb1327b905 29-Mar-2017 Glen Kuhne <kuh@google.com> Merge "Reset & Stop updating WifiInfo outside ConnectMode" into oc-dev
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiVendorHal.java
eb37292950237a906c4220acfc03406db2ef44cb 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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiVendorHal.java
ac8fdfed920619ff5e9186b5df96396d6ed68243 29-Mar-2017 Ningyuan Wang <nywang@google.com> Merge "Fix hidden network list comparision for scan merging" into oc-dev
am: 6490231d83

Change-Id: I4c69cae7218f22950a5ef347b4f0dc39e0bc7188
6490231d83f30b48ac48e62e707ed68e1f3ef730 29-Mar-2017 Ningyuan Wang <nywang@google.com> Merge "Fix hidden network list comparision for scan merging" into oc-dev
e8fd83b34e2d7e7ac275fef0baa1f33b9982a0b1 20-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: request ANQP element for OSU Providers

Ideally, we would only want to request OSU Providers ANQP element
when no provider is installed and request all elements when at least one
provider is installed. However, this would result in more complexity
on the cache management and the code.

Since the ANQP results will cached, the traffic hits should be minimized.
This can be optimized in the future if needed to.

Bug: 36174048
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ie948caf4f37b2ff206271bd1d34d14fc2061ead6
ndroid/server/wifi/hotspot2/ANQPRequestManager.java
ndroid/server/wifi/hotspot2/PasspointManager.java
f331a6bf511cc9d105a45219548d0ad3feab5a70 20-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: verify CA certificate before installing Passpoint provider

For Hotspot 2.0 Release 1, the provisioning method is not standardized,
so to improve security, the CA certificate must be trusted by one
of the pre-loaded public CAs in the system key store.

So verify the CA certificate if one is provided before installing
the Passpoint provider.

A utility class CertificateVerifier is created in order to easily mock
the certificate verification in unit tests.

Bug: 34460350
Test: manual test
Change-Id: I627ef9da2876ffbaf29aadb2d5b281c75ec1d145
ndroid/server/wifi/hotspot2/CertificateVerifier.java
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointObjectFactory.java
2e60a41775fc66f245e7413db72002aebe69e823 24-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: track creator UID for installed providers

This is purely for debugging purpose. It is not used for restricting
apps that can update/remove configs. Since for Passpoint configuration,
the app that's responsible for adding a config might not be the app
that's responsible for removing that config.

Bug: 36566563
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: verify Creator UID in the output of "adb shell dumpsys"
and the config store file

Change-Id: I66b744934c1643c6d66eb96d4ee437d6cc09fb52
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/PasspointConfigStoreData.java
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointObjectFactory.java
ndroid/server/wifi/hotspot2/PasspointProvider.java
2aa7cc7c13207c3afa3ef428ec1c8cdc1893c50c 24-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: set domain_suffix_match for Passpoint network

This is needed to be compliant with the Hotspot 2.0 spec,
was missed during the refactoring.

Bug: 36569007
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: Verify Passpoint network connections
Change-Id: Idf1c5ac565d48a38f87f2e2aba824c7cab8c9e9a
ndroid/server/wifi/hotspot2/PasspointProvider.java
21828cda937c83afdfbb52204803d2a3abd37ecc 29-Mar-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Restrict publish/subscribe count configuration API" am: b899ef2490 am: ebe19d3d87
am: e048f5a278

Change-Id: Iec7bf78f5067b76b23c7944ed1a05ba1cd733740
0b74b795587b6aada97c7c63f0febf94c76633e2 20-Mar-2017 Etan Cohen <etancohen@google.com> [AWARE] Restrict publish/subscribe count configuration API

Public API access to publish/subscribe count removed. Enforce
restriction on service side.

(cherry-pick of commit 16b00750e1d3c41ce9b4ccae9f07e0586e8ca2d0)

Bug: 36446307
Test: unit tests and integration (sl4a) tests
Merged-In: I28edd79dcf3aa1e34f921a35c388dc0b056831d0
Change-Id: I28edd79dcf3aa1e34f921a35c388dc0b056831d0
ndroid/server/wifi/aware/WifiAwareNativeApi.java
51fdfc4b4dd25b702343b796e4f8318ee4f7554a 29-Mar-2017 Randy Pan <zpan@google.com> Merge changes from topic 'fw_roaming' into oc-dev

* changes:
Same BSSID award
Local log buffer shared by connectivity modules
Firmware roaming configuration management
Always honor config specified BSSID
Hand off roaming to firmware if supported
460aac9e7380c4d60279ae276a836911248aa9e9 29-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove temporary logging from WificondScannerImpl.java" into oc-dev
8a9a103245ecfaf2c596603ccef884b870509566 29-Mar-2017 Ningyuan Wang <nywang@google.com> Fix hidden network list comparision for scan merging

This fixes the case where we reject the scan merging
because we think a null hidden network list and an empty hidden
network list is practically different.

Bug: 36697185
Test: compile, unit tests, integration test
Change-Id: Ib0185f3ad962805b1939d2d108f82506eccf5940
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
9949b88fd173f085ec1aa8a85dd6d5ec5c6bd8ff 01-Mar-2017 Glen Kuhne <kuh@google.com> Cleanup isRoaming & mAutoRoaming

Minor non-functional changes. Rewrote comment doc

Bug: 35846546
Test: Unit tests pass
Change-Id: I5de1960982673a0ecdca01e649e1b312f315f29e
ndroid/server/wifi/WifiStateMachine.java
653cd53f0906a90fbf5b1d9d0bd30917043d1bfc 02-Mar-2017 Glen Kuhne <kuh@google.com> Check validity of staticIpConfigurations

Added a check ensuring Static IP wificonfigurations have a non-null
StaticIpConfiguration and ipAddress.
This fixes a potential stalling of WifiStateMachine in ObtainingIpState
indefinitely.

Bug: 35849629
Test: Added unit test. Existing pass
Change-Id: Ibc55050db99f71acdb821f9c62e0433fda18632f
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
47b8bdb173893084115ead905ea7ffe847840ca2 23-Mar-2017 Glen Kuhne <kuh@google.com> Reset & Stop updating WifiInfo outside ConnectMode

Added a WifiInfo reset call on entering and exiting ConnectModeState, as
well as setting WifiInfo SupplicantState to Disconnected.
Also removed handling of SUPPLICANT_STATE_CHANGE_EVENT from
ScanModeState, which results in no updates to WifiInfo.
This fixes an issue where WifiConnectivityManager could become frozen
due to wpa_supplicant shenanigans in ScanModeState.

Test: Added a unit test
Bug: 36416438
Change-Id: Id8f4bd6434937ece08978a6186f6a9b1a6ab9c37
ndroid/server/wifi/WifiStateMachine.java
83e248aeeea818b3c4267c80fdd5d4eeb5197b63 28-Mar-2017 Ningyuan Wang <nywang@google.com> Remove temporary logging from WificondScannerImpl.java

Bug: 36276738
Test: compile, wifi works
Change-Id: I502463bf7f9bbcd3e899a39e5a1853b7003af482
ndroid/server/wifi/scanner/WificondScannerImpl.java
c22ad7f19888f7967edcf30080543bb632ddd68d 03-Mar-2017 Randy Pan <zpan@google.com> Same BSSID award

When firmware roaming is supported, apply the same BSSID award to
all of the BSSIDs under the same network as the currently connected
BSSID. This is under the assumption that firmware will roam to that
better BSSID.

This might save a disconnection triggered by network switch when
the score of the currently connected BSSID is lower than a network
with a different SSID, but within the currently connected network
there is a BSSID better than the currently connected BSSID.

Bug: 35642269
Test: runtest.sh
Change-Id: Ie09170d0cb11565f72e3b45b702d39c88ababba9
ndroid/server/wifi/SavedNetworkEvaluator.java
ndroid/server/wifi/WifiInjector.java
17c2a7b30e5680b11fc0073ce322ee7bc14ef2c5 03-Feb-2017 Randy Pan <zpan@google.com> Local log buffer shared by connectivity modules

Move the creation of the local log buffer for connectivity modules to
WifiInjector. Then pass it over to all the connectivity modules.
Dump the log buffer via WifiConnectivityManager.

While there, removed the null check in localLog() for all the
connectivity modules.

Bug: 35642622
Test: runtest.sh and manual test
Change-Id: I31866c6fecdd9f50061f47e34e16c701ff230a6c
ndroid/server/wifi/SavedNetworkEvaluator.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNetworkSelector.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/PasspointNetworkEvaluator.java
ab8c62a5c348702090aceee23de12945cc3fdb0d 27-Feb-2017 Randy Pan <zpan@google.com> Firmware roaming configuration management

Clear the BSSID blacklist when starting/stopping
WifiConnectivityManager or when we are about to connect
to a user or app specified network. Write the new roaming
configuration to firmware when the BSSID blacklist is
updated and both WifiConnectivityManager and Wifi client
mode are enabled.

Bug: 35642221
Test: runtest.sh and manual tests
Change-Id: I841c30f9218b4615252f9a75490a480e2f2d0265
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiStateMachine.java
b6686e9d42895f9c2b9f4278cd892149bee04e3a 01-Feb-2017 Randy Pan <zpan@google.com> Always honor config specified BSSID

When WifiNetworkSelector recommends a network for connection and the
WifiConfiguration of the network has a BSSID specified, we always
use that BSSID for connection attempt no matter firmware controls
roaming or not.

If the WifiConfiguration doesn't have a BSSID specified,
WifiConnectivityManager doesn't specify a BSSID for connection attempt
if firmware controls roaming.

If the BSSID of the scan result for the recommended network
configuration doesn't match the config specified BSSID, we drop the
connection or roaming attempt.

While there, made the indent style consistent in the unit test file.

Bug: 35641886
Test: runtests.sh and manual tests.
Change-Id: I888a65f2f9d4cb418f43775a8ecd1035c0cead28
ndroid/server/wifi/WifiConnectivityManager.java
a54399f6da655dfbe440333ca3682b9199060a27 18-Jan-2017 Randy Pan <zpan@google.com> Hand off roaming to firmware if supported

If firmware supports the controlled roaming feature, don't specify
the target BSSID when connecting, and framework no longer initiates
roaming.

While there, cleaned up the indent of localLog() messages in
WifiConnectivityManager.java.

Bug: 35642216
Test: runtests.sh and manual tests
Change-Id: I02355c9b49bbd9275365a43151cc11a81c4696aa
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
16b00750e1d3c41ce9b4ccae9f07e0586e8ca2d0 20-Mar-2017 Etan Cohen <etancohen@google.com> [AWARE] Restrict publish/subscribe count configuration API

Public API access to publish/subscribe count removed. Enforce
restriction on service side.

Bug: 36446307
Test: unit tests and integration (sl4a) tests
Change-Id: I28edd79dcf3aa1e34f921a35c388dc0b056831d0
ndroid/server/wifi/aware/WifiAwareNativeApi.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
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiVendorHal.java
45a984619e338090981499e4823e0177649e3c28 22-Mar-2017 Roshan Pius <rpius@google.com> Add try/catch blocks for incoming HAL params

Add try/catch blocks for handling exceptions raised during handling
incoming params to the HAL calling code.

While there,
Rename SupplicantStaIfaceHal.addNetwork to
SupplicantStaIfaceHal.addNetworkAndSaveConfig

Bug: 36510794
Bug: 36510113
Test: Compiles & able to connect to wifi networks
Change-Id: Idc52d6ea63c4c23e9a3c8f12827f7b6ef1ea07b8
Merged-In: Idc52d6ea63c4c23e9a3c8f12827f7b6ef1ea07b8
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStaNetworkHal.java
ndroid/server/wifi/WifiVendorHal.java
ndroid/server/wifi/p2p/SupplicantP2pIfaceHal.java
edf8be948c0879a2153582e853dc048f3060512a 24-Mar-2017 Roshan Pius <rpius@google.com> WSM: Reconnect on network credential change

Currently, we ignore connect request if we're already connected to the
same network. This is not correct for network modifications. Hence,
trigger a reconnect in this case.

Changes in the CL:
1. Add a new |hasCredentialChanged| param in NetworkUpdateResult.
2. Use that in WSM to determine if we need to trigger a reconnect.

While there,
Removed a couple of unused setters in NetworkUpdateResult.
Fixed WifiConfigManager unit test failure due to mockito change.

Bug: 36505419
Bug: 36020928

Test: Unit tests and manual tests via settings UI.
Test: Will send for regression tests.
Change-Id: I1adaac58108c2f65fb36173a468dff000f5372c8
Merged-In: I1adaac58108c2f65fb36173a468dff000f5372c8
ndroid/server/wifi/NetworkUpdateResult.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiVendorHal.java
448eded66cf274be7cad14b9d40c342175b6c4b2 21-Mar-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Remove unused code

Remove the deprecated events/API handling in WSM:
1. WifiMonitor.SSID_TEMP_DISABLED
2. WifiMonitor.SSID_RENABLED
3. WifiMonitor.DRIVER_HUNG

Also, Removed the pingSupplicant handling as that API has now been
removed.

Bug: 36404409
Test: Compiles
Change-Id: I3762bea36f682eac0694e667addc919e7db6fcaa
Merged-In: I3762bea36f682eac0694e667addc919e7db6fcaa
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
96455476082f5680fd0f66eb5a87cd6f2fde1a70 28-Mar-2017 Roshan Pius <rpius@google.com> Merge changes from topic 'unused_code'

* changes:
WifiNative: Fixing some nits
Add try/catch blocks for incoming HAL params
WSM: Reconnect on network credential change
WifiStateMachine: Handle vendor HAL death
WifiStateMachine: Remove unused code
2f87382a69b04aa6fe90b2ba2f41954525c1f494 28-Mar-2017 Sohani Rao <sohanirao@google.com> Merge "Unit tests for SupplicantStateTracker" am: cb86d10809 am: 9497861799
am: 0327819aa7

Change-Id: Ifed582e4dbf244a4f55bbefaf3a8853cf09134f5
cb86d10809667ce2803485382223a7bc19726495 28-Mar-2017 Sohani Rao <sohanirao@google.com> Merge "Unit tests for SupplicantStateTracker"
631266d856fffb2aea9175fabbc70ae9416512f7 27-Mar-2017 Ningyuan Wang <nywang@google.com> Merge "Add try/catch blocks for incoming WificondControl params" am: 1ad9ac3a12 am: 32215ed301
am: 7e48b7a57e

Change-Id: Ia31b90755525f5bc96687e6ddf5a89b66fd265d0
1ad9ac3a128506722a55ad784fb8c699d2e4b4ec 27-Mar-2017 Ningyuan Wang <nywang@google.com> Merge "Add try/catch blocks for incoming WificondControl params"
8ce63761f263cc5190e87d6f5f8d0501e531168f 27-Mar-2017 Ningyuan Wang <nywang@google.com> Add try/catch blocks for incoming WificondControl params

Bug: 36608272
Test: compile, manual test that wifi connects and no error logs
Change-Id: I853d85813644fe74343c1bc322ad34ad6f1adf2b
ndroid/server/wifi/WificondControl.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
cb594dc8e61189be19c56ab03626df045ed90d1a 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
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiVendorHal.java
7adcbd6f7b0baef1e4186376b0b43789303856cf 22-Mar-2017 Roshan Pius <rpius@google.com> Add try/catch blocks for incoming HAL params

Add try/catch blocks for handling exceptions raised during handling
incoming params to the HAL calling code.

While there,
Rename SupplicantStaIfaceHal.addNetwork to
SupplicantStaIfaceHal.addNetworkAndSaveConfig

Bug: 36510794
Bug: 36510113
Test: Compiles & able to connect to wifi networks
Change-Id: Idc52d6ea63c4c23e9a3c8f12827f7b6ef1ea07b8
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStaNetworkHal.java
ndroid/server/wifi/WifiVendorHal.java
ndroid/server/wifi/p2p/SupplicantP2pIfaceHal.java
cdd56a55709407c9efe2a24b4ed25666e2e8318e 24-Mar-2017 Roshan Pius <rpius@google.com> WSM: Reconnect on network credential change

Currently, we ignore connect request if we're already connected to the
same network. This is not correct for network modifications. Hence,
trigger a reconnect in this case.

Changes in the CL:
1. Add a new |hasCredentialChanged| param in NetworkUpdateResult.
2. Use that in WSM to determine if we need to trigger a reconnect.

While there,
Removed a couple of unused setters in NetworkUpdateResult.
Fixed WifiConfigManager unit test failure due to mockito change.

Bug: 36505419
Bug: 36020928

Test: Unit tests and manual tests via settings UI.
Test: Will send for regression tests.
Change-Id: I1adaac58108c2f65fb36173a468dff000f5372c8
ndroid/server/wifi/NetworkUpdateResult.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.java
790a767cc340069ce4d8f76410889199c1beaf01 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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiVendorHal.java
8aebfed96d10c3ef93ece3974e602b36c3e81f4a 21-Mar-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Remove unused code

Remove the deprecated events/API handling in WSM:
1. WifiMonitor.SSID_TEMP_DISABLED
2. WifiMonitor.SSID_RENABLED
3. WifiMonitor.DRIVER_HUNG

Also, Removed the pingSupplicant handling as that API has now been
removed.

Bug: 36404409
Test: Compiles
Change-Id: I3762bea36f682eac0694e667addc919e7db6fcaa
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
f06fd7eebff96a7d0cacfc72a1c01ca34b129755 27-Mar-2017 Ningyuan Wang <nywang@google.com> Merge "Remove shouldDisconnect and redundant transition"
2200b0df1f05306c14850030ac6044216ca5cc10 27-Mar-2017 Roshan Pius <rpius@google.com> Revert "WifiConfigManager: Add quotes back for psk" am: 2a4eccdb8a am: 5ece6f34b9
am: 7492bde5f0

Change-Id: I83c0012a05e8942485035d50f7b1e114683c51e7
2a4eccdb8aab8e028e8bc8e88e13ab73d8627d87 25-Mar-2017 Roshan Pius <rpius@google.com> Revert "WifiConfigManager: Add quotes back for psk"

This reverts commit a63ab49c1d20d7a698537b5253d172a8dffc235f.

Change-Id: Ic1516df6078001260c721cf8400855297d6cf67a
ndroid/server/wifi/WifiConfigManager.java
99f90f5cb7637ece0358003d3d3355036e6d68f7 17-Mar-2017 Sohani Rao <sohanirao@google.com> Unit tests for SupplicantStateTracker

Create unit test(s) for SupplicantStateTracker. Need to modify
constructor of the class for testability.

Change-Id: I5fb6a049ee09cb07e7d866abd9ed3b2b737f7a6e
Bug: 36485448
Test: Unit tests, Sanity (Power on, wifi On, connect to AP)
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/SupplicantStateTracker.java
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
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
e5be458980ba6313368341c3caf6cf614438fd81 24-Mar-2017 Peter Qiu <zqiu@google.com> Merge "hotspot2: use android.graphics.drawable.Icon for Passpoint icon data" am: e7efc1b20e am: 497c2e277d
am: c0b42e0f03

Change-Id: Ib78f5c93985ef13db11264401ecddf2acb21d421
e7efc1b20e644ff622b8f9f042afa34b2a4452ad 23-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: use android.graphics.drawable.Icon for Passpoint icon data"
ce0bec30360b3f6559342d8c77175fcb4768a044 23-Mar-2017 Ningyuan Wang <nywang@google.com> Do not initialize connection upon SAVE_NEWORK am: 1316bfba02 am: 0ae1655c95
am: 5fc64fc1da

Change-Id: Ic7d961ca07765eb2c1d6d2a82aab1eb4cbe54e24
1316bfba023da3371bbc590ab2edee19c9475c03 23-Mar-2017 Ningyuan Wang <nywang@google.com> Do not initialize connection upon SAVE_NEWORK

This removes the connection request in WifiStateMachine
upon SAVE_NETWORK command.
This also cleans up the handling and logging of CONNECT_NETWORK
and SAVE_NETWORK in WifiServiceImpl.
This fixes that bug where WifiStateMachine tries to connect
to a network twice because Settings UI calls both save() and
connect().

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

Change-Id: I6466c438324220ffa0d5bdea8ef7496f301bcb50
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
dc59be4e200b9739a3a114360743f7d021e4f758 23-Mar-2017 Peter Qiu <zqiu@google.com> Merge "hotspot2: add support for the build config flag "config_wifi_hotspot2_enabled"" am: de3a7c0e94 am: 9e63c7d71a
am: feb133cd0d

Change-Id: Id286a1bcc014305b2a7cef9bb6c9dd2f5621f9d1
de3a7c0e948c41d7663aae426606889d72b5e9f1 23-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: add support for the build config flag "config_wifi_hotspot2_enabled""
4ebe0e0f5723ed58bafaea8b27c0b5ca5852500a 23-Mar-2017 Peter Qiu <zqiu@google.com> Merge "hotspot2: allow Process.WIFI_UID to modify Passpoint networks" am: 26b510e630 am: 70c6644fa3
am: 11091af8e2

Change-Id: I245ad00797b6ed5f02489bcc9f819d4bfbd020cb
26b510e6306c9776e7a9fde5f800c9c58bc075d6 23-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: allow Process.WIFI_UID to modify Passpoint networks"
13124e91e541c1a91cd91075064d5560cc2f7db0 23-Mar-2017 Ningyuan Wang <nywang@google.com> Merge "Do not return member array reference upon CMD_GET_SINGLE_SCAN_RESULTS" am: 4990cf1ecd am: a94723b115
am: 1f16394997

Change-Id: I12f870225685ef48f680b6a32930455643696013
f660ccc51029bb8fcd2f5e4fd54d078972b35b80 23-Mar-2017 Rebecca Silberstein <silberst@google.com> Merge "SoftApManager: retrieve config when null" am: fb30401ec2 am: c9b0a3060a
am: 92f77d5ca9

Change-Id: Id8121a599e87309793b6b0a3a3374c90ae437219
6a5a04fa4fcd71b1448cc6499599b8935f246b6a 16-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: use android.graphics.drawable.Icon for Passpoint icon data

Bug: 35857805
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I0936eb28a4e820b49cdab99fa31364696a27c0f0
ndroid/server/wifi/hotspot2/PasspointManager.java
4990cf1ecd9df8da76ea60b56c414ff3271b30ce 23-Mar-2017 Ningyuan Wang <nywang@google.com> Merge "Do not return member array reference upon CMD_GET_SINGLE_SCAN_RESULTS"
fb30401ec20fa2f82c1ae9d37efc367630bb2995 23-Mar-2017 Rebecca Silberstein <silberst@google.com> Merge "SoftApManager: retrieve config when null"
1294ec27c04b8efffcd1d38056dfa7368eae39a4 23-Mar-2017 Ningyuan Wang <nywang@google.com> Merge "Separate single scan and sched scan result handling" am: 7a74c36073 am: f0f96d5741
am: b68f68e3bc

Change-Id: I43fe1b256d1d35d4c7c7043d47f8927f3b6da517
7a74c36073dfe94717b24741538502f9781140cb 23-Mar-2017 Ningyuan Wang <nywang@google.com> Merge "Separate single scan and sched scan result handling"
9af7a553d86c910a14410ddecea6fb9422c41cdb 20-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: add support for the build config flag "config_wifi_hotspot2_enabled"

This flag specifies if the Passpoint is enabled or not. Currently,
this flag is set to false for the default overlay.

So do not register PasspointNetworkEvaluator if Passpoint support
is not enabled to avoid any Passpoint related traffics (e.g. ANQP).
Also throw UnsupportedOperationException for any Passpoint related API
calls.

Bug: 32671424
Test: manual test
Change-Id: Icefa9b990d6d989750e5a7f00b4f3f5d83a82960
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiServiceImpl.java
5ba387648378cb12f0dcfa057094cc8d99a79397 23-Mar-2017 Sohani Rao <sohanirao@google.com> Merge "Protect NPD in WifiP2pServiceImpl" am: e5909d266e am: b63cca3931
am: fb7b92eabe

Change-Id: I67edf8143157e75ddfc9b8e40b185a73dc59b1fd
e5909d266e65deae7612486cf2cc7570449b8514 23-Mar-2017 Sohani Rao <sohanirao@google.com> Merge "Protect NPD in WifiP2pServiceImpl"
a0570ab96b00a56d377d9e90aeb2ddc4cf7d8706 23-Mar-2017 Peter Qiu <zqiu@google.com> Merge "hotspot2: dump Passpoint related info to dumpsys" am: a23a5d9759 am: 03d6cda7c2
am: 1a1c471679

Change-Id: I07e2559ae215c1bc7dfaee8ed65172842427ebc3
a23a5d97595e973f2a0aa6028473259f47934d4c 23-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: dump Passpoint related info to dumpsys"
51353b26af88c6e9584f309932210ea90cabaadf 23-Mar-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Data-path Passphrase security: connect to HAL" am: e8de163ec3 am: c80e7017d2
am: f24a898935

Change-Id: Ifad0a6f9305fe39752e269a7ca267c72a69fd41e
e8de163ec30f575280b907b0e4f836c67b43948d 23-Mar-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Data-path Passphrase security: connect to HAL"
4990c799e80a5d01262630f541cb86aaa7727768 18-Mar-2017 Sohani Rao <sohanirao@google.com> Protect NPD in WifiP2pServiceImpl

Messages sent to the P2p state machine from an application or a system
server can contain null objects. Ensure all external inputs to the
service are checked for null before dereferncing.

Bug: 36443767
Test: Unit test and test app
Change-Id: I16434c1b29a58a75563a337e3b50c5c80b33e54f
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
037724980a7a6c5281422ccbfacbaba908ab46f3 22-Mar-2017 Randy Pan <zpan@google.com> Move BSSID blacklist to WifiConnectivityManager am: 167b90b5e0 am: 497c084dcb
am: 99be848186

Change-Id: Ic81cafee9029b624116932ad6ab49a99506fe110
3a86cc60b6cd3a5eb7b4982ba98f7e71ad45915e 20-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: allow Process.WIFI_UID to modify Passpoint networks

Passpoint networks are generated by PasspointManager, and can be
added to WifiConfigManager via either PasspointNetworkEvaluator
(for auto connection) or Settings app (for manual connection).
In either case, the network will need to be removed from
WifiConfigManager once the connection is completed.

Since the Passpoint networks are managed/owned by us, bypass
the permission check for any Passpoint network modifications
made by us (with UID Process.WIFI_UID).

Bug: 36357280
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manual test
Change-Id: I5b1bcf3cb882a9d63a1643d8db779788c22b8036
ndroid/server/wifi/WifiConfigManager.java
50bc1e851d073d4a986f5b32072f94bbaba86a95 16-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: dump Passpoint related info to dumpsys

While there, added more debug logs.

Bug: 35850988
Test: verify logs in "adb logcat"
Test: verify Passpoint info in "adb shell dumpsys"
Change-Id: I40d197b3b303eab4d67d7714102ac1aa2ccc8335
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/ANQPData.java
ndroid/server/wifi/hotspot2/AnqpCache.java
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointNetworkEvaluator.java
ndroid/server/wifi/hotspot2/PasspointProvider.java
6781d02916ada0ee87df09b68e4082e44932b25d 20-Mar-2017 Ningyuan Wang <nywang@google.com> Do not return member array reference upon CMD_GET_SINGLE_SCAN_RESULTS

If the caller is within the same process, this might cause concurrent
access of mCachedScanResults.

This patch uses a copy of this array instead.

Bug: 34670610
Test: compile, unit tests, integration test
Change-Id: I143ce97f21f172fe195a3b97383b9fb8d6e5e5b2
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
51493e199ebf1e1191ccf652f0081d229018a11f 21-Mar-2017 Ningyuan Wang <nywang@google.com> Separate single scan and sched scan result handling

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

Change-Id: I066619ca7c53cf7e8e53ce776c1b419201d522f1
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WificondControl.java
ndroid/server/wifi/scanner/WificondScannerImpl.java
2bce4620efc197b7423b842dbb8884ccecf76a1f 14-Mar-2017 Etan Cohen <etancohen@google.com> [AWARE] Data-path Passphrase security: connect to HAL

Connect the framework data-path passphrase security to the
(newly added) HAL APIs.

Bug: 35866810
Test: unit tests and integration (sl4a) tests
Change-Id: I5e6aeef1ff6abcaf414b50ba13aa1d7fa9a49908
ndroid/server/wifi/aware/WifiAwareNativeApi.java
ndroid/server/wifi/aware/WifiAwareNativeCallback.java
167b90b5e002698378728a54a417a08c317d29dc 25-Feb-2017 Randy Pan <zpan@google.com> Move BSSID blacklist to WifiConnectivityManager

Now the BSSID blacklist is managed by WifiConnectivityManager and
passed to WifiNetworkSelector for scan results filtration.

Bug: 35642214
Test: runtests.sh and manual tests
Change-Id: I7afb5e66be471f3582075adb687a7d85ba49a80b
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiNetworkSelector.java
099b837815bc6e0c24a0e4a4fad0bee8ec339d01 21-Mar-2017 Roshan Pius <rpius@google.com> Merge "SupplicantStaIfaceHal: Broadcast bssid change event" am: 168fba7187 am: 7a9a3b4d49
am: 8968c27b92

Change-Id: I8461d5305a57bb5572cdf800b92887c04be3028b
9f60c8e06a287f00389554361a89387125a61928 21-Mar-2017 Roshan Pius <rpius@google.com> Merge changes I0faf4cff,If7c3473b am: 8e048dfa14 am: aa28ee3bcb
am: 821a060157

Change-Id: I6641e88c2f42889157bbe07a1d3a4f2e7edb15a1
168fba718720b54cf0a88cfad7f96948925fb1e3 21-Mar-2017 Roshan Pius <rpius@google.com> Merge "SupplicantStaIfaceHal: Broadcast bssid change event"
8e048dfa149e15cd7e0baf0d10ff4358e79e0dca 21-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge changes I0faf4cff,If7c3473b

* changes:
WifiStateMachine: Remove networks on enter/exit ConnectMode
SupplicantP2pIfaceHal: Add the 2 missing callback handling
d8324d5655b2e90ade91a9dffe7632e582f72999 21-Mar-2017 Roshan Pius <rpius@google.com> SupplicantP2pIfaceHal: Fix pin sending for connect am: 7395d73fb3 am: 715be5e753
am: 88889efd00

Change-Id: I1963bd12ba0e50ce6b221d1ed19daf7518ba9efc
7395d73fb33a6ad5e234f8fc2832810ec8109af9 21-Mar-2017 Roshan Pius <rpius@google.com> SupplicantP2pIfaceHal: Fix pin sending for connect

Send the pin for all types of WPS connect requests to wpa_supplicant.

Bug: 36475029
Test: Unit tests
Change-Id: I4965d59c88ea976255b141056224fb46570c2e92
ndroid/server/wifi/p2p/SupplicantP2pIfaceHal.java
79a79d4b81bda6fcb76ccfdec096ec6ab765897a 21-Mar-2017 Roshan Pius <rpius@google.com> Split up WifiNative/WifiMonitor into STA-AP/P2P am: 163f9765f9 am: 33541513a4
am: 429a5e264b

Change-Id: I558bea4248bab9cc343c69fd9c82b45f96fe4339
35c9c7f7a2f83d81b8d61da834b3960f5b9ffe19 21-Mar-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Broadcast bssid change event

Bug: 36451639
Test: Unit tests
Change-Id: Id4dc17fc9b0af1145a264406bf5d540c60c511f2
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/WifiMonitor.java
56ee240e9e4c6a4967f08faa50cef95bfd5c2949 20-Mar-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Remove networks on enter/exit ConnectMode

Bug: 36189070
Test: Unit tests
Test: Turned on/off wifi several times & verified that the networks are
removed.
Change-Id: I0faf4cffacb440746516122845667a7a7a5e6546
ndroid/server/wifi/WifiStateMachine.java
1555c030405df64cb4c52cff44598e678045b82b 18-Mar-2017 Roshan Pius <rpius@google.com> SupplicantP2pIfaceHal: Add the 2 missing callback handling

Bug: 36401779
Test: Compiles
Change-Id: If7c3473b461021b1cf13763e6228ef791b758b52
ndroid/server/wifi/p2p/SupplicantP2pIfaceCallback.java
ndroid/server/wifi/p2p/WifiP2pMonitor.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
ndroid/server/wifi/SupplicantP2pIfaceCallback.java
ndroid/server/wifi/SupplicantP2pIfaceHal.java
ndroid/server/wifi/WifiConfigStoreLegacy.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/p2p/SupplicantP2pIfaceCallback.java
ndroid/server/wifi/p2p/SupplicantP2pIfaceHal.java
ndroid/server/wifi/p2p/WifiP2pMonitor.java
ndroid/server/wifi/p2p/WifiP2pNative.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
15830d28ee4e526a86ed90d02a2b6177edf23829 20-Mar-2017 Roshan Pius <rpius@google.com> SupplicantP2pIfaceHal: Support for P2P client list and save config am: 2a1078dc37 am: 8773fa1bfd
am: e414848248

Change-Id: I2edd53a68af6ca45d750c387b2554d4d075c03db
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
ndroid/server/wifi/SupplicantP2pIfaceHal.java
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/util/NativeUtil.java
9a0db4944213876f2bb30e7d0cf079384ffa9f99 19-Mar-2017 Ningyuan Wang <nywang@google.com> Merge "Reset to default country code when phone is out of service" am: c67240d12b am: 384409871a
am: fc4a591f6c

Change-Id: Ibd90beb8916f3781e0c0dc795a12e3697d75d5c3
c67240d12b213e732cc9e1358349e7163812d524 19-Mar-2017 Ningyuan Wang <nywang@google.com> Merge "Reset to default country code when phone is out of service"
5353a4413684083df0e8ff2fbd6f5f256731bd28 16-Mar-2017 Ningyuan Wang <nywang@google.com> Reset to default country code when phone is out of service

Bug: 36229469
Test: compile, unit tests, manual test
Change-Id: Ic6689cee5f559158cee16c3bf3072e96496f19c6
ndroid/server/wifi/WifiCountryCode.java
b1a8a099c092b321702610f56e9bfcf25c5087a9 18-Mar-2017 mukesh agrawal <quiche@google.com> WifiStateMachine: set supplicant log level after supplicant starts am: 61e149bc12 am: 779e9a661d
am: b0e010b62e

Change-Id: I0aced771da6b8e6489bcdd785b675605d9e89c73
6471efc59661843bf95aab46d17d31b9a32c3a54 17-Mar-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Fix WPS handling am: a21bea22a9 am: fd21b14f1b
am: 8418d04ca2

Change-Id: I85e5dae7d3761fcb0c6f65520776c9f702c3cdd5
61e149bc125c753fea54ba59cf70fbaff1772ea5 16-Mar-2017 mukesh agrawal <quiche@google.com> WifiStateMachine: set supplicant log level after supplicant starts

When we start supplicant, we want to set its logging level to
reflect the logging level of WifiService. At present, we attempt
to set supplicant's logging level immediately after we
enableSupplicant().

This is problematic, because enableSupplicant() does not actually
block until supplicant is ready. Hence, the request to set supplicant's
logging level can be (and sometimes is) dropped.

Resolve this problem, by waiting for WifiMonitor.startMonitoring()
to return, before setting supplicant's logging level. (startMonitoring
is a blocking call.)

Note that, with this change, we'll no longer have any chance of
seeing debug-level log messages in the window from when supplicant
is started, until startMonitoring() returns. But I don't think such
messages are very important anyway.

Bug: 33462714
Test: manual (see below)

Manual test
-----------
1. flash DUT
2. Settings -> Developer options -> Enable Wi-Fi Verbose Logging -> On
3. reboot
4. adb shell logcat -d | grep ' D wpa_supplicant: ' | wc -l
-> should be non-zero

Change-Id: Iaf9e3e8c047367ae55086d4d680664c6d954ebee
ndroid/server/wifi/WifiStateMachine.java
a21bea22a9d442b5886207855ddf63ffee972f0b 14-Mar-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Fix WPS handling

Since wpa_supplicant is no longer our config store, we need to read the
network params out of it add it to WifiConfigManager after WPS network
addition.

Bug: 34714021
Test: Manual tests. Able to connect to wps networks now.
Test: Some unit tests. It can be better, but need to figure out how to
extract the message reply from WSM.
Change-Id: I41231698c7e99ec46d34a60a70c04a6ee25ebfe4
ndroid/server/wifi/SupplicantStaNetworkHal.java
ndroid/server/wifi/WifiStateMachine.java
21daaaeb98111f184345ef10589af6023348d436 17-Mar-2017 Roshan Pius <rpius@google.com> Merge "SupplicantStaIfaceHal: Stop wpa_supplicant auto connect" am: 8923f3bd35 am: 9c0f86104b
am: b71c71a50b

Change-Id: I702dc3619105e9a89f84e347d3a6ea6cb42cb299
12d88e1561f3a8a959f5add9b61c668d04437476 17-Mar-2017 Peter Qiu <zqiu@google.com> Merge changes from topic 'legacy passpoint indicator' am: 44104c69e8 am: 8166105ea7
am: ab5e48f755

Change-Id: Ic92ebb520683b855340fcee3690a839c6bacc257
b4c12f96b76e2f831e6eb33f1ac53e20440190d1 17-Mar-2017 Peter Qiu <zqiu@google.com> WifiConfigMangaer: use updated legacy Passpoint config indicator am: 018e39e2f6 am: 1395be1e70
am: 8106f6ce92

Change-Id: I0ff73f38c8db168b8c9852d3eb232f9f9ed95633
ed81bd99e9e89062796d78366f6614706c8d855f 17-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: add support for WifiStateMachine#syncGetMatchingWifiConfig am: 48c93da3c5 am: ba15667e97
am: e948a05668

Change-Id: Ib9bd31d48e64c03a1f04483e35d540426b316753
c4ffd679940aa0177a0fba2c8693619f8b3cc6e9 17-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: update semantics for PasspointManager#matchProvider am: b54f07e01c am: f80d78535b
am: 874395d470

Change-Id: I545a1bdc18d3a92730d8da73e333f6f872fb9b81
ff5296a14a7b1336bdfd78d9dbd43de0adefe013 17-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: use ScanResult to match Passpoint providers am: ec28f863c5 am: 9d1bf067f6
am: 8c8d999ebc

Change-Id: I4159557c607b432a6bb81e008981038c9f344223
3e240b2bfb6fefe8b91ad68e8a12b652b4136c69 16-Mar-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Stop wpa_supplicant auto connect

Bug: 36282386
Test: Compiles & manual tests.
Change-Id: I90a7b56de1b6f3315bd71c94df45abe8aa9dc155
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
1395be1e703ec394127466dd3ce0eff30236d62c 17-Mar-2017 Peter Qiu <zqiu@google.com> WifiConfigMangaer: use updated legacy Passpoint config indicator
am: 018e39e2f6

Change-Id: I2c1f26aab3ee27bc321579bdd458542d1608d4dc
ba15667e97c906761928697e4a240cd4a85d8a51 17-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: add support for WifiStateMachine#syncGetMatchingWifiConfig
am: 48c93da3c5

Change-Id: I432c0bcbde8b33fc129e0fc309d38096de7ea9cf
f80d78535b8854f6158a2efc0de43da8a12c721f 17-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: update semantics for PasspointManager#matchProvider
am: b54f07e01c

Change-Id: I82813257cc85cfcc3af65fd5ae46f1aca75614a4
9d1bf067f668c8f5cb414a56caf4e64c0e7ddef0 17-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: use ScanResult to match Passpoint providers
am: ec28f863c5

Change-Id: I028c4cde45b9324af60ceb5a9a85b17dd6b009f4
44104c69e83ee6ee07f0449cbf720dad53c0cdfb 17-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge changes from topic 'legacy passpoint indicator'

* changes:
WifiConfigurationXmlUtil: persist additional fields for legacy Passpoint configuration
WifiConfigMangaer: use updated legacy Passpoint config indicator
hotspot2: add support for WifiStateMachine#syncGetMatchingWifiConfig
hotspot2: update semantics for PasspointManager#matchProvider
hotspot2: use ScanResult to match Passpoint providers
e6a5d3f13010dad76e55e4c386d7c3f7154556fd 16-Mar-2017 Ningyuan Wang <nywang@google.com> Merge "Add temporary logs in WificondScannerImpl" am: 9b7ac0c52f am: 94dfca04cf
am: d5eb01234e

Change-Id: Ia085f628fbcf37a4e8d426cd37b054c1fc4ace21
9b7ac0c52f2a5d6a4e409e902692c437698c52b6 16-Mar-2017 Ningyuan Wang <nywang@google.com> Merge "Add temporary logs in WificondScannerImpl"
018e39e2f6201519373e7f4dbb1427f0e5274898 10-Mar-2017 Peter Qiu <zqiu@google.com> WifiConfigMangaer: use updated legacy Passpoint config indicator

Bug: 36101691
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I85cd5619072ec978913df932c0b47ebe696074bc
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStoreLegacy.java
48c93da3c53650a62bc827199840137417c0825a 09-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: add support for WifiStateMachine#syncGetMatchingWifiConfig

This function will try to match a Passpoint AP to an installed Passpoint
provider. Once a match is found, it will generate and return a
WifiConfiguration for the given Passpoint AP, which will contain
all necessary credentials for connecting to it.

Note that, the generated configuration is not added to WifiConfigManager.
The consumer of this WifiConfiguration (e.g. Settings app) can use
this WifiConfiguration to initiate a connection via WifiManager's API.

This operation is only supported in client mode, since PasspointManager
might issue ANQP requests when matching scan result to a provider.

Bug: 35888100
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: install Global Reach Passpoint profile and verify the Global
Reach Passpoint AP in the Settings UI is shown with
"available via xxx" text.

Change-Id: I9bbd57819326d285367e89a342f21da79fc33555
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/PasspointManager.java
b54f07e01c9daef8883c85e09f61436f2c06cc72 07-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: update semantics for PasspointManager#matchProvider

Instead of returning a list of matched providers, it will now
return the best provider for the given AP (based on ScanResult).
It will return null if no match is found.

So PasspointManager is responsible for ranking providers for
a given AP (based on ScanResult), while PasspointNetworkEvalutor
is responsible for ranking Passpoint networks with matched provider.

Bug: 35888100
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: Manual test with Global Reach Passpoint AP
Change-Id: I9e2a76aaf319f6180d7767fe8f713547221feb6c
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointNetworkEvaluator.java
ec28f863c5e46c0a75e8bdb92283304b875ee0f2 07-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: use ScanResult to match Passpoint providers

This removes ScanDetail and NetworkDetail dependencies from
PasspointManager, and allows provider matching to be performed
using ScanResult instead of ScanDetail.

Bug: 35888100
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manual test using Global Reach Passpoint profile
Change-Id: I229f042352e2d51cfaf9c154d707f3b6b39b2c5d
ndroid/server/wifi/hotspot2/ANQPRequestManager.java
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointNetworkEvaluator.java
ndroid/server/wifi/hotspot2/PasspointNetworkScore.java
9ef555a48ac600c8766f703fa60db15b69e20301 10-Mar-2017 Peter Qiu <zqiu@google.com> WifiConfigurationXmlUtil: persist additional fields for legacy Passpoint configuration

When migrating legacy Passpoint configurations, the configuration will only
get migrated when its owner logs in. In the meantime, we will
need persist all the required data in the share store temporarily.
So persist the additional required fields for Passpoint to the storage
to avoid any data loss in the case when migration took multiple
boots to complete.

Bug: 36099588
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manual test updating a device from N to O, verify all configs
are migrated.

Change-Id: I040dfd9f207ed1a9b2e3ccd50eca50560d6e1444
ndroid/server/wifi/util/XmlUtil.java
4bae3afd6041218b1eb2f0947d06c7839e6063e5 16-Mar-2017 Ningyuan Wang <nywang@google.com> Add temporary logs in WificondScannerImpl

Bug: 36276738
Test: compile, manual test
Change-Id: Ib94df5326ced497b7d32820d053763ceeda1800a
ndroid/server/wifi/scanner/WificondScannerImpl.java
8e7a3131a0903a049623eb553f270c123c2c173a 16-Mar-2017 Roshan Pius <rpius@google.com> Merge "SupplicantHal: Fix Wps PBC/Display setup" am: 15d4e32d0b am: ff31a7c427
am: 3631993e85

Change-Id: I5fde09af599548c764550012edf31c0a56937efd
15d4e32d0b4ae41eb582aeef9e9c97792e25f703 16-Mar-2017 Roshan Pius <rpius@google.com> Merge "SupplicantHal: Fix Wps PBC/Display setup"
23b9ad32d1b903a2527ad7ef8deae78b51eddc97 16-Mar-2017 Ningyuan Wang <nywang@google.com> Stop supporting persistent country code am: 586197ab0e am: cb937877d4
am: fda3524c35

Change-Id: I192a882351827df4be6309bf3881cf60627a7779
d19743b66ba214a8c4a5166d1fe7d938f97a3f03 14-Mar-2017 Roshan Pius <rpius@google.com> SupplicantHal: Fix Wps PBC/Display setup

For Wps PBC/Display the app can choose to send a null bssid to indicate
that we want to indicate wildcard. So, add support for it.

Change NativeUtil.macAddressToByteArray to allow null/empty strings
which would return all zero'ed bssid.

Bug: 34714021
Test: Unit tests
Test: WPS setup can now be initiated via settings app.
Change-Id: I223eb9666163a0f02fe6b68480b1a05895563803
ndroid/server/wifi/SupplicantP2pIfaceHal.java
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/util/NativeUtil.java
586197ab0ed6d1c9d76c7b461a19ab8733ce9b3a 14-Mar-2017 Ningyuan Wang <nywang@google.com> Stop supporting persistent country code

This actually reverts ag/1108739/, which we don't need anymore.

Bug: 29353903
Test: compile, unit tests

Change-Id: Ic0e52f0832d0b78a3b6f7e24694e2b0427866d75
ndroid/server/wifi/WifiCountryCode.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiServiceImpl.java
a92ba32e8d79bdffa4ec8efe158e808c02655fec 15-Mar-2017 Randy Pan <zpan@google.com> Merge "Schedule a scan immediately when disconnected" am: 1df53b3ec0 am: d4f7867a19
am: 56a9011a03

Change-Id: If32214b0e0c87c793b5764131e360e8d5b35bda7
1df53b3ec09d8bd1713b55167ebe283bd1c1a9e9 15-Mar-2017 Randy Pan <zpan@google.com> Merge "Schedule a scan immediately when disconnected"
2cacc054cb4b367077b53e97f38303812cdf9cf4 15-Mar-2017 Roshan Pius <rpius@google.com> Merge "WiFi: Wifi service get configured networks use ParceledListSlice." am: ffe8694d14 am: 01bc68b2f5
am: 42d4219528

Change-Id: I7bcb70f9dc4633ceca1e99c9d35b6dcdd72d0d72
4e0a1bafa7a86e2840c855846f3fdaee9cd00424 10-Mar-2017 Rebecca Silberstein <silberst@google.com> SoftApManager: retrieve config when null

To support temporary softap configs, SoftApManager will not
automatically write out passed in configs to the WifiApConfigStore.
This means that Settings will need to continue explicitly saving config
changes through the WifiManager API and cannot depend on a call to start
softap to write a new config.

Bug: 35809698
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: Wifi integration tests
Change-Id: I60e138ada3258e29ed4f411616e85b553c7dd34d
ndroid/server/wifi/SoftApManager.java
ffe8694d14621b679ef06ca2679cf55462b33ea8 15-Mar-2017 Roshan Pius <rpius@google.com> Merge "WiFi: Wifi service get configured networks use ParceledListSlice."
53aa2cc5f30cf53c73324a4629b404d49023a0dc 15-Mar-2017 Michael Plass <mplass@google.com> Merge "BgScan rename for wifi vendor background scan" am: f66217fc1b am: 5af7cdd3d8
am: 1eef091776

Change-Id: I2d97934b64dec3c733a3f2528e5b1be210501d4d
a6c9196ab06177459471e7307415802ebb8fcafb 15-Mar-2017 Michael Plass <mplass@google.com> Merge "[SupplicantStaIfaceHal] Detect PSK mismatch" am: f1b57b5f1b am: 384f1e83f8
am: 573be03ed2

Change-Id: I728e8a18e5652656c4787c3d26f427136a7a3503
f66217fc1b9631cfdafa9fbb51296146fd777317 15-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "BgScan rename for wifi vendor background scan"
f1b57b5f1b6bb710a5db5afb91aa101417f26347 15-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "[SupplicantStaIfaceHal] Detect PSK mismatch"
3a861cce1ca6416175a1657c8c2b7ced3cc67fa5 15-Mar-2017 Peter Qiu <zqiu@google.com> Merge "hotspot2: ignore Passpoint networks in SavedNetworkEvaluator" am: 7c4e3b39a5 am: 91f699078c
am: 692150076f

Change-Id: I386e9cee9f39b590d29c98663e630178e06832a2
7c4e3b39a5fba0749cab3c244dcda45a1ff3c35b 15-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: ignore Passpoint networks in SavedNetworkEvaluator"
f384821f8979152ba83ec70614a59094c838c8c6 13-Mar-2017 zhangshuxiao <zhangshuxiao@xiaomi.com> WiFi: Wifi service get configured networks use ParceledListSlice.

The number of configurations will be more and more, some
users configured more than 600KB or even 1M, It will cause
the binder failed. Therefore, we use ParceledListSlice
to splits into multiple transactions when more than 64K.

Test: more than 500 configurations.

Change-Id: I4b56a6d34f7d6631ae7d2f8bcbc2c4f42a17456b
Signed-off-by: zhangshuxiao <zhangshuxiao@xiaomi.com>
ndroid/server/wifi/WifiServiceImpl.java
7fa6b3923dc14351bca10ef501786dd7d0eb2e21 14-Mar-2017 Roshan Pius <rpius@google.com> Merge "WifiStateMachine: Note user selection only for settings app" am: a4d316f8e7 am: b78c831e79
am: 4137f1c86f

Change-Id: I451af45a0ddf68d12b4c69a7af90079798b371ed
67a4541372684c5d0a3f834f8be76bd8d29ca7ac 14-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: ignore Passpoint networks in SavedNetworkEvaluator

While there, enable the Passpoint network when it is created
by PasspointNetworkEvaluator to be more consistent.

Bug: 36218488
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I72fa55a9cb6baf71e8650e10cb54b496a7be1343
ndroid/server/wifi/SavedNetworkEvaluator.java
ndroid/server/wifi/hotspot2/PasspointNetworkEvaluator.java
a4d316f8e789bc1aa6645235f139e48636fe1f2d 14-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "WifiStateMachine: Note user selection only for settings app"
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiVendorHal.java
ndroid/server/wifi/scanner/HalWifiScannerImpl.java
ndroid/server/wifi/scanner/WifiScannerImpl.java
92e43feb3eb54736a28226b588bc087fdda1646e 11-Mar-2017 Michael Plass <mplass@google.com> [SupplicantStaIfaceHal] Detect PSK mismatch

Use checks analogous to those in wpa_supplicant_8/wpa_supplicant/events.c
to decide whether or not a disconnect is likely due to an incorrect
password.

Test: Attempt to join a PSK network with the wrong password
Test: Unit tests added
Bug: 35464954
Change-Id: I47196cf89dbd602c22a61b430b764c7ea76f04d5
ndroid/server/wifi/SupplicantStaIfaceHal.java
d6b541c35b7196a9317a645944b7ab0a6e2482e9 14-Mar-2017 Roshan Pius <rpius@google.com> Merge "[WifiVendorHal] Add support for more than 1 radio stat instance" am: eb26485dd3 am: 68f2425919
am: 45f20dd63d

Change-Id: Iff9ab131028c49b147d61900fc706977d313991f
eb26485dd36b83676b4931e415f20b284abd7dfc 14-Mar-2017 Roshan Pius <rpius@google.com> Merge "[WifiVendorHal] Add support for more than 1 radio stat instance"
6e482c9c1882fd32edb446aa6f2f1e080a5cda25 14-Mar-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: protect Settings softap config" am: e65f63b675 am: 193d9023ac
am: 838083e229

Change-Id: I22f08ab46ef10b52a9f28e7da7e9fb21f258e281
e65f63b6758b2c310a17263fab622adf798e47cd 14-Mar-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: protect Settings softap config"
3d5cb3a914766414039a1a1261af8452c15efbb9 14-Mar-2017 Randy Pan <zpan@google.com> Merge "Helper class for Wifi connectivity operations" am: c6b2bac85c am: 8c895ff8e1
am: 2b2a72a2bd

Change-Id: I1d5b12b7281bbb24fa6a5d625291bff104078a04
c6b2bac85c9cabb01058169279e238168a47d405 14-Mar-2017 Randy Pan <zpan@google.com> Merge "Helper class for Wifi connectivity operations"
a1727e40dc6b2742df5b32451f1dfa787fc6aa98 14-Mar-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Note user selection only for settings app

The previous CL for this bug also modified the user selection when we let
non-settings app to initiate connection. This bug CL reverts that,
non-settings app can only initiate connection, but not set user connect
choice.

Bug: 36040264
Test: Unit tests
Change-Id: If70fe974274277bd804f5cc17a5751dee76f44e3
ndroid/server/wifi/WifiStateMachine.java
9ca3944e48689ee1d72eed1ed27bc19ecea2c039 13-Mar-2017 Roshan Pius <rpius@google.com> [WifiVendorHal] Add support for more than 1 radio stat instance

Bug: 36148086
Test: Existing Unit tests & manual tests on newer devices.
Change-Id: Ibc84f4217f0e9cb7b59d60ab606dbd2fa443cb2e
ndroid/server/wifi/WifiVendorHal.java
4fdbb2cd44da9cd50bfdc022e7fcf7eec53986a6 14-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: use the updated public intent definitions"
efe96b06536c59bf0e47d83c5544b228caf5111f 13-Mar-2017 Ningyuan Wang <nywang@google.com> Rename SupplicantWifiScannerImpl to WificondScannerImpl am: 05d51a2d8e am: e11ddc06aa
am: bea1f6ae58

Change-Id: Ic65d1cc964329c93e53b5a3f3bc39a8bc9f68b06
915a3782e33684562dff8a0897d1446227301b75 13-Mar-2017 Randy Pan <zpan@google.com> Schedule a scan immediately when disconnected

This gives the device a chance to reconnect as soon as possible.

Bug: 35188856
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I8eb019ca11b2b63ab17edcc2fa60fb8795141951
ndroid/server/wifi/WifiConnectivityManager.java
b48796131ddd016071144f77f208360e8c408f0e 02-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: use the updated public intent definitions

While there, add unit tests for handling WNM frames.

Bug: 35857805
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ic546aa2854d925a9546fcabdca92fc056c2435f4
Merged-In: Ic546aa2854d925a9546fcabdca92fc056c2435f4
ndroid/server/wifi/hotspot2/PasspointManager.java
6eaae7e66124abce3c9ab218d7bf0d00a943aa8d 13-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: use the updated public intent definitions"
9c7730dd2cbf7c8d0d42052bee15a7a1323b8133 24-Feb-2017 Randy Pan <zpan@google.com> Helper class for Wifi connectivity operations

Add a helper class for WifiConnectivityManager and
WifiNetworkSelector to interface WifiNative for connectivity
related operations. Initially implement firmware roaming
related methods.

Bug: 35643651
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ie8b6547fdb6cb0026d3746d56db9a9665b840b78
ndroid/server/wifi/WifiConnectivityHelper.java
05d51a2d8eb67ea2eaf4cae43280d1cf9fe92645 02-Mar-2017 Ningyuan Wang <nywang@google.com> Rename SupplicantWifiScannerImpl to WificondScannerImpl

This also fixes a few formatting issues.

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

Change-Id: I1b6642b723c5676620d65136cc6c773b49e28559
ndroid/server/wifi/scanner/HalWifiScannerImpl.java
ndroid/server/wifi/scanner/SupplicantWifiScannerImpl.java
ndroid/server/wifi/scanner/WifiScannerImpl.java
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
ndroid/server/wifi/scanner/WificondScannerImpl.java
951121b2101909e1c4041a07d0dceb723c2883d7 11-Mar-2017 Michael Plass <mplass@google.com> [WifiVendorHal] Synchronize clearing of handles am: e1d5fa72eb am: 1c8169105d
am: b472ba351e

Change-Id: Ifdad26257453aa06098f1c2ae71ee88074dade28
e1d5fa72eb35fb8f936e19d0830548593de6a6ff 10-Mar-2017 Michael Plass <mplass@google.com> [WifiVendorHal] Synchronize clearing of handles

Test: Unit tests
Test: manual test of start/stop ap mode on both bands
Test: manually kill hidl wifi service
Bug: 36119402
Change-Id: I9991e7c723423892a5a185c3ec08cf93d3b7be2b
ndroid/server/wifi/WifiVendorHal.java
daf64460268bbf258c54cf8d0d1af3c8b55fd361 11-Mar-2017 Michael Plass <mplass@google.com> Merge "[WifiVendorHal] link layer stats unit tests" am: c01e0416b7 am: 01c924b132
am: 2461429d26

Change-Id: I4f813e79e0c3da36e7748fdf60eb9a7dc1dd4b30
c01e0416b71b561d9aa7f8fb788ed45866a2ed3d 11-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "[WifiVendorHal] link layer stats unit tests"
2e09710368280e06d60d22eb6921ecf7a2951cbc 11-Mar-2017 Peter Qiu <zqiu@google.com> util: add utility functions for retrieving Hotspot 2.0 specific IEs am: 9e83e33d44 am: d63fbe170c
am: fe27c6690f

Change-Id: Ia4932a3666b5f128d810b85143124c09755bd9b6
9e83e33d444446e59aa59fc355972ff804d8eafa 07-Mar-2017 Peter Qiu <zqiu@google.com> util: add utility functions for retrieving Hotspot 2.0 specific IEs

Instead of using the parsed IEs maintained in NetworkDetail, the interested
party can use the newly added utility functions to retrieve the elements
that it is interested in. This allows us to remove the NetworkDetail
dependencies from Passpoint code.

I think if we ever want to maintain a copy of parsed IEs, it should be
in ScanResult instead of NetworkDetail.

Bug: 35888100
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: I69849728c93d3e1f9b6c7bda1e5c21cfdb40689a
ndroid/server/wifi/util/InformationElementUtil.java
699cb92ca94c3fbd883472937ab3b071cafadf77 08-Mar-2017 Michael Plass <mplass@google.com> [WifiVendorHal] link layer stats unit tests

Refactor getWifiLinkLayerStats to make the conversion part more
testable.

Add test for the link layer stats conversion.

Test: New test
Bug: 33384303
Change-Id: I322d30c451769c6cbbc1ac048d48af8aaa0ce39e
ndroid/server/wifi/WifiVendorHal.java
3a34398ff796fc39ff539394a63032da4c82e386 10-Mar-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Allow any app to initiate connection am: 4a5f4e08d6 am: 34f6dd1663
am: 9cc5150c36

Change-Id: I58a798955eaafcc6ae020bb7fced96ae67437f40
c009536b77947039fd232bb5ce70a494639b9518 02-Mar-2017 Peter Qiu <zqiu@google.com> hotspot2: use the updated public intent definitions

While there, add unit tests for handling WNM frames.

Bug: 35857805
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ic546aa2854d925a9546fcabdca92fc056c2435f4
ndroid/server/wifi/hotspot2/PasspointManager.java
4a5f4e08d677a6da1b436e58d027de99518a97cf 09-Mar-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Allow any app to initiate connection

This brings the existing API's in parity with behaviour in N. We allow
apps to initiate connection to a network even if they have no permission
to modify it.

Bug: 36040264
Test: Unit tests
Change-Id: I3316877ea88969fe4397552fea9461acb4d52cf2
ndroid/server/wifi/WifiStateMachine.java
75604d5cc2934b9740371f91f9b5e72e594f756b 10-Mar-2017 Roshan Pius <rpius@google.com> Remove all legacy HAL usage from framework am: b8b3fb8228 am: 23014c56a4
am: dcb18d42a1

Change-Id: I1f68855260304b6be21e2184aeddd85fe4368542
441e6afc53f4335923cfcbec0b33cac7a66c1c07 10-Mar-2017 Roshan Pius <rpius@google.com> SupplicantP2pIfaceHal: Enable P2p HIDL iface am: 96c464e935 am: 3b4f6ebd78
am: 27fdb9081b

Change-Id: If8cbadb9b040b672a334f0532168073a38a9f807
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
ndroid/server/wifi/BaseWifiDiagnostics.java
ndroid/server/wifi/RttService.java
ndroid/server/wifi/SupplicantP2pIfaceHal.java
ndroid/server/wifi/SupplicantStaNetworkHal.java
ndroid/server/wifi/WifiBackupRestore.java
ndroid/server/wifi/WifiConfigStoreLegacy.java
ndroid/server/wifi/WifiDiagnostics.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiNetworkHistory.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiSupplicantControl.java
ndroid/server/wifi/WifiVendorHal.java
ndroid/server/wifi/hotspot2/AnqpEvent.java
ndroid/server/wifi/hotspot2/WnmData.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
ndroid/server/wifi/scanner/HalWifiScannerImpl.java
ndroid/server/wifi/scanner/SupplicantWifiScannerImpl.java
ndroid/server/wifi/scanner/WifiScannerImpl.java
ndroid/server/wifi/util/TelephonyUtil.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
ndroid/server/wifi/SupplicantP2pIfaceHal.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
6b04563db1b9bf5cedd866e0592f4c1e77dde109 09-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiPermissionsUtil: add checkConfigOverride am: 835e781643 am: e1894184ac
am: c9e0c9b182

Change-Id: I32118d045c3f07f3a0aaba30459dc199ddeefa31
5c5e8b347d32f7bf5bb1e6f40b1e350f1e9fb0f3 02-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: protect Settings softap config

Do not allow temporary softap configs to overwrite the user specified
softap config.

Bug: 35809698
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: Wifi integration tests
Change-Id: Id6bde08025cea8828e3106482c72ec04d01ff2cb
ndroid/server/wifi/WifiServiceImpl.java
835e781643b79c30fabbab5595770cf01b5861fb 01-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiPermissionsUtil: add checkConfigOverride

Add a helper method to allow callers to check the calling UID for the
override config permission. This CL moves the call from
WifiConfigManager to the util/WifiPermissionsUtil class and adds tests.

Bug: 35870086
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I5aa1bbc82eb86408272564365d45b7ddbf7cc661
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/util/WifiPermissionsUtil.java
ndroid/server/wifi/util/WifiPermissionsWrapper.java
bd0839a667d68ba09c6817ee0f435c2b6126b5b6 09-Mar-2017 Randy Pan <zpan@google.com> Merge "Log association rejection event" am: a9f4a722ac am: e2737a7a72
am: 8b2e766812

Change-Id: Iebfa600115db510235bab093f789873e5e5d9672
a9f4a722ac91fe87352f2e0cfec72fdfbb35ba5d 09-Mar-2017 Randy Pan <zpan@google.com> Merge "Log association rejection event"
68ebc5f3b76acd5e8bfe8f32da58d7c5c7ff844c 09-Mar-2017 Amin Shaikh <ashaikh@google.com> Move adjustCandidateWithUserSelection to WifiNetworkSelector am: 235642dba4 am: 81284deb65
am: 59ee8d3242

Change-Id: I39cfc37e8597b7a52536a2868796f648d5c37d88
235642dba4359c1e68618f27c949e744765cbbcc 07-Feb-2017 Amin Shaikh <ashaikh@google.com> Move adjustCandidateWithUserSelection to WifiNetworkSelector

WifiNetworkSelector#setUserConnectChoice contains all of the logic for
favoring a user selected network over other visible networks present at
the last round on network selection. However, the logic for using this
data is contained in
SavedNetworkEvaluator#adjustCandidateWithUserSelection. This has the
side effect that RecommendedNetworkEvaluator or any new NetworkEvaluator
in the future can override the user's explicit intent to choose a
specific network. This change moves adjustCandidateWithUserSelection to
WifiNetworkSelector, fixing this bug and bringing all user connect
choice logic into the same class, WifiNetworkSelector.

Set a candidate ScanResult for every WifiConfiguration in
SavedNetworkEvaluator, regardless of whether it is externally scored.
This ensures that the user connect choice is respected if an externally
scored network is selected by a user over a secure saved network.

Bug: 34971941
Test: ./runtests.sh
Change-Id: I8730aee89dbee0ebb97161a56f00c026139ef5c9
ndroid/server/wifi/SavedNetworkEvaluator.java
ndroid/server/wifi/WifiNetworkSelector.java
de7607b217ca46152a34f578f20735d8b2881025 08-Mar-2017 Randy Pan <zpan@google.com> Log association rejection event

Bug: 34280407
Test: build and boot

Change-Id: I5264ef5762b97a77fa6dd6e9b03c043e452ba6bf
ndroid/server/wifi/WifiStateMachine.java
c016ddb04241e43d63b1bdde8a33d81f8c662d15 08-Mar-2017 Roshan Pius <rpius@google.com> Merge changes from topic 'raw_psk' am: 1f5fa78215 am: a528767237
am: 53ae304c75

Change-Id: Iaa9aec2860db7ac8ad64015e3bffbd22ce370984
b16313e509350e1fa7a150d0ed4e88fe9ff5d78d 08-Mar-2017 Roshan Pius <rpius@google.com> SupplicantStaNetworkHal: Add support for raw psk am: f50550926a am: a2bf881173
am: 70d7247944

Change-Id: If5537a9f57764b8a76f8fa6278559d2bf0a63962
f50550926a7bddc24adf822876f35812d7d8c7be 07-Mar-2017 Roshan Pius <rpius@google.com> SupplicantStaNetworkHal: Add support for raw psk

|config.preSharedKey| can either be a quoted ascii passphrase or a raw
psk hexstring. Handle these 2 scenarios and call the corresponding HIDL
methods.

Bug: 36013886
Test: Added Unit tests
Test: Connected to networks with both raw psk and passphrase.
Change-Id: Ifaf31a7ce864aa0f6e86020ec5207ea8dee09205
ndroid/server/wifi/SupplicantStaNetworkHal.java
ndroid/server/wifi/util/NativeUtil.java
a63ab49c1d20d7a698537b5253d172a8dffc235f 07-Mar-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Add quotes back for psk

For user's who lost the quotes around their ASCII psk passphrase, add
them back to be backward compatible.

Bug: 36008106
Test: Unit tests
Test: Verified manually updating a device which had previously
lost it's quotes around psk.
Change-Id: I6ef8ea2059ff044ba9e57d46bb50aa5ee7dcad9b
ndroid/server/wifi/WifiConfigManager.java
dc45bf068bbe0f52495f52880211acf5c5cf0c3f 08-Mar-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Add data-path security configuration (Passphrase)" am: df5dc451ff am: aa521d868f
am: d79b1f17e6

Change-Id: I2a2cae5f6a157942edc9135ffda42df7bbbbcf14
df5dc451ffe849d3dc2f3d6cb6e2360690a3c9a9 08-Mar-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Add data-path security configuration (Passphrase)"
3b186d20cd1337c7f5221ac1622554af4961dc5a 08-Mar-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Update agent initialization to provide valid link properties" am: e8b70faa6c am: 43053f2f94
am: 2722e40f53

Change-Id: If8ab0507326917f7345299e31bb7c392a24aa28e
e8b70faa6cdcb96ded670444696f0861c60031a5 08-Mar-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Update agent initialization to provide valid link properties"
31389a22a6f12b12cca89d53b5f9f80fdcd76385 21-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] Add data-path security configuration (Passphrase)

Add support for Passphrase-based security.

Bug: 33552694
Test: unit tests and integration (sl4a) tests
Change-Id: Id883367f79ca38501e8670097a31245f048e5d71
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareNativeApi.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
6f8030b6e550cffe6bea94a14c06173aeae0b873 08-Mar-2017 Etan Cohen <etancohen@google.com> [AWARE] Update agent initialization to provide valid link properties

Update the agent creation/initialization to provide a valid link
properties and remove a separate update of link properties. This
guarantees that the onLinkProperties will be called with a non-NULL
interface name and will only be called once.

Bug: 36040991
Test: unit tests and integration (sl4a) tests.
Change-Id: Ib5d00ad0c3c041bc662ce8cbfae993b662ad4716
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
2dd3ff6d7ed63bf937beaacac7465a5f3bc7d34b 08-Mar-2017 Roshan Pius <rpius@google.com> Merge "[WifiVendorHal] Send the gscan bucket idx from request" am: f3b6e59f64 am: e02cf7931b
am: e31ab64d7f

Change-Id: Ie5d5b09c032f9ef873041508f79ea88b5cae1843
bb046dce743136bc126dfa1df6556a9263c8933b 08-Mar-2017 Roshan Pius <rpius@google.com> Merge "SupplicantStaIfaceHal: Add timedOut param in assoc reject" am: 412585c194 am: 7f27c5759c
am: 066d462250

Change-Id: I496919d435353028894f1f31d560bf02d97ab4e1
f3b6e59f6418e7353559b0b8edfc98919056185b 08-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "[WifiVendorHal] Send the gscan bucket idx from request"
03cc8ee172c10050dbcd4bc928cdbed09e66ebcc 08-Mar-2017 Roshan Pius <rpius@google.com> Wifinative: Fixed a missing plumbing to vendor HAL am: 58374056df am: b94dfdec95
am: 827018bdc9

Change-Id: I13e0a6a54d943ad5353738f38d9562cf25c0e4a5
412585c19416b8574fc98a10be44b4ff6e7d86fd 08-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "SupplicantStaIfaceHal: Add timedOut param in assoc reject"
6680c62f91f61660d47c34ae435113ca5846b79d 07-Mar-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Add timedOut param in assoc reject

Bug: 34280407
Test: Compiles
Change-Id: I966da67dfd24b75ac90f63b71249df16e1cd0238
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/WifiMonitor.java
f1d80d9ef642a1adaa5ca51ada06f199b4d19e1d 07-Mar-2017 Roshan Pius <rpius@google.com> [WifiVendorHal] Send the gscan bucket idx from request

We can't rely on the ordering of these buckets to populate their
indexes. So, send them explicitly from the caller.

Bug: 35989680
Test: Compiles
Change-Id: Ie0569d8e7dc0723888972136066831f67677d247
ndroid/server/wifi/WifiVendorHal.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
ndroid/server/wifi/WifiNative.java
391f7749a6c8d6c45a62263f4cfcd0cfd3b2baee 08-Mar-2017 Michael Plass <mplass@google.com> Merge "[WifiVendorHal] Unit tests for logging" am: 5f97aaf9d5 am: e1b16332af
am: 79dfb8b39b

Change-Id: Ic0937953a51da7560bf6e72b5118f430a8defe95
644c4e1e673b69e8eaf8699334db452fe37284ed 08-Mar-2017 Roshan Pius <rpius@google.com> SupplicantP2pNetworHal: Add method to load Groups am: eed5100c0a am: d30052799e
am: 70af534d01

Change-Id: I2b3fe46f6413383479bf93504b375364be061319
5f97aaf9d5fccda252cedcf5b7b2fc18dc05ba12 08-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "[WifiVendorHal] Unit tests for logging"
eed5100c0a64dc8d12651226bb9fd2fad4b2891b 04-Mar-2017 Roshan Pius <rpius@google.com> SupplicantP2pNetworHal: Add method to load Groups

Bug: 35765841
Test: Add unit tests
Change-Id: If6a993f9cf8318efe01e7f4eeb40b0bd2347d27d
ndroid/server/wifi/SupplicantP2pIfaceHal.java
ndroid/server/wifi/WifiNative.java
622fa1247e4fdbc588e9ff15ea36e5f1adb50a62 07-Mar-2017 Ningyuan Wang <nywang@google.com> Request Pno scan via wificond and re-enable pno scan am: 04c453c2e0 am: aa4cd04469
am: d591170013

Change-Id: Ie9b5bac0c47e7dc2faee7efec73e3597aa1e7c3e
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
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WificondControl.java
ndroid/server/wifi/scanner/SupplicantWifiScannerImpl.java
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
8dfa1a2e88781c773cb1ce79a1d4b72cc45c5c04 06-Mar-2017 Michael Plass <mplass@google.com> [WifiVendorHal] Unit tests for logging

- enableVerboseLogging
- boolResult w/ verbose
- Enter w/ verbose
- RemoteException handling

Also remove noteHidlError and its one remaining caller

Rename mLog to mVerboseLog, mErrLog to mLog

Test: These are tests
Bug: 33384303
Change-Id: I9b1268905d2ffaaebbe318853f0bf2e8357b3aa7
ndroid/server/wifi/WifiVendorHal.java
6e6ad435e4217760c41bbfc37d904189f43a1d57 07-Mar-2017 Rebecca Silberstein <silberst@google.com> Merge "FrameworkFacade: add helper to ease testing" am: 512a8e7d5d am: 704c2b9d82
am: 39bc608d90

Change-Id: I449ce7df69551d65595eac093616dbc7b99d1a73
512a8e7d5d8d924d5895ea649e0e1e8953709bfe 07-Mar-2017 Rebecca Silberstein <silberst@google.com> Merge "FrameworkFacade: add helper to ease testing"
34a36c245f9e070f1559ef689feef36f38d1189a 07-Mar-2017 Paul Stewart <pstew@google.com> Merge "Perform null check on replyTo" am: f080a27326 am: 10e897c827
am: 71394364cc

Change-Id: I12f5b3bc3b0a009804462027fe9a2d2706188026
f080a273262cab85de58c7814fe197853bb810ad 07-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Perform null check on replyTo"
1e44a32b052ef9f4d566cadebed5fd5a8c2ef100 07-Mar-2017 Roshan Pius <rpius@google.com> WifiNative: Use Vendor HAL for mode change am: 3a0679d411 am: 192c3a219f
am: f368fff8ac

Change-Id: Ib880f2356eaafebbf4967c95eab7d061084c84a3
b7ed5b09e84b344c0e7ea46d079f4729675940a0 07-Mar-2017 Roshan Pius <rpius@google.com> WifiNative: Turn on supplicant/vendor HIDL Interface am: 3b7def108e am: ebceaa270d
am: 6fcc23041f

Change-Id: Ib10a3e2e16dad322369a7b83a9fbc596fa50321f
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/WifiNative.java
e1d14389cd77b0757ba3533b122cf00ad65e2099 07-Mar-2017 Paul Stewart <pstew@google.com> Perform null check on replyTo

Do not try to respond do a null replyTo.

Bug: 35642134
Test: Compile
Change-Id: Iffbcd3afe3b40ce77728eceb02352a4ac790a2bd
ndroid/server/wifi/WifiServiceImpl.java
2a70519406937402c761a6ce418c15e3b5598688 04-Mar-2017 Rebecca Silberstein <silberst@google.com> FrameworkFacade: add helper to ease testing

WifiController, RecommendedNetworkEvaluator and SavedNetworkEvaluator
all use ContentObservers in their implementations. The tests for these
classes started failing when a change was made to include the Context
object when registering ContentObservers. This changed caused the tests
for these methods to fail due to a mix of mocks and actual objects.
This CL adds a helper to FrameworkFacade that allow the tests to pass,
and even better, updates them to use ArgumentCaptors to get a handle on
the ContentObservers. This will allow the tests to be enhanced and
easily call the observers to test functionality for changes related to
the observers.

Bug: 35908602
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I2e4a39febf575c1335cec57b9e21e28cb3e0fffd
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/RecommendedNetworkEvaluator.java
ndroid/server/wifi/SavedNetworkEvaluator.java
ndroid/server/wifi/WifiController.java
94f9f7fade309e61560a28512a9b6b70d5b8ddf9 04-Mar-2017 Roshan Pius <rpius@google.com> WifiSupplicantControl: Add missing null check for psk am: c7ddffabcd am: dacf980039
am: 3f0f47d2f2

Change-Id: Ib2371157a5da9761894ca7b75b6eb03cae026aa2
c7ddffabcd191c2bfd251b3d5d321e6e8f1d0bd3 04-Mar-2017 Roshan Pius <rpius@google.com> WifiSupplicantControl: Add missing null check for psk

Test: Compiles
Change-Id: I9968950a73527c23ad576eac8a8405d6aec309b4
ndroid/server/wifi/WifiSupplicantControl.java
b48682b2268fbee514a61110825d8cb9be1ea8f2 04-Mar-2017 Roshan Pius <rpius@google.com> WifiSupplicantControl: Add quotes if missing for psk am: 6282157dd2 am: 7c096841ad
am: 43cfc3d8ef

Change-Id: Ib671fc7dd9d179b90b46374f8d6223dd695ff593
6282157dd238a83e33ebd172f9c85fd97d87983e 04-Mar-2017 Roshan Pius <rpius@google.com> WifiSupplicantControl: Add quotes if missing for psk

Bug: 35959992
Test: Modified the config to remove quotes and ensured that we can still
connect.

Change-Id: I20bd6940cba17b7fbb7db36b89461ace730f14d1
ndroid/server/wifi/WifiSupplicantControl.java
d9aedb83cb46330fcc288348c9b3d03c45b0715c 03-Mar-2017 Roshan Pius <rpius@google.com> HalDeviceManager: Store death recipient object am: 3b2c0d62fe am: 5cc58ec17e
am: b82e7e2177

Change-Id: Ibddf81f8e3ccec7f66320fb42ef6a213caba2521
3b2c0d62fe9fcfe5cc3a7e2a3eece6161b9bb33a 03-Mar-2017 Roshan Pius <rpius@google.com> HalDeviceManager: Store death recipient object

These might get garbage collected otherwise.

Bug: 35950529
Test: Unit tests
Test: Killed the hal and ensured that we detected it.
Change-Id: I498fa745042fd2f8e0be736f68398ddd1ba2a8de
ndroid/server/wifi/HalDeviceManager.java
3832ea04250a844f8ef8b7d66c2355bcca5ffbd6 03-Mar-2017 Roshan Pius <rpius@google.com> SupplicantHal: Store death recipients am: f42911bc9a am: 642337d191
am: 57f8726994

Change-Id: I204b12af49f011ab186d5fd7fb2c0ff72a9470f1
8dbb67c19ef09e0b4f063daf04990f56b0a3d2d1 03-Mar-2017 Roshan Pius <rpius@google.com> SupplicantP2pIfaceHal: Port over link to death handling am: 60ef62896e am: ef5e354df3
am: 3893f2596a

Change-Id: Ica3d7b5487681ec5a59f1ec20bfc885b4f264eac
f42911bc9a921c28ce1614c3513e088e755a55f0 03-Mar-2017 Roshan Pius <rpius@google.com> SupplicantHal: Store death recipients

Also, Removed an unused flag from SupplicantStaIface.java.

Bug: 33383725
Test: Unit tests.
Test: Killed wpa_supplicant on the device and ensured the callbacks are
invoked.

Change-Id: I62ec2459ad552bca95c9f9b96032c936c14461fb
ndroid/server/wifi/SupplicantP2pIfaceHal.java
ndroid/server/wifi/SupplicantStaIfaceHal.java
88bc9a07efbd9f7c5315a1429e0f15d9679a0a60 03-Mar-2017 Roshan Pius <rpius@google.com> WifiNative: Separate connect to supplicant am: fdffec5da7 am: 83f01d49b2
am: 3c3c015e4e

Change-Id: Ife68838753efbe1a6e9bc0a87600b27ce19c9434
0edd40b00cdffb5557cce9a217b5f439ffcdfee8 03-Mar-2017 Roshan Pius <rpius@google.com> Merge "SupplicantStaNetworkHal: Fix wep key handling" am: 8db1eb8b2a am: f9eae27d2d
am: 6a113612f2

Change-Id: Ia2b8bae920265286c2c4bc1d45bade18ffe25537
60ef62896e60b41a36a73f4a58d1281084b7181a 03-Mar-2017 Roshan Pius <rpius@google.com> SupplicantP2pIfaceHal: Port over link to death handling

Port over the link to death handling from StaIface.

Bug: 33383725
Test: Compiles
Change-Id: I6a7c60ea759d638fe315b04ba9831b9bf90bd0a6
ndroid/server/wifi/SupplicantP2pIfaceHal.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
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
8db1eb8b2a062d749116e7aba6c018c594f27a23 03-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "SupplicantStaNetworkHal: Fix wep key handling"
e45189e28420d99165d1fa33b4b435dce40781b0 03-Mar-2017 Peter Qiu <zqiu@google.com> Merge changes I88feac77,I6a8f2695,Idcd85832,I565e9dce,Iab005d98 am: 36625b693e am: b8da292103
am: 36175fea35

Change-Id: Ib7ee093a4f796501a6371efe520c0c97cf5a74ed
36625b693ef5da6aa14e9ea0e3581262803795b7 03-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge changes I88feac77,I6a8f2695,Idcd85832,I565e9dce,Iab005d98

* changes:
hotspot2: synchronize Passpoint configuration changes through WifiStateMachine
WifiConfigManager: setup user store when loadFromStore is triggered after user unlock
hotspot2: migrate legacy Passpoint configurations
Create user store when migrating legacy configs
hotspot2: PasspointProvider: update semantics for certificate and key alias
0bc656fdf4894002a447525d8a07fcb337ae041b 03-Mar-2017 Randy Pan <zpan@google.com> Merge "Remove unregisterNetworkEvaluator()" am: d7e6cea32c am: d46021fce1
am: 66af2ea8c4

Change-Id: Id4cf8cb3549fa9031e7d7f0bb014b304ad357b7e
d7e6cea32c1b8ff5dfe9ffeed3ba4e02655e3b4e 03-Mar-2017 Randy Pan <zpan@google.com> Merge "Remove unregisterNetworkEvaluator()"
f2eda490dc6410557f0ff9bcbd8ec5a85ed9aef1 03-Mar-2017 Michael Plass <mplass@google.com> [WifiVendorHal] Logging for module am: a89f52e241 am: 992fd1ae08
am: fd9df5c7b8

Change-Id: I95f7e230f72b23c0bdd757a9cbe4798e3853903e
6a8908d2bc0367397eb92444ac78cc8d43160ef6 03-Mar-2017 Roshan Pius <rpius@google.com> SupplicantStaNetworkHal: Fix wep key handling

According to our public documentation, the wep keys can either be a
quoted ASCII string or a hex string. Since this is similar to the SSID
field, rename the helper function in NativeUtil to reuse for both.

Bug: 35907939
Test: Fixed unit test input for wep networks and validated existing
WEP related tests pass.
Change-Id: I180b9261252dc5745fa3e30e4bc980cde054ba2a
ndroid/server/wifi/SupplicantStaNetworkHal.java
ndroid/server/wifi/util/NativeUtil.java
81726ba6e9a66b8f5aa50002fdee1dcdac23c9ad 03-Mar-2017 Randy Pan <zpan@google.com> Remove unregisterNetworkEvaluator()

This method is not being used at all.

Bug: 35753614
Test: builds

Change-Id: I2b91cca0ee6e17fa18e2b6a85d4234efd4824975
ndroid/server/wifi/WifiNetworkSelector.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiVendorHal.java
535b7b48ea4afe7baae806407ccc87e3570a6213 02-Mar-2017 Roshan Pius <rpius@google.com> Revert "Turn on supplicant's HIDL interface" am: 5219690b05 am: 47d803158b
am: bf3f565044

Change-Id: I07eaf0dc08176aa5ffce924cfe5aed7d4d17423a
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
ndroid/server/wifi/WifiNative.java
dd97694345f47ba6a952c1162e7dcdd66fb72060 24-Feb-2017 Peter Qiu <zqiu@google.com> hotspot2: synchronize Passpoint configuration changes through WifiStateMachine

This is to avoid any race conditions so that all Passpoint configuration
changes and use of those configurations will be done in the WifiStateMachine
thread.

While there, initiate a disconnect when removing a Passpoint provider and
the current connecting/connected network is provided by that provider.

Bug: 33200134, 34202139
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually remove the Global Reach Passpoint profile while the
phone is connected to its network, verified that the profile
is removed and the WiFi connection is torn down

Change-Id: I88feac77d3c1c1836d651df09d01142b73489c54
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
040829fe448045d12cbc90f6143aca7da6b5aa80 23-Feb-2017 Peter Qiu <zqiu@google.com> WifiConfigManager: setup user store when loadFromStore is triggered after user unlock

Instead of performing an user unlock/switch logic after reading from
the store, we only need to setup the user store for the current
user before performing the read.

Bug: 35675098
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I6a8f2695d53c8a2ea8589e64c9dd8e867ae5415e
ndroid/server/wifi/WifiConfigManager.java
5e4822d5dba15e45c5ff43dfba3ac7803b3f4e28 23-Feb-2017 Peter Qiu <zqiu@google.com> hotspot2: migrate legacy Passpoint configurations

When the legacy Passpoint configuration is read from the legacy
store, it will represented as WifiConfiguration and stored in the
share store. When the owner of the legacy Passpoint configuration
logs in, the configuration will be converted to PasspointConfiguration
and added to PasspointManager, then persist to the user store in the
new format.

Bug: 34206769
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually upgrade a bullhead containing Boingo and Global Reach
Passpoint profiles from N to O, verify configurations are
maintained and still able to connect to those APs

Change-Id: Idcd858326968463cea0cdc99452ba67b13d2ac77
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointProvider.java
498d406fbe956b1b9789a8739f6d7de9caaa851c 23-Feb-2017 Peter Qiu <zqiu@google.com> Create user store when migrating legacy configs

Currently, at the time when the migration starts, the user
store for the current user might not have been initialized.
This can happen if the user unlock before the config store
is ever read after boot.

To fix it, we will setup the user store for the current user
if it is not setup yet, before persisting the migrated data
to the config store.

While there, fix a bug when retrieving the password for
enterpise config from the legacy wpa_supplicant.conf file.
The password stored in that file is enclosed in double quotes,
and when we set the password in WifiEnterpriseConfig double
quotes will also be added. This results in the password being
enclosded in duplicated double quotes. So fix it by removing
the double quotes when retrieving the password from
wpa_supplicant.conf file.

Bug: 35675098
Test: frameworks/opt/net/tests/wifitests/runtests.sh
Test: manually updating a bullhead from N to O and verify
user specific configurations are migrated

Change-Id: I565e9dcea8c45ba21595c18161cb976fbb472bd0
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiConfigStoreLegacy.java
8c22a001ebe4537fe5c0da1112e256dbd9d55ae7 17-Feb-2017 Peter Qiu <zqiu@google.com> hotspot2: PasspointProvider: update semantics for certificate and key alias

Instead of using the full name for the installed certificate and key as the
alias, use the suffix of the name (without the certificate or key type).
This will make the certificate/key alias meaning consistent with the usage in
WifiEnterpriseConfig.

This will make it cleaner/easier for converting the legacy Passpoint configuration
to the new one.

Bug: 34206769
Test: frameworks/opt/net/tests/wifitests/runtests.sh
Test: manual testing using a Boingo profile
Change-Id: Iab005d98f83c9e217f87ab780787bdcc618b6509
ndroid/server/wifi/hotspot2/PasspointProvider.java
8006fd4fda3a4822106bf3e9f536ee2fd980d7a8 02-Mar-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Add null checks for WPS methods am: 913bcdf2c0 am: bcba994369
am: 93fa84add4

Change-Id: I5745b84ec2e6360dc0b213c945f454729fc51e9b
3ee734c61a1fe1603cd0d201fcaff853df642596 02-Mar-2017 Roshan Pius <rpius@google.com> Merge "SupplicantStaIfaceHal: Handle exceptions during network load" am: f7c9cd613e am: 25125a918a
am: dbe5160946

Change-Id: If79b552026cdb5bf1ca4fcdbbf17f8277ae5c3fa
913bcdf2c0c37a04735e7401037e729496aae021 02-Mar-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Add null checks for WPS methods

Bug: 35922006
Test: Unit tests
Change-Id: I0d10e23422f45ced464ee2f3a66f6fbc59424a00
ndroid/server/wifi/SupplicantStaIfaceHal.java
f7c9cd613efb753f3dfdddfaf57bcd1f368f9730 02-Mar-2017 Roshan Pius <rpius@google.com> Merge "SupplicantStaIfaceHal: Handle exceptions during network load"
a859d834edbba90793c2ff36ce2d579cac617786 02-Mar-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Handle exceptions during network load

To guard against the wpa_supplicant.conf having some invalid/unsupported
values, handle exceptions in framework and skip such networks instead of
crashing the entire system and failing the entire migration of data out
of wpa_supplicant.

Bug: 35915083
Test: Added unit tests
Change-Id: Ic7df2f144c34814e830eb1f48ff2204890fd83ea
ndroid/server/wifi/SupplicantStaIfaceHal.java
2b049b9b8fa0022aba08c4b78e92a31127919712 02-Mar-2017 Ningyuan Wang <nywang@google.com> Stop supplicant using wificond am: d3014b79dd am: 60de444a45
am: d0d14e791f

Change-Id: I1b69b1000b8eba4a8fe85ca8ab78b9abe8114ba3
d3014b79dd46393cd22fc566937878a738c392a5 01-Mar-2017 Ningyuan Wang <nywang@google.com> Stop supplicant using wificond

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

Change-Id: Ied15d8d39c8c3a09f1917bf13afe3d2b1ed1b8dc
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
7ddbd08cc148278b39685370b0d649e9c1e1ed00 02-Mar-2017 Mehdi Alizadeh <mett@google.com> WifiStateMachine: Return Succeeded when connecting to the same network am: f91a96259d am: 8de7c6005d
am: e7a3a0378b

Change-Id: Iddd9de7a9ecf2ba9b3d6b1be571dcf95e55c9252
f91a96259d1fbdfb9af907dd20cf905a8da3a119 21-Feb-2017 Mehdi Alizadeh <mett@google.com> WifiStateMachine: Return Succeeded when connecting to the same network

If a caller sends connection request to connect to an already connected
network, we reply with a CONNECT_NETWORK_SUCCEEDED message.

Added one unit test in WifiStateMachineTest that creates and connects to
a network, and then tries to reconnect to the same network.

Bug: 35360668
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: I00da335c50f2c98de4ea12a59e927a0af0a54728
ndroid/server/wifi/WifiStateMachine.java
d2aff7b81569c6672259c758f7570e515fe43238 02-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "IServiceManager/ITokenManager uses "default" service name"
c4a0ee36313c4cabd453cd4b3080099b9909deed 02-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "IServiceManager/ITokenManager uses "default" service name"
d7c6593969fd73e7e85ff885d06df541ca360d32 01-Mar-2017 Ningyuan Wang <nywang@google.com> Log the number of filtered scan results am: f82729c2cd am: a4d4ce37f6
am: 13c13a8b47

Change-Id: Ide2eb41535870f9095e5896933ca85edf0c42295
006eb17e06a7843e3da3bf939833b94e58a5a034 25-Feb-2017 Yifan Hong <elsk@google.com> IServiceManager/ITokenManager uses "default" service name

The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: boots
Test: hidl_test

Bug: 33844934
Change-Id: I80d35dcd87ebc42c8d60682f03a69111898a4268
ndroid/server/wifi/HalDeviceManager.java
ndroid/server/wifi/SupplicantP2pIfaceHal.java
ndroid/server/wifi/SupplicantStaIfaceHal.java
dd2434e5075a5459d6daad3ae3adfbd06f67344a 25-Feb-2017 Yifan Hong <elsk@google.com> IServiceManager/ITokenManager uses "default" service name

The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: boots
Test: hidl_test

Bug: 33844934
Change-Id: I80d35dcd87ebc42c8d60682f03a69111898a4268
ndroid/server/wifi/HalDeviceManager.java
ndroid/server/wifi/SupplicantP2pIfaceHal.java
ndroid/server/wifi/SupplicantStaIfaceHal.java
f82729c2cda359ebebffe8ea11d2fa95ada8486c 01-Mar-2017 Ningyuan Wang <nywang@google.com> Log the number of filtered scan results

Bug: None
Change-Id: Ie6d969daca5e853e12de85958088ef168428e1f4
Test: compile, unit tests
ndroid/server/wifi/scanner/SupplicantWifiScannerImpl.java
6fd6386a72bdaae0f49ba73a46d54586fa509c03 01-Mar-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: merge scan mode handling am: 63e847ec06 am: 06f8539687
am: 7c32655846

Change-Id: Id81b879b56032b77d502864690987dce34829c98
6e162efa5492e45338148c2c5937e1c61abd4e80 01-Mar-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Add data-path security configuration (PMK)" am: c54a84b3ae am: e174dffb4b
am: e9d6941de2

Change-Id: I92a423c914870072384397e1da3597633b6ffc60
63e847ec063cdb7567e242104f25352745393707 16-Feb-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: merge scan mode handling

There are two flavors of scan mode that are not handled consistently.
This causes issues like wifi being reported as enabled when it is
disabled.

This CL merges the two scan mode options. SCAN_ONLY_MODE and
SCAN_ONLY_WITH_WIFI_OFF_MODE both are now handled the same way in
WifiStateMachine and will report wifi as disabled (when ScanMode is the
operational state). There will not be special handling between the two
modes. Full cleanup will be done with the WifiStateMachine refactor.

An update to the scan mode transition to connect mode was also cleaned
up. With the cleanup of the connect mode enter method, we now set wifi
enabled, notify p2p and also no longer need to load the configs. These
calls were removed since they are now redundant.

A test was added to check the wifi disabled/enabled state for the
operating modes of connect, scan, softap and disabled (not a real state,
but implemented as the InitialState). A helper function was also added
to advance the state machine thru SupplicantStarting and
SupplicantStarted states. One test name typo was also fixed.

Bug: 33367804
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: passed wifi integration tests
Change-Id: I9d2c2c898a36f8029a108bda5b8a9aabef9c4762
ndroid/server/wifi/WifiStateMachine.java
c54a84b3aeab3634c68e74d4decfb3bf106e4918 01-Mar-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Add data-path security configuration (PMK)"
dca73b1c22819447b516709329f056f8f99d47cc 01-Mar-2017 Tomasz Wiszkowski <ender@google.com> Merge "Additional checks for NPE and corner cases." am: 3a7ec4c5ab am: c373633add
am: 5fff2615ae

Change-Id: I30cc75b04a73f556c3bd2da15ddccff98571e116
3a7ec4c5abde2d025b368bbfc5478ce3da8502af 01-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Additional checks for NPE and corner cases."
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
ndroid/server/wifi/WifiNative.java
e91fc23c66a61437973a07eb0a31338a53b432aa 01-Mar-2017 Roshan Pius <rpius@google.com> Merge "[WifiVendorHal] HIDL interface changes" am: 858611a45c am: 35bf0d6fb3
am: e29318f901

Change-Id: I91180a2c82988afcebae103bad38b9a48fc22ca1
858611a45c914fe8704b5f29406f3ff5642faa79 01-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "[WifiVendorHal] HIDL interface changes"
0505a61812128ae5635b26d821659d6e04914467 01-Mar-2017 Roshan Pius <rpius@google.com> Merge "Move listNetworks parsing from WifiP2pServiceImpl to WifiNative." am: 851571240f am: 324d57ddd6
am: 7246e1c9f8

Change-Id: Iaa3d95666fa9719418cbcbd2d55446b26f6232ee
851571240f14a4006b8e28c5b0b9b822738fe585 01-Mar-2017 Roshan Pius <rpius@google.com> Merge "Move listNetworks parsing from WifiP2pServiceImpl to WifiNative."
6b1dfdb05b07e485cf510d3cc393cb0ca7b9d9ef 28-Feb-2017 Roshan Pius <rpius@google.com> [WifiVendorHal] HIDL interface changes

Changes:
1. Added bucketsScanned parm for full scan results
2. Added stopLoggingToRingBuffer

Bug: 34899890
Test: Unit test
Change-Id: I3aa1a79bba0cb4dc675e42e46456c829a4c68a9c
ndroid/server/wifi/WifiVendorHal.java
5b8e162eccbe82a86f5484861da0cbfd4f1ace23 28-Feb-2017 Roshan Pius <rpius@google.com> Merge "[WifiVendorHal] Invoke callbacks outside lock" am: 80a396b209 am: fa8dac1a0b
am: f7630c14f4

Change-Id: Ia082b2483bc9a18d8afb1fa7db31df5e4ddaf11f
861b017bba4b65aeb3c38c4889370ed542df8ab0 28-Feb-2017 Paul Stewart <pstew@google.com> Fix initialization order of mJavaRuntime in WifiInjector am: e21d6b71b5 am: 675c2a94c2
am: bbaa779442

Change-Id: Idce466b2136c8199e770d8d6321b473f7a4c6790
80a396b2095fc7080d830b51ef8402ff99fcc5b0 28-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "[WifiVendorHal] Invoke callbacks outside lock"
e21d6b71b5480dfc7f539a6f73a5f9f046fb5b2e 28-Feb-2017 Paul Stewart <pstew@google.com> Fix initialization order of mJavaRuntime in WifiInjector

As of commit 3bbf564af91515b33fcba33e7039ffe09c8c025c, the
WifiDiagnostics object depends on having mJavaRuntime initialized
in WifiInjector at the time of its constructor. Since
WifiStateMachine creates WifiDiagnostics, we must initialize
mJavaRuntime before then.

Bug: 35831093
Test: Replicate scenario of b/35831093
Change-Id: I1a943babf50231ef5f09023e23f78bc439565a8a
ndroid/server/wifi/WifiInjector.java
0b34f840252ed529f926a5952fa05e7f7f0494dc 28-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Data-path negotiation update" am: 738444f3a6 am: d592f78bee
am: 28e2d1d927

Change-Id: Iaf6128b67d113073868789b8f698a7c5b25542cc
738444f3a60f56fda5eeba926c065fc0e82f5012 28-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Data-path negotiation update"
83cb72e2f3739c702ef3c1addb0016cbd2e09cdd 28-Feb-2017 Tomasz Wiszkowski <ender@google.com> HIDLization of WifiDirect, stage 3: callbacks. am: d3c761e72a am: 5ec375f281
am: 797e1b7933

Change-Id: I54d1420252942cba2f46b50eb6101cbe780cc026
97d88a5da912a69a90a56583262c5a84b2dad5ad 28-Feb-2017 Roshan Pius <rpius@google.com> [WifiVendorHal] Invoke callbacks outside lock

This might cause a deadlock if some external module
invokes a WifiVendorHal method from within the callback.

Bug: 35765841
Test: Unit tests
Change-Id: Id4a0163e53a0bb9e434c46511f4aaeeb1b1faf02
ndroid/server/wifi/WifiVendorHal.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
d3c761e72a5f89c81bd74889a9fec663adcc491e 08-Feb-2017 Tomasz Wiszkowski <ender@google.com> HIDLization of WifiDirect, stage 3: callbacks.

Callback class crafted to be compatible with legacy code.
Several calls currently generate no action (never used before).

Change-Id: I1e1d94fd23dfb069cd387bc511c979ebeb2e72cf
ndroid/server/wifi/SupplicantP2pIfaceCallback.java
ndroid/server/wifi/SupplicantP2pIfaceHal.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiMonitor.java
56a8ff2e077bdbcd1511ad48c05df99c4d8ae300 28-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Remove ExternalScoreEvaluator."
c74b357ac852c9131ff39237043ee594e8044e1c 28-Feb-2017 Roshan Pius <rpius@google.com> WifiNative: Refactor for WifiVendorHal integration am: 520fbe7db0 am: 935407f2ba
am: dabb5e5f56

Change-Id: I3732d385ad3f2421d5d8c1ec7edf9adc1090acc1
084de8d87f0c1f018faac4f518a0c5e4a92f7169 28-Feb-2017 Roshan Pius <rpius@google.com> [WifiVendorHal] Handle set/reset log handler am: 1514ed2b37 am: 1fc7aa5f3c
am: e5ba999c97

Change-Id: I09ff5c6431e2d142e22149bf33eb9c73e9aacc1e
29ba6469cbc244abefd11ba433b6ba7178d2f975 28-Feb-2017 Roshan Pius <rpius@google.com> [WifiVendorHal] Bgscan callback handling am: d4c5eca00c am: d1d0e17288
am: c05fa6ed0f

Change-Id: I0831178adb5c885529e1bf8de5da2ab6b6dfad86
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
ndroid/server/wifi/WifiNative.java
1514ed2b37ca20f14990c9a605a576632300649b 24-Feb-2017 Roshan Pius <rpius@google.com> [WifiVendorHal] Handle set/reset log handler

Bug: 34901821
Test: Unit tests.
Change-Id: I4965225b78e2046c3cf0bfc1b15b4545a5e44ae0
ndroid/server/wifi/WifiVendorHal.java
d4c5eca00c9cae55561210479ed61a977923e0da 24-Feb-2017 Roshan Pius <rpius@google.com> [WifiVendorHal] Bgscan callback handling

To preserve current API surface exposed by WifiNative to Wifiscanner,
cache the scan results received and simulate the necessary scan events
to WifiScanner. We can cleanup this along with scanner later.

Also, fixed a couple of other nits.

Bug: 34899890
Test: Unit tests

Change-Id: I9b6ce2e5e7d72be0b058de6c335bd80829f2cc78
ndroid/server/wifi/WifiVendorHal.java
d174dec48abc57d26bd0c21a32c155fc828d3a83 04-Feb-2017 Amin Shaikh <ashaikh@google.com> Remove ExternalScoreEvaluator.

Also remove WifiNetworkScoreCache usage from the wifi framework and
instead maintain a cache of requested WifiKeys.

Bug: 33694078, 19948759
Test: ./runtests.sh
Change-Id: Ib4ba372f0fd4802d111a4f1ab609a26a4f34c399
Merged-In: Ib4ba372f0fd4802d111a4f1ab609a26a4f34c399
ndroid/server/wifi/ExternalScoreEvaluator.java
ndroid/server/wifi/RecommendedNetworkEvaluator.java
ndroid/server/wifi/WifiInjector.java
45ffdefa24da3b0534bd33dacdf9fa6c04abad6c 28-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove ExternalScoreEvaluator."
3f195e55789b1277f37c4a3fb0eff96f4f64d85e 28-Feb-2017 Paul Stewart <pstew@google.com> Merge "Provide SIM identity for PEAP/SIM configurations" am: bdfeb91af1 am: 95a3bca31b
am: 3be34f9a9a

Change-Id: I3a8cdac899fd301b9c78ee8fe0f126d5ee1dd1d6
bdfeb91af1b24703aabb72f1f33ed533e93880a9 28-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Provide SIM identity for PEAP/SIM configurations"
f7b23f5b785120d054ed44819179375f2f4ce558 28-Feb-2017 Mukesh Agrawal <quiche@google.com> Merge "WifiDiagnosticsTest: stub out call to logcat" am: cb95c994c6 am: 50a8cf6480
am: 8fd4072987

Change-Id: I33cdf96f60b133a2c866feab3c106509308937db
cb95c994c65b05c6ad5fd63ddfb62b8d940e5bb1 28-Feb-2017 Mukesh Agrawal <quiche@google.com> Merge "WifiDiagnosticsTest: stub out call to logcat"
c5765899429b6fab77539c19a8fc8a2ffd7f38f6 28-Feb-2017 Roshan Pius <rpius@google.com> Merge "Turn on supplicant's HIDL interface" am: 1cc63e1fe5 am: 304e3635be
am: 191b30be71

Change-Id: I003947404680c571317e1171541a681890930fd8
1cc63e1fe57ffbf5accc297809afd5b7321521e9 28-Feb-2017 Roshan Pius <rpius@google.com> Merge "Turn on supplicant's HIDL interface"
69eb934f563ac0099113bf24587c729df25b15bf 21-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] Add data-path security configuration (PMK)

Modify the data-path configuration to use the (optional)
PMK to configure security on the data-path.

Remove the old 'token' usage. While that information is
available from the HAL it doesn't provide any security
functionality.

Bug: 33552694
Test: unit tests and integration (sl4a) tests
Change-Id: I0d0aedc7f00405d7325d7af016666c51669653d4
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareNativeApi.java
ndroid/server/wifi/aware/WifiAwareNativeCallback.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
86e4c343394565f8e59e02d25334589f96de38f0 25-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] Data-path negotiation update

Complete the data-path negotiation cycle. Add
responder-side code to respond to initiator
and check for errors in data-path negotiation.

Bug: 33552694
Test: unit tests and integration (sl4a) tests
Change-Id: I06f17658e244617cc7fb4cb3788f45fbe3542609
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareNativeApi.java
ndroid/server/wifi/aware/WifiAwareNativeCallback.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
41f7888046e6555cb684595a9730b24dba1f2331 27-Feb-2017 Roshan Pius <rpius@google.com> Merge "SupplicantStaNetwork: EAP sim fixes" am: a6482cf61c am: 2cc03145d9
am: 94d4413c7f

Change-Id: If0c2f7dd6572e2da0fea993dd818f14a91410a3e
9e2819f96d87be927c628d138a955afd3681a470 27-Feb-2017 Michael Plass <mplass@google.com> Merge "[WifiVendorHal] RTT support" am: f04133525e am: ffe403491c
am: b7ccefdf65

Change-Id: If120d755d0fc25c12e0b11ad6761610c6faf17a5
a6482cf61c32ac742e3774a2d46445ee1595b04f 27-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "SupplicantStaNetwork: EAP sim fixes"
f04133525e28383bd6bbb178dbb6c451198d184f 27-Feb-2017 Michael Plass <mplass@google.com> Merge "[WifiVendorHal] RTT support"
561867c6b9827e47f133ddb260e45f92b22200bd 04-Feb-2017 Amin Shaikh <ashaikh@google.com> Remove ExternalScoreEvaluator.

Also remove WifiNetworkScoreCache usage from the wifi framework and
instead maintain a cache of requested WifiKeys.

Bug: 33694078, 19948759
Test: ./runtests.sh
Change-Id: Ib4ba372f0fd4802d111a4f1ab609a26a4f34c399
ndroid/server/wifi/ExternalScoreEvaluator.java
ndroid/server/wifi/RecommendedNetworkEvaluator.java
ndroid/server/wifi/WifiInjector.java
692384c5a5562ff28ef8d020ca6efd40973e1448 27-Feb-2017 Peter Qiu <zqiu@google.com> Merge "hotspot2: do not verify against installed SIM at provider install time" am: 2c9e71ef99 am: 6443594394
am: 6b71c58aea

Change-Id: I7d02d47deb8c6b05d65d20d0559c2c2e82a245f0
2c9e71ef9985d43f3ac85ea5fb8bea981a90036f 27-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: do not verify against installed SIM at provider install time"
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
ndroid/server/wifi/WifiNative.java
dd685b34596b790c76e2cc03fc825c1249c9174f 27-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaNetwork: EAP sim fixes

Bug fixes for EAP sim handling:
1. The network response for EAP sim sent by TelephonyUtil does not have
prefixes like "ck", "ik". It's just a string of values separated by
colons.
2. Umts SIM request data sent to TelephonyUtil needs to be in reverse
order: Rand first and then autn.

Bug: 33383725
Test: Unit tests
Test: Able to connect to EAP sim networks.
Change-Id: I5a5122da75412c5cf39eb660b0ba4e6059623645
ndroid/server/wifi/SupplicantStaNetworkHal.java
ea644ad9920420dbcf420602355f9f91a7266b14 07-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] RTT support

Test: Some new unit tests
Bug: 34901744
Change-Id: I2900466b3769a71b06e8151b7ea17d31f65ee929
ndroid/server/wifi/WifiVendorHal.java
4dc38061478bf69e2858148b03552fedf711d2ee 27-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Lock-down access to hidden sendMessage API" am: c725c2ba10 am: aae2c22fb4
am: ea3f7fcc35

Change-Id: I3437e1995ed3d0e38bd13d7d3162aefe2c0a826d
c725c2ba1009ecc286a71c6bb52051196674e7d4 27-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Lock-down access to hidden sendMessage API"
fc34ddb26c7b65bcf06d65325ec407186011a285 27-Feb-2017 Peter Qiu <zqiu@google.com> hotspot2: do not verify against installed SIM at provider install time

The validation is only needed when attempting to match a provider
to a network. This allows a Passpoint provider with SIM credential
to be installed at the time when the SIM card is not installed.

Bug: 35797905
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: If27c7ebdedf2864757535530d9752e2b05430f1b
ndroid/server/wifi/hotspot2/PasspointManager.java
93ed1748297b9bc66b28e25cd1cab8d41d3a712a 24-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] Lock-down access to hidden sendMessage API

The sendMessage(..., retryCount) is removed (hidden).
Lock down the API on the server side.

Bug: 35755823
Test: unit-tests and integration (sl4a) tests
Change-Id: Id138d17fdeca5cede90671c9f15e871bcb6fa524
ndroid/server/wifi/aware/WifiAwareServiceImpl.java
b3c9eaca7b767aa9d5e9c550087436db4b2fa610 25-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] Background Scans - Unit tests am: 56d2cece0c am: d26e8a8a8c
am: e14272a5f0

Change-Id: I1fbd3d7de6db75f7c71ee9df4e94455671cde24a
6870d72c1a4bbd732420c4e9bd20d11522540dd6 25-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] Background Scans am: b3dc1823eb am: d4f349ce95
am: 124fdb312c

Change-Id: I6a904ed477f271eeaf812cddf09fe22dc0a2efab
56d2cece0c3cc908a875fd1d3291a1ba8882bbaf 25-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] Background Scans - Unit tests

Also add the AP mode version of freq-for-band.

Bug: 34899890
Test: New unit tests

Change-Id: If35ab50a9fadf45d0cc0285b9b1f10396ed917e1
ndroid/server/wifi/WifiVendorHal.java
37fdac1e5ceb2893dc91bd5118f5cb54febf7c85 25-Feb-2017 Michael Plass <mplass@google.com> Merge "[WifiVendorHal] RSSI Monitoring" am: 3089804367 am: d4f111daaf
am: 7c87d4a294

Change-Id: I624d6d7bb5e9aae9b9b50a75af7fdc3a7e9ed8a1
b3dc1823eb4d9bf505cc2bef984f9db1b91c1998 04-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] Background Scans

Bug: 34899890
Test: NIL
Change-Id: Id0f394cb4da934f890438722bf88e1beb8b536d8
ndroid/server/wifi/WifiVendorHal.java
8757adcc5e1f17354d09b4bacd3abda911974448 03-Feb-2017 Paul Stewart <pstew@google.com> Provide SIM identity for PEAP/SIM configurations

Refactor the TelephonyUtil code to take a WifiConfiguration
instead of an EAP method so it can evaluate both the outer and
inner EAP methods. This allows TelephonyUtil to whitelist SIM
authentication methods tunneled under PEAP for SIM authentication
and to provide the proper SIM identity.

Bug: 34835771
Test: Unit tests + manual tests: connect to a PEAP/EAP-SIM AP
Change-Id: I544c58f53bd1fe27fbd34626300928382095ccda
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/util/TelephonyUtil.java
30898043676f0cfd8707bf18c3af0bb3c6b51fd0 25-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "[WifiVendorHal] RSSI Monitoring"
3401582e1b1defc1877c7c47c6a839611fa211c3 16-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] RSSI Monitoring

Test: New unit test
Bug: 34903056
Change-Id: I0246a6bb21d3d4d49854ed1c8f64f0cdf48cb839
ndroid/server/wifi/WifiVendorHal.java
3bbf564af91515b33fcba33e7039ffe09c8c025c 17-Feb-2017 mukesh agrawal <quiche@google.com> WifiDiagnosticsTest: stub out call to logcat

WifiDiagnostics.captureBugReport() forks an external
process (logcat), to read data from logd. At present,
that external process is _not_ stubbed out for testing.

As a consequence, the time to run WifiDiagnosticsTest
depends on how busy logd happens to be. This causes
problems when, e.g., running a ToT build where other
subsystems are crashy.

Resolve this problem, by stubbing out the external
process for unit tests.

Along the way: update WifiInjector, so that it hosts
an instance of java.lang.Runtime.

Bug: 34971969
Test: runtests.sh
Test: manual

Manual test:
- install a build that's suffering from b/35400537
- run wifi unit tests 5 times
- verify that no run takes longer than 35 seconds

Change-Id: Icf2c36acc04713c5ead44b47a42fa9e80cf0a1fd
ndroid/server/wifi/WifiDiagnostics.java
ndroid/server/wifi/WifiInjector.java
085f95a5c65fd5c4671602af06d25967d134ad10 24-Feb-2017 Ningyuan Wang <nywang@google.com> Merge "Allow wificond scanner to use blocking binder call" am: c3ae674186 am: 9a1707bf4f
am: 489be2a3a5

Change-Id: I1e56db31e603cd2c7e5ed852ba94d27b0a7ecb25
c3ae6741869e9a0670f0cf3312a6c093abeb7a9e 24-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Allow wificond scanner to use blocking binder call"
bb1a2db286601be78d36c9fe747e779d40cd7d6c 24-Feb-2017 Ningyuan Wang <nywang@google.com> Allow wificond scanner to use blocking binder call

Bug: 35726133
Test: compile, manual test

Change-Id: I51d8782251ecc1aaa47cfd55d93195af890c648a
ndroid/server/wifi/WificondControl.java
1d084e2106da2b445ffa5a1c1d1dab257e1b49bb 24-Feb-2017 Peter Qiu <zqiu@google.com> WifiConfigStoreLegacy: read legacy Passpoint configuration file am: 9432358b81 am: 297ee0b3da
am: 42d5314dfa

Change-Id: I343eeacac0a846ae76b9cb7c3a3bd87f95c7307d
ba5858ec6c95beb503f2574df6e0165388292ec9 24-Feb-2017 Peter Qiu <zqiu@google.com> hotspot2: add config parser for legacy Passpoint configuration file am: 15eeedd83c am: c2b1c47520
am: 83b9c59af5

Change-Id: I97e9631515f26f78cad39dae43459e485d5c8100
a204051683daadf39641ac81dd7bc5bd6bc43768 24-Feb-2017 Roshan Pius <rpius@google.com> Merge "SupplicantHal: Store the service manager callback" am: 5a2c880635 am: fe7b551681
am: ba1143c0a2

Change-Id: I83e7230eb7b30cfdbe764eb07d919999806fcdc6
9432358b816df5530aed86d4107756854e5ac4f0 16-Feb-2017 Peter Qiu <zqiu@google.com> WifiConfigStoreLegacy: read legacy Passpoint configuration file

Read and load Passpoint configuration from the legacy Passpoint
configuration file (PerProviderSubscription.conf). Copy the missing
configuration fields to WifiConfiguration, so that a WifiConfiguration
will contained all configuration data for Hotspot 2.0 Release 1
configuration.

The WifiConfiguration for Passpoint configuration will be stored
temporarily in the share store until its owner logs in. When the
configuration owner logs in, the configuration will be converted
to PasspointConfiguration and added to PasspointManager. Then the
shared WifiConfiguration will be removed to complete the migration.
This will be done in the follow-on CLs.

Bug: 34206769
Test: frameworks/opt/net/tests/wifitests/runtests.sh
Change-Id: I946984822599b46e7e79babdf84272290ecf2431
ndroid/server/wifi/WifiConfigStoreLegacy.java
ndroid/server/wifi/WifiInjector.java
15eeedd83c258ae7eec5065880b0887545124456 16-Feb-2017 Peter Qiu <zqiu@google.com> hotspot2: add config parser for legacy Passpoint configuration file

For Hotspot 2.0 Release 1, most of the configuration data are
already stored as part of WifiConfiguration across multiple files
in N and older. There are number of fields contained in the
legacy Passpoint configuration file
(/data/misc/wifi/PerProviderSubscription.conf) that needed in order
to complete the configuration. Mainly:
- Friendly Name
- Roaming Consortium OI
- Realm
- IMSI (for SIM credential)

So add the parsing support for the legacy Passpoint configuration
file to retrieve the missing configuration fields.

Refer to the javadoc in LegacyPasspointConfigParser for the format
of the configuration file.

Bug: 34206769
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I1d1a96a2534e123fcd06e91eaa9fc18af842bea1
ndroid/server/wifi/hotspot2/LegacyPasspointConfig.java
ndroid/server/wifi/hotspot2/LegacyPasspointConfigParser.java
4353eeded2052537b3e52f44718e36c718e1815b 24-Feb-2017 Rebecca Silberstein <silberst@google.com> WifiMetrics: use SoftAp return code metrics am: 44ce135519 am: 1e549db1ce
am: 9d4ada7e92

Change-Id: I6b1434c256596b4e214d7d04c853b01265653a10
ae29f2a3f2e08c6ee1af639e313d25e6f6eea89d 24-Feb-2017 Rebecca Silberstein <silberst@google.com> SoftApManager: add WifiMetrics to constructor am: 80a1468c75 am: 48529051f8
am: 7468ba3ca9

Change-Id: Id300a28e81a0545c3b4beb00ed3179ebed17122c
5a2c880635ee0e2d3498ba22c584b61e15440708 24-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "SupplicantHal: Store the service manager callback"
44ce135519e22d8c4746abac21c14111f1ce8667 25-Jan-2017 Rebecca Silberstein <silberst@google.com> WifiMetrics: use SoftAp return code metrics

Add calls to populate SoftAp startup return code values to metrics.
This CL also adds the handling of these metrics in WifiMetrics. The
newly tracked SoftAp start return code metric is also added to the
WifiMetricsTest.

Bug: 30899122
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: manually verified code counts incrementing with dumpsys wifi
Change-Id: I9256e08c0de6e9d4132e5aab3d604ba0ef6922c0
ndroid/server/wifi/SoftApManager.java
ndroid/server/wifi/WifiMetrics.java
80a1468c75b0db36e58de767c74f7c15e9aa55e3 21-Jan-2017 Rebecca Silberstein <silberst@google.com> SoftApManager: add WifiMetrics to constructor

To prepare SoftApManager for an upgrade with WifiMetrics, add the
WifiMetrics object to the constructor. This also involves updating
WifiInjector and the SoftApManagerTest files.

Bug: 30899122
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually started softap and verified connectivity on client
Change-Id: I14d319ab51b85ab26ecba45ec534da7690caf7fe
ndroid/server/wifi/SoftApManager.java
ndroid/server/wifi/WifiInjector.java
1c353f3fca322aab2fff5369a55876a91a112775 24-Feb-2017 Roshan Pius <rpius@google.com> SupplicantHal: Store the service manager callback

Not storing these callbacks will lead them to be cleaned up and cause a
SIGSEGV when there is a notification.
This is a known limitation with how these objects are refcounted across
the jni boundary.

Bug: 33383725
Test: Crash no longer observed when airplane mode is toggled.
Change-Id: Ide96ef2c2f8ee34e87f52edcf84965f1eb7fcaf7
ndroid/server/wifi/SupplicantP2pIfaceHal.java
ndroid/server/wifi/SupplicantStaIfaceHal.java
63d313df8c30da8052415cab3c02d1624bc4b466 24-Feb-2017 Tomasz Wiszkowski <ender@google.com> HIDLization of WifiDirect, stage 2: method calls. am: 61233efc46 am: 4a792fa05b
am: 7bea72ec03

Change-Id: Ic304e071898b083bd8daafca5e28fde51da5dd08
61233efc46707ace6cb3a45dd84766f06df946af 08-Feb-2017 Tomasz Wiszkowski <ender@google.com> HIDLization of WifiDirect, stage 2: method calls.

BUG: 33383725
Change-Id: I82249adf59546d0e73f0eafd85b3e7e0ce51936c
ndroid/server/wifi/SupplicantP2pIfaceHal.java
ndroid/server/wifi/WifiNative.java
0c041fe6d84ee36f139544f8d7921b8481523423 24-Feb-2017 Roshan Pius <rpius@google.com> Merge "SupplicantStaIface: Handle supplicant death" am: 0d25c5ecd4 am: 3ba62cb084
am: e4ee8995af

Change-Id: Ifbaee2fce4fec61a0a00e6c51a2b6ce9f52d4cc4
0d25c5ecd48ef39f74707fba1b121037c4d85f97 24-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "SupplicantStaIface: Handle supplicant death"
0f1d4a719339c70b2d3d7e3322964b1852df6cd5 24-Feb-2017 Glen Kuhne <kuh@google.com> Merge "Move WSM.updateWifiMetrics into WifiMetrics" am: a350867b69 am: dbcaebacde
am: 2371fcccf8

Change-Id: I59029df5841939a00d9f3812753f677ac15100cd
a350867b698fe5302d3ed3078be2eb22996df8df 24-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Move WSM.updateWifiMetrics into WifiMetrics"
a6a1bff9fff611743960ccb658e1092e5f1087b6 24-Feb-2017 Ningyuan Wang <nywang@google.com> Plumb through scan result/failure notification am: 70a9b25ee5 am: 5c6b81d3fc
am: 2fb9549009

Change-Id: Ida978fe5e6d44942119fd15504b67bdd22d2eeba
b16c35b175ec49cd491c885677982db4b552e447 24-Feb-2017 Ningyuan Wang <nywang@google.com> Request single shot scan via wificond am: e6d7f23569 am: eeb432fd2a
am: 8188e34289

Change-Id: Id0f40d9ff105bd970c7fd60bf77433ad44ca4329
ca919e89a95472f2785b3ee951f9779544d19f7f 23-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIface: Handle supplicant death

Listen for death notifications from wpa_supplicant and cleanup state.

Bug: 33383725
Test: Unit tests
Change-Id: I5e4a594a7f347bf901ae9a33d061199fbb5d0280
ndroid/server/wifi/SupplicantStaIfaceHal.java
71ee3f628c99c5620cc286dcf791a856453653fe 24-Feb-2017 Mehdi Alizadeh <mett@google.com> Merge "WifiNative: Override hashCode for HiddenNetwork and PnoNetwork classes" am: 15c710887d am: 176578aaba
am: b8d375c225

Change-Id: I2f99026916d5de55c655dcaa9d8232cb205564b4
70a9b25ee5d051660b8aeb15ffa97d36a181741d 16-Feb-2017 Ningyuan Wang <nywang@google.com> Plumb through scan result/failure notification

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

Change-Id: I10726aac7c186ea277c9a169b37e1900e8420b71
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WificondControl.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WificondControl.java
8d134c4c62cfe113e3bc56dd515c9283654f29f0 24-Feb-2017 Roshan Pius <rpius@google.com> Merge "[WifiVendorHal] Register for chip callback" am: 4b80aa3101 am: db448a8ebd
am: eefcfc1261

Change-Id: I9c1af436357a8dfda55e939d7f37ba8f61361dd7
15c710887d2ea9b83df21e5d43d402bfb5506540 24-Feb-2017 Mehdi Alizadeh <mett@google.com> Merge "WifiNative: Override hashCode for HiddenNetwork and PnoNetwork classes"
4b80aa31010d18810622f28256ccdd64f9c84dbf 24-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "[WifiVendorHal] Register for chip callback"
bc054094daf195b29bbc091b9cbd1d4a2dfb9793 24-Feb-2017 Roshan Pius <rpius@google.com> Merge "[WifiVendorHal] Register for sta iface callback" am: 845029db67 am: 7fa6ad717e
am: b64d5d731b

Change-Id: I2fe3ca3f13b8b906a654e0e3f240f522a6673115
3c6e92f51984ba8999d5efe622b4a52dd18bdaff 23-Feb-2017 Glen Kuhne <kuh@google.com> Move WSM.updateWifiMetrics into WifiMetrics

Made this functionality internal to WifiMetrics. WSM passes it a list of
Saved Networks, and WifiMetrics does all the counting.

While I was here, cleaned up an unreachable code path in WSM.dump, that
gets preempted by WifiServiceImpl.dump (The part that dumps the raw
proto bytes).

Bug: 35675572
Test: new unit tests
Change-Id: Id0a2b71d08679410931a01c3e958aa1ba5558e6a
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
845029db6709fcf3894d847ac2a1bbb5c453fe43 24-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "[WifiVendorHal] Register for sta iface callback"
45e0e4d2c9bf85ac8225a117326f68e0c326664c 23-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Lock-down startRanging Aware API" am: 79464e94fb am: 4144af82c5
am: 991dfa8fb0

Change-Id: Ia4af4e401d3ee13981c875992a6c6cd5e42f040f
79464e94fbfe3201f47693950ed1647a9f941615 23-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Lock-down startRanging Aware API"
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
ndroid/server/wifi/WifiNative.java
1cfe1dd431ece7c336e9f24147644bf361d989ad 23-Feb-2017 Mukesh Agrawal <quiche@google.com> Merge changes I15fc6862,I9f51c873 am: ac244e0918 am: 39ffaad450
am: 74b04780bc

Change-Id: I5965bc38d06d293fcd5e15d44b87e27a6f55d241
ac244e09180ab5876a2d04d454b56dd75e9c5781 23-Feb-2017 Mukesh Agrawal <quiche@google.com> Merge changes I15fc6862,I9f51c873

* changes:
WifiStateMachineTest: use a real Clock
WifiStateMachine: inline printTime()
542b204c2120a9c91324ccc86c6695012ac02ab7 23-Feb-2017 Roshan Pius <rpius@google.com> [WifiVendorHal] Register for chip callback

Bug: 33384303
Test: Unit tests
Change-Id: Ib3db8318e549ae862787c714832bc1b0c88d309e
ndroid/server/wifi/WifiVendorHal.java
7e4b5bdfa88703a09f611e3ef8973ab7e286375d 23-Feb-2017 Roshan Pius <rpius@google.com> [WifiVendorHal] Register for sta iface callback

Bug: 33384303
Test: Unit tests
Change-Id: If2b2da0603cb962540b9b994e326076940c2b674
ndroid/server/wifi/WifiVendorHal.java
9310e7a88e01d9b1f9c047b0b6225aa43aecca11 23-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Add a disabled reason for recommendation providers"
61421bbcc8c44a87404f1bd2f835d921af8a37bc 23-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] Request vendor debug info am: 2f0db656f6 am: d9ef154289
am: 52b13806fe

Change-Id: Iff0534fbe363dee1a5dce11756f0ce90ddfa09b2
2f0db656f678c8cf1ab6643739c6d0059721e6e2 16-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] Request vendor debug info

Add two calls to get vendor debug info,
one for the driver and one for the firmare.

Test: Two new unit tests
Bug: 34901966
Change-Id: I83e9cf8000b7e7094e31847ac1724c4aec196008
ndroid/server/wifi/WifiVendorHal.java
0d828e07d4ccf7cc554931dbfaff34c469ab6a3f 23-Feb-2017 Michael Plass <mplass@google.com> Merge "[WifiVendorHal] wake reason stats" am: d53f9a8246 am: 1c589fb429
am: 818bba6a0f

Change-Id: Ia9678222c1bbf9bb29d549566ae0b4026f9449a2
d53f9a8246a98a43f44983b1286ddf4a944d6571 23-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "[WifiVendorHal] wake reason stats"
c0187398b6043c1444c76665ba52e04d35e4da9e 23-Feb-2017 Roshan Pius <rpius@google.com> Merge "[WifiVendorHal] Neighbor Discovery Offload" am: 608c48674e am: 7878ac1ba6
am: 890c2314e4

Change-Id: I409ebf4cd94990cbb7f4c6a3c2b7a03b9adaf2ce
f37a2d79fac68dc84f10094582097919a51fd020 23-Feb-2017 Roshan Pius <rpius@google.com> Merge "[WifiVendorHal] Packet fates" am: 7cda57b6e1 am: 110c69880f
am: a5559f807c

Change-Id: I933d4fe09c88414d00e38421a2ad396ebbc1f7d2
608c48674e1e6eca30562329a72dc66921294806 23-Feb-2017 Roshan Pius <rpius@google.com> Merge "[WifiVendorHal] Neighbor Discovery Offload"
7cda57b6e1a343846692b228b8565fdafbfce6cf 23-Feb-2017 Roshan Pius <rpius@google.com> Merge "[WifiVendorHal] Packet fates"
cbe44718452e93ef2b68974230231ff4fac99dee 16-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] wake reason stats

Test: Added unit tests
Bug: 35429387
Change-Id: I12dba5e4e2fc2e714c5f04cf8ce3b51173d0b14c
ndroid/server/wifi/WifiVendorHal.java
c298e9cc2f33b1bbe79536a290e2a3b302514996 23-Feb-2017 Roshan Pius <rpius@google.com> Merge changes from topic 'eap_key_id' am: 4139350e99 am: 9d972b8c81
am: a2a40dcfd6

Change-Id: Ie3d523c30871e3840736626d0d2dc12b4208c9d0
ea66aa8c6e41552edb9f57c15a5300681eaf1f6b 23-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaNetworkHal: Use private "key_id" am: 1f5dee3271 am: 1428ff7495
am: cea91b72e8

Change-Id: I2fbdcc8ee3375e52e610f6ac89a3c920e2ff6a0c
1428ff7495bf2513123f2ff0f3da04ff42e25d76 23-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaNetworkHal: Use private "key_id"
am: 1f5dee3271

Change-Id: Iadf19c22cb3458cccd6451ce2fe712dc301fdcb8
4139350e99d7a6acc1156a9f221c21972cc5bf9d 23-Feb-2017 Roshan Pius <rpius@google.com> Merge changes from topic 'eap_key_id'

* changes:
SupplicantStaNetworkHal: Fix network extra parsing/writing
SupplicantStaNetworkHal: Use private "key_id"
2669a60d3d515565678dd576fa84e703851b0b84 23-Feb-2017 Mukesh Agrawal <quiche@google.com> Merge "Use Android Gerrit OWNERS file syntax." am: 7c31080bda am: a2a14039a6
am: a323b9625f

Change-Id: I72062805d4d1b39bd96319a0b80632cf13dc87d1
7c31080bda1bcd09ac34abf2f70df1ee3f3a72b0 23-Feb-2017 Mukesh Agrawal <quiche@google.com> Merge "Use Android Gerrit OWNERS file syntax."
135be5a123dd70bb4663396a28dda9d6c26956fc 16-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] Neighbor Discovery Offload

Test: Added unit tests
Bug: 34903058
Change-Id: I52393ef7f4a70ed58f9803f3350441ae01682653
ndroid/server/wifi/WifiVendorHal.java
5a801ea1dd4da217cb2ea03ecfcfc02985e4f1df 16-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] Packet fates

Test: Added Unit tests
Bug: 34902450
Change-Id: I8df2e571a368c50540ed23bb88cfbf9193fd9431
ndroid/server/wifi/WifiVendorHal.java
29a32ed26636892cecc262f4f373d24b1edc210c 23-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] Lock-down startRanging Aware API

The WifiAwareManager.startRanging method is WIP. Lock
it down (internal use only) until productized/opened -
possibly through the RTT API.

Bug: 35676064
Test: unit tests and integration (sl4a) tests
Change-Id: I66db9985215a76a3e619dca28afefc262735c9a7
ndroid/server/wifi/aware/WifiAwareServiceImpl.java
04e8768993cc7e19e5173f829c642f6191509e77 23-Feb-2017 Ningyuan Wang <nywang@google.com> Merge "More logging for WificondControl" am: 44fba787aa am: bfafdd2e15
am: 4d9b4b3e59

Change-Id: I6ed956221626da5872b21c14783ecb23e1916494
55c4da0a533f2a531f8b810dafabee64fdfdc37e 22-Feb-2017 mukesh agrawal <quiche@google.com> WifiStateMachine: inline printTime()

Given that printTime() is a short method, and that
printTime() has only one caller, it's simpler to
just inline the code.

As a bonus, inlining the code eliminates the creation
of an extra StringBuilder on each state machine action.

Bug: 35644876
Test: tests/wifitests/runtests.sh
Change-Id: I9f51c8738d5e1539f858302551e5fdca82adba32
ndroid/server/wifi/WifiStateMachine.java
1f5dee32716a2709ca2e1e491cbc2f09ca35a2fa 22-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaNetworkHal: Use private "key_id"

"private_key" field is not used in Android, we instead use the "key_id"
field. So, change the setter/getter to reflect that.

Bug: 35663125
Test: Unit tests
Change-Id: I5c22edbbc14a3de531d6dd7f3e862b680de45fec
ndroid/server/wifi/SupplicantStaNetworkHal.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
ndroid/server/wifi/WifiBackupRestore.java
ndroid/server/wifi/WifiConfigStoreLegacy.java
ndroid/server/wifi/WifiNative.java
44fba787aaf21d78616e4e5315d9d4b96c2e07e6 23-Feb-2017 Ningyuan Wang <nywang@google.com> Merge "More logging for WificondControl"
512ba9008e5b9ab4019647eb036c303a6bb9e0ce 23-Feb-2017 Ningyuan Wang <nywang@google.com> More logging for WificondControl

Bug: None
Change-Id: Ia5ea3d53a7ba1484db79d286970a44e5331e9ecc
Test: compile
ndroid/server/wifi/WificondControl.java
3f7cd32878130323e2632bc2c6b8b211f6260138 03-Feb-2017 Amin Shaikh <ashaikh@google.com> Add a disabled reason for recommendation providers

When the NetworkRecommendationProvider provides a "do not connect"
recommendation, mark all enabled available saved networks
WifiConfiguration#mNotRecommended. This value is used in
Settings/SystemUI to display a message that the network is not
currently recommended.

Bug: 34745259
Bug: 35671673
Test: ./runtests.sh
Change-Id: Id623963c5ae88f19935fae9f38f3a1bc0a116be3
Merged-In: Id623963c5ae88f19935fae9f38f3a1bc0a116be3
ndroid/server/wifi/RecommendedNetworkEvaluator.java
ndroid/server/wifi/WifiConfigManager.java
2c6426abc81292f8051695a4622cc582bd87d226 23-Feb-2017 Roshan Pius <rpius@google.com> Merge changes I9c953a1c,Id082eedb,Iaf8631b5 am: 220799646e am: 1a589774bf
am: cfd4a7d8fe

Change-Id: I5087fcdce39e2c15e79e8faba59ab8e4f0bcf170
220799646ea141432488051a9fdbb61e0b2d165a 22-Feb-2017 Roshan Pius <rpius@google.com> Merge changes I9c953a1c,Id082eedb,Iaf8631b5

* changes:
WifiNative: Supplicant HIDL integration
WifiNative: Start supplicant HIDL integration
Remove unused/unwanted WifiNative methods
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
ndroid/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
ndroid/server/wifi/SupplicantP2pIfaceHal.java
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.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
ndroid/server/wifi/WifiConfigStoreLegacy.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
85d8b1c9985b1baa589877fc951ef7a2fc357076 22-Feb-2017 Chih-Hung Hsieh <chh@google.com> Use Android Gerrit OWNERS file syntax.

* Use email addresses instead of user name.
* No directory path in per-file glob.

Bug: 33166666
Test: default build targets
Change-Id: I0e6c9ad4103333f1d08cfb49ef238786d4b3bc6b
ndroid/server/wifi/OWNERS
ndroid/server/wifi/aware/OWNERS
ndroid/server/wifi/hotspot2/OWNERS
ndroid/server/wifi/util/OWNERS
ndroid/server/wifi/wificond/OWNERS
e420cb8580707ff2139ecc8fd0de5529201c15e7 22-Feb-2017 Mukesh Agrawal <quiche@google.com> Merge "LastMileLogger: make fail-safe more robust" am: f65622706c am: 712e0dd1aa
am: 91d7e0a660

Change-Id: Ia950c41966e8f2aef79dd9fda44a4ea98b9931f3
f65622706c4709c6220d0cc759d0988fe6ff4f39 22-Feb-2017 Mukesh Agrawal <quiche@google.com> Merge "LastMileLogger: make fail-safe more robust"
64885fbc6c27afad28c889c518eec3e011639a96 22-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaNetworkHal: Remove enclosing quotes from psk am: 67bbcdc2c8 am: 36e9d0f569
am: 32af49967a

Change-Id: Ia169de8a546dbd592999bb88c7bdffeb467c6e12
67bbcdc2c81824ff671a5a1d8475a598199e342e 22-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaNetworkHal: Remove enclosing quotes from psk

The settings app seems to be quoting psk passphrase. So, remove those
when we add it to wpa_supplicant.

Bug: 33383725
Test: Unit tests
Test: Able to connect to psk networks now.
Change-Id: I68e9d377a97d7ad1393e14e6e5371ef9f9fab439
ndroid/server/wifi/SupplicantStaNetworkHal.java
ndroid/server/wifi/util/NativeUtil.java
bd40752def756e3ea39d9dc3c9c1fa89d1368914 22-Feb-2017 Michael Plass <mplass@google.com> Merge "[WifiVendorHal] keep-alive packet offload" am: 127d5ed44c am: b01d7d5354
am: aec11defcc

Change-Id: I610eb02bca1d78bf6d1a078a10cf4e2a012fb992
127d5ed44c0615041943574c70e392a2aa113f1d 22-Feb-2017 Michael Plass <mplass@google.com> Merge "[WifiVendorHal] keep-alive packet offload"
f322da3f70ac59cfa2741849a6b9cdee7855ec16 22-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaHal: Store callback objects am: b70d1e046a am: e36029c100
am: 506db12166

Change-Id: I08ea319e27b48d1a2f7a887470f77ac72a94b214
70b995bed9674a30c56b7ae2585d5897900ff695 16-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] keep-alive packet offload

Test: Two new unit tests
Bug: 34901930
Change-Id: Ia80de5374647e7e863caa704059ab655cbf0a6fa
ndroid/server/wifi/WifiVendorHal.java
b70d1e046a5eb7e87c6b96beec30bcb985ee9c3c 22-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaHal: Store callback objects

Changes in the CL:
1. Store the callback object reference in SupplicantStaIfaceHal &
SupplicantStaNetworkHal.
2. Add a log method for callbacks.
3. Move the body of the callback inside the lock.

Bug: 33383725
Test: Unit tests
Change-Id: Ie5cfc1a3c30e24a43082108caa17bf029f73c69c
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStaNetworkHal.java
46cc74e5bde47b57eab9bc7ba56a992d0db9b89a 22-Feb-2017 Michael Plass <mplass@google.com> Merge "[WifiVendorHal] Clean up some unneeded stubs" am: c7a2afd69a am: 6237eee7f8
am: 934d58fa84

Change-Id: I3ba5de32e2efa6a29a4f3a5344b24f8807017c49
c7a2afd69a70f497dbffbb4b61146bbe9d82baed 22-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "[WifiVendorHal] Clean up some unneeded stubs"
da5196d59d2cd1aa2ce1003a0c50fa3618ffcf4d 22-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] Clean up some unneeded stubs

Test: exiting wifi unit tests
Bug: 34901916
Bug: 33384303
Change-Id: Ibe66dca4650346fdbec83a9e5d9764351234e29a
ndroid/server/wifi/WifiVendorHal.java
b7b3cd16c90915f12dd76116d61ec9013f12aed3 21-Feb-2017 Roshan Pius <rpius@google.com> Merge changes Ifafb6a2f,I3e0c8082,Id0934c2b,Id9953c4a,I04afd80a, ... am: 5b769c0925 am: 9815380b6d
am: 1ed18cd501

Change-Id: I7138d1f2668fc8ec382273afcdb3820fc3582272
5b769c09255a6a8765e74feee26b8a827fa0f396 21-Feb-2017 Roshan Pius <rpius@google.com> Merge changes Ifafb6a2f,I3e0c8082,Id0934c2b,Id9953c4a,I04afd80a, ...

* changes:
SupplicantStaIface/NetworkHal: Enable verbose logging
SupplicantStaIface/NetworkHal: Clean up logging
SupplicantStaIface: Expose network request methods
SupplicantStaIfaceHal: Remove network on config failure
SupplicantStaIfaceHalTest: Fixing ordering nit
SupplicantStaIface: Handle wpa_supplicant death
SupplicantStaIfaceHal: Handle the remaining callbacks
SupplicantStaIfaceHal: Handle state change callbacks
1dcdcb95c5923b2792903a3b5acfa3af004515cd 21-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] Ranging auto-response configuration change am: afd0fa5167 am: 32e17091f5
am: d879da9d50

Change-Id: I294f7177f638951b10d486908a63d304ecdedbfa
511c6a204fefd7d295cb3728e6d4665106a29ae7 18-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIface/NetworkHal: Enable verbose logging

Add method to support setting the verbose logging flag.

Bug: 35435098
Test: Compiles
Change-Id: Ifafb6a2f6bf37f0de39d6cbea6f762d516726437
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStaNetworkHal.java
b850a6ae6fe8470fd9338bbc9978caadc7ca2c4b 18-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIface/NetworkHal: Clean up logging

Remove unnecessary DBG logs and use common methods for logging status.
This is a prelude to turning on verbose logging using the settings menu
for these modules.

Bug: 35435098
Test: Existing unit tests
Change-Id: I3e0c80828e8d96dbf4975c20a498faa5686ee67a
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStaNetworkHal.java
8aad61408adef866a177857b79a979cf77a0a662 18-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIface: Expose network request methods

These are required for EAP networks where the authentication params are
generated by framework and sent to wpa_supplicant.

Bug: 33383725
Test: Unit tests
Change-Id: Id0934c2b119d1fde73b1409c8cc283a4466095ee
ndroid/server/wifi/SupplicantStaIfaceHal.java
f0c2cbd00fe77a8f2b94f3f0d7c28e3e5fdc1fc4 17-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Remove network on config failure

When the Wificonfiguration save fails, we should remove the network from
wpa_supplicant.

While there,
Make the RX filter addition/removal methods public.

Bug: 33383725
Test: Unit tests
Change-Id: Id9953c4a4b4fae60295b8f3b8769d2163ffe3d58
ndroid/server/wifi/SupplicantStaIfaceHal.java
5317e7c11c99d5cc8417c65cc73cf548f8f52b87 17-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIface: Handle wpa_supplicant death

Trigger the existing WifiMonitor events to indicate
establishment/loss of contact with wpa_supplicant.

Bug: 33383725
Test: Unit tests
Change-Id: I394a3ed7dad4f201456e2aaa53ba380c7a130f33
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/WifiMonitor.java
bcf35be52f93d09a3f2ac8d4272a6d66467309b9 17-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Handle the remaining callbacks

While there,
Corrected a typo in one of the WifiMonitor methods.

Bug: 33383725
Test: Unit tests
Change-Id: I0bb8da7d2af468a419b595688286bc42e0f3d57f
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/WifiMonitor.java
82c5c5f2ee520a1066cf5d6421885bb53bbfe269 17-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Handle state change callbacks

This should invoke associated/connected broadcasts along with the state
change broadcast depending on the state.

While there,
Change NativeUtil to return lower case hex string since that is what is
being used everywhere else.

Bug: 33383725
Test: Unit tests
Change-Id: I87cbd33819ec05bc529af76d17a3e1be84a304da
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/util/NativeUtil.java
afd0fa5167ae4e0eb3e7d0f3e1a011ebccef5f80 17-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] Ranging auto-response configuration change

Remove configuration of ranging auto-response from
an Aware-wide configuration (in Enable/Config). It
is now configured on a per-discovery-session basis.

Bug: 33821639
Test: integration (sl4a) tests.
Change-Id: I89d838e6cf33aba6fbe2a0ea3b8beff31a81c3cd
ndroid/server/wifi/aware/WifiAwareNativeApi.java
46ef12f06a8ea37cdc06545250f11a1f10135272 18-Feb-2017 Roshan Pius <rpius@google.com> Merge "SupplicantStaIfaceHal: Handle Hotspot 2.0 callbacks" am: baebd871c9 am: 4c3670eeef
am: 0318948bb7

Change-Id: Ieb90eded370405ba0c1769f829c191920275d829
baebd871c9b92c996ed47c0c69a6e605022b696a 18-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "SupplicantStaIfaceHal: Handle Hotspot 2.0 callbacks"
c8dbe3cf69426865735e8926ba95e95528fee4c2 18-Feb-2017 Sohani Rao <sohanirao@google.com> Merge "Note WifiState in BatteryStats" am: c6925da0f9 am: 17e07547d6
am: fcb1d3f8d1

Change-Id: Ic4737955cc1ff5c7dac7e06461203bb806231720
c6925da0f93c029733e570c05e1276e0b2ce986a 18-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Note WifiState in BatteryStats"
5a1adfdef3025a595544b3d17e1d5d9afca7673b 17-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Handle Hotspot 2.0 callbacks

Bug: 33383725
Test: Unit tests
Change-Id: I631c2e32850183b0f20391f964bea1efee350960
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/hotspot2/WnmData.java
cd18576b9f2bf642b4fb4c29f6669f5641bfeba7 18-Feb-2017 mukesh agrawal <quiche@google.com> Merge "add OWNERS" am: adb6279924 am: 61977c5a49
am: b12d9eecf0

Change-Id: I7cc0d8b705123aa853b9d8f22ffb6b56ea1a5f66
adb627992491758ef7d2549a524e139991e2612d 18-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "add OWNERS"
3c0eb618a6398926893508f9d05fa39a99cf4894 03-Feb-2017 Sohani Rao <sohanirao@google.com> Note WifiState in BatteryStats

BatteryStats has APIs which can be used to keep it posted about the
WifiStateMachine state . This can help correlate power usage with
different WifiStates. A helper class WifiStateTracker will convert
WifiStateMachine states to the states of interest in BatteryStats.

Bug: 28908455
Test: Unit tests
Change-Id: I18db4496c1d7388f57e249d7dbdc0115134c1b3b
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiStateTracker.java
5a6219f2f2745c6c123de3ad3514172d4b5048c2 18-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] RingBufferLogging am: 53f278b6fe am: 2edb8d5832
am: c87730c15b

Change-Id: Ib55ba977ba642ebcc0b430f001b9369558c80912
1cead8267716aa98e40d036a8146daa68e1be272 17-Feb-2017 Ningyuan Wang <nywang@google.com> Merge "Plumb through enableVerboseLogging() to WificondControl" am: 9eff84f3ce am: 6650f8915a
am: 1e8cbc2bec

Change-Id: If693cd938753ed51c2694329be7c6221d4339c49
53f278b6fed422a18d763b07216a21e96d9445f9 15-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] RingBufferLogging

Test: unit tests added
Bug: 34902105

Change-Id: I6411ad720fe537bd2b97b22b180762c4c9e48145
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiVendorHal.java
9eff84f3cecf6dc8b4c623fcc78f82dca30ee739 17-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Plumb through enableVerboseLogging() to WificondControl"
363f5e4ac9b98cd73b151a657b5091cf09b8dba4 17-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Remove public enableUsage/disableUsage API" am: 37a184b0fa am: 9500e82fb1
am: 43828853d3

Change-Id: I5d0f5e04f82524ef809a3c0b1bb2f974e76dafcf
b2bf13e1706aa73f6aa78988dee716eca7069b50 17-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Pipe discovery window period configuration to HAL" am: ed9f8d1f5b am: 29aaf1c32f
am: 1e450121dd

Change-Id: I0417cc35df0aab55bfddef3bbbae081ea9a2bf4e
7f1900eb02a17ea6aacc450b7278526b54d6646a 13-Feb-2017 mukesh agrawal <quiche@google.com> add OWNERS

Add some documentation on which developers are most
responsible for the various bits of functionality in
the Wifi framework code.

Bug: 35318795
Test: None
Change-Id: Ib96f44182867f72710f9d0a58ebe2cf5738ec8e1
ndroid/server/wifi/OWNERS
37a184b0fa864bf599008857812eab24dd18ce56 17-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Remove public enableUsage/disableUsage API"
9951fc4c87fe3ee06ca7889e3e98f55024d49d97 16-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] Remove public enableUsage/disableUsage API

The APIs were provided to the manager to provide an indirect
mechanism to enable/disable Aware. No longer needed - removing
dead code.

Bug: 35435032
Test: unit tests and integration (sl4a) tests.
Change-Id: I7f4cca982b250ee4d270a57e9cfdf355719cf11b
ndroid/server/wifi/aware/WifiAwareServiceImpl.java
ed9f8d1f5b42392c0d98df832f92ec64ba72e264 17-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Pipe discovery window period configuration to HAL"
01fa2ef8e3c15e3e6bfd4187ca342daf85347983 17-Feb-2017 Roshan Pius <rpius@google.com> Merge changes Ie6ba8410,Ifd3374ef,I7cc92129 am: 2e6fd575d8 am: 0e5ac9f9c6
am: dec6e12336

Change-Id: I74acc272a5eb3879f9b805c3188360dc397be234
2e6fd575d84c12ba27e8dec50eeafd11585699fd 17-Feb-2017 Roshan Pius <rpius@google.com> Merge changes Ie6ba8410,Ifd3374ef,I7cc92129

* changes:
SupplicantStaIfaceHal: Register for callbacks
SupplicantStaNetworkHal: Handle callbacks
SupplicantStaIface/Network: Store the iface name
c2c46dd3898378d9dd6be9250cbe23378618cd0b 17-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add a disabled reason for recommendation providers"
cfb9a9683307b914f02179a746e846c396fd9664 17-Feb-2017 Roshan Pius <rpius@google.com> PasspointEventHandler: Stop creating wpa_supplicant string commands am: fc83b303a3 am: e2ee82232c
am: 8ec9834781

Change-Id: I8821b107e941b3d93ea17efb506a8e809387f220
c224fb554deca894818490c9416ff35d18a79d76 17-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Register for callbacks

Register for callbacks on initilization of the iface. The actual
callback handling will be added in a subsequent CL.

Bug: 33383725
Test: Unit tests
Change-Id: Ie6ba841092933cb9d4fbf9f7399ede1511d071e5
ndroid/server/wifi/SupplicantStaIfaceHal.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WificondControl.java
c3d81dbf035c205ca1baf16b84a41b67eda9ae4a 17-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaNetworkHal: Handle callbacks

Handle the hidl callbacks and trigger wifimonitor broadcasts.

Bug: 33383725
Test: Unit tests
Change-Id: Ifd3374ef1465682010dc2fe15736d3eafe707168
ndroid/server/wifi/SupplicantStaNetworkHal.java
03fea88ccab149c07391d38f3c406bb04ab0a3a9 17-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIface/Network: Store the iface name

Retrieve and store the associated iface name during initialization.

While there,
Remove the calling code for the unnecessary iface name retrieval
HIDL methods.

Bug: 33383725
Test: Unit tests
Change-Id: I7cc921299e249d516fa68c21b6bab3ce79d1afcc
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStaNetworkHal.java
ea5ad12b8a7140323a0b70f982c8f8a5ac83a9ae 17-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIface: Expose the 2 ISupplicant methods am: cb9565f0cb am: efd93c49c7 am: cdc7dfe2ab
am: acc0bb440b

Change-Id: I0a9443edca77809ffe2092ba614266f1e674c70e
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/hotspot2/PasspointEventHandler.java
c8d71776a203bd1a515caa2e06570eab34b9c22e 03-Feb-2017 Amin Shaikh <ashaikh@google.com> Add a disabled reason for recommendation providers

When the NetworkRecommendationProvider provides a "do not connect"
recommendation, mark all enabled available saved networks
WifiConfiguration#mNotRecommended. This value is used in
Settings/SystemUI to display a message that the network is not
currently recommended.

Bug: 34745259
Test: ./runtests.sh
Change-Id: Id623963c5ae88f19935fae9f38f3a1bc0a116be3
ndroid/server/wifi/RecommendedNetworkEvaluator.java
ndroid/server/wifi/WifiConfigManager.java
cb9565f0cb8fa92346549bcacdfbf91cdf8e6bd3 16-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIface: Expose the 2 ISupplicant methods

These are 2 methods exposed in the top level ISupplicant object, which
needs to be exposed to WifiNative.

While there,
Add the new EAP phase 2 method conversions in SupplicantStaNetworkHal.

Bug: 33383725
Test: Unit tests
Change-Id: I46abd77b0616e4e3da7e9bbe3d2751e0783e93fe
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStaNetworkHal.java
c5b364f8edb366dae0c8b699321ba20db95e7879 17-Feb-2017 Roshan Pius <rpius@google.com> Merge "WifiSupplicantControl: Remove this class (Part 1)" am: c75e7b8f0f am: 2df265a28b am: adb5dd03d2
am: d60ddecacd

Change-Id: I341498514b35cb057837df048c074d016b2befdb
c75e7b8f0ff1a1e87c77485a08b691b76081adf0 17-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "WifiSupplicantControl: Remove this class (Part 1)"
c68528ca2d20b6fd428fa0a8cee55d4b6eed9a18 17-Feb-2017 Roshan Pius <rpius@google.com> Merge "WifiMonitor: Broadcast connection events" am: a32a3900eb am: ebc92ca4bb am: 79e950af59
am: 3db9ab46b2

Change-Id: I1d5ee0a69d9ae5b4cc8b23d271715794b3b0056c
a32a3900eb7eb95f52d32ead33fda825459b8be6 17-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "WifiMonitor: Broadcast connection events"
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
ndroid/server/wifi/WifiConfigStoreLegacy.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiSupplicantControl.java
6117ea21e169affa9fd76ef2a93482adef3fc0db 16-Feb-2017 Randy Pan <zpan@google.com> Merge "Lower log level when looking up networkId -1" am: 84c6b2b933 am: 2329cb1716 am: 2f3d5b0706
am: b9e49705a2

Change-Id: I984716bf959def93e6ee35f9531225f2b8240387
84c6b2b93365f271e208443e540c976e65a124a2 16-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Lower log level when looking up networkId -1"
f56bacdb29215639cbfe0aef82b048c246e7a215 16-Feb-2017 Roshan Pius <rpius@google.com> WifiMonitor: Broadcast connection events

Add methods to broadcast connection related events.

Bug: 35357251
Test: Unit tests
Change-Id: I372dfcaa63ce75e9bc0e7bb2f1b68b72549abc9f
ndroid/server/wifi/WifiMonitor.java
72930acda921a35e708db3e25dfc2fb289070264 16-Feb-2017 Roshan Pius <rpius@google.com> Merge changes from topic 'new_eap_phase2_and_nfc' am: 995a0b5430 am: 58a0b91109 am: 941a1ca5d9
am: f4bf2ced33

Change-Id: I7c322eaeb2e36abf3549a98432af1348ebec0955
896ee0e6df02a4b2f0fcec4053e821d0486501da 16-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Expose current network methods am: 0a3dcd7229 am: 7c9bdd1efa am: e641ae3ab8
am: 00f4a97df7

Change-Id: I27f35c04bb7d5895242115ac2ab76afb71151281
c147c7e9ffc3b36cd5ecb8311169981209bce30b 16-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Cleanup getter method calling code am: 3aa9b7e616 am: b969cd0a9c am: 1e5e2eeeda
am: c0c8ae3f1c

Change-Id: Ib29a71a5c9b43f94ac77cd8318f56361a2f7bc87
c91dfb44f9d841d2f5b236a6059f16a7b3bf14ec 16-Feb-2017 Roshan Pius <rpius@google.com> SupplicantHal: Add the calling code for remaining methods am: 7651e69b6f am: 054c228342 am: f142f15895
am: e4869d8eac

Change-Id: Ic3d0a41e4128e8d5465ea69f6f742858eff55cd6
7c9bdd1efa49d48ee1955d2beeba157ec220907a 16-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Expose current network methods
am: 0a3dcd7229

Change-Id: Id71246f1277dcb39f70a60677eccf534023eeef6
b969cd0a9c6e30e8b28f5b64f285330089ec1c1d 16-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Cleanup getter method calling code
am: 3aa9b7e616

Change-Id: I488261071a8157e5337e3244acb7872e4df0bd4a
054c228342d2a5ff657e6859cf40c101ca3a4e97 16-Feb-2017 Roshan Pius <rpius@google.com> SupplicantHal: Add the calling code for remaining methods
am: 7651e69b6f

Change-Id: I1b94a94829cf3eb990119a454128ea77fe09fa16
995a0b54303337da561026301ad172eb9e0a998f 16-Feb-2017 Roshan Pius <rpius@google.com> Merge changes from topic 'new_eap_phase2_and_nfc'

* changes:
SupplicantStaIfaceHal: Expose WPS public methods
SupplicantStaIfaceHal: Expose current network methods
SupplicantStaIfaceHal: Cleanup getter method calling code
SupplicantHal: Add the calling code for remaining methods
225f61a54ea07c1cc63f8a6d1bc2c161b638df3a 16-Feb-2017 Roshan Pius <rpius@google.com> WifiMonitor: Methods to broadcast network requests am: 1e13813336 am: f2d6226eda am: cc343c6357
am: 89d15c4923

Change-Id: I289ffc6884b1e58b6cdd4baf3243766ddd3d477d
20adbc4b03da009b16f515c9dc7b09a878107ea8 16-Feb-2017 Roshan Pius <rpius@google.com> WifiMonitor: Method to broadcast Wnm event am: 7f21b7a688 am: daff98b0a8 am: 35ad874932
am: c8857e4562

Change-Id: I8c074033fee4f247b292ff9b9cd49e2e99d8b537
3f82be7a3efb8a0a8f70041f5acfbdc91f154c29 16-Feb-2017 Roshan Pius <rpius@google.com> Passpoint: Change ICON response handling am: 773ef3483e am: a156de13df am: e8509445c8
am: 948fd6b0af

Change-Id: I7f14b7298ca544a4f47b26ecdf38829426de85ed
95563700d79114a55835ccb24435947032d0a0d1 16-Feb-2017 Roshan Pius <rpius@google.com> Passpoint: Change ANQP response handling am: 65d8ba5dd5 am: 9f5e8b295a am: 36ef5254a8
am: 7fac008457

Change-Id: I57b5cbef8a302af24979771ad061a1e06a83aabd
1bf364c20bd2f966390e0413cf942b7d417d44b4 16-Feb-2017 Randy Pan <zpan@google.com> Lower log level when looking up networkId -1

Looking up WifiConfiguration with networkId -1 is a valid use
case.

Bug: 34165254
Test: build and boot
Change-Id: I01f835d4f83a84cbbdff5031d81d10c18b16bb76
ndroid/server/wifi/WifiConfigManager.java
1e1381333657f0a02bf1b300d1e600f87e5aae38 16-Feb-2017 Roshan Pius <rpius@google.com> WifiMonitor: Methods to broadcast network requests

These requests are sent from wpa_supplicant and needs to be handled by
framework.

Bug: 35357251
Test: Unit tests
Change-Id: I4d5e151063ec1bc50260fe6f6f7f35b1394e2a7d
ndroid/server/wifi/WifiMonitor.java
ff105cb59573427268e851758d1c5b934f2bc6b0 16-Feb-2017 Rebecca Silberstein <silberst@google.com> Merge changes I66dbef26,Id5c1d2f2 am: d0f7cebec5 am: 418e5ae7c1 am: 0a322c80f0
am: 4092c4d91a

Change-Id: Ibc06f39c14de09b96dea2da0dad11feaf8de57bf
7f21b7a68872183ae89545b07f716aafa7dc3674 16-Feb-2017 Roshan Pius <rpius@google.com> WifiMonitor: Method to broadcast Wnm event

Bug: 35393853
Test: Unit tests
Change-Id: Iada3425c26541181692d61f66f2cacfa79908761
ndroid/server/wifi/WifiMonitor.java
773ef3483e18f1afbd9cdce1564add3d89cb21fa 16-Feb-2017 Roshan Pius <rpius@google.com> Passpoint: Change ICON response handling

Currently, the ICON done notification from WifiMonitor is used
as a trigger to fetch icon data in PasspointEventHandler.
In the HIDL interface, the callback itself will contain all the
necessary icon data. So, change the currently handling to prepare for
integration with HIDL interface.

Changes in the CL:
1. Move the icon data fetching to WifiMonitor away from
PasspointEventHandler.
2. Change the params of the icon done event to include the icon data.
3. Add a new public method in WifiMonitor to send the notification out
from WifiMonitor, which will be used by the HIDL interface in the
future.

Note: There are no unit tests for any of these changes because this CL
is just moving things around and most of it is going to be removed when
we integrate with HIDL.

Bug: 35393853
Test: Connects to passpoint networks.
Test: Will send for regression tests.
Change-Id: I197180c8a8ec8673e5e8fa29ba8bb51b026d44fb
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/IconEvent.java
ndroid/server/wifi/hotspot2/PasspointEventHandler.java
ndroid/server/wifi/hotspot2/PasspointManager.java
65d8ba5dd551cd132789e8feb270dfc7998dfbdc 15-Feb-2017 Roshan Pius <rpius@google.com> Passpoint: Change ANQP response handling

Currently, the ANQP done notification from WifiMonitor is used
as a trigger to fetch anqp data in PasspointEventHandler.
In the HIDL interface, the callback itself will contain all the
necessary ANQP data. So, change the currently handling to prepare for
integration with HIDL interface.

Changes in the CL:
1. Move the ANQP data fetching to WifiMonitor away from
PasspointEventHandler.
2. Change the params of the ANQP done result to include a newly created
struct (AnqpResult) which would contain the bssid and the ANPQ results.
3. Add a new public method in WifiMonitor to send the notification out
from WifiMonitor, which will be used by the HIDL interface in the future.
4. Remove the redundant PasspointEventHandler.parsANQPLines().

Note: There are no unit tests for any of these changes because this CL
is just moving things around and most of it is going to be removed when
we integrate with HIDL.

Bug: 35393853
Test: Connects to passpoint networks.
Test: Will send for regression tests.
Change-Id: I7fdf8fbdba13d267eb986db3f8a5854c606bcd4c
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/AnqpEvent.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/hotspot2/PasspointEventHandler.java
ndroid/server/wifi/hotspot2/PasspointManager.java
d0f7cebec538f526929376cf1b18514148678d3c 16-Feb-2017 Rebecca Silberstein <silberst@google.com> Merge changes I66dbef26,Id5c1d2f2

* changes:
WifiStateMachine: allow config removal
WifiStateMachine: add delete config helper method
b2e6cc549450b4260dc6dfc490ca5c8af86f1788 16-Feb-2017 Peter Qiu <zqiu@google.com> Merge changes I026cd52c,Ic378bd76,I373c9a0f am: c5b7168db7 am: 9c265480f1 am: 551cee2b52
am: 3c3e6fd25f

Change-Id: I0d1a4e31c0899e5d1833d1d228d6aa560ff33690
0a3dcd72290481cb1fcbaaec268cccf343e4ff48 14-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Expose current network methods

Expose methods to set bssid of the currently configured network and
retrieve the NFC token of the network.

While there,
Add unit test for the removal of all networks from wpa_supplicant.

Bug: 33383725
Test: Unit tests.
Change-Id: Ibfff7a3349967c851a3cde62e082aa5d6ec2ee91
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStaNetworkHal.java
ndroid/server/wifi/util/NativeUtil.java
3aa9b7e616f685ded8fade523317e96cedcdcc2d 14-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Cleanup getter method calling code

Clean up the existing calling code wrappers over the HIDL getter
methods so that they follow the same pattern throughout the file.

Bug: 33383725
Test: Existing unit tests
Change-Id: Id6547d54b5154a89f6a847ec908b1c5bceed3ad4
ndroid/server/wifi/SupplicantStaIfaceHal.java
7651e69b6f5e2b28a4fee7284ac2522faa002c9f 14-Feb-2017 Roshan Pius <rpius@google.com> SupplicantHal: Add the calling code for remaining methods

Adding wrapper methods for all the remaining methods in
SupplicantStaIfaceHal & SupplicantStaNetworkHal. Will add public methods
to access these in subsequent CL's along with tests.

Bug: 33383725
Test: Existing unit tests
Change-Id: I4d1982ba760043b2742c0bffe10f25e8a6136458
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStaNetworkHal.java
5f39baacf16b55c5551574bd1d973cdb14f70c45 14-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Expose WPS public methods

Expose public methods for performing WPS operations. Most of these
public methods accept string params and perform the necessary conversions
to the HIDL methods.

While there,
Tighten the regex'es used in SupplicantStaNetworkHal.

Bug: 33383725
Test: Added Unit tests for any non trivial param conversions.
Change-Id: I95ccb41f9624cc46b91b61c39bfbf0a321ea4eb2
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStaNetworkHal.java
c5b7168db71c846d635986b0e55a776606dbb545 16-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge changes I026cd52c,Ic378bd76,I373c9a0f

* changes:
hotspot2: save and load Passpoint configurations to/from config store
hotspot2: add config store data for Passpoint
hotspot2: add utility class for XML serialization of Passpoint configurations
299dea3028d09f5622284630c359fdb6920fc4e4 16-Feb-2017 Michael Plass <mplass@google.com> Merge "New helper class BitMask" am: c7fe09b4e7 am: 940bbaa455 am: 1c54313445
am: ba8cce6366

Change-Id: Id1f69f877574d28eff93f042e1fa3b68df4c3153
49a847941e08faec5901d4824040a522b773ef83 15-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] Pipe discovery window period configuration to HAL

Discovery window period configuration was added to ConfigRequest.
Pipe the information to the HAL (HIDL) API.

Bug: 33552536
Test: integration (sl4a) tests
Change-Id: I1570f98650cc5dbb51d9e722088f9f13931474cd
ndroid/server/wifi/aware/WifiAwareClientState.java
ndroid/server/wifi/aware/WifiAwareNativeApi.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
c7fe09b4e7e2576188477304c8ff1550ca76b950 16-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "New helper class BitMask"
6b6c7b51d735fdd7d9b6759f8eaf535df8eaf522 16-Feb-2017 Roshan Pius <rpius@google.com> WifiMonitor: Methods to broadcast remaining Wps events am: c626bc21f7 am: 479467fd37 am: cc2836ede3
am: 02af0f75ef

Change-Id: I7cb34049ddd7d5cdb1746c72930ee1ce8431ad42
113c235c7f892cf3b0686013b40c45d8c5d6106e 16-Feb-2017 Roshan Pius <rpius@google.com> WifiMonitor: Method to broadcast WPS fail event am: ef027b4240 am: a2153122b5 am: ed2d47767c
am: 87e9fa291d

Change-Id: I51b523816d729dee16cfb631cb1dc0dd1cb946a6
f9c69201a95062e33cf62d7bacd465e799788a8f 11-Feb-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: allow config removal

Allow FORGET_NETWORK and REMOVE_NETWORK commands to be handled in the
DefaultState. This means we can now remove configs in any state.

Proper handling for loaded config checks are handled by
WifiConfigManager. A test was added to confirm calling removeNetwork
with a random int properly returns false when no network configs are
loaded.

Bug: 32809235
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: All automated Sanity tests passed
Change-Id: I66dbef26530e3376f00537a3f1241bfd4f8a0d8b
ndroid/server/wifi/WifiStateMachine.java
3c5b13dca7ddb243da91def206c344701d699812 11-Feb-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: add delete config helper method

In preparation for handing config remove/forget commands when
WifiStateMachine is in any state (ie, not just connect mode), create a
helper method to call WifiConfigManager to delete the configs and send
the proper message reply.

Bug: 32809235
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: Id5c1d2f2e65b2166ff1f14183aa448c00504114f
ndroid/server/wifi/WifiStateMachine.java
c626bc21f7ebac14daa31ca7014767970127efee 15-Feb-2017 Roshan Pius <rpius@google.com> WifiMonitor: Methods to broadcast remaining Wps events

Bug: 35357251
Test: Unit tests
Change-Id: I27a3fb384dbb37fa6d1b8a4fd30f43be76e4e9aa
ndroid/server/wifi/WifiMonitor.java
ef027b4240eb994976dc6173fa396fe10b45ae52 15-Feb-2017 Roshan Pius <rpius@google.com> WifiMonitor: Method to broadcast WPS fail event

Bug: 35357251
Test: Unit tests
Change-Id: Ieb5ea5383a80205df616f132e735bc90f40716a2
ndroid/server/wifi/WifiMonitor.java
10c299cbdc46b743571bd3a040a34d62e8137532 16-Feb-2017 Roshan Pius <rpius@google.com> NetworkListStoreData: Handle runtime exceptions am: 7d100897cd am: 765cb28da3 am: 66bfed0391
am: e07f33c5cc

Change-Id: Ie089b9ee0b6078d9c10f76835b01fca2f4a5c152
6d8d20617e742e68d9dc53380664a85dbaa3f927 15-Feb-2017 Michael Plass <mplass@google.com> New helper class BitMask

Helpful for translating bit flags.

Test: New unit test
Bug: 34902105
Change-Id: Id5bdcc0b22c3171fb3111d4fd3343f74de059ea1
ndroid/server/wifi/util/BitMask.java
7d100897cd3ab3a05c3925da42bd25af6e3c8c4a 15-Feb-2017 Roshan Pius <rpius@google.com> NetworkListStoreData: Handle runtime exceptions

The enterprise config setters can raise Illegal argument exceptions if
the data being set is incorrect. This shouldn't normally happen until
someone manipulates the XML (or downgrades as in the linked bug). Handle
such runtime exceptions gracefully and skip over that network block.

While there made a small nit,
Rename parse/writeWifiConfig to parse/writeNetwork to be symmetric with
other method names in the file.

Bug: 35244730
Test: Unit tests
Change-Id: I168eb383090712f7c5df388a6fcc3a1ed1055fe3
ndroid/server/wifi/NetworkListStoreData.java
99d4b81a25df948c46cac9027eb111ee7a786742 14-Feb-2017 Peter Qiu <zqiu@google.com> hotspot2: save and load Passpoint configurations to/from config store

Bug: 31065385
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: install Boingo Passpoint profile on an angler, verify
the profile persist over boot and automatically connect
after boot

Change-Id: I026cd52c01702babcbe3c761437fc340260e5fe5
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointObjectFactory.java
a7f0f6e6fc75c94ab9af3cf1a6f390390c640d70 13-Feb-2017 Peter Qiu <zqiu@google.com> hotspot2: add config store data for Passpoint

Two types of Passpoint configuration will be persisted to the storage:
- System wide configuration - persisted to share store
- User specific configuration - persisted to user store

Currently, the system wide configuration only consists of provider index,
which is used for assigning unique ID to providers during provider
creation. And the user specific configuration will contain information
for each installed provider.

Bug: 31065385
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ic378bd761af4e45f83428210dd3a493d845a786b
ndroid/server/wifi/hotspot2/PasspointConfigStoreData.java
ndroid/server/wifi/hotspot2/PasspointProvider.java
d501fd07f0e2ab6a320a1570e426926838a1b316 10-Feb-2017 Peter Qiu <zqiu@google.com> hotspot2: add utility class for XML serialization of Passpoint configurations

This is used for serializing/deserializing Passpoint related configurations
to/from config store.

Bug: 31065385
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I373c9a0f30a8ccf47f2df860f43982dc03630322
ndroid/server/wifi/hotspot2/PasspointXmlUtils.java
f192e56ae2b5dbb6f3a24806527f357af7f9d365 15-Feb-2017 Amin Shaikh <ashaikh@google.com> Merge "Pass enabled networks to recommendation provider" am: 97a3f7ce13 am: ed73199465 am: 1305111d22
am: e5ebe4cab2

Change-Id: Ie3a4241e7cd1d9b7e8bdbb145f3ac4e6758ca133
97a3f7ce13f5655f6212d06fc3e21f692473deb0 15-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Pass enabled networks to recommendation provider"
c22fc17ab019354692253b1a51df9f669226ffc4 15-Feb-2017 mukesh agrawal <quiche@google.com> Merge "WifiStateMachine: add cleanup todo" am: b36220a402 am: eb67e72ac1 am: 1e226d1411
am: 9170e7f915

Change-Id: Iae212daa75b60e8fa1bb8e3adf39fdb313688c01
b36220a4026eff1d7f11e6b2d6294f1ce0846b01 15-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "WifiStateMachine: add cleanup todo"
05cef46d2ae1cbc48eacdc8a71864419b9815fbc 14-Feb-2017 Roshan Pius <rpius@google.com> Merge "SupplicantStaNetworkHal: Add FT flags" am: 8c548d6067 am: 31166c4528 am: 13b253c580
am: 9fb1b83aad

Change-Id: I6f262a49be11b1e759408a34cd1604f79803b77a
8c548d60679e8bd82a5fe8f95f4d6c1723aaff1c 14-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "SupplicantStaNetworkHal: Add FT flags"
11952e36888379a8282609f58fd6d742e5b0740b 14-Feb-2017 mukesh agrawal <quiche@google.com> WifiStateMachine: add cleanup todo

At an appropriate point in the future, we should
remove CMD_DIAGS_CONNECT_TIMEOUT.

Add a todo to that effect.

Bug: 34691329
Test: runtests.sh
Change-Id: I1fe67d94385378ba8d10d71bb9d4ec522469cc1d
ndroid/server/wifi/WifiStateMachine.java
30f4d10cc70aad84ce4119ae7951b77dae937d46 14-Feb-2017 Roshan Pius <rpius@google.com> Merge changes Icd0f23c1,Ica1fd02d am: 4193eb5211 am: 7b023c932e am: b046ce8560
am: 56d58dce96

Change-Id: I493690bf1f81bc7cda412041082e84d56135ee41
4193eb52117c391971ab78eea5f99821f335510d 14-Feb-2017 Roshan Pius <rpius@google.com> Merge changes Icd0f23c1,Ica1fd02d

* changes:
SupplicantStaIfaceHal: Implement connect/roam to network
SupplicantStaIfaceHal: Load networks
9395000757f025f02e7a557ef30af534314ca56c 14-Feb-2017 Peter Qiu <zqiu@google.com> Merge "hotspot2: check access permission before querying Passpoint icon file" am: ae449e6105 am: f0e17d8111 am: 59091e47ee
am: 29d7743ab5

Change-Id: I204eed48c5e2b86f3ce206ab8b858b1ad14cb3d4
ae449e6105dd7ce431f3b5a03956685352c4e786 14-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: check access permission before querying Passpoint icon file"
59723d40e65c1ec8987b137c717c4cb6d4a9685c 14-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Fix bootloop."
c7a4b6706fa09042bb36a64036d86d88eb6e4126 11-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaNetworkHal: Add FT flags

This is a port of the existing logic in WifiSupplicantControl. Need to
add the FT flags when adding the network to wpa_supplicant when the
device supports it (specified in device config.xml). Changed the input
arguments to SupplicantStaNetworkHal & SupplicantStaIfaceHal so that it
takes an instance of the Context and use WifiMonitor to trigger
callbacks instead of directly sending events using WifiStateMachine
handler.

Bug: 33383725
Test: Unit tests
Change-Id: Id266835ef5dc3038057cab5b8f8da3a327f39ce2
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStaNetworkHal.java
ndroid/server/wifi/WifiInjector.java
7c0ec884188660f72977c8a80366049705c48ffa 10-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Implement connect/roam to network

This is the port of the existing methods from WifiSupplicantControl.

Bug: 33383725
Test: Unit tests

Change-Id: Icd0f23c1239beae05769ec99c93f84a4c1db16c4
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStaNetworkHal.java
5248c83abcc5cbfc67bdb511b07b6565157ff329 14-Feb-2017 Ningyuan Wang <nywang@google.com> Merge "Override equals() for wificond java side parceable classes" am: a0fc0940b2 am: 7dd0c6f978 am: 6c702a3478
am: 566eac9262

Change-Id: I2429c5851a1e5dd178a86cf8ac475681fbb48cc0
83b8a3d25eb4991277d8ec3720bc1f3d821166b6 23-Jan-2017 Peter Qiu <zqiu@google.com> hotspot2: check access permission before querying Passpoint icon file

Bug: 34610107
Test: make -j32
Change-Id: I0959c8adb50e5944cd9ff9b3a557ab6266ee8765
ndroid/server/wifi/WifiServiceImpl.java
a0fc0940b2d584918073d76f448bc4705c16acbc 14-Feb-2017 Ningyuan Wang <nywang@google.com> Merge "Override equals() for wificond java side parceable classes"
6a44d8afc7c7832de4fa66cbf7c9e0912247051e 14-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[HAL Device Manager] getSupportedIfaceTypes() mod to never return null" am: 254c664716 am: e53731a195 am: 6e61210072
am: be81322ee4

Change-Id: Iac765367cbf3877cba5256dcbcd0cc3015dcfa39
254c664716d102f2c1cecb23f6817af111271c54 14-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[HAL Device Manager] getSupportedIfaceTypes() mod to never return null"
e450fe1a611e4dcf05046a6aa0df0bc8300cba61 14-Feb-2017 Etan Cohen <etancohen@google.com> [HAL Device Manager] getSupportedIfaceTypes() mod to never return null

Change the semantics of HalDeviceManager.getSupportedIfaceTypes so
that it never returns null. It now always returns a Set<IfaceType> -
possibly an empty set.

Cleaner than clients trying to figure out error conditions.

Bug: 35101185
Test: unit tests (including new one for error)
Change-Id: Icdff4192b3b7dc5901110e243a0a021a1593c01b
ndroid/server/wifi/HalDeviceManager.java
c5d349d814e5eeb72beb62d722699a9624fb9932 13-Feb-2017 Julia Reynolds <juliacr@google.com> Fix bootloop.

Bug: 35310090
Test: user device
Change-Id: Ia4bd2943b88c61d7c648d898b26bb2fd9e4fe094
Merged-In: Ia4bd2943b88c61d7c648d898b26bb2fd9e4fe094
ndroid/server/wifi/hotspot2/NetworkDetail.java
ae53bc959ac0b401443b03f24531c4f102bc60e3 14-Feb-2017 Randy Pan <zpan@google.com> Add an API to reset firmware roaming configuration am: 374f78d384 am: fc39301d9c am: 0f4705b02b
am: 8f4e6077e4

Change-Id: I9788e918565bf445cf7100f78736e473284cac75
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiVendorHal.java
35f55a0fe4c3997aa9f5e238b9a82bc1d647f71d 14-Feb-2017 Michael Plass <mplass@google.com> Merge "[WifiVendorHal] setCountryCodeHal" am: 982ca4b928 am: be58ab3e1f am: 66e56c6422
am: 4cf85a42fa

Change-Id: I55aa98330f1f08bf6e28cee523fee581554a94d5
982ca4b9289697bc4e3a8922412b0535d7f1c71c 14-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "[WifiVendorHal] setCountryCodeHal"
8104a5f2c02d96f239899e79588e5a52feefe89b 14-Feb-2017 Ningyuan Wang <nywang@google.com> Merge "Initialize WifiSsid from a byte array" am: 545822d8eb am: 37d6eb5124 am: c61202575f
am: 380386696a

Change-Id: Ia76bab7a6c1e7d61d097ea524af8942d8cc74aec
545822d8ebc32d506fb2674b39a59eb6ed55aa93 14-Feb-2017 Ningyuan Wang <nywang@google.com> Merge "Initialize WifiSsid from a byte array"
e3feab74d9a9aab2a4ed193209ff5058e64be403 14-Feb-2017 Ningyuan Wang <nywang@google.com> Use NativeUtil methods for WifiStateMachine am: 11d0776431 am: d1dcfbe676 am: 6595827641
am: 52d49ffe73

Change-Id: Id4277f56f1f9dfbdc8c0184b644ae7d757182e2e
f180b0109b3fce79609b03ae2f7fbeff02d96b80 10-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Load networks

Porting over the load networks from wpa_supplicant to HIDL interface.

Bug: 33383725
Test: Unit tests

Change-Id: Ica1fd02dd2d5fae823e17b61ffd12d9090ca8fd0
ndroid/server/wifi/SupplicantStaIfaceHal.java
11d07764318e2491003346ce88047862fea45b4f 11-Feb-2017 Ningyuan Wang <nywang@google.com> Use NativeUtil methods for WifiStateMachine

Bug: 35154749
Test: compile, unit tests

Change-Id: I0e8839059017c873ae64a0b84ddf42ce83c93a87
ndroid/server/wifi/WifiStateMachine.java
861d0f41709f00a6484dfc15a89c475d50b2f860 13-Feb-2017 Mukesh Agrawal <quiche@google.com> Merge changes Ib08b11b8,I849169e3 am: 65ca369420 am: 42e7a1c141 am: ca397d6a5d
am: 8cd3b7340f

Change-Id: I27c9e7bf9701a12ea99b276e68422e3311a50cec
6e2b8430427ec78d3dbbef908c6a9c8dc2484907 13-Feb-2017 Sohani Rao <sohanirao@google.com> Merge "P2pService: Handle invalid WifiChannel usecases" am: b85c567ae4 am: 46aa035c65 am: 57d3203c33
am: d556ae5263

Change-Id: I47ec70c923a538bf6172cf9ac99698db620ce3ca
65ca369420a66fbb44610a37e93cc1a519ac2a1c 13-Feb-2017 Mukesh Agrawal <quiche@google.com> Merge changes Ib08b11b8,I849169e3

* changes:
last mile: add timeout support (2/2)
last mile: add timeout support (1/2)
b85c567ae482d15e11accd0a87cde039ce303efd 13-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "P2pService: Handle invalid WifiChannel usecases"
755bbe962c20d37491dd9264ad3497bf27e33602 13-Feb-2017 Ningyuan Wang <nywang@google.com> Initialize WifiSsid from a byte array

Bug: 35318006
Test: compile, unit tests
Change-Id: Ib23b549af3056111c3c8ae6faaafb5d027cfa9d9
ndroid/server/wifi/WificondControl.java
79bb1568d439f4db2ba4160bd2ae23cdadd774d3 13-Feb-2017 Ningyuan Wang <nywang@google.com> Merge "Use NativeUtil methods for WificondControl" am: 6f8a2a08c7 am: 99046bf69a am: 475d6a900a
am: 9c88c08993

Change-Id: Ic973290defc3bcf4f3c1aba027369c8a43aab59e
6f8a2a08c76f219d9332609da1d8f191ab36b53f 13-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Use NativeUtil methods for WificondControl"
f1423f0bc5fbda5062adb0bd465b999799571f53 10-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] setCountryCodeHal

For setting the country code in the AP case.

Test: Unit test added
Bug: 34901480
Change-Id: Id7c224f4a172d2b0cd72ec32977132c2fbb8b3b3
ndroid/server/wifi/WifiVendorHal.java
82a4a88af120bfca237f63e3e6645a5f80760856 13-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] setScanningMacOui am: df8568a5aa am: f63e1fdf87 am: 770b3603cb
am: 1ef67786ce

Change-Id: I2060e00b8fb9c3344e28b44dafef42a5effabbc0
e8f6dca29124f8ddb86a5af4f771d4be63478485 11-Feb-2017 Sohani Rao <sohanirao@google.com> P2pService: Handle invalid WifiChannel usecases

Race conditions may occur in WifiP2pService between setting up of
WifiChannel with WifiStateMachine, handling WifiMonitor events and
recieving messages over AsyncChannel from a client. Ensure all accesses
to WifiChannel is protected inside a null check. Additionally, failure
to setup WifiChannel will move P2p to disabled state, this will provide
clean handling of error cases.

Bug: 35184612
Test: Unit tests
Change-Id: I299957c0f2aee83e3451c7c001cc1e53a706ef7a
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
f4b53ff21ce0aa25131222d0cd15cc4a5e8c0c4f 11-Feb-2017 Ningyuan Wang <nywang@google.com> Use NativeUtil methods for WificondControl

Bug: 35154749
Test: compile, unit tests, manual tests

Change-Id: Idc9e7569b3c86b409646be5edb9f16060619f167
ndroid/server/wifi/WificondControl.java
df8568a5aaed3c82ff7ef1ecafab85abf7a99da7 11-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] setScanningMacOui

Test: New unit test
Bug: 34901472
Change-Id: I1a6c293c52a0f1eae411a091da75a03cc8c6b4d7
ndroid/server/wifi/WifiVendorHal.java
4d8d33a90f6cce69854181db890ce60b8375797c 13-Feb-2017 Julia Reynolds <juliacr@google.com> Fix bootloop.

Bug: 35310090
Test: user device
Change-Id: Ia4bd2943b88c61d7c648d898b26bb2fd9e4fe094
ndroid/server/wifi/hotspot2/NetworkDetail.java
888d5afb49181de37d15faa0630bfc73c7e85bf8 11-Feb-2017 Roshan Pius <rpius@google.com> Merge changes I2385e29b,I308e2632,I2deb19d6 am: a2abce2c29 am: c94ca578e2 am: d27bf37f27
am: 327068e59c

Change-Id: I45d7188c13c56d54bc9e8997974422abb2679bbc
a2abce2c29a548fd94bb96cbaf5fba8b1a59debe 11-Feb-2017 Roshan Pius <rpius@google.com> Merge changes I2385e29b,I308e2632,I2deb19d6

* changes:
SupplicantStaNetworkHal: Load network ID
SupplicantStaIfaceHal: Expose public methods
SupplicantHal: Use the new NativeUtil methods
5db0a36555a5691a62dd9e6a0dff4b0e546779b8 11-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[Wi-Fi HAL] Add feature support info for NAN/P2P/AP" am: dbe7bbc043 am: ac1345bf3b am: f7d4fce966
am: 8380371829

Change-Id: I6e8ce830bdfff04173d4ac9fb36f85b462981bac
249f3fddcadd69260c47aa36ffaca4be5dfed596 11-Feb-2017 Roshan Pius <rpius@google.com> Merge "NativeUtil: Create utility for native modules" am: 42ac0dbf1e am: 8a8eca5d58 am: dca8a45cf1
am: 071f9cd968

Change-Id: I4b144ff95118d4698a8e728e204b2917611f455a
dbe7bbc04366b9e4472e91477be745d16ac97b09 11-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[Wi-Fi HAL] Add feature support info for NAN/P2P/AP"
42ac0dbf1eafcb7b04548922c5cfe33a631061f2 11-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "NativeUtil: Create utility for native modules"
127d56051e0da6302d1f3f1d43f804e5e9652c26 11-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[HAL Device Manager] API to return available interfaces" am: efb9bf2f5d am: 847871e4b3 am: 51b4f390fa
am: 0fc6b5c6d9

Change-Id: Ifd7f5fe3360403fd906421c655d2b092a6632da5
8e68e6198e07adb7babbf6b611b4255201edd26e 11-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Update capabilities" am: e4da9c3d13 am: 8257050a9d am: 2d7aec4682
am: 3cfe66ca60

Change-Id: Ia928c66c95530889d6b09813d7907e532893836e
efb9bf2f5dc149dc36edbf025b6d0eda91013a15 11-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[HAL Device Manager] API to return available interfaces"
ea6cc92416db63cd94b800ccbd7dd0fa5c19f7b7 11-Feb-2017 Roshan Pius <rpius@google.com> Merge "XmlUtil: Persist WifiConfiguration.status field" am: 4126ba3f81 am: eaedaef211 am: ecf0bd1b00
am: 3b70983f60

Change-Id: Idc7758113430a12a3f7e2ac8340b376f23331a6c
e4da9c3d13a2e86ad7f808b617335a9f12d8f9d3 11-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Update capabilities"
4126ba3f81e7f010fe17e3d0ca5ea87ff6e79bf4 11-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "XmlUtil: Persist WifiConfiguration.status field"
1aefd66d75da546f30e608ac979eb6594286105f 11-Feb-2017 Roshan Pius <rpius@google.com> Merge "HIDL P2P Interface bring-up - stage 1 - basic class." am: 5d5f232cd9 am: caad7f5401 am: 44e34ac2c0
am: dd765c51f3

Change-Id: I2d53261c5e2d77f1babd703389f3967fea02afb9
5d5f232cd9441a3bedad001d1a094929d971cb05 11-Feb-2017 Roshan Pius <rpius@google.com> Merge "HIDL P2P Interface bring-up - stage 1 - basic class."
0ce807e687947d68b2024eb77661dd1bb018a32f 11-Feb-2017 Etan Cohen <etancohen@google.com> [Wi-Fi HAL] Add feature support info for NAN/P2P/AP

Use the set of supported interfaces to update the supported
feature set for STA (infra) NAN, P2P, and AP (soft AP).

Bug: 35101185
Test: builds
Change-Id: I150f58f4ed4c8beb9de8eafe693041abeccb4368
ndroid/server/wifi/WifiVendorHal.java
2c77fc78df8f1e3175c3cd184da1e8301aee75c8 10-Feb-2017 mukesh agrawal <quiche@google.com> LastMileLogger: make fail-safe more robust

In order to minimize dependencies, we don't synchronize
the execution of wifi-events.rc, and the start-up of
WifiService. Consequently, it may be possible for
LastMileLogger to be initialized before the Wifi
tracing instance.

Given the above, we shouldn't manipulate the Wifi tracing
instance in the LastMileLogger ctor. In particular,
attempting to arm the fail-safe (opening the free_buffer
file) in the ctor risks never arming the fail-safe.

Resolve this problem, by arming the fail-safe on calls
to enableTracing().

While there: if the fail-safe cannot be armed, bail out
of enableTracing().

Bug: 34683800
Test: runtests.sh
Change-Id: Ibb2922609bf8e33f2a3ce087d383e59d86683b7e
ndroid/server/wifi/LastMileLogger.java
309c7101dc49d9cd17e4fe0ab70d244dfde0d4e1 11-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Enable Subscribe Service ID List Attribute inclusion" am: de617e06ec am: 0c0e7120b7 am: 2d02a63fb9
am: 54340b9433

Change-Id: I9b35ddaf3061dc947682909f541d112364fbaef0
8e31fa1eab7c376c5af9c46d9b0caa2c4d40a449 11-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Update framework to match HIDL changes" am: fab3621561 am: 70119a096f am: 95f82becb2
am: 2bffa17622

Change-Id: I5632aa66c876e8ea97e69b3e55d7976e914058d2
3355eb4392aabfae9453e7d6f11d9f0620bf5dae 01-Feb-2017 mukesh agrawal <quiche@google.com> last mile: add timeout support (2/2)

- Update WifiStateMachine to report connection timeout
events to LastMileLogger.
- Update LastMileLogger to process timeout events, but
ignore spurious timeouts.
- Update LastMileLoggerTest, to be clearer about which
sections of trace data are present.
- Revise the requirements for connection IDs in
BaseWifiDiagnostics.

Bug: 34691329
Test: wifitests/runtests.sh
Change-Id: Ib08b11b8907f47f8b62bfb5e38d0a8263e9d2e4a
ndroid/server/wifi/BaseWifiDiagnostics.java
ndroid/server/wifi/LastMileLogger.java
ndroid/server/wifi/WifiStateMachine.java
3f2187fdcc3ed55c909cb4cdee589744655d3243 01-Feb-2017 mukesh agrawal <quiche@google.com> last mile: add timeout support (1/2)

As preparation for adding timeout support, update
the reportConnectionEvent() methods to take a
|connectionId| parameter.

This new parameter will be used to ensure that
LastMileLogger ignores spurious timeouts.

The actual timeout logic, as well as real values
for the new parameter, will be added in the next
CL.

Bug: 34691329
Test: wifitests/runtests.sh
Change-Id: I849169e36ca1798ebd1c5fe57d14515f374a0d71
ndroid/server/wifi/BaseWifiDiagnostics.java
ndroid/server/wifi/LastMileLogger.java
ndroid/server/wifi/WifiDiagnostics.java
ndroid/server/wifi/WifiStateMachine.java
727ba04029935d4faee3c7fce8a5a0ba6ed0a4ea 10-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaNetworkHal: Load network ID

This is needed during migration of networks. So, populate the network ID
when loading network config from wpa_supplicant.

Bug: 33383725
Test: Unit tests
Change-Id: I2385e29b98fd9f950cdd4f353b9d7c1429f5d7ec
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStaNetworkHal.java
d95fa596d07855b70ff18a50a48e773155a919f5 09-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaIfaceHal: Expose public methods

a) Expose public methods for all the needed HIDL calls.
b) Add javadocs for all of these public docs.
c) Corrected a few other nits.

There isn't any logic changes in this CL and hence no unit tests added.

Bug: 33383725
Test: Existing unit tests
Change-Id: I308e2632d7c870540641f838c5cd8bedaedcc4f4
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStaNetworkHal.java
2104cc5eaf4ed7b9047ca1de460838a8ca6d0fe1 09-Feb-2017 Roshan Pius <rpius@google.com> SupplicantHal: Use the new NativeUtil methods

Bug: 33383725
Test: Unit tests
Change-Id: I2deb19d6cbdc7422c9157a2d515daaff7e17fe66
ndroid/server/wifi/SupplicantStaNetworkHal.java
99ee64591d5d0ac986b1dbd676382b8a1409a36f 09-Feb-2017 Roshan Pius <rpius@google.com> NativeUtil: Create utility for native modules

This class will contains helper functions for converting data format for
modules interacting with native daemons (WifiVendorHal,
SupplicantStaIfaceHal, WifiCondControl).

SSID is encoded/decoded differently based on whether it represents an
ASCII string or not.

Bug: 35154749
Test: Unit tests
Change-Id: I466ca7bc1fe14720a922715d31376a1ca7d6c988
ndroid/server/wifi/util/NativeUtil.java
307acde0b29838b817a4fd3659a46c22be0ea314 10-Feb-2017 Etan Cohen <etancohen@google.com> [HAL Device Manager] API to return available interfaces

Return the set of interfaces supported by the device (all
chips) or a particular chip.

Bug: 35101185
Test: (new) unit tests
Change-Id: I02c7efd0ec1c11aa2301fe7192d202ce40053f24
ndroid/server/wifi/HalDeviceManager.java
de617e06ecf10ca13f382b67743e3a1489decfe6 11-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Enable Subscribe Service ID List Attribute inclusion"
fab3621561165b1060bb3036bd8576c19013d686 11-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Update framework to match HIDL changes"
6296902ef69724b106973b57b268c30ea4f1ab51 10-Feb-2017 Roshan Pius <rpius@google.com> XmlUtil: Persist WifiConfiguration.status field

Since WifiConfiguration.status field is publicly exposed we need
to persist this field across reboots. We could either,
a) Directly persist this field, or
b) Reset the field on every load using the retrieved NetworkSelectionStatus.

Going with option a) since i want to try and avoid too much logic like
this in the data loading path as much as possible. We don't use this
field internally and it's only used for external apps to check the
status of the network.

Bug: 35210874
Test: Unit test
Change-Id: I80d692affe628a29c29ad2f4b66f8c1e522b114b
ndroid/server/wifi/util/XmlUtil.java
1d5ec2316e874cc5cc68140dd664c9afe94f0fa4 10-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] handle Network Management Service exceptions" am: 4e681f923f am: 81ff4238af am: 8698b4d573
am: 5f5305a789

Change-Id: Ied0d6b194cbc7d4659f4df2011e69b15334e5fe6
4e681f923fe08c62cc7b219017da0a5ed3fbdedd 10-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] handle Network Management Service exceptions"
79d22abe8ab440408ac1d568ddced7efd1a19278 08-Feb-2017 Tomasz Wiszkowski <ender@google.com> HIDL P2P Interface bring-up - stage 1 - basic class.

BUG: 33383725
Change-Id: I4e642e68bc4a48e937bd43fb45afeff78f35da57
ndroid/server/wifi/SupplicantP2pIfaceHal.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
35a930cfb2f5496c638b156605ff1985164543fe 10-Feb-2017 Peter Qiu <zqiu@google.com> Merge "Wifi configuration store data refactor" am: 2f74844643 am: e973995a17 am: ff060237a2
am: b705a1c7e5

Change-Id: I3278210fdae8d4a7d85822864ca045df388fcb64
2f74844643d30a69e77436e93ad904c7701bac5e 10-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Wifi configuration store data refactor"
3aab62be96ae5db2cd98ea1c1636a396e14fa06e 10-Feb-2017 Roshan Pius <rpius@google.com> Merge "SupplicantStaNetworkHal: Network Response handling" am: 1b1bafd2b0 am: e4a3d3d5ce am: 8b25c8f246
am: e197d884a4

Change-Id: I57f9d61869028c4a2b0ad5988c8205e13afc5520
1b1bafd2b0278e2079f6ece9081ddb25cdf2c254 10-Feb-2017 Roshan Pius <rpius@google.com> Merge "SupplicantStaNetworkHal: Network Response handling"
701b9b87c377a36c9403b2e52b9fd8aa8ed6bf7e 10-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Modify the discovery session handle to uint8_t" am: 683990b886 am: af390c757f am: c7d45c0a68
am: 0366dcb3a9

Change-Id: I9ecbe02c2ecc9bb46f5661e1e9e70f56a7968e24
683990b8861b570411659a111b1df1632825072b 10-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Modify the discovery session handle to uint8_t"
75bb2a1c3f5c513cde140a8cec417c67423465d2 10-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] Update capabilities

Add extended service specific info and remove vendor-specific
attributes.

Bug: 35193235
Bug: 35193423
Test: unit tests and integration (sl4a) tests
Change-Id: I905c0bf4d06162fb55ff33a314634f9a2f1f8c59
ndroid/server/wifi/aware/Capabilities.java
ndroid/server/wifi/aware/WifiAwareNativeCallback.java
445b5f46264af0a2e9c043c9badb2b4f38044f11 08-Feb-2017 Roshan Pius <rpius@google.com> SupplicantStaNetworkHal: Network Response handling

Bug: 33383725
Test: Unit tests
Change-Id: I748ade8a1b65405fb56fd0fa80611d46fe19ef6b
ndroid/server/wifi/SupplicantStaNetworkHal.java
2e9d3b2775c18e167f72060e3bc0913f40ccdbb4 10-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Remove event callback for vendor-specific attributes." am: a117e55614 am: 87e1368049 am: 4f12023902
am: 735a2932d7

Change-Id: I5223e34a72539f02ddb322bd65c0acc607caf554
cb1a42a285106e31790297b5427024f43307d457 09-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] Enable Subscribe Service ID List Attribute inclusion

Include the Subscribe Service ID List Attribute by default. Enhances
the likelihood of finding the service being searched for.

Bug: 35195516
Test: unit tests and integration (sl4a) tests.
Change-Id: Iffce8416f5a83cdd98cf618177fc279cf7deb470
ndroid/server/wifi/aware/WifiAwareNativeApi.java
a117e55614a5f0ca9bdbc92f09ff248e59db7d56 10-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Remove event callback for vendor-specific attributes."
0a0b5035ce8013ed327a0802357a1b7df3061912 07-Feb-2017 Peter Qiu <zqiu@google.com> Wifi configuration store data refactor

Currently, the unified config store files contained data for
network list and deleted ephemeral SSID list. Since both of them
are owned by WifiConfigManager, it is tightly integrated into
WifiConfigManager, results in complexities when need to add
new data that's not owned by WifiConfigManager (e.g. Passpoint
configurations) to the store file.

To reduce the complexity, an abstraction is provided for the store
data to be persist to the store files. Any interested module
can register its own store data to the store file. Then at read/
write time, WifiConfigStore will iterate through each registered
store data to deserialize/serialize configuration data from/to
a XML block, to be persist to the store file.

So each StoreData is responsible for serialization/deserialization
of a XML block denoted by its tag. For example,
WifiNetworkListStoreData is responsible for the XML block under
tag <NetworkList>.

Bug: 31065385
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: Manual test to verify saved networks are persisted over boots
Test: Manual test to verify migration of legacy store file still works
Test: Regression integration test
Change-Id: I83c2eb7cd907188f392b5179405f19182ee13bb9
ndroid/server/wifi/DeletedEphemeralSsidsStoreData.java
ndroid/server/wifi/NetworkListStoreData.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiConfigStoreData.java
ndroid/server/wifi/WifiInjector.java
461e5fbcce032dec8cce52761c90c0c610c11a2f 09-Feb-2017 Roshan Pius <rpius@google.com> ISupplicantStaNetwork save & load WifiEnterpriseConfigs am: 64950d46f5 am: 953bf5cacd am: 933eb3c3af
am: 512d26b43a

Change-Id: I724df4c6a3b49d14c83e3f350ba466f028a24d53
4f8df631a2e4bbfaadd8c948d281675ba6b38784 09-Feb-2017 Glen Kuhne <kuh@google.com> ISupplicantStaNetwork save & load WifiConfigs am: 66e9f4ab59 am: 434a307f44 am: 572edc7d8b
am: 4b3a2e44fe

Change-Id: I3f55fc6a4684b164d1b365d9621e92c352250b28
64950d46f5469e5e6ce32ccc81a1f751c40f4202 07-Feb-2017 Roshan Pius <rpius@google.com> ISupplicantStaNetwork save & load WifiEnterpriseConfigs

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

Test: Unit tests
Bug: 33383725
Change-Id: I82ce772db84ebdeadbd54e8ac5b11f4a4b10cb14
ndroid/server/wifi/SupplicantStaNetworkHal.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
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStaNetworkHal.java
ndroid/server/wifi/WifiNative.java
1e7386343d09cb5b63661d52732999f8626ba140 09-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] Update framework to match HIDL changes

Name changes to match spec more closely.

Bug: 35040192
Test: unit tests and integration (sl4a) tests
Change-Id: Ide8d19a6a61de1c606b2bff57ff6b5966513e4e3
ndroid/server/wifi/aware/WifiAwareNativeApi.java
ndroid/server/wifi/aware/WifiAwareNativeCallback.java
26ac163a1f95188ea00314e07ba52574aadfb726 09-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] Modify the discovery session handle to uint8_t

Match the NAN protocol.

Bug: 35040192
Test: unit tests + integration (sl4a) tests
Change-Id: Iefed58874f4be606c7d7d4cfa9b24bf2138b390c
ndroid/server/wifi/aware/WifiAwareNativeApi.java
ndroid/server/wifi/aware/WifiAwareNativeCallback.java
53f9d554a19eb192796253bdefbe86009ff7be7c 09-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] Remove event callback for vendor-specific attributes.

Match change to HIDL to remove this feature.

Bug: 35193235
Test: unit tests + integration (sl4a) tests
Change-Id: I3c7877dc1773b01c2922030623209d2229223cd6
ndroid/server/wifi/aware/WifiAwareNativeCallback.java
bbcb3e9f69c1a4fe2698948e56379e2fd246f2bd 09-Feb-2017 Ningyuan Wang <nywang@google.com> Merge "Move getScanResult to WificondControl" am: 7c2c343199 am: 18f5a463f7 am: dbfcbeff3e
am: b332462325

Change-Id: I00be7e2f40248f4bb26c4cc452bd729a1ac06443
7c2c34319905b2122f124134a9f6f2064f1a2ea5 09-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Move getScanResult to WificondControl"
9015eb26753ff98a7716b2cf3764b92b2a6dd0d5 09-Feb-2017 Michael Plass <mplass@google.com> Merge "[WifiVendorHal] APF support" am: 7a408ba5e4 am: c9bd9e7a9a am: 198f357aec
am: 761432f037

Change-Id: Ia56a98e802da1ec1dc6e66c4377aa2504ed74615
7a408ba5e446159195262a8eb5a9c9eaaffffd73 09-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "[WifiVendorHal] APF support"
b77ef41835180c0f427ea74f688d2ece0f7a6ea9 09-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Send message: error code handling" am: 9f72999627 am: 4e638767c2 am: 6118519195
am: bc622bbaf8

Change-Id: Id5d8b0f2158d48205479fa1d90acedede30d4f24
0675e75623e8308d32ca9a304de2062204783185 09-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Handle HAL failure correctly" am: ee13bbb487 am: 47bf3e1480 am: a5a2422a24
am: d896da0fc0

Change-Id: I6181f9b0467e4220ee2e1741348614cfd05e4584
9f729996277994d6320b046a74f75237f0f4e64c 09-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Send message: error code handling"
ee13bbb487f6484b8a7d92104c0f3d2997439db3 09-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Handle HAL failure correctly"
9f74a332a61c48359e85e452cda52b6b72d92649 09-Feb-2017 Ningyuan Wang <nywang@google.com> Merge "Move signal poll and getPktCounters to WificondControl" am: 37892799c6 am: 3a2577c333 am: 772d2230bc
am: 6e41d0767a

Change-Id: I89778a6783729091a78f5f9a4c509604437f68bc
7a3f94814b4f960cc6e69b884c896e36f6bbc5f7 09-Feb-2017 Ningyuan Wang <nywang@google.com> Merge "Create new class WificondControl" am: 15413f890a am: 24aebb475c am: 5fc1edd5ef
am: fc49c1754b

Change-Id: Iea1cf884a5922f4157a942bf78612e1c485b271f
cc0a86f647320808c5d88da6e9d45c6de10b65b0 09-Feb-2017 Ningyuan Wang <nywang@google.com> Override equals() for wificond java side parceable classes

Bug: 35155583
Test: compile, unit tests

Change-Id: Icb41a9aa5318928ca4605513f27641df80830860
ndroid/server/wifi/wificond/ChannelSettings.java
ndroid/server/wifi/wificond/HiddenNetwork.java
ndroid/server/wifi/wificond/PnoNetwork.java
ndroid/server/wifi/wificond/PnoSettings.java
ndroid/server/wifi/wificond/SingleScanSettings.java
939ecb928e139b6d090b3264129105c542b30311 09-Feb-2017 Sohani Rao <sohanirao@google.com> Merge "Log API surfaces of WifiService" am: 4498a1ad78 am: 195acc79f6 am: 39f733c336
am: d66c663b09

Change-Id: I0f4152bdf32f00178640c702a978316b9108946b
9817b8a1d1afae8a8dda515b85358cb8a07cbb12 09-Feb-2017 Michael Plass <mplass@google.com> Merge "[WifiVendorHal] driver, firmware version getters" am: d3c7f796e7 am: 7b3db5c96e am: 9a94c90b97
am: 602188a45a

Change-Id: Ic2a5c897f9057ee3f601db7dda73251728a63d0b
37892799c66c1de5ec1713109b12d9d9cf7459fc 09-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Move signal poll and getPktCounters to WificondControl"
15413f890a31b7ba8ac9e1410a7fc44f8f695c32 09-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Create new class WificondControl"
ccac1c69ee6559b567e34b9b19e368efaa600174 08-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] APF support

Test: Unit tests pass (2 new tests)
Bug: 34901818
Change-Id: Ife9c541166ef895fd4732ddc435951ba2bd97758
ndroid/server/wifi/WifiVendorHal.java
4498a1ad78d325a8a42358c875197cc1b7e4c517 09-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Log API surfaces of WifiService"
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WificondControl.java
f2fdf411925ad172b5e0b25b0c6df880256691d4 20-Dec-2016 Sohani Rao <sohanirao@google.com> Log API surfaces of WifiService

Log following ways to interact with WifiServiceImpl
- AIDL methods, trace calling uid
- AsyncChannel messages sent from and handled by WifiService
using WifiAsyncChannel instead of AsyncChannel
- AsyncChannel messages sent to WifiService using WifiHandler
instead of Handler

This CL changes the construction of WifiServiceImpl to use the
WifiAsyncChannel object instead. Exercise WifiAsyncChannel using
tests added in WifiServiceImplTest and mock logging objects.

Bug: 33780715
Test: Unit tests, Sanity tests (power on and connect to AP),
and verify logging

Change-Id: I7a56806ea1b166d15a4c75e5e0d5bfcaf23c7b98
ndroid/server/wifi/WifiService.java
ndroid/server/wifi/WifiServiceImpl.java
7e7e2e3fd4da1f5ccda2f03dcdb321654e9f6ff8 08-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] driver, firmware version getters

Test: Unit test passes
Bug: 34901572
Change-Id: I31a28965a8a57a886dc5934a285e471d3fd7c429
ndroid/server/wifi/WifiVendorHal.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WificondControl.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
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WificondControl.java
26f57d4921a2390f90d4bf474cb76ec3761d6c69 04-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] Send message: error code handling

Send message operates by queueing messages to the firmware
and then reacting to the status of the queue and the actual
over-the-air transmission.

Added:
- Code to handle immediate queueing failure (need to be more
concerned with transition to HIDL - likelihood of immediate
errors increased, e.g. due to service failure).
- Code to differentiate QUEUE FULL error code from other firmware
errors.
- More robust testing framework: including a model of the device
and randomized responses.

Bug: 29061728
Bug: 29459286
Test: unit tests + integration (sl4a) tests
Change-Id: I218ec9b9107fae0efc7299341ad02e19034d2f09
ndroid/server/wifi/aware/WifiAwareDiscoverySessionState.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
e417fbaed361beaf717764feb7a255b56b1630ab 08-Feb-2017 Ningyuan Wang <nywang@google.com> Merge "Remove isFullScan from SingleScanSettings" am: 969f150805 am: ac593fcb0d am: 176c6e0250
am: c814db4502

Change-Id: I48d6b9948e09a836152b27c12cb6913ca25d77df
969f150805d1ee94038c8447fb52a7b841ce508b 08-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Remove isFullScan from SingleScanSettings"
d116abb2cfebe0ec2ec2604d75acf5ba85afff95 08-Feb-2017 Michael Plass <mplass@google.com> Merge "[WifiVendorHal] getSupportedFeatureSet" am: 8dd2f05191 am: ba23bf27a0 am: a7c3139aa7
am: 174834d2be

Change-Id: I077b11ba774196a67129af176342a26d559ff8b8
8dd2f05191af69f9d6f061e85f1937632426d240 08-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "[WifiVendorHal] getSupportedFeatureSet"
5254a256676974e9db86fcb86b2f41af7d4a59f5 01-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] Handle HAL failure correctly

HAL calls may fail asynchronously or synchronously. The frameworks finds
out about async failures through notification callbacks - already handled.
The synchronous failures happen immediately on HAL API calls. These are
rarer and have not been handled until now. Add code to handle the sync
failures - by calling appropriate failure callbacks. Add unit tests.

Bug: 29061728
Test: unit tests + integration (sl4a) tests pass.
Change-Id: I7ad35c989aa146f74eaad4eaa781d2e628586846
ndroid/server/wifi/aware/WifiAwareDiscoverySessionState.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
ad449c1f41364ea1aa3e3e862d92db12653069e5 07-Feb-2017 Ningyuan Wang <nywang@google.com> Remove isFullScan from SingleScanSettings

Bug: 35103495
Change-Id: I54e7e58662c8ec8e67b5ed5f76155445a8db6b2d
Test: compile, unit tests
ndroid/server/wifi/wificond/SingleScanSettings.java
cc4eec889c54fa7618aa1b8f1288f45d7754ea5f 06-Feb-2017 Amin Shaikh <ashaikh@google.com> Pass enabled networks to recommendation provider

Bug: 34973057
Test: ./runtests.sh
Change-Id: I1d1854e22e13224659a9e2c877b4c4fe74c1eafb
ndroid/server/wifi/RecommendedNetworkEvaluator.java
260f8f7ab5595c36ab5d130441cabe3dc944830c 02-Feb-2017 Peter Qiu <zqiu@google.com> hotspot2: Passpoint API rename update

Some Passpoint APIs are renamed to follow the API guideline, so
update the callsite accordingly.

Bug: 34862444
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Iff7b5aafac0b0062c4575e24383530f91849db36
ndroid/server/wifi/hotspot2/PasspointProvider.java
1dc6d8ecde4cad66dc8cb7b97926f1120e7b0d57 06-Feb-2017 Michael Plass <mplass@google.com> [WifiVendorHal] getSupportedFeatureSet

Handle the feature bits that come from the STA interface.

Test: Unit test passes, manual test with HIDL HAL enabled.
Bug: 34900537
Change-Id: I6abdedfe03714a23396c648c5333766b6f224c5d
ndroid/server/wifi/WifiVendorHal.java
19447b3f8edfc752b23d89c57b09abe0ca3c581c 04-Feb-2017 Amin Shaikh <ashaikh@google.com> Clear BSSID when adding ephemeral networks.

Also allow NetworkRecommendationProviders to specify "any" or null as
the BSSID for a recommended WifiConfiguration.

Bug: 34975077
Test: ./runtests.sh
Change-Id: I5753b27f0ae58a3d32f7590097caa237bf5beef7
Merged-In: I5753b27f0ae58a3d32f7590097caa237bf5beef7
ndroid/server/wifi/RecommendedNetworkEvaluator.java
717cd0df9157e81dbd78f0292c6ce0ddc78e301f 06-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Clear BSSID when adding ephemeral networks."
40c1a38ff9a9bb06eb1bcdaa70f0a6827ac3bd5b 04-Feb-2017 Etan Cohen <etancohen@google.com> [AWARE] handle Network Management Service exceptions

NetworkManagementService (NMS) is used to manage Wi-Fi Aware
data-path interfaces. NMS throws runtime exceptions in error
conditions - e.g. IllegalStateException when the interface being
operated on does not exist.

These exceptions are now caught and handled (as errors) instead
of crashing the system service.

Bug: 29608448
Test: integrated (sl4a) tests
Change-Id: Iea0b4ee1dc8b938355b40f045881041a8bc36cb5
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
0f09e36f95316f4f9e23acfee08affb37f083ff0 04-Feb-2017 Roshan Pius <rpius@google.com> Merge "WifiSupplicantHal: Rename to StaSupplicantIfaceHal" am: 147adcf0d7 am: c50cfe38b0 am: bb822db22d
am: c4da4d0954

Change-Id: I712a7396cc6421173dfe824dafeaf74eba48dbd8
147adcf0d7bbedb95be8b6a49db628e2d7003d5c 04-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "WifiSupplicantHal: Rename to StaSupplicantIfaceHal"
b808c52fdfe8ea7c9af3919aa667dce2cb7d19af 04-Feb-2017 Sohani Rao <sohanirao@google.com> Merge "WifiMonitor doesn't handle incorrect password authentication failure" am: 77eff3bb24 am: 40cfd0985b am: 735ccf9d4e
am: a2d1e777a0

Change-Id: Ib991de4527e2294ae56bf77a5a118eb84f633f68
77eff3bb24cf5296972c94aabf5696b3b5da8678 04-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "WifiMonitor doesn't handle incorrect password authentication failure"
c2e5122eff7f50ee3260462e0bc091c0422bb695 04-Feb-2017 Amin Shaikh <ashaikh@google.com> Clear BSSID when adding ephemeral networks.

Also allow NetworkRecommendationProviders to specify "any" or null as
the BSSID for a recommended WifiConfiguration.

Bug: 34975077
Test: ./runtests.sh
Change-Id: I5753b27f0ae58a3d32f7590097caa237bf5beef7
ndroid/server/wifi/RecommendedNetworkEvaluator.java
b4419d876beda78c29836726e43d80203b4a656c 04-Feb-2017 Roshan Pius <rpius@google.com> WifiSupplicantHal: Rename to StaSupplicantIfaceHal

Bug: 33383725
Test: Compiles
Change-Id: Icfe37705c3f053aa46f410a6c11e71fb93733a05
ndroid/server/wifi/SupplicantStaIfaceHal.java
ndroid/server/wifi/SupplicantStaNetworkHal.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiSupplicantHal.java
fb4745ac123a0150101d269d4e5bcaf108b62187 04-Feb-2017 Michael Plass <mplass@google.com> Merge "[WifiVendorHal] - WifiLinkLayerStats" am: 483eab074f am: b365c72883 am: 8fa590f06f
am: b0fed7c626

Change-Id: I82b644d63318e277f8c87ae7a97790a0597b3e05
483eab074f9431f3fe86af3be66f88c787e519cf 04-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "[WifiVendorHal] - WifiLinkLayerStats"
1241ac94aa2f5d6c5f5c3e935c7f7baa8045ee5c 24-Jan-2017 Sohani Rao <sohanirao@google.com> WifiMonitor doesn't handle incorrect password authentication failure

This change updates dispatchEvent() in WifiMonitor, that parses native
events, to handle auth failure due to incorrect password. The absence
of this check causes the SupplicantTracker to send wrong authentication
status in the broadcast intent for Supplicant state change.

WifiMonitor also sends a message to subscribed interfaces with the
authentication failure event. In case of a wrong password, the event
SSID_TEMP_DISABLE is generated subsequently. WifiStateMachine, which
recieves both events, will erroneously update the WifiConfigManager
twice for the same authentication failure. To avoid this, this CL adds
a reason code in the message which can be used to conditionally update
WifiConfigManager.

Bug: 30080982
Test: Functionality tests and unit tests
Change-Id: I3154e6b52ace0b7c2295dc796325747439c0ac43
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
70d72c8b8a82b2ba2c0980eabeb7b58254c4b0ff 03-Feb-2017 Glen Kuhne <kuh@google.com> Merge "ISupplicantStaIface & ISupplicantStaNetwork calls" am: ecccdb6c28 am: ac05a83db1 am: ba1c7944f6
am: d8e84b1175

Change-Id: If1821ced995346e2bfd47b7ebac978f14cc2fb59
ecccdb6c28ebea5fa0453917309e1d3836eb7068 03-Feb-2017 Glen Kuhne <kuh@google.com> Merge "ISupplicantStaIface & ISupplicantStaNetwork calls"
eb55cd19e61637f40e097a47ac9006ef2874944f 03-Feb-2017 Peter Qiu <zqiu@google.com> Merge "hotspot2: Passpoint API rename update"
4f2049a015722cae0f0169379d499d5d4fc98e30 30-Jan-2017 Michael Plass <mplass@google.com> [WifiVendorHal] - WifiLinkLayerStats

Test: Unit tests pass, manual testing
Bug: 34900534
Change-Id: Ib78e292b0a5b1a3cfd10a48d47fbe8f12d734319
ndroid/server/wifi/WifiVendorHal.java
96013ebe01c095e2bac5ff7a490a2f9b69876e3c 02-Feb-2017 Glen Kuhne <kuh@google.com> ISupplicantStaIface & ISupplicantStaNetwork calls

Adds unused wrappers over the ISupplicantXXXX methods, checking for
RemoteExceptions, failure codes & managing invalidating the
WifiSupplicantHal if necessary.
Lots of boilerplate

Bug: 33383725
Test: Existing Unit Tests
Change-Id: I9a44e532817667b8d6dae05e8f549d70bf9a0d77
ndroid/server/wifi/SupplicantStaNetworkHal.java
ndroid/server/wifi/WifiSupplicantHal.java
c82eacbc84f40589ef213bdb90b4a72cc25f51b9 20-Dec-2016 Wei Wang <wvw@google.com> Cherry-pick: Skip tearDownInterfaces during init

CleanUpSystemState is called when wificond starts, so we can skip
tearDownInerfaces call as long as wificond is restart.
This helps to save the WiFi service start time from 291ms to 57ms
measured on marlin.

Bug: 33752168
Test: wificond_unit_test and wificond_integration_test passed
Change-Id: I07bcf49b7e3dc6c5c34f9fd154b81ed81b2cc8b8
ndroid/server/wifi/WifiStateMachine.java
0932396ba66987440b428de30166e9261bd2c04e 02-Feb-2017 Peter Qiu <zqiu@google.com> Merge "WifiConfigManager: do not delete certificates and keys for passpoint network" am: 86584ee872 am: 076d620c0b am: 30e49464aa
am: 47cf373af5

Change-Id: Ibbe6a7a7a6e53297d64b3d30c06f8da917171920
9d32963a3ffde278ce5b74e990cfc0f4cd97e20a 02-Feb-2017 Glen Kuhne <kuh@google.com> Merge "ISupplicant Initialization unit tests and refactor" am: e19aa4378b am: ac3a13e728 am: d6d1d369dc
am: d5df46a513

Change-Id: Id7034dc32b4de87f2a44bf7cff515c4c3f18b0d1
86584ee872168ff7dd314674f92795e73abaf12d 02-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "WifiConfigManager: do not delete certificates and keys for passpoint network"
e19aa4378b3cbe6e8348399afde16cc17461ef6b 02-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "ISupplicant Initialization unit tests and refactor"
a82dc0aa4c8c326b26a36b452f5fbfe7ba92efff 02-Feb-2017 Peter Qiu <zqiu@google.com> hotspot2: Passpoint API rename update

Some Passpoint APIs are renamed to follow the API guideline, so
update the callsite accordingly.

Bug: 34862444
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Iff7b5aafac0b0062c4575e24383530f91849db36
ndroid/server/wifi/hotspot2/PasspointProvider.java
0157dc63c3fdef8b898e06daec2566f16bc39f31 02-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[HAL Device Manager] Fix validation bug due to object comparison" am: 538f0fbf83 am: 00559c1d3b am: a0699b0ccd
am: 98218a2482

Change-Id: I302d7188c46ec1400cdc52e797b67fa219798846
538f0fbf836bfdd75839333c741fc90d3fd0579c 02-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[HAL Device Manager] Fix validation bug due to object comparison"
0d1e0f4f3e85ba71fd288cdeb0d332915f1b0ec6 02-Feb-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Prepare for HIDL integration am: d84fd37259 am: 1f1646714b am: 32a83075d5
am: 8e3a537759

Change-Id: If4733168540caf55a4423175648b80447db6ce37
c9a6c7b295e35415a61e3de6bf75f846a4aca048 02-Feb-2017 Etan Cohen <etancohen@google.com> [HAL Device Manager] Fix validation bug due to object comparison

Proxy objects from HAL are created on every query - thus it
isn't possible to compare IWifiIface objects obtained from the service
even if they represent identical server-side objects.

Device manager was using object references - removed. Need to stick
to non-changing representations, e.g. type/name.

Bug: 34474043
Test: unit-tests still passing + boot
Change-Id: I56c9ac88767f272ddd14fa2ef2a4b3796fdeb348
ndroid/server/wifi/HalDeviceManager.java
d7e8058288bdc5085b54fef77dbfa38597cea348 01-Feb-2017 Peter Qiu <zqiu@google.com> WifiConfigManager: do not delete certificates and keys for passpoint network

They will be deleted when the Passpoint profile is uninstalled.

While there, avoid triggering a perisistent store save when adding or
removing a WifiConfiguration for a Passpoint network.

Bug: 34888235
Test: Verify connecting to a Passpoint network works after
is disconnected previously

Change-Id: I204eaf7053d047b5f4983c6167e6e520bcf643ff
ndroid/server/wifi/WifiConfigManager.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiVendorHal.java
98152bd4a4e36ea2097abd474248a4c7884f55b5 30-Jan-2017 Glen Kuhne <kuh@google.com> ISupplicant Initialization unit tests and refactor

Refactored WifiSupplicantHal to make initialization more robust and
testable.

Test: +4 unit tests
Bug: 33383725
Change-Id: Id083b8462d68229b51eb8518e5d887052c99a12c
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiSupplicantHal.java
33690e49cb30d4880f08098c7f04e037e2f8d10d 01-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Wi-Fi Aware HAL: move to HIDL" am: f8759c3c73 am: 687d30af7e am: 5b2b30ff18
am: b373148c63

Change-Id: I873a7a12b9fc3f7c64eed12910e79cd39ac6c88f
f8759c3c7309d4905459c04e476f720045f56304 01-Feb-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Wi-Fi Aware HAL: move to HIDL"
c6e47761cbbe85404d7245bde4e0624738e24281 01-Feb-2017 Peter Qiu <zqiu@google.com> Merge "hotspot2: use updated PasspointConfiguration APIs" am: 25e0d91a8d am: 5abacce4a6 am: e97f99d17d
am: af0ed96aa6

Change-Id: I2475b9ce10a5f032a7f7a106c059678f72c80748
25e0d91a8d152c7c59bf6295e1931e7450bd1d8c 01-Feb-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: use updated PasspointConfiguration APIs"
d6a7bfbd924bca2b2ca8c9ff1bd455a1e72ac979 01-Feb-2017 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Handle user switch after fresh install" am: 605f370795 am: 3ea006e5fc am: e9842596be
am: 871a44e87c

Change-Id: Id29c945cbfcf572e7007769779ccac8e4504ef8e
db3c9d35a7f08de03beec81e801d917a5375f63e 30-Jan-2017 Etan Cohen <etancohen@google.com> [AWARE] Wi-Fi Aware HAL: move to HIDL

Transition from JNI-based HAL to HIDL-based HAL.

Bug: 32315992
Test: unit tests + integration (sl4a) tests passing
Change-Id: I8deeaa501b90b1b2a92c3f57a7e0251f21cc40ff
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/aware/Capabilities.java
ndroid/server/wifi/aware/WifiAwareClientState.java
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareDiscoverySessionState.java
ndroid/server/wifi/aware/WifiAwareNative.java
ndroid/server/wifi/aware/WifiAwareNativeApi.java
ndroid/server/wifi/aware/WifiAwareNativeCallback.java
ndroid/server/wifi/aware/WifiAwareNativeManager.java
ndroid/server/wifi/aware/WifiAwareService.java
ndroid/server/wifi/aware/WifiAwareServiceImpl.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
605f370795be014ed0816eb8cf91aa10ddace8f0 01-Feb-2017 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Handle user switch after fresh install"
f50111bd5f2f48f0b0b6bf4c31282b19b59018d2 01-Feb-2017 Michael Plass <mplass@google.com> Merge "[WifiVendorHal] Tests for WifiVendorHal part 1" am: 4703827bdb am: d501afcab8 am: db05e72b5d
am: 95f64bdb02

Change-Id: Ife1c19ac20abd1627d80b5fc5220cfc75a64c3a8
4703827bdbe599d907e7227e1a6113ac417581cc 01-Feb-2017 Michael Plass <mplass@google.com> Merge "[WifiVendorHal] Tests for WifiVendorHal part 1"
4f4d745ca28b915ea4a7c91ec5df3ea8a2db64ad 25-Jan-2017 Peter Qiu <zqiu@google.com> hotspot2: use updated PasspointConfiguration APIs

PasspointConfiguration APIs are updated to use private variables
with public accessor methods based on the API guideline. So update
the callsite to use accessor methods instead of using the variables
directly.

While there, refactor the test a bit to reduce code duplications.

Bug: 34627062
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I96ce7c3bdb3b6a6dce1715f29e5e1e019dbeeb5e
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointProvider.java
249f241b74b783d8c42af201d40f453ea637b32a 31-Jan-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Handle user switch after fresh install

Need to handle user switch after a fresh install. Since, there are no
store files after a fresh install, we need to reset the
|mPendingStoreRead| flag to allow user switch handling.

Bug: 34834491
Test: Added unit test
Change-Id: I097ea506c2e536413feab89182d03826829eabce
ndroid/server/wifi/WifiConfigManager.java
1c677f0682c21726be71674c4ab9c142379bad47 01-Feb-2017 Peter Qiu <zqiu@google.com> Merge "hotspot2: cache ScanDetail for Passpoint network" am: 9f880cb9a5 am: 18a0ee2069 am: 5afa8b696c
am: 7edd42c640

Change-Id: I533cf42e8f1d5f355b1fb85f9547e0617caf3ea7
ef0fa7ba7ac833aca7fc3e28a0158354e0f01ada 31-Jan-2017 Roshan Pius <rpius@google.com> Merge "WifiBackupRestore: Don't return null" am: ec8b297e0f am: f3ff1f7f81 am: 3d50a88622
am: fc7b2ba419

Change-Id: I9e053ed7859994cc0f93448a5b077ba199283035
9f880cb9a5e208c4f5ae5ab5e1d3f2d164740458 31-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: cache ScanDetail for Passpoint network"
3787e0344073c0326e61542ee2906107114dd98a 31-Jan-2017 Jeremy Joslin <jjoslin@google.com> Merge "Lookup the recommended config to check if it's saved." am: b8e6b6c601 am: 95065a31a0 am: 22db0252e2
am: a06923fbb2

Change-Id: Ic21315f56a27e8ee697b025627a3f2146fcb95f0
ec8b297e0fbf4ed94c2c8a1a7694f80010359adc 31-Jan-2017 Roshan Pius <rpius@google.com> Merge "WifiBackupRestore: Don't return null"
b8e6b6c6015122807ea4d84371adecc628ec5192 31-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Lookup the recommended config to check if it's saved."
b4659e143a1a0b27e4f4ca82e8428863b8c41324 31-Jan-2017 Michael Plass <mplass@google.com> [WifiVendorHal] Tests for WifiVendorHal part 1

Need to start somewhere

Test: Yes
Bug: 33384303
Change-Id: Ib458463facd472e590e08eee398993c8fe45423e
ndroid/server/wifi/WifiVendorHal.java
850116348dacd6baf16645641c3383970e4a1157 31-Jan-2017 Peter Qiu <zqiu@google.com> hotspot2: cache ScanDetail for Passpoint network

When a new WifiConfiguration is created/added for a Passpoint network,
we need to cache the initial ScanDetail for it. So that others can
get more detail information about the network (e.g. NetworkDetail)
when needed.

Bug: 34735964
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ia8ee3fef2eab3c4bcd81c23a0adf9b805abaaf6f
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/hotspot2/PasspointNetworkEvaluator.java
e42ef8332bb9129ce1410d725baf9c05bee222d2 31-Jan-2017 Peter Qiu <zqiu@google.com> Set meteredHint flag when connected to a chargeable public network am: 581681a842 am: e23327529a am: 2200d59a6c
am: 50d430bc62

Change-Id: Ifb00336d19d743de90bd488690ab93fa0da53919
581681a8420c7fd26272af46af9c9db85625d7f6 26-Jan-2017 Peter Qiu <zqiu@google.com> Set meteredHint flag when connected to a chargeable public network

The chargeable public network indication is retrieved from the
interworking IE, which is stored in NetworkDetail. So use it
to mark the meteredHint flag when connected to such network.

Bug: 34735964
Test: frameworks/opt/net/tests/runtests.sh
Change-Id: Ied92a1ad312fcc71858e0acaf66954993e69b2eb
ndroid/server/wifi/WifiStateMachine.java
c7588c6a7307e177085a4368498bf00632acb448 31-Jan-2017 Roshan Pius <rpius@google.com> WifiBackupRestore: Don't return null

The SettingsBackupAgent doesn't handle null returns, so return an empty
array if there is no data to backup.

Bug: 34831550
Test: Added unit test
Change-Id: Ieed471a9cc01ae58dcb70529f12974a76b2e8dbb
ndroid/server/wifi/WifiBackupRestore.java
7e0fa3a55657dc52848a8bf1abb7b4fdcad659d7 31-Jan-2017 Jeremy Joslin <jjoslin@google.com> Lookup the recommended config to check if it's saved.

Instead of comparing the recommended config's networkId to
WifiConfiguration.INVALID_NETWORK_ID to determine if the config
represents a saved config actually look up the config using its
matching ScanDetail.

Test: ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Bug: 34808853
Change-Id: I74c4e3ecd1a8d069f69d38d6a8a539588d11ec7c
ndroid/server/wifi/RecommendedNetworkEvaluator.java
934595feae83f8072c9deef2dbab0a3bc4788a10 31-Jan-2017 Etan Cohen <etancohen@google.com> Merge "[HAL Device Manager] Stop Wi-Fi if (re)started" am: a93c6ba03f am: a2c49d4146 am: 68dc99a952
am: b83bab0aa9

Change-Id: I3260ccf45fd234a25816da7e63e267fe4deb3650
a93c6ba03f196e89117507646110a6fdd6ad59ba 31-Jan-2017 Etan Cohen <etancohen@google.com> Merge "[HAL Device Manager] Stop Wi-Fi if (re)started"
c631d41a08401fb916f241d7e5d53d9e3b5c5d00 31-Jan-2017 Roshan Pius <rpius@google.com> Merge "WifiStateMachine: Allow network list retrieval in Default state" am: b55c25ab87 am: f0fa939686 am: 7e80fe466d
am: b0f5335801

Change-Id: I9eba900f1740f06f9d4170374aed86e263a8f757
b55c25ab87c5515ca57d73219031eebc7c7139fe 31-Jan-2017 Roshan Pius <rpius@google.com> Merge "WifiStateMachine: Allow network list retrieval in Default state"
a5dc1667f752dc2446e6de12279614a4fd9e2fe2 30-Jan-2017 Etan Cohen <etancohen@google.com> [HAL Device Manager] Stop Wi-Fi if (re)started

When getting notification that Wi-Fi service is started
we don't know if this is a re-start of the service or
potentially of the framework itself. If the framework is
restarted then it is possible that the state of the service
and framework are out-of-sync.

Therefore, on every service restart make sure to reset it by
stopping Wi-Fi.

Bug: 34474043
Test: unit tests
Change-Id: I5968598756cae3c1181659ef153b36cada7c2c16
ndroid/server/wifi/HalDeviceManager.java
6ec5de3266f365d6199d7fa89af77c4f6c237f96 30-Jan-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiController: send mode change before switching" am: 855a83a628 am: 2f88557366 am: 4bd164aaf1
am: f020a28af2

Change-Id: Id221ab6ed439cd8157332f588b9a0b4c8b566f17
855a83a6289470f52da2fab10e53b0f7f26a7553 30-Jan-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiController: send mode change before switching"
2d358dc9b4ef6232a7762061f04fc48560d601bf 30-Jan-2017 Randy Pan <zpan@google.com> Merge "Add the new roaming features to WifiNative and WifiVendorHal." am: b534df367b am: 8857bec592 am: d78f9aebac
am: 17aa02559d

Change-Id: I70db9b1b70d77eb59a06e2f0a6a087291f5d4557
b534df367bf49340848cc423b1dcdf5c7d239992 30-Jan-2017 Randy Pan <zpan@google.com> Merge "Add the new roaming features to WifiNative and WifiVendorHal."
128fcfb990488b9aeb7a8bdc06705653a9500b09 30-Jan-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiPermissionsUtil: add WifiInjector" am: b860b8e236 am: 55e4ee4f80 am: 1c095850a5
am: 2584fcdcde

Change-Id: I30b3b02a5eb7743e744fe03f7716ee6306b6db51
b860b8e236277516f7ff49b6eefbdbaa21c951ec 30-Jan-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiPermissionsUtil: add WifiInjector"
23ed63d91b8af8f1d3569371daedc4162e323cc0 30-Jan-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Allow network list retrieval in Default state

Now that we've moved the config store loading to DefaultState, we should
be able to start supporting network list retrieval in DefaultState as
well. This should allow apps to query the list of networks configured
even when wifi is turned off.

Bug: 33391502
Test: Added unit test
Test: Verified that the saved networks list is visible in settings even
wifi is turned off.
Test: Regression tests
Change-Id: I1b0716d59a2262fc269d95138cd7f90a442eb18b
ndroid/server/wifi/WifiStateMachine.java
896151bcf9345f4db8cf3f6ccc64320f78aa6443 27-Jan-2017 Rebecca Silberstein <silberst@google.com> WifiController: send mode change before switching

When performing the following mode changes, do not force
WifiStateMachine to guess which mode it should be entering.

Sequence:
1. Enable wifi
2. Enable wifi location scans
3. Disable wifi (ScanMode)
4. Disable wifi location scans (wifi fully disabled)
5. Enable wifi (should go to ClientMode without
first entering ScanMode)

This sequence was an issue because WifiStateMachine was most recently in
ScanMode and supplicant was started before the new operational mode was
sent. This CL adds a mode switch call to WifiStateMachine before the
call to start supplicant if wifi was off and we are going to
ConnectMode.

Bug: 31986765
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: manually verified by performing the above sequence and inspecting
the logs
Test: passed wifi integration tests

Change-Id: I9e0f99c4c3df59330c1932370cc93d3047202f33
ndroid/server/wifi/WifiController.java
3a94bbf9b7f81b63c5cbce7356241494949376a0 28-Jan-2017 Paul Stewart <pstew@google.com> Merge "Apply client chain when installing enterprise credentials" am: 7e78e525b7 am: fd02979d59 am: a8cf685212
am: d7eca5ee4b

Change-Id: I476ce9dc0b4e8d9953dd70c3d369d0b8515fb879
7e78e525b7000d46707f1e96041d4b3f1324ead0 28-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Apply client chain when installing enterprise credentials"
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiVendorHal.java
f2d2a31c8c98f17545f72033abe0d281c829c055 27-Jan-2017 Rebecca Silberstein <silberst@google.com> WifiPermissionsUtil: add WifiInjector

Instead of calling the WifiInjector.getInstance method that is used for
the makeLog command, pass the instance of WifiInjector so the unit tests
can pass stand alone (or when run out of order by the automated test
process).

Bug: 34764965
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh -e class
com.android.server.wifi.util.WifiPermissionsUtilTest

Change-Id: I782135fa55d1bbf760c271344a7502687a2ba591
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/util/WifiPermissionsUtil.java
9d34c0136f5e03a3530bc0e76f6b2b893b71f812 27-Jan-2017 Roshan Pius <rpius@google.com> WifiVendorHal: Interactions with HalDeviceManager am: 8c6d09c035 am: 2e4c67154e am: f861ff0270
am: 378f838089

Change-Id: I3c5dbc58884175a1497095ff0b08146b7f310ec7
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
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiSupplicantHal.java
ndroid/server/wifi/WifiVendorHal.java
cd079c9382dd027270265f89e0d75dff135eed25 27-Jan-2017 Etan Cohen <etancohen@google.com> Merge "[HAL Device Manager] Available for request API + STA/STA request bug" am: 21de76fadf am: c987ee6b1b am: 230f4d6e63
am: 707c453c4a

Change-Id: I5689bf808d1fb7b4552bc8b940a9a3afca930c95
deaf943b5f2860a059c2bb4a8525cd89ffc465ad 27-Jan-2017 Randy Pan <zpan@google.com> Merge "WifiVendorHal: add a MAC string parsing helper function" am: 2a494ed6c9 am: 8de0f6578a am: 6febdac20d
am: 6f8c00ea31

Change-Id: I2736fb10d7d64c96d6ed39c067a856dc3cb5182b
a969fe6659ebfa8f1882743f09eb22f7ee4ca913 25-Jan-2017 Paul Stewart <pstew@google.com> Apply client chain when installing enterprise credentials

Extract the client keychain and install this as a single blob
after the client certificate within the blob. Doing so is
backwards-compatible since wpa_supplicant will terminate at the
end of the client certificate at the end of the first
"PEM_read_bio_X509()" call when this blob is retrieved. If
wpa_supplicant knows how, it can then retrieve the rest of the
keychain using successive PEM_read_bio_X509() calls on the same
input data.

Bug: 34688653
Test: Regression tests using WiFi testbed
Change-Id: I9251a4da59ca189a8682c632966fc305c1ec126e
ndroid/server/wifi/WifiKeyStore.java
21de76fadfca64eaa0fd14b181e8c726d55d2daf 27-Jan-2017 Etan Cohen <etancohen@google.com> Merge "[HAL Device Manager] Available for request API + STA/STA request bug"
2a494ed6c983cc8b2ff47af930d20d194fdb8a6e 27-Jan-2017 Randy Pan <zpan@google.com> Merge "WifiVendorHal: add a MAC string parsing helper function"
8c5159c38eca30d4b9b7983266fc2dce1c45effb 27-Jan-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: properly enable p2p service am: cabc3cff51 am: 70343a4af2 am: b48463c65c
am: d2b309a015

Change-Id: Ie79d598ae61a0b42a42a98a7016513faa32ff3c9
cabc3cff51d7e13ba3caddabe46e526d3ed50819 14-Jan-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: properly enable p2p service

After moving the async channel connection between WifiStateMachine and
p2p service, the case where we immediately enter connect mode was not
able to properly notify p2p service to enable. This CL waits for two
conditions to be true:
1 - the async channel (WSM to P2P service) is connected
2 - we are in connect mode

There are two conditions that this can address - namely, a race between
setting up the async channel and entering connect mode, and also the
assumed entry into client mode immediately after booting.

This CL additionally adds a bug number (b/34283611) tracking work for
investigating the reliability of the async channel connection to the
p2p service.

Bug: 34281933
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: manually tested wifi connection
Test: manually checked for Wifi Direct peers
Change-Id: Id420746be40de5ae60d1b45b806a25e8379f79ae
ndroid/server/wifi/WifiStateMachine.java
35408733dbf1693084bae6d7072c23a16d55a106 27-Jan-2017 Pontus Fuchs <pontus2.fuchs@sonymobile.com> wifi: Don't call wpa_supplicant from binder thread context am: 6bf691b60d am: ee6a7bfe23 am: 39eede1ba3
am: 49aed81ad5

Change-Id: I925e5c36864f627f2fab13eb5e9d77569eb53d9f
8b53a743c2a2a85804fed884ce0c7949361e0c18 27-Jan-2017 Etan Cohen <etancohen@google.com> Add HalDeviceManager to WifiInjector am: 5282e08d98 am: 83c8c2f272 am: 4fd5439846
am: 286f2f88b4

Change-Id: If6bc8600be2fa4ed39cc4637c18c5bbdb6c318c7
5bd4fa3b2872e8b339dd38ca4b2378af939835cf 27-Jan-2017 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Cleanup the pending store read logic" am: 69dfa6e3f6 am: 11abfb6a35 am: 4236dfeb45
am: a0f2215f14

Change-Id: If5e5bb3730e2079ff6f000d0aed48bae4b041692
448a7b6b7b16cf39ed25729ceaf61edb30368567 27-Jan-2017 Etan Cohen <etancohen@google.com> [HAL Device Manager] Available for request API + STA/STA request bug

Updated available for request API:
- Simple register/unregister API
- Will be called immediately on registration (if valid)
- Will be registered until unregistered
- Only a single copy is kept (duplicates detected)

Fixed issue whereby the requested interface wasn't counted toward
the total of required interfaces. So with only one STA allowed, a
second STA would have been allowed.

Bug: 34474043
Test: unit tests pass (with new unit tests added)
Change-Id: Ic19731b66a609b828cda07f8065ef27ead077b2d
ndroid/server/wifi/HalDeviceManager.java
ndroid/server/wifi/aware/WifiAwareNativeManager.java
6bf691b60d19548554c7e5de4a54052505f67f53 27-Feb-2015 Pontus Fuchs <pontus2.fuchs@sonymobile.com> wifi: Don't call wpa_supplicant from binder thread context

Commands to wpa_supplicant are serialized through WifiStateMachine.
This rule is broken when dumpstate collects data from the wifi
service. In this case a command will be sent wpa_supplicant from the
binder thread.

If wifi is turned off at the same time as dumpstate is running the
wpa control socket structure can be cleared leading to a crash
in system server.

Since the info from the dump is not of high value we can remove it.

Bug: 33066580

Change-Id: I4f829d017176261272b479cef9dcb0e10baca345
ndroid/server/wifi/WifiStateMachine.java
04618bb38669b709553d01b7bb29ce1ed8db073d 20-Sep-2016 Peter Qiu <zqiu@google.com> DO NOT MERGE: OMAParser: throw IOException when parsing a null XML string

This avoids a NullPointerException when parsing a null XML string.
OMAParser.parse is only used by PasspointManagementObjectManager for
adding/building/modifying a HomeSP from a XML string.

It is fine to use IOException since it is already being handled
gracefully by its upstream callers.

Bug: 31497435
Test: unit tests
Test: Verify system server crashes when executing the command below without the fix
and doesn't crash with the fix:
"adb shell service call wifi 8 i32 0"

Change-Id: If2ad13b8573d49ba0ccbea2427f3c63d841f866d
(cherry picked from commit 519056861a467ae64e142ff07d53891514ef9c70)
(cherry picked from commit 81080a8430568399a14e9b85007a8aaea5c2e6eb)
ndroid/server/wifi/hotspot2/omadm/OMAParser.java
5282e08d98fa5c18b77ecf8b40de015bcd092a44 26-Jan-2017 Etan Cohen <etancohen@google.com> Add HalDeviceManager to WifiInjector

Need to share a singleton HalDeviceManager.

Bug: 34474043
Test: builds
Change-Id: I264ec83412938537c051f3fe16d340a1626cd8f1
ndroid/server/wifi/WifiInjector.java
69dfa6e3f6657d5505c881133fe1320edd066589 27-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "WifiConfigManager: Cleanup the pending store read logic"
d7e826a86f845e439715eae57d43731d1ca9a404 26-Jan-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Cleanup the pending store read logic

I had assumed that user unlock would always come after boot completed,
but it turns out that it's not always the case (especially for non
encrypted devices).

Couple of flags added to handle this race:
1. mPendingStoreRead: Used to indicate if we have invoked
|loadFromStore| or |migrateFromStore| once. This flag is used to defer
any user unlock or switching handling untill we do load from store.
2. mDeferredUserUnlockRead: Used to indicate if we deferred a user
unlock handling because we had not yet loaded from store.

User switching requires a UI interaction and cannot occur until the
BOOT_COMPLETED broadcast is received. So, there is no need to handle
that. A wtf was added to alert for out of order notifications.

Bug: 34741678
Test: Added Unit tests.
Change-Id: Id17d233f8da2540210b84cbd313b2a3efff90d70
ndroid/server/wifi/WifiConfigManager.java
75cb696c469b9ea1b1988fb18871cc96520d8899 27-Jan-2017 Randy Pan <zpan@google.com> WifiVendorHal: add a MAC string parsing helper function

This helper function parse a unquoted MAC address string into
a byte array.

Bug: 34740076
Test: compiles
Change-Id: Ie4a534d8e60a1c963464499eb7828edd83ace4b6
ndroid/server/wifi/WifiVendorHal.java
0dc2857544ad6ca6560f8016ad9332977293c11d 26-Jan-2017 Glen Kuhne <kuh@google.com> Merge "ISupplicant service & iface initialization" am: 8eb5377c60 am: 07245d42e4 am: dd45441ff0
am: 3c62cb7d25

Change-Id: Icc8e18dea538c745f81498e4896011b624abdddb
8eb5377c60cb75a63da07df1ebb5d0e8320b57cb 26-Jan-2017 Glen Kuhne <kuh@google.com> Merge "ISupplicant service & iface initialization"
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
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiSupplicantHal.java
0d0eaca0f0034246c3731f909e691f4717bc519a 26-Jan-2017 huajun.x.tong <huajun.x.tong@sonymobile.com> Merge "P2P dialogs should not be dismissed when touching outside" am: 8d3d4c35b3 am: d00cad5c5b am: cebc070441
am: 3e391a9e41

Change-Id: I4e8493af7f2f6b6490fc6ed62ffd3426bc0cd203
8d3d4c35b317a56269776fe207f8441646e97fe3 26-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "P2P dialogs should not be dismissed when touching outside"
89192ff887ea51751d134f1e282e253bd762e494 26-Jan-2017 Etan Cohen <etancohen@google.com> Merge "[HAL Device Manager] Use non-default service name" am: eb0bbfd3a4 am: 26024578b3 am: 4acbced351
am: ea6423582b

Change-Id: I4bbe12626b2f4a16458d24307b3dde5d22e4161e
eb0bbfd3a439ddb85c8a59dbf855c18fa28f7b04 26-Jan-2017 Etan Cohen <etancohen@google.com> Merge "[HAL Device Manager] Use non-default service name"
a654de0cc15534aac47c9fa65ea69c0346000ea3 26-Jan-2017 Sohani Rao <sohanirao@google.com> Merge "Fix WifiScanningServiceImpl stand-alone unit test failure"
9ea74bec262597c7e8e804be5a3f97de8e544830 26-Jan-2017 Etan Cohen <etancohen@google.com> [HAL Device Manager] Use non-default service name

The IServiceManager requires 'manager' as service name.

Bug: 34474043
Test: builds/boots (failed boot before)
Change-Id: I6ad5fdeda090949274629045bde6fce5eadc505b
ndroid/server/wifi/HalDeviceManager.java
67fd6d55895b602bab62f640618554cbb4aed7f3 10-Jan-2017 huajun.x.tong <huajun.x.tong@sonymobile.com> P2P dialogs should not be dismissed when touching outside

When P2P dialogs like invitation request dialog, frequency conflict
dialog are shown and user touches outside the dialog, it's dismissed.

This might cause trouble that connection is cancelled unexpectedly by
touching outside of the dialog unintentionally. Should be improved.

The dialogs should be dismissed only when intentional operation is
done like tapping Back key, Decline button, Accept button.

Bug: 34727704
Test: Manual test OK

Change-Id: Ic2bcf857b9122ce62018822b4d3257ff148accc6
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
4f385c302799952fb6ef46d45a6d9706d4ba0f7e 26-Jan-2017 Michael Plass <mplass@google.com> Merge "[wifiVHidl] New module to hold hidl vendor hal" am: b10258e9b3 am: a92e4c579a am: da9cb89b90
am: 5149eb509d

Change-Id: I044a72eb1c6084d2a8c14fd30666ac184a2f0859
b10258e9b36c3e0600957a1671f09a12f21a40eb 26-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "[wifiVHidl] New module to hold hidl vendor hal"
2f924aa064fbdeef4c07d52e71812ac5b42ad5a9 26-Jan-2017 mukesh agrawal <quiche@google.com> WifiDiagnostics: propagate events to LastMileLogger am: d3ab97d3cf am: 4c98ad96ef am: 9db62447e7
am: 972fb4919e

Change-Id: I858683112a5016bbe1dda5339fc90b16cc7cb9ec
67e502ab8d7d7131ceb05523d177866a38c9bcc1 26-Jan-2017 mukesh agrawal <quiche@google.com> WifiStateMachine: report success to WifiDiagnostics am: dec0c578a4 am: 8a80660e53 am: 716aa1cc53
am: a8fb6bee73

Change-Id: I2c13b47e356bd4b1c5348df96166356bdb657c80
d3ab97d3cf26342610204b6492f082d62d3e51e3 07-Jan-2017 mukesh agrawal <quiche@google.com> WifiDiagnostics: propagate events to LastMileLogger

In order for LastMileLogger to actually be useful,
LML needs to receive notifications about connection
events.

Update WifiDiagnostics, to propagate events from
WifiStateMachine, to LastMileLogger.

While there: make the |mLog| field final. (I
probably should have made that field final in the
first place.)

Bug: 34362951
Test: tests/wifitests/runtests.sh and manual
Manual testing:
- boot with new code
- connect to GoogleGuest
$ adb shell dumpsys > >(egrep 'rdev_connect') 2>/dev/null
<...>-5220 [004] ...1 83.714720: rdev_connect: phy0, netdev:wlan0(5), bssid: 6c:f3:7f:ae:8b:f1, ssid: GoogleGuest, auth type: 0, privacy: false, wpa versions: 0, flags: 0

Change-Id: If1c6b50f866d892c4a95ac94398bfe0680e5a51a
ndroid/server/wifi/WifiDiagnostics.java
ndroid/server/wifi/WifiInjector.java
dec0c578a471ecfd861164d7522ec09c7d9976a7 07-Jan-2017 mukesh agrawal <quiche@google.com> WifiStateMachine: report success to WifiDiagnostics

WifiDiagnostics needs to know about connection success,
so that WifiDiagnostics can disable data-path tracing.

Update WifiStateMachine accordingly.

Bug: 34361332
Test: tests/wifitests/runtests.sh

Change-Id: Ib944267b9e3150ed7dc4cfd112e9e7cce7657342
ndroid/server/wifi/WifiStateMachine.java
53b06dd52d6de7ca083fa0163cfbfbc0377d9767 26-Jan-2017 Etan Cohen <etancohen@google.com> Merge "[Wi-Fi HAL Device Manager] Status callback semantics change" am: cdf8904a4e am: c01cec3edd am: af489796eb
am: 67f89a37fd

Change-Id: I1efb46f377c9968e799f8618ba1c208e62c8c5b8
cdf8904a4ef612050f56458ac0daa447dba3d39e 26-Jan-2017 Etan Cohen <etancohen@google.com> Merge "[Wi-Fi HAL Device Manager] Status callback semantics change"
1068f11513bfa6f24b35d68e6b34accb99fcdccf 26-Jan-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Allow all apps to connect to a network am: 5574ae2549 am: 1aa00722cc am: 55c98674eb
am: c57738e0a2

Change-Id: Ib8ffff6fcbea5134096b8d3d93e85ddeaa663c8f
4a012d169d9e98d7afe2c0e0c427458415899f6b 26-Jan-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Restructure config store load am: 4f294fab99 am: f743a8f939 am: 452200b7e5
am: e6d139f813

Change-Id: I5d19e8d6ed5e3658449ee63f2741d4caedee8393
1aa00722cca4464baba0921b01c949417aafa61f 26-Jan-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Allow all apps to connect to a network
am: 5574ae2549

Change-Id: I85de9e81c242edfbf65b87ab8e07f8a1d3b92956
f743a8f939751fe35b49544a36021b00669b4c4e 26-Jan-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Restructure config store load
am: 4f294fab99

Change-Id: I09a5d9171fec152d3e16602dcd9421278a70f3dd
995d94e21324625a43ec4e437b408e09787f8951 26-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge changes I78c382ea,I3e4f7e21

* changes:
WifiStateMachine: Allow all apps to connect to a network
WifiConfigManager: Restructure config store load
75056bc60eeb726e855d8a8eefe729fcb7144fd9 26-Jan-2017 Etan Cohen <etancohen@google.com> [Wi-Fi HAL Device Manager] Comments/nits am: 5e9a23e247 am: 440e0709b5 am: db54fea894
am: 1e2787d16c

Change-Id: Iffdb43f4488383dca319801259cb81cda78138a6
be1a54c92502c3fa26ce03e1eefdf7631e11d889 25-Jan-2017 Michael Plass <mplass@google.com> [wifiVHidl] New module to hold hidl vendor hal

Base CL for hidlized vendor hal

Implementations just raise UnsupportedOperationException

Test: Builds
Bug: 33383725
Change-Id: I2de2f85e31462ddc381fb7c4d3d1b22e88739595
ndroid/server/wifi/WifiVendorHal.java
3145bb4d3359647cccd9b4aba1734066f36bb2e6 26-Jan-2017 Etan Cohen <etancohen@google.com> [Wi-Fi HAL Device Manager] Status callback semantics change

Change behavior of status callback/API:
- Listener provides a status change only (onStatusChange)
- Triggered when Wi-Fi is started or stopped
- Triggered when Wi-Fi HAL service dies or restarts
- API for
- isStarted(): indicates if Wi-Fi is started or stopped
- isReady(): indicates if Wi-Fi HAL service is alive

Bug: 34474043
Test: unit tests
Change-Id: I8babb00ea8a2c8c485d1661255644434f0787d8e
ndroid/server/wifi/HalDeviceManager.java
ndroid/server/wifi/aware/WifiAwareNativeManager.java
5574ae254943a9f6bbb763f20777a52a377d7a39 25-Jan-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Allow all apps to connect to a network

We had previously disallowed non settings apps from initiating
connection to a specific network for O using |disableOthers| flag in
WifiManager.enableNetwork.
But, we're relaxing this for O. We'll enforce this back in the next
release.

Note: We're adding an API surface with better semantics
(Network Specifier) for apps to make such requests in the future.

Bug: 34520151
Test: Unit tests
Change-Id: I78c382eab67a6dcff18627b6ca8ee282a04b3dde
ndroid/server/wifi/WifiStateMachine.java
4f294fab991c91d629b9dfab5ed3a35a69ed3ce6 20-Jan-2017 Roshan Pius <rpius@google.com> WifiConfigManager: Restructure config store load

Currently, we load from config store only when we start wpa_supplicant
in SupplicantStartingState. However, we handle the user unlock/switch
in the DefaultState. This could lead to cases where we handle the user
unlock (& thus overwrite the config store file) even before we have had
the opportunity to read the existing data out.

Changes in the CL:
1. Decouple the migration of data out of legacy store and the load of
data from new store files.
2. The new config store loading will now happen in BOOT_COMPLETED
message handling. If it's a bootup after fresh install or upgrade from
N, this will be a no op.
3. Whenever wpa_supplicant is started, attempt to migrate data out of
the old config store. If the data has already been migrated, this will
be a no op.
4. User unlock/switch before migration is performed is ignored.

PS: This will also help us handle the
|WifiManager#getConfiguredNetworks| API even if wifi is disabled.

Bug: 33966771
Bug: 33391502
Test: Added unit tests
Test: Will send for integration tests
Change-Id: I3e4f7e21dc88bad5ae8581a150b29850fbac0afa
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.java
ff269d3f35876b1b330ab787cf7c0c0a0cef68ba 25-Jan-2017 Etan Cohen <etancohen@google.com> Wi-Fi HAL Device Manager: implement available for request logic am: d887e5c6bf am: 70fe59aafb am: fc7bd37e68
am: bd08e1f63d

Change-Id: Idbecf7f20c8caf50d2f8616b2b491c57a30c7d5a
2c35ef2a4f508d531d570c1f97bfbf4d844cf81c 25-Jan-2017 Etan Cohen <etancohen@google.com> Wi-Fi HAL device manager: implement coordination logic am: a78e7cf8de am: 5210c2c40e am: 3418e0e23a
am: 18967efdbe

Change-Id: I00d8d486432ed01eda9a02a63b7957c2b9227d69
7fedc9fe96a63a578d004c4f577566172f2e3452 25-Jan-2017 Etan Cohen <etancohen@google.com> Wi-Fi HAL device manager: add interface API am: 64ce9f185e am: de09d94930 am: 34223a0809
am: bee83623b0

Change-Id: Icb8d0dad68b4ffd8567b23b4ba1d38fa413e888f
562a7daebb04ebf9f0d0e06cbd55c557f0c9321b 25-Jan-2017 Etan Cohen <etancohen@google.com> Wi-Fi HAL device manager: baseline for init/start/stop am: dd4dcab629 am: 37deab4074 am: be32fa55c7
am: 549a3511e4

Change-Id: Ifd296b4207a1d19a2610e0150de87a781f71bd10
5e9a23e2472ac7ba67924b8a8f79dff9f6e5e186 25-Jan-2017 Etan Cohen <etancohen@google.com> [Wi-Fi HAL Device Manager] Comments/nits

Update naming and comments per original CL reviews.

Bug: 34474043
Test: unit tests passing
Change-Id: Ie32df5e2910d1b6c6efeecf7a2134653521ced51
ndroid/server/wifi/HalDeviceManager.java
70fe59aafbf6e9d93cb24081ca71b5a12168023c 25-Jan-2017 Etan Cohen <etancohen@google.com> Wi-Fi HAL Device Manager: implement available for request logic
am: d887e5c6bf

Change-Id: I8be2a762dd0fa6acda52cc0fe8bc3bb745d0c52f
5210c2c40e14635738d882b73c73b6a077d3318f 25-Jan-2017 Etan Cohen <etancohen@google.com> Wi-Fi HAL device manager: implement coordination logic
am: a78e7cf8de

Change-Id: I0d39b539ccd1041ef857876b77e4bd9862579610
de09d94930c425577096087d9abbab06fd0787f0 25-Jan-2017 Etan Cohen <etancohen@google.com> Wi-Fi HAL device manager: add interface API
am: 64ce9f185e

Change-Id: Ib08f645f90816dc3a3c762e3480bff41dd53ea1b
37deab4074e33c2380f7d1de679e116873406f22 25-Jan-2017 Etan Cohen <etancohen@google.com> Wi-Fi HAL device manager: baseline for init/start/stop
am: dd4dcab629

Change-Id: I0dad48093225a533a6aad9fd38a58b1fbb7b4f36
2440465d07a9032f95aa37209f8931bb73568fb6 25-Jan-2017 Etan Cohen <etancohen@google.com> Merge changes from topic 'hidl_device_manager'

* changes:
Wi-Fi HAL Device Manager: implement available for request logic
Wi-Fi HAL device manager: implement coordination logic
Wi-Fi HAL device manager: add interface API
Wi-Fi HAL device manager: baseline for init/start/stop
f4812396600569b0b0a7510d4d9249cca6131f2f 25-Jan-2017 Etan Cohen <etancohen@google.com> [AWARE] Update Wi-Fi state machine to enable Aware am: 6d3e37d70c am: 3759b712d7 am: a5497b4eb8
am: 591fe87549

Change-Id: Ia67a5a4fdfa0dd534464dd7c6ef5972e04d63f09
6d3e37d70c416a408931e72a8a62de25004fc22c 25-Jan-2017 Etan Cohen <etancohen@google.com> [AWARE] Update Wi-Fi state machine to enable Aware

Use lazy initialization of WifiAwareManager. Prevents race
condition or order-of-initialization issues which were causing
WifiAwareManager to be null when the state machine was trying
to use it to enable Aware.

Bug: 34708106
Test: aware integration sl4a tests pass
Change-Id: I7dc1e13287b51299b1464ad66fff54f0c94e2adc
ndroid/server/wifi/WifiStateMachine.java
965a9ef7aad4a24da5d370d5155fd2159f0e4db2 25-Jan-2017 mukesh agrawal <quiche@google.com> add LastMileLogger am: 1716aa7ad8 am: 444b3659f3 am: a6f0071793
am: d0d08a026c

Change-Id: Icce25d66013a8492d55774da90b11a4df3214b2d
1214f9a8d91477a14bc584e1c97fb1b08d64db18 25-Jan-2017 mukesh agrawal <quiche@google.com> BaseWifiDiagnostics: generalize reportConnectionFailure() am: cf99aa8a53 am: d28334a509 am: 67ece1dd64
am: dfb15831cb

Change-Id: I702345f623c3aebf1bcc9583abe9b136693ab246
d9e0e830e4b4f3c8397460cf5e197345df62c802 10-Jan-2017 Sohani Rao <sohanirao@google.com> Fix WifiScanningServiceImpl stand-alone unit test failure

WifiAsyncChannel and WifiHandler objects use lazy intialization for the
logging objects. WifiInjector.getInstance() may return a null object if
the unit test is run by itself or if earlier tests have not created it.

If the unit tests are able to update these instances with a logging
objects that are not null, then unit test can pass stand-alone.
- Add a method in FrameworkFacade to return new instances of
WifiAsyncChannel
- Update WifiAsyncChannel to expose setWifiLog() API for testing only
- Call this method on instances of WifiAsyncChannel returned by the mock
of FrameworkFacade factory to ensure mLog is not null
- Add a method in WifiScanningServiceImpl, also meant for testing only
to update WifiHandler with logging object
- Change unit tests to call this method after starting scanning service

Bug: 34127212
Test: WifiScanningServiceTest by itself and all unit tests pass
Change-Id: I0bc7a55d6d6862e2360bfb20897828e84358dd39
Merged-In: I0bc7a55d6d6862e2360bfb20897828e84358dd39
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
ndroid/server/wifi/util/WifiAsyncChannel.java
1716aa7ad8e00a41980c4120c2104b25fe36630e 07-Jan-2017 mukesh agrawal <quiche@google.com> add LastMileLogger

Add the LastMileLogger class, which manages the tracing
of kernel wifi events. These events will include
cfg80211 API calls, cfg80211 events, and data-path
events on the Wifi interface.

Note:
- The LastMileLogger itself does _not_ control which
events are logged. LML simply a) controls when
logging is enabled/disabled, and b) retrieves the
trace data when appropriate.
- The events to be logged will be controlled by an
init script. Separating the control reduces the
risk that a compromised system_server captures
more data than it should.
- Later CLs will actually plumb all the bits together
(LastMileLogger, init script, WifiStateMachine,
WifiDiagnostics, etc.). As of this CL, LML isn't
actually instantiated in WifiService.

Bug: 34180821
Test: tests/wifitests/runtests.sh (on angler)
Change-Id: I2facf70b93a0f824fbb08c1bddb415bcbdc7e504
ndroid/server/wifi/LastMileLogger.java
cf99aa8a53e95f220fa0b627e712b4a4d87b6017 07-Jan-2017 mukesh agrawal <quiche@google.com> BaseWifiDiagnostics: generalize reportConnectionFailure()

Rename reportConnectionFailure() to reportConnectionEvent(),
and add an argument to the renamed method. Follow-on CLs will
use the new argument to report additional events.

Bug: 34179456
Test: tests/wifitests/runtests.sh (on angler)
Change-Id: Ifc62dcaa576f4d9355509922dfdc2c3aa0f330fd
ndroid/server/wifi/BaseWifiDiagnostics.java
ndroid/server/wifi/WifiDiagnostics.java
ndroid/server/wifi/WifiStateMachine.java
d887e5c6bf4abf2f098ea6f087e717e29c551548 23-Jan-2017 Etan Cohen <etancohen@google.com> Wi-Fi HAL Device Manager: implement available for request logic

Added code which dispatches the 'available for request'
listeners.

Bug: 34474043
Bug: 34633162
Test: (new) unit tests pass
Change-Id: I77074a3dc59fafff0688c921ca8ca4156ca68d1f
ndroid/server/wifi/HalDeviceManager.java
a78e7cf8de28fd836f7a111e39e7d7e7005bf942 23-Jan-2017 Etan Cohen <etancohen@google.com> Wi-Fi HAL device manager: implement coordination logic

The coordination logic for the HAL device management: uses
chip information and hard-coded interface priority to determine
interface creation decisions:

- Changes mode
- Destroys interfaces (dispatches listeners)
- Creates new interface

Unit tests based on the current default chip configuration.

TODO: dispatch interface available for request listeners.

Bug: 34474043
Test: (new) unit tests pass
Change-Id: I5d2e865baac7e9948aad6d8f607757b8db485952
ndroid/server/wifi/HalDeviceManager.java
64ce9f185eb6097c1c358c44710be6e1ca7c7055 21-Jan-2017 Etan Cohen <etancohen@google.com> Wi-Fi HAL device manager: add interface API

Added interface management API and infrastructure.
The create API does not function.

Bug: 34474043
Test: builds - no unit tests
Change-Id: I71983d7d6c4ca941689112f0112d692e06574b3a
ndroid/server/wifi/HalDeviceManager.java
ndroid/server/wifi/aware/WifiAwareNativeManager.java
dd4dcab629d1045b08f58f699a4a09ecc8cd23e3 20-Jan-2017 Etan Cohen <etancohen@google.com> Wi-Fi HAL device manager: baseline for init/start/stop

Wi-Fi HAL device manager. All Wi-Fi services should use this
manager to start/stop and monitor status of Wi-Fi.

Baseline: will be extended to coordinate interface.

Bug: 34474043
Test: unit tests
Change-Id: I3846cb57f301bcd91534f1b5943d996f4c84ed63
ndroid/server/wifi/HalDeviceManager.java
8349ac8be364908df9f7813e22f7bf52e812b9ab 25-Jan-2017 Jeremy Joslin <jjoslin@google.com> Merge "Track the potential connectable networks for the watchdog." am: 6dada2c3bc am: df8fd68097 am: 771667a94a
am: 8257b828a9

Change-Id: I20c3336b49aba2aabc18aa7cddbe91714d3dacdb
6dada2c3bc67349ae08befd0f1fa76cf7e6ea028 24-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Track the potential connectable networks for the watchdog."
2e5ffe4916f943303e485c7518a56cb823be1ade 24-Jan-2017 Ningyuan Wang <nywang@google.com> Add java side pno scan settings parcelable classes am: a49633f879 am: a388f442c1 am: ce8568b9f3
am: d2efc0d16a

Change-Id: I0cf880fe9be18399d5b119eb836b27f8d02e5541
a388f442c1ab166a9074e75aa9f612ab90154424 24-Jan-2017 Ningyuan Wang <nywang@google.com> Add java side pno scan settings parcelable classes
am: a49633f879

Change-Id: I784d257407446a64d4c59504b340683c6f9e1a50
0e62cf37d128216dae128fbae0d26f98acade773 24-Jan-2017 Ningyuan Wang <nywang@google.com> Merge changes from topic 'wificond_parcelables'

* changes:
Java side unit test for PnoSettings
Add java side pno scan settings parcelable classes
cf97fa73a498a7254a656ff8037ad7928186c79d 24-Jan-2017 Sohani Rao <sohanirao@google.com> Merge "Fix WifiScanningServiceImpl stand-alone unit test failure"
3564dd1aed7f98bff60e000ac6b1d76c58406998 23-Jan-2017 Jeremy Joslin <jjoslin@google.com> Track the potential connectable networks for the watchdog.

Test: ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Bug: 34520858
Change-Id: I0123d3a8a9f85c52bcb906be6651c613e8cf2b40
ndroid/server/wifi/RecommendedNetworkEvaluator.java
03acb45ef16978892eaccc7d37be0ba023ba6c51 24-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Skip open networks in SavedNetworkEvaluator."
b2f97844a53105c0c95e48f460953cf50e823baa 24-Jan-2017 mukesh agrawal <quiche@google.com> Merge "WifiStateMachine: make some constants final" am: 41c8ff83a7 am: acb0343f53 am: c297e4289b
am: 60f849e66c

Change-Id: Id722864cc8ab85b267670e9e8a68d269da4ace0d
41c8ff83a79089ef985a4001ba5d37a06030d0d2 24-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "WifiStateMachine: make some constants final"
5f4a90d8625325a0f5d34784d00544ed6ef7770b 24-Jan-2017 Amin Shaikh <ashaikh@google.com> Merge "Populate selected network in RecommendationRequest" am: 00ffe9ca1c am: e941db0237 am: d0e4f9a8d2
am: fc9c5c8a88

Change-Id: I4d6116db4e38d62ea607212a9450f832b487d6d0
e4b4b229331da3964671606f18557b2e7f681b45 20-Jan-2017 Amin Shaikh <ashaikh@google.com> Skip open networks in SavedNetworkEvaluator.

- Only if CURATE_SAVED_OPEN_NETWORKS is enabled.

Bug: 34392914
Test: ./runtests.sh
Change-Id: I47b5848e21e0851d4e5e3a1b1f49aa8e8c876fcc
Merged-In: I47b5848e21e0851d4e5e3a1b1f49aa8e8c876fcc
ndroid/server/wifi/ExternalScoreEvaluator.java
ndroid/server/wifi/SavedNetworkEvaluator.java
ndroid/server/wifi/WifiInjector.java
00ffe9ca1c676d2bf97787e31fd2d179709848b5 24-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Populate selected network in RecommendationRequest"
d9a37ee7cabfdc465569ed5527efdb273a8ca8fe 21-Jan-2017 mukesh agrawal <quiche@google.com> WifiStateMachine: make some constants final

The various MESSAGE_HANDLING_* fields are named
as constants, and are never modified. As such,
they should be marked final.

Bug: 34521318
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh (on angler)
Test: frameworks/base/wifi/tests/runtests.sh (on angler)
Change-Id: I7454e62282526efe2e2bf0ba3eb7289e463850ac
ndroid/server/wifi/WifiStateMachine.java
d9a98660720513dc404c6ebf229f4d4f27be3c36 24-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Skip open networks in SavedNetworkEvaluator."
9c6270d4234ea18915ae62163a04db098dce9fab 23-Jan-2017 Jeff Sharkey <jsharkey@android.com> StrictMode to detect untagged network traffic. am: 794e28014e am: ed9d66cf00 am: 0c42b17a93
am: 4415d82764

Change-Id: I8f618685207b570ed51d7193e3c7a6c6b63b552d
794e28014e4af2a6f8dfb11d4b332866355941e2 21-Nov-2016 Jeff Sharkey <jsharkey@android.com> StrictMode to detect untagged network traffic.

Test: builds, boots, all common traffic tagged
Bug: 30943431
Change-Id: I4f5719d0421fc1f77a1109581021c0bfbf7fa5f1
ndroid/server/wifi/WifiStateMachine.java
a49633f87905530426cbfa6ab9586d282ab5df3f 10-Dec-2016 Ningyuan Wang <nywang@google.com> Add java side pno scan settings parcelable classes

These are parcelable claases used for sending pno scan requests
to wificond.
They should be consistent with corresponding parcelable classes
under directory: system/connectivity/wificond/scanning/

Change-Id: I96a620df3557f9f8736fc03a8f1db9419c600274
Test: compile
Bug: 33011588
Bug: 33398008
ndroid/server/wifi/wificond/PnoNetwork.java
ndroid/server/wifi/wificond/PnoSettings.java
645d9daa0ae52f52d8d7bbca1886462a65db906b 21-Jan-2017 Jeremy Joslin <jjoslin@google.com> Populate the new RecommendationRequest fields. am: 55066b337d am: 0a90d2d990 am: 6af32f1bbd
am: 515bc0f039

Change-Id: Ia43ef7018eee1746902f13f09f5b4989cec294fe
5eceb34aa6a940ac079fc336209e6fd981d30dd5 20-Jan-2017 Amin Shaikh <ashaikh@google.com> Populate selected network in RecommendationRequest

Bug: 34467596
Test: ./runtests.sh
Change-Id: Ide0b4cbc9114bb8f79a2671103ab7f1cf0590dd0
ndroid/server/wifi/RecommendedNetworkEvaluator.java
706db6cddad773ab2c7aa0b89b9474901fd9af39 20-Jan-2017 Amin Shaikh <ashaikh@google.com> Skip open networks in SavedNetworkEvaluator.

- Only if CURATE_SAVED_OPEN_NETWORKS is enabled.

Bug: 34392914
Test: ./runtests.sh
Change-Id: I47b5848e21e0851d4e5e3a1b1f49aa8e8c876fcc
ndroid/server/wifi/ExternalScoreEvaluator.java
ndroid/server/wifi/SavedNetworkEvaluator.java
ndroid/server/wifi/WifiInjector.java
55066b337d76f6e8eb1b8b7aacbcd4b2b9024b9a 20-Jan-2017 Jeremy Joslin <jjoslin@google.com> Populate the new RecommendationRequest fields.

Passing down the current network and the array of connectable WiFi
configs. Also fixed a bug where the ScanResult wouldn't be marked as
untrusted if the associated config was ephemeral.

Test: ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Bug: 34387385
Change-Id: I76cf80595d805e10d7297dc2de292d410f9b8e01
ndroid/server/wifi/RecommendedNetworkEvaluator.java
d2d34055c34e800980c53e27000bbb380ee87cbe 20-Jan-2017 Ningyuan Wang <nywang@google.com> Merge "Add java side scan settings parcelable classes" am: 3f1ea0190d am: 44c1991cce am: 098b0c654a
am: 80845c0130

Change-Id: I78dacfc2bd41289601d2b78c6030535a59c881b2
56dccb9d42b606aebf0a3b22b090a0015cf2f480 20-Jan-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiStateMachine: check p2p supported" am: 3a84970eda am: 3cce414d8a am: 0363a96711
am: 051cf9ad45

Change-Id: Ib939a782a2df5b409967526d020a0bcbf3badd03
3f1ea0190d8a3b6d15ff91923176057b1100369b 20-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Add java side scan settings parcelable classes"
3a84970edae8bed47c5b79623f471c2920c7ec91 20-Jan-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiStateMachine: check p2p supported"
e7ebc3fba71f4f996794bc5fa939674f8b4b2c5a 10-Jan-2017 Sohani Rao <sohanirao@google.com> Fix WifiScanningServiceImpl stand-alone unit test failure

WifiAsyncChannel and WifiHandler objects use lazy intialization for the
logging objects. WifiInjector.getInstance() may return a null object if
the unit test is run by itself or if earlier tests have not created it.

If the unit tests are able to update these instances with a logging
objects that are not null, then unit test can pass stand-alone.
- Add a method in FrameworkFacade to return new instances of
WifiAsyncChannel
- Update WifiAsyncChannel to expose setWifiLog() API for testing only
- Call this method on instances of WifiAsyncChannel returned by the mock
of FrameworkFacade factory to ensure mLog is not null
- Add a method in WifiScanningServiceImpl, also meant for testing only
to update WifiHandler with logging object
- Change unit tests to call this method after starting scanning service

Bug: 34127212
Test: WifiScanningServiceTest by itself and all unit tests pass
Change-Id: I0bc7a55d6d6862e2360bfb20897828e84358dd39
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
ndroid/server/wifi/util/WifiAsyncChannel.java
915f83ed6e0fc4636cee992dbf1c8a492788adc1 19-Jan-2017 Ningyuan Wang <nywang@google.com> Merge "Remove extra writing of array length in NativeScanResult" am: b32f7d6a3d am: 77c9c8fbf6 am: 84c65e474b
am: a04e731460

Change-Id: I00bc7dc5d9748f92962dc583e099fd1d5bea2dbd
b32f7d6a3d4339d20bc73ab4853d9a4fc5ec9e2e 19-Jan-2017 Ningyuan Wang <nywang@google.com> Merge "Remove extra writing of array length in NativeScanResult"
3d06c9eb56bb3c46f407965a5d2478cf7fd82408 23-Nov-2016 Ningyuan Wang <nywang@google.com> Add java side scan settings parcelable classes

These are parcelable claases used for sending scan requests
to wificond.
They should be consistent with corresponding parcelable classes
under directory: system/connectivity/wificond/scanning/

Test: compile, manual tests
Bug: 33011588

Change-Id: I1e81726313124cd3efbaa8a266cfa67aaad780a0
ndroid/server/wifi/wificond/ChannelSettings.java
ndroid/server/wifi/wificond/HiddenNetwork.java
ndroid/server/wifi/wificond/SingleScanSettings.java
c48608e5b30e5b5ae42ca92a84b6428dd2c95258 19-Jan-2017 Jeremy Joslin <jjoslin@google.com> Use NetworkScoreManager.isCallerActiveScorer(). am: 25f5cad21b am: 13eb1826c1 am: 3a395d6b4c
am: 2c531ead6f

Change-Id: I1c62fe09802d6df937f0bf9d53ee2e28de7ba97b
25f5cad21b4cd0ad8aa302623463c5c861a885b0 19-Jan-2017 Jeremy Joslin <jjoslin@google.com> Use NetworkScoreManager.isCallerActiveScorer().

The previous method from NetworkScorerAppManager has been deprecated,
the new call is cheaper but otherwise the same as the old call.

Test: ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: ./frameworks/base/wifi/tests/runtests.sh
Bug: 33781558
Change-Id: Ic8419a7f9b60661fb030973fde2653ea4cdfbc88
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/util/WifiPermissionsUtil.java
3112931546f051366df4fd15bd3236f11875a915 15-Jan-2017 pkanwar <pkanwar@google.com> DO NOT MERGE: Fix to enable reconnecting to a Carrier network.

We now generate a new Config for each connection attempt.
BUG: 30760683

Change-Id: I88393ecc2964e299e80f6f2802dd85a142e1f473
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
e2baeea02ca0cb4535282fff9da89cbe5d0044e5 18-Jan-2017 Ningyuan Wang <nywang@google.com> Remove extra writing of array length in NativeScanResult

Bug: 34359597
Test: compile
Change-Id: I83009b33035f5c50d0adb321e840ad30894bfaf0
ndroid/server/wifi/wificond/NativeScanResult.java
0d14dbc1da819e72054b9f168c8e3db767dd34bf 01-Sep-2016 Glen Kuhne <kuh@google.com> Http Proxy Profile & Device Owner permission check

Adding permissions checks to ensure callers of
WifiManager.SAVE_NETWORK and addOrUpdateNetwork() have either
Profile Owner policy, Device Owner policy, or the System Uid. if
they're setting the Http Proxy.

While I was here: Fixed a bug where IpManager wasn't notified of an IP
settings change when a WifiConfiguration's STATIC proxy was modified.

Bug: 14669153
Bug: 32584568
Test: extended WifiConfigManagerTest
Change-Id: I5bc3b1bff6628ffeea7bf6ecd0f6f25a671ab682
Merged-In: I5bc3b1bff6628ffeea7bf6ecd0f6f25a671ab682
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigurationUtil.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/util/WifiPermissionsWrapper.java
4620013c32e885dbe78398d5e2c1d15a0353adca 17-Jan-2017 Glen Kuhne <kuh@google.com> Merge "Http Proxy Profile & Device Owner permission check"
db85c372294ee1ba4d242407196bb368f3001a3f 17-Jan-2017 Roshan Pius <rpius@google.com> Merge "WifiSupplicantControl: Strip out FT flags in WifiConfiguration" am: e4c4861e07 am: fc43095921 am: 3f2200415c
am: 9447ba52ea

Change-Id: Ie153437dfc42730107042a4195575e8d27d62056
e4c4861e078e2e0fb2a6551859f4c44ee2634f2c 17-Jan-2017 Roshan Pius <rpius@google.com> Merge "WifiSupplicantControl: Strip out FT flags in WifiConfiguration"
927460f9dcedc9167acb5591726887d1a0af4ba5 11-Jan-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: check p2p supported

WifiStateMachine communicates with the P2P service without checking if
P2P is supported by the device. This CL adds a check for p2p support
and only attempts to create an async channel with the p2p service if
it is supported. If it is not supported, the p2p service and p2p
async channel local variables will be null and no messages will be
sent between services.

Bug: 34193861
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: manually checked p2p peers
Change-Id: Ie4d22aff8de02086142371fbe7da705e669921ab
ndroid/server/wifi/WifiStateMachine.java
816adaf6fcfba6c8e7dc019d33cab5b6b6acf55e 13-Jan-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiStateMachine: remove service dependence" am: aba0ba2f76 am: 3bb81cd270 am: 22446d9b0a
am: 4ed61f2007

Change-Id: If782be24487c6b0b21f9e1bb53e75ad3f4757843
aba0ba2f764a87e0ac7708bdb13f1e1e51fd0ace 13-Jan-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiStateMachine: remove service dependence"
157d8e7251bc38b338cee4b6313fcb1071463d69 13-Jan-2017 Peter Qiu <zqiu@google.com> Merge "util: fix parsing logic for ExtendedCapabilities IE" am: f91694ff0b am: 3b0b7b1d60 am: bfc8099d32
am: 16ef95d217

Change-Id: Id25403493796d8d50ab79a05eb1e469b9fc61f7b
f91694ff0b589d5b9fbe55b5da1b80642990321a 13-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "util: fix parsing logic for ExtendedCapabilities IE"
936d25cfe7a682337e9a9c39412650c9ae3ff312 13-Jan-2017 pkanwar <pkanwar@google.com> DO NOT MERGE: Fix to maintain the Carrier Network connection.

Added isCarrierNetwork param in WifiConfiguration, which is then used in
WifiStateMachine. After this change, the connection to Carrier Network
should be maintained.

BUG: 30760683
Change-Id: Ie6df849182aafc018e336631c502ff7749bfdc35
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/util/InformationElementUtil.java
b40cf26e34638abeca1844a1b7de3ee1bcdb17da 01-Sep-2016 Glen Kuhne <kuh@google.com> Http Proxy Profile & Device Owner permission check

Adding permissions checks to ensure callers of
WifiManager.SAVE_NETWORK and addOrUpdateNetwork() have either
Profile Owner policy, Device Owner policy, or the System Uid. if
they're setting the Http Proxy.

While I was here: Fixed a bug where IpManager wasn't notified of an IP
settings change when a WifiConfiguration's STATIC proxy was modified.

Bug: 14669153
Bug: 32584568
Test: extended WifiConfigManagerTest
Change-Id: I5bc3b1bff6628ffeea7bf6ecd0f6f25a671ab682
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigurationUtil.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/util/WifiPermissionsWrapper.java
f826a412709e7e30bd993440fa8174596cc384e7 07-Jan-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: remove service dependence

The constructor for WifiStateMachine currently depends on other wifi
related services starting in a particular order (ex, p2p starting before
wifi service). This CL removes this dependence and delays retrieval of
other services until after the boot complete command.

Setting the local WifiApConfigStore variable is also moved to the
constructor for consistency with other locally stored state.

This CL additionally alters the WifiStateMachineTest to send a different
message to test log rec sizes when verbose logging settings are changed
(this set of tests seems out of place for WSM, but this CL is not meant
to address that problem).

Bug: 34137732
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: manually tested wifi connection
Test: manually checked for Wifi Direct peers
Change-Id: I50fcc378bbbcc98ab833a01b9dd6c044c5f85e3d
ndroid/server/wifi/WifiStateMachine.java
c353945d360da3efdbfdee249496bc0fb46b6290 12-Jan-2017 Roshan Pius <rpius@google.com> WifiSupplicantControl: Strip out FT flags in WifiConfiguration

The FT flags are added dynamically to wpa_supplicant. These are not
exposed in the public API's and hence should not be returned in the
configs retrieved by apps. So, strip out the FT flags when reading
network configuration from wpa_supplicant.

Bug: 34095472
Test: Will send for regression testing.
Change-Id: I77a35b516b0e9c454b2515f9513ae6869b89c132
ndroid/server/wifi/WifiSupplicantControl.java
c1d7caf1a0db0068d1d3f1133a05eba4b0f592e3 11-Jan-2017 Rebecca Silberstein <silberst@google.com> Merge "[DO NOT MERGE] WifiStateMachine: prevent erroneous wifi toggle" into nyc-mr2-dev
bc94919d4241a499d22cb219e0e6d24f95980c87 11-Jan-2017 Peter Qiu <zqiu@google.com> hotspot2: integration of network evaluator for Passpoint am: 50f36ec6fe am: 36064b611a am: 97cae2b339
am: 2491e5afec

Change-Id: I5f790d7bc10fb701a1cb67f1dfe2bd6c872f51ae
d6a732981224e703416ff1787c1de912175b12ad 11-Jan-2017 Roshan Pius <rpius@google.com> Merge "DO NOT MERGE: WifiConfigStore: Strip out FT flags in WifiConfiguration" into nyc-mr2-dev
aad7e09ce84f07e72c51038a45bec0bbff5ad38c 10-Jan-2017 Peter Qiu <zqiu@google.com> hotspot2: PasspointNetworkScore cleanup am: 49036aa383 am: a1364caddf am: 1abcec4948
am: 3030272975

Change-Id: I965db50cc6904a3d65b81622e5efa76b5374a997
0258f4a1acdc5955875518ff64ac6d52eb0301b2 10-Jan-2017 Peter Qiu <zqiu@google.com> hotspot2: rename PasspointMatchInfo to PasspointNetworkScore am: 1be0ef19e2 am: bf65f8b591 am: 346702a9c3
am: b8c017bbf6

Change-Id: I7d84190ece6a0c14eb19d590386d016e650df8b0
50f36ec6fe906445db996bf3918e5cb3f170bc79 22-Dec-2016 Peter Qiu <zqiu@google.com> hotspot2: integration of network evaluator for Passpoint

Bug: 32714185
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: Manual testing with a Boingo Passpoint AP using a bullhead

Change-Id: Ib71723bed332aa850485edd98ebdcbfcf8ec22c7
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/PasspointNetworkEvaluator.java
a1364caddf198b6f4563f81432a6690cec35906c 10-Jan-2017 Peter Qiu <zqiu@google.com> hotspot2: PasspointNetworkScore cleanup
am: 49036aa383

Change-Id: I315a8c12a69df9e9208ac5392fb01889ece32c78
bf65f8b5911a0aa4856d4eb104ae345f7a55b098 10-Jan-2017 Peter Qiu <zqiu@google.com> hotspot2: rename PasspointMatchInfo to PasspointNetworkScore
am: 1be0ef19e2

Change-Id: I5e10c3e79a62004e58075a8751b0d9da77f75b88
6a8e5ccb593fa239d53d1be4ac6913cfeba47ab6 10-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge changes Ice8e6af9,Iad731d2f

* changes:
hotspot2: PasspointNetworkScore cleanup
hotspot2: rename PasspointMatchInfo to PasspointNetworkScore
ab9a573e3138911e08d037a6996297be30be20bc 26-Dec-2016 pkanwar <pkanwar@google.com> DO NOT MERGE ANYWHERE: Connect to Carrier networks if enabled in
Settings.

After this change the WifiQualifiedSelector will
only connect to Carrier networks if enabled in the Settings. Provided a
method in WifiConfigManager that will be used to decide if we try
connecing to the Carrier network.

BUG: 30760683
Change-Id: I5c6841f784bd82f3811837331d3dd0c795da7688
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
e94a6f2d6e4b12d53041b12ca254a3eb1f294179 10-Jan-2017 Paul Stewart <pstew@google.com> Merge "Fix 802.1x check for needsUnlockedKeyStore()" am: 013708287e am: a1ec459cbc am: 40d4e95e48
am: 939f1183f5

Change-Id: I93125fad652afe2de700aad6b6ad30649c48e0dc
82c1e5cda881e7c9c6074f1769e002945e508d65 10-Jan-2017 Roshan Pius <rpius@google.com> DO NOT MERGE: WifiConfigStore: Strip out FT flags in WifiConfiguration

The FT flags are added dynamically to wpa_supplicant. These are not
exposed in the public API's and hence should not be returned in the
configs retrieved by apps. So, strip out the FT flags when reading
network configuration from wpa_supplicant.

Bug: 34095472
Test: Will send for regression testing.
Change-Id: I0d49fb3c98e49207f2faf30d54493f1147924e3b
ndroid/server/wifi/WifiConfigStore.java
013708287ef5f82f936207b849d294cdbb14d8b2 10-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Fix 802.1x check for needsUnlockedKeyStore()"
edf41f5b58f4bacdda5f558e8f68fc5a5675954d 10-Jan-2017 Amin Shaikh <ashaikh@google.com> Observe settings in RecommendedNetworkEvaluator. am: dfc4219e2d am: ca3c598d82 am: 41ab517ce3
am: 027c1cac0c

Change-Id: I12c9e29ab141b44e30e3a16f25c42a728ca72c57
dfc4219e2d230cdce654c26aed3680fece04ddb5 07-Jan-2017 Amin Shaikh <ashaikh@google.com> Observe settings in RecommendedNetworkEvaluator.

If NETWORK_RECOMMENDATIONS_ENABLED is set, use
RecommendedNetworkEvaluator, otherwise use ExternalScoreEvaluator.
Previously, this setting was only respected at boot time, however,
users can toggle this setting at runtime. This change forwards method
calls on RecommendedNetworkEvaluator to ExternalScoreEvaluator when
this setting is disabled. ExternalScoreEvaluator will be removed in
a later change.

Test: runtests.sh
Bug: 33694202
Change-Id: I67e73d4e2c4cdff465d23056b59554fc9d8ab64a
ndroid/server/wifi/RecommendedNetworkEvaluator.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiInjector.java
80d08cca3132812083fb804ccc327e4f1ceee733 09-Jan-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiApConfigStore: randomize default soft ap SSID" am: 83418537b8 am: 306bfb79ac am: 4a3a1d746c
am: 83379afafc

Change-Id: Id1bd2878ff08bd069dce8b7ea44521a009cad685
83418537b8188242e94c11e33298a51ea2606edd 09-Jan-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiApConfigStore: randomize default soft ap SSID"
49036aa383a6dfdaaf84e760e72d627638a9d86a 04-Jan-2017 Peter Qiu <zqiu@google.com> hotspot2: PasspointNetworkScore cleanup

This reduce the complexity of the scoring system by removing
considerations for AP station count and link speeds. Can be
added back on in the future if needed.

Also added consideration for the RSSI level associated with
the network and if the network is currently active.

Bug: 32714185
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ice8e6af907a8ecf6e61f2b061c11f62f5e363036
ndroid/server/wifi/hotspot2/PasspointNetworkScore.java
1be0ef19e27c5bf8091643128c17906ce10c82a8 04-Jan-2017 Peter Qiu <zqiu@google.com> hotspot2: rename PasspointMatchInfo to PasspointNetworkScore

Bug: 32714185
Test: None
Change-Id: Iad731d2fcd5b57ce4378b35f9df697cb5038eab4
ndroid/server/wifi/hotspot2/PasspointMatchInfo.java
ndroid/server/wifi/hotspot2/PasspointNetworkScore.java
87bcddd937eabb90b56cf79a69f0ff3972e3c812 09-Jan-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiStateMachine: erroneous wifi enabled updates" am: 5bd75487ad am: 83e604fc1c am: 58a0bdb924
am: a126424051

Change-Id: I34a7505f7b0ee412724ec135a6eb223b7bb8ac50
5bd75487ad81dc7a01768def4d0417931cdabff9 09-Jan-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiStateMachine: erroneous wifi enabled updates"
326b5c2972a1ca5c47fe7cd04407f4ee620e79b1 09-Jan-2017 Wei Wang <wvw@google.com> Merge "Skip tearDownInterfaces during init"
426ed3e24848029cb6331045fc09e624fea6955f 09-Jan-2017 Peter Qiu <zqiu@google.com> hotspot2: add support for generating WifiConfiguration from PasspointProvider am: 79b81a96a2 am: e9a465d262 am: 76803561b7
am: ffc8c20d88

Change-Id: Ic3b8ff75c47c3ce6cf8df42a29c0af417c78f620
c0006bcbf69b0dbe88b8020ef02b54e44b6e579b 09-Jan-2017 Peter Qiu <zqiu@google.com> hotspot2: add ANQPRequestManager for managing ANQP requests am: 33c46cd713 am: de48cd3f42 am: e2231767fb
am: 71fe3535c8

Change-Id: I22d7bdc8664a16bbdff185ff26cfc4552685054f
df969e4d2bf9165e8ec3f4cbc434228e0bb31d88 09-Jan-2017 Peter Qiu <zqiu@google.com> hotspot2: add support for matching Passpoint provider am: 87c6f1b149 am: 6beea28d82 am: 9803b10ede
am: 607721fb8f

Change-Id: I233110b14a9b68364c989f6cd3c548834c61b904
2823af420f5d9f40c388fd672224bb585655ac6d 08-Jan-2017 Peter Qiu <zqiu@google.com> hotspot2: Passpoint configuration APIs update am: d28cfdde23 am: e67a2fa8f7 am: 271e45bd11
am: d4a66ccfa2

Change-Id: I31580d83d0d3bbed2a2b86775c2df8d5af3767e3
79b81a96a2dd5ce45cb4b9206f04e4b37f7220f1 21-Dec-2016 Peter Qiu <zqiu@google.com> hotspot2: add support for generating WifiConfiguration from PasspointProvider

Bug: 33246489
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: I3387d0bf35563bb403d55f7ed918fac0454670d6
ndroid/server/wifi/hotspot2/PasspointProvider.java
33c46cd7132df4ce72eee0ed2783e1a1e15bc007 19-Dec-2016 Peter Qiu <zqiu@google.com> hotspot2: add ANQPRequestManager for managing ANQP requests

The main objective is to hold off ANQP requests to an AP
after the previous request is unanwered or failed.

This can eaisly be expanded in the future to throttle ANQP requests
further by taking into consideration of the current connection
status and other criteria, to reduce the impact of ANQP
requests on the network performance and the power consumption.

Bug: 33746564
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I906508f72832a9e461be6b2db2ceacb997765bb8
ndroid/server/wifi/hotspot2/ANQPRequestManager.java
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointObjectFactory.java
87c6f1b149804685e46c18d2ad11262f611c9255 16-Dec-2016 Peter Qiu <zqiu@google.com> hotspot2: add support for matching Passpoint provider

Added support for matching Passpoint provider based on the
content of ANQP elements.

While there:
- updated IMSIParameter and added unit tests for it
- added utility class ANQPMatcher for providing ANQP
element matching functions

Bug: 33246489
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ibdd49aaf44a097c1ee523284888faace6b866485
ndroid/server/wifi/IMSIParameter.java
ndroid/server/wifi/SIMAccessor.java
ndroid/server/wifi/hotspot2/ANQPMatcher.java
ndroid/server/wifi/hotspot2/AuthMatch.java
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointObjectFactory.java
ndroid/server/wifi/hotspot2/PasspointProvider.java
ndroid/server/wifi/hotspot2/anqp/eap/NonEAPInnerAuth.java
d28cfdde236d3d7c72f0c57ca7f18622b16d421a 13-Dec-2016 Peter Qiu <zqiu@google.com> hotspot2: Passpoint configuration APIs update

- renamed addPasspointConfiguration to addOrUpdatePasspointConfiguration
to match the implementation of the API
- updated PasspointManager to update passpoint provider using exact FQDN
string matching instead of base domain matching, to avoid unnecessary
complexities.
- updated getPasspointConfigurations to return an empty list instead of
a null when no configuration is installled
- updated PasspointManager to use a 64-bit counter for assigning provider
IDs instead of using the wall clock to avoid possible ID conflicts. The
use of an unique provider ID is necessary to avoid leaving keys and
certificates in a bad state when failing to install keys and certificates
on the update operation.

Bug: 33587910
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: Iee304fe742085ec91d8d448e0939201d293ab7e5
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/hotspot2/PasspointManager.java
cef3c12987d0adc01a93d469b0f5ce8fbe5cb4dd 07-Jan-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Remove reason from discovery session terminate callback" am: e1ea3ef20d am: 466ee1ca71 am: c7105e906f
am: 66b24df7c7

Change-Id: Ie90edce9eaf3c49e47456bfe4d1086df965a1968
e1ea3ef20d6cd94f89e3a9ff7c5c38307dedc6f6 07-Jan-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Remove reason from discovery session terminate callback"
5c06e3b7134bcba75c9d5709c309dc18069a1983 07-Jan-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Simplify Wi-Fi Aware API namespace" am: 6c6396f30b am: f769667474 am: ed1e0b5e26
am: 36b4bce5d9

Change-Id: I9a6337fdcea79fbe6bce051d04e2583b8364e2a7
6c6396f30b0fbcbcce497c85568c36fca77deb9b 07-Jan-2017 Etan Cohen <etancohen@google.com> Merge "[AWARE] Simplify Wi-Fi Aware API namespace"
59eaa9ca9ba63202f848c15c525a9b8190d107da 20-Dec-2016 Wei Wang <wvw@google.com> Skip tearDownInterfaces during init

CleanUpSystemState is called when wificond starts, so we can skip
tearDownInerfaces call as long as wificond is restart.
This helps to save the WiFi service start time from 291ms to 57ms
measured on marlin.

Bug: 33752168
Test: wificond_unit_test and wificond_integration_test passed
Change-Id: I07bcf49b7e3dc6c5c34f9fd154b81ed81b2cc8b8
ndroid/server/wifi/WifiStateMachine.java
cecebde8ef6445860c111f252c9dbb02e15e42d7 24-Dec-2016 Etan Cohen <etancohen@google.com> [AWARE] Remove reason from discovery session terminate callback

Only valid reason is per request (destroy or timeout/count).

Bug: 32670068
Test: unit tests & integration tests (sl4a) passing
Change-Id: I2d773beffe590456a302b682f2861007315d1619
ndroid/server/wifi/aware/WifiAwareNative.java
66c17d08de5b28134f172317c87132d1818f30f0 20-Dec-2016 Etan Cohen <etancohen@google.com> [AWARE] Simplify Wi-Fi Aware API namespace

Simplify Wi-fi Aware API namespace. Rely on project and remove WifiAware
prefix from most classes.

(pure rename operation: no functional changes)

Bug: 31470256
Test: unit-tests + integration (sl4a) tests.
Change-Id: I2a3de693ba0945300f973ab66fec195077568d79
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareNative.java
ndroid/server/wifi/aware/WifiAwareServiceImpl.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
ea9f4457a7c376d985876fdf4887a5e991f5b1f8 06-Jan-2017 Amin Shaikh <ashaikh@google.com> Move WifiWakeupController to NetworkRecommendation am: 6dc7e1f070 am: 79251114ac am: 6d7a5a970f
am: 4d385943f0

Change-Id: I43ca1e4b8961039337a9147856d961814001611a
6dc7e1f070741c44d1c322427b742e566c9c0d9b 03-Jan-2017 Amin Shaikh <ashaikh@google.com> Move WifiWakeupController to NetworkRecommendation

Bug: 34054262
Test: runtests.sh
Change-Id: I7eec869f5a3c74f0ac949113d08a70c7f5565052
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiWakeupController.java
dc41c27a6e434bfd6f96c4df8724f57b5d1e6660 06-Jan-2017 Stephen Chen <stewchen@google.com> Merge "Move WifiNotificationController to NetworkRecommendation" am: ff1100de0e am: abe27d8d7c am: 10307dd70e
am: 1075315dca

Change-Id: Ib24ee2aa40e34d39aa0d8da298f6efe345f60451
ff1100de0e10f72517c93427d7231c8a7ae0307d 06-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Move WifiNotificationController to NetworkRecommendation"
c4d0de0346332a43155580c28097c3bdc9976875 05-Jan-2017 Rebecca Silberstein <silberst@google.com> WifiApConfigStore: randomize default soft ap SSID

Add a suffix to the default SSID for SoftAp configurations. This
results in the default SSID name (currently AndroidAP) followed by and
underscore and four randomized ints. The WifiApConfigStoreTest methods
were also updated to reflect this change.

Bug: 31076622
Test: manually tested with a newly flashed device
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: If3032ff97d76cbd0bf24950aeb01a9d30568496f
ndroid/server/wifi/WifiApConfigStore.java
d84ac6ab3451b32aaedc2b497a57c700088d6f6d 05-Jan-2017 Paul Stewart <pstew@google.com> DO NOT MERGE: Fix null dereference in carrier networks

WifiStateMachine can respond to CMD_HAS_CARRIER_CONFIGURED_NETWORKS
with a null object if it is not in a state to handle this. Therefore
syncHasCarrierConfiguredNetworks must check for null before
attempting to cast the result object back to boolean.

Bug: 34050164
Test: Compile
Change-Id: I21b80ef3989ca2d6a09784f9c9a44f4af19b5850
ndroid/server/wifi/WifiStateMachine.java
883a0bf526097a686ed4bc6db5348537f723367a 05-Jan-2017 Amin Shaikh <ashaikh@google.com> Merge "Populate fields in RecommendedNetworkEvaluator." am: 4718fa7418 am: 93cf2d9d0d am: a694b39691
am: 323a31a7e5

Change-Id: Ia18aaf0a43305b8ac7bc22b492d80fdff2c085b1
4718fa7418ebb57bb62e51697a6ba073e777b149 05-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Populate fields in RecommendedNetworkEvaluator."
48bba582a6735feae2d0834011cd30d9bc2d1100 04-Jan-2017 Rebecca Silberstein <silberst@google.com> WifiStateMachine: erroneous wifi enabled updates

Update WifiStateMachine to only broadcast wifi availability when in
client mode. Prior to this fix, wifi would briefly enable/disable when
exiting airplane mode when location scans are enabled and wifi
(client mode) should be disabled.

This CL additionally fixes an issue in WifiController that works around
an assumption in WifiStateMachine that the default mode after supplicant
has started is client mode. The mode is now set before starting
supplicant so we do not erroneously enter client mode and then
immediately switch to scan only mode.

This CL addresses three known issues where wifi flickers on/off:
1 - wifi disabled, enable wifi location scans
2 - location scans enabled, wifi disabled, enter and exit airplane mode
3 - location scans enabled, wifi disabled, enter airplane mode, enable
and disable wifi, exit airplane mode

Bug: 28336982
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: manually confirmed wifi does not flash on after airplane mode
Change-Id: I9a1d4c7cf00e78c09e3f28e820e058c72c5114b9
ndroid/server/wifi/WifiController.java
ndroid/server/wifi/WifiStateMachine.java
392506310ec5bf00d9908bebef4ed0a90c0150e5 05-Jan-2017 Rebecca Silberstein <silberst@google.com> [DO NOT MERGE] WifiStateMachine: prevent erroneous wifi toggle

The icon for wifi toggles on/off quickly when transitioning between
states if location scans are enabled. This is due to two errors:
1 - WifiStateMachine sends the wifi enabled broadcast before wifi has
entered client mode.
2 - WifiStateMachine assumes it is entering client mode if it has not
been told otherwise.

This CL works around the assumptions in WifiStateMachine and avoids
sending the wifi enabled broadcast when it should be going in to scan
mode and not client mode.

Bug: 28336982
Test: verified state transitions manually
Test: runtest frameworks-wifi
Change-Id: I5e34ee4f0ef90668ecc97f5d6d726444fd08ffb3
ndroid/server/wifi/WifiController.java
ndroid/server/wifi/WifiStateMachine.java
a0519deb15342a5eeb82b27db94a305d5e1d6990 04-Jan-2017 Peter Qiu <zqiu@google.com> resolve merge conflicts of fe09754c1 to nyc-dev am: f35c310b1a am: bd91d4a476 am: 39ec37cefe
am: e4890ae5f6

Change-Id: Ib39ff0bf19dd2a0390cee7c371167d9db3bda487
e4890ae5f6b6cb60669d7527513ffb4598ac3476 04-Jan-2017 Peter Qiu <zqiu@google.com> resolve merge conflicts of fe09754c1 to nyc-dev am: f35c310b1a am: bd91d4a476
am: 39ec37cefe

Change-Id: I82862cd9b911f3de01ce97be4dcb225259e72a74
39ec37cefe9db617af2bc37ec5b05517b01576e2 04-Jan-2017 Peter Qiu <zqiu@google.com> resolve merge conflicts of fe09754c1 to nyc-dev am: f35c310b1a
am: bd91d4a476

Change-Id: I8afeca7863e3973205272eabc7df7d8b4f2d3cf7
bd91d4a476b2b5d4ab13658f8fb01415ea45f06f 04-Jan-2017 Peter Qiu <zqiu@google.com> resolve merge conflicts of fe09754c1 to nyc-dev
am: f35c310b1a

Change-Id: Ie8d68a8964d49b629e37d79dd14dac7e523f1461
fcbdc7fdb5612e82991494832a95c73bcc898f12 04-Jan-2017 Stephen Chen <stewchen@google.com> Move WifiNotificationController to NetworkRecommendation

Bug: 32981344
Test: runtests.sh
Change-Id: If11c7b5bb9e47503e22ad8fe58b5e8f23798db7a
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNotificationController.java
ndroid/server/wifi/WifiServiceImpl.java
f35c310b1acc5898811c9ec9b7978bc5da50d507 04-Jan-2017 Peter Qiu <zqiu@google.com> resolve merge conflicts of fe09754c1 to nyc-dev

Change-Id: I9845a6826188ea0c05508947f5c1266a245b04fd
fe09754c17a194e2ac1342b0da9959aafdc6dc32 04-Jan-2017 Peter Qiu <zqiu@google.com> configparse: do not delete passpoint configuration file am: de3de10eec am: 8d43428276
am: 39ae399af7

Change-Id: Ice3c49e6f2377f2822cce0fe1138f5c837507d1b
39ae399af786656ddb820ecb6a46eaf98042aaf6 04-Jan-2017 Peter Qiu <zqiu@google.com> configparse: do not delete passpoint configuration file am: de3de10eec
am: 8d43428276

Change-Id: I2fdc59cf23a122bcc6cbc4f0596e384152d29160
8d43428276b08f5afcec6c64cc24fc4e7a8fd498 04-Jan-2017 Peter Qiu <zqiu@google.com> configparse: do not delete passpoint configuration file
am: de3de10eec

Change-Id: I04ebda0dccafa98a4b08d35cddc17d005f6a735f
21786cba4db7a24245f1e85c068e0c4c277cb546 03-Jan-2017 Ivan Podogov <ginkage@google.com> In permission review mode, always request user's consent to toggle WiFi.
am: 054ddcd931

Change-Id: Id40da72090217210ac0ffbc1029475a8ef0ee2da
43ce2c4496636ffeb7d408bcef5b4e790fa34276 29-Dec-2016 Ivan Podogov <ginkage@google.com> In permission review mode, always request user's consent to toggle WiFi. am: 02938a0a73 am: c1b1d03e13 am: 8ddefe3ed4
am: 302bc1775a

Change-Id: Ifcf150a8bda563f639691e1c77d47e797250c72f
02938a0a735da7fafaaed84e31e1aa93cdf80a56 05-Dec-2016 Ivan Podogov <ginkage@google.com> In permission review mode, always request user's consent to toggle WiFi.

Bug: 33155556
Test: Manual: flash the watch, check that the consent UI was
displayed in both apps (the one with CompileSDK=21 and
TargetSDK=21, and the one with CompileSDK=25 and
TargetSDK=25).
Change-Id: I41d9adb916c12327643d59fd05a50d097800e2ac
ndroid/server/wifi/WifiServiceImpl.java
3872e4cd3900c7b179371028dbe0e94d9b0a7380 20-Dec-2016 Amin Shaikh <ashaikh@google.com> Populate fields in RecommendedNetworkEvaluator.

- Find corresponding ScanResult for recommended WifiConfiguration
- Set WifiConfiguration#{allowedKeyManagment,ephemeral} bits
- Add new WifiConfiguration for ephemeral networks

Test: runtest frameworks-wifi
Bug: 33702806
Change-Id: I4aaeabe626c68b13bb7aa75b89adc4cb2663508c
ndroid/server/wifi/RecommendedNetworkEvaluator.java
ndroid/server/wifi/WifiSupplicantControl.java
ndroid/server/wifi/util/ScanResultUtil.java
ae856f2c09ff3a408c0610f10008056ed5437771 23-Dec-2016 Sohani Rao <sohanirao@google.com> Add method to handle boolean arguments to log am: 64acb4210c am: 3a8020030f am: ce88546d36
am: ba4d30f2e1

Change-Id: Ibc4456d6dc48871e452338beef441989cb8dcef9
64acb4210ced1920fc29caa98a353b2968fd33b5 22-Dec-2016 Sohani Rao <sohanirao@google.com> Add method to handle boolean arguments to log

Overload LogMessage's c() function with boolean argument

Change-Id: I33cc6478b8f4f46f6f990933c0cb1a3011afcc84

Bug: 33839553
Test: Unit tests
ndroid/server/wifi/DummyLogMessage.java
ndroid/server/wifi/LogcatLog.java
ndroid/server/wifi/WifiLog.java
1985d02fa70fe91f74fb5971612b8d716c5cfab3 23-Dec-2016 Peter Qiu <zqiu@google.com> hotspot2: cleanup ANQPParser am: 29074fe3d2 am: d976749660 am: 17c782df9f
am: 49f924b420

Change-Id: Ia38be607aa31b04ec530451600a29537a0c2a8f1
7eec1db39aaf1738cff89cf23b74a5fc1cf7317d 23-Dec-2016 Peter Qiu <zqiu@google.com> hotspot2: rename ANQPFactory to ANQPParser am: 3a46e1804b am: 0c147a58ee am: d692411e19
am: 032b0d60d7

Change-Id: I07b82416a428d074821e67d8dd4d4efc7f3b58df
c55b139a7082dafdf19b09baf7870b23e5f566c3 23-Dec-2016 Sohani Rao <sohanirao@google.com> Merge "Wifi specific logging must be enabled with Verbose Logging mode" am: 17eada40bd am: 9c444ccff5 am: 97e4c5c048
am: 004687b375

Change-Id: I67c346018553c044c5af19b43cb51603a9eeb23e
29074fe3d2125eeb33db6b9d4425b54e72036661 12-Dec-2016 Peter Qiu <zqiu@google.com> hotspot2: cleanup ANQPParser

Below is the list of cleanups:
- removed unused function
- cleaned up parsing of vendor specific element
- only support Hotspot 2.0 elements, since these are the only
elements that we cared about
- added unit tests

Bug: 33000864
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I2e492525dfa5e28c12336e2bbec2f2882e0af57c
ndroid/server/wifi/hotspot2/PasspointEventHandler.java
ndroid/server/wifi/hotspot2/anqp/ANQPParser.java
3a46e1804baf10d514d7d79bdad9ab0b1dc1759c 09-Dec-2016 Peter Qiu <zqiu@google.com> hotspot2: rename ANQPFactory to ANQPParser

This is a purely rename operation. Class name and call reference
updates will be done in the follow-on CL.

Bug: 33000864
Test: None
Change-Id: I3e4d03fee31480d7d851e221a8d5347b7a740587
ndroid/server/wifi/hotspot2/anqp/ANQPFactory.java
ndroid/server/wifi/hotspot2/anqp/ANQPParser.java
17eada40bdca61d3a8f52005f34aca4bde978269 22-Dec-2016 Sohani Rao <sohanirao@google.com> Merge "Wifi specific logging must be enabled with Verbose Logging mode"
292d2299c7843d40d7515d051b1ac7f7138a40e8 22-Dec-2016 Peter Qiu <zqiu@google.com> Merge "hotspot2: ANQP elements cleanup Part 4" am: b49041a969 am: 7abc4a580f am: d3b0afdfc3
am: 0eb86a68d6

Change-Id: I25ca31893c81d32777fbc9ad7117aea94ced2481
b49041a96954a5724ac162f0e4bd4842073fffec 22-Dec-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: ANQP elements cleanup Part 4"
e33b3346b262507ef2361d50a89d16bef69d9a57 20-Dec-2016 Sohani Rao <sohanirao@google.com> Wifi specific logging must be enabled with Verbose Logging mode

Wifi Verbose Logging setting from Developer settings menu will
be used along with each message's log level to determine if it
will be flushed to the log buffer. Expose a new method to set
set Wifi's verbose logging mode in LogcatLog and store it as a
static variable. Since multiple threads could be accessing this
variable, ensure atomicity for reads/writes.

Bug: 33783647
Test: Unit test and verify logging
Change-Id: I183f6c9fa148f241b2e9eba9846ccaf34f79ae70
ndroid/server/wifi/LogcatLog.java
ndroid/server/wifi/WifiServiceImpl.java
b4a4ef8b9dae3f0d812e5a57408a36cd0630376f 22-Dec-2016 Peter Qiu <zqiu@google.com> Merge "hotspot2: ANQP elements cleanup Part 3" am: 94203bb70f am: dcd4957d37 am: bf22e9f783
am: 300839ba16

Change-Id: Iabf2620d477c30605fe2cb54af68686474dd9a53
94203bb70f2afd3b2b3ac50bda8aa5900b78663b 22-Dec-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: ANQP elements cleanup Part 3"
f07b61edc5f3443e5719b2ff1084ab1aee07d029 22-Dec-2016 Pankaj Kanwar <pkanwar@google.com> Merge "DO NOT MERGE: Add API to indicate carrier networks." into nyc-mr2-dev
ce012ca33b603e3f7f21262199ae0c0bd84756b0 22-Dec-2016 Peter Qiu <zqiu@google.com> Merge "hotspot2: ANQP elements cleanup Part 2" am: 12c5e25550 am: 136ba92335 am: 03b067e6da
am: 9233958f30

Change-Id: I1c9d3623d4bbe82763690f82d9d688e145ca7e58
12c5e255507bceb0bdc915f709dd0275705df461 22-Dec-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: ANQP elements cleanup Part 2"
9616c2a15927130fc941a874fdf8a0a0a061a2ae 22-Dec-2016 Etan Cohen <etancohen@google.com> Merge "[AWARE] Use WifiInjector in WifiAware library" am: 3121bb5254 am: 214511797f am: 50df9e2bda
am: 0e018e462b

Change-Id: If1c1451d78a80da5e9e76aeae8a071a22b3ea1d4
68b8c4c1ccdd9fec67a96a2a4e8df284ce15bb7e 21-Dec-2016 pkanwar <pkanwar@google.com> DO NOT MERGE: Add API to indicate carrier networks.

Bug: 31003437
Change-Id: I4a5374b59d08fd8ec8ffbff007764e3f277f79df
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
d8dddd9671750e6bfbcfa218db16ad096b9904ee 09-Dec-2016 Peter Qiu <zqiu@google.com> hotspot2: ANQP elements cleanup Part 4

Cleaned up the implementation and added unit tests for NAIRealmElement
and the classes used by it.

While there, remove the match() function from NAIRealmElement for now.
So that all ANQP elements class are purely data storages for the element.
The match() function will be added to PasspointProvider for matching
a NAI Realm Element against the provider's configuration.

Other changes included:
- removed the now unused EAP.java
- removed the uses of enum for EAP Method ID and Authentication
Parameter type constants.
- renamed Credential to CredentialType

Bug: 33000864
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I940f6d7cecb9bec405f0786845af768caf527990
ndroid/server/wifi/hotspot2/anqp/ANQPFactory.java
ndroid/server/wifi/hotspot2/anqp/NAIRealmData.java
ndroid/server/wifi/hotspot2/anqp/NAIRealmElement.java
ndroid/server/wifi/hotspot2/anqp/eap/AuthParam.java
ndroid/server/wifi/hotspot2/anqp/eap/Credential.java
ndroid/server/wifi/hotspot2/anqp/eap/CredentialType.java
ndroid/server/wifi/hotspot2/anqp/eap/EAP.java
ndroid/server/wifi/hotspot2/anqp/eap/EAPMethod.java
ndroid/server/wifi/hotspot2/anqp/eap/ExpandedEAPMethod.java
ndroid/server/wifi/hotspot2/anqp/eap/InnerAuthEAP.java
ndroid/server/wifi/hotspot2/anqp/eap/NonEAPInnerAuth.java
ndroid/server/wifi/hotspot2/anqp/eap/VendorSpecificAuth.java
54481f724e41249c4e036a9f59e8cb3e6fb821d8 08-Dec-2016 Peter Qiu <zqiu@google.com> hotspot2: ANQP elements cleanup Part 3

This CL contained cleanups for ThreeGPPNetworkElement and CellularNetwork.

Bug: 33000864
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ibba64207e0f22e3247a3cc8387eeca277bcd577b
ndroid/server/wifi/hotspot2/anqp/ANQPFactory.java
ndroid/server/wifi/hotspot2/anqp/CellularNetwork.java
ndroid/server/wifi/hotspot2/anqp/ThreeGPPNetworkElement.java
1dc52f076977039a6bf112885feca6638c05cd29 06-Dec-2016 Peter Qiu <zqiu@google.com> hotspot2: ANQP elements cleanup Part 2

This CL contained cleanups for the following ANQP elements:
- DomaniNameElement
- HSConnectionCapabilityElement
- HSWanMetricsElement
- RawByteElement

Bug: 33000864
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I6c4737bdb04cc54aa5b3ea7462e44afd423f1b27
ndroid/server/wifi/hotspot2/PasspointMatchInfo.java
ndroid/server/wifi/hotspot2/anqp/ANQPFactory.java
ndroid/server/wifi/hotspot2/anqp/DomainNameElement.java
ndroid/server/wifi/hotspot2/anqp/HSConnectionCapabilityElement.java
ndroid/server/wifi/hotspot2/anqp/HSWanMetricsElement.java
ndroid/server/wifi/hotspot2/anqp/ProtocolPortTuple.java
ndroid/server/wifi/hotspot2/anqp/RawByteElement.java
5c5d7ea1d4947b85b2d64363bd1adadddf68753c 21-Dec-2016 Pankaj Kanwar <pkanwar@google.com> Merge "DO NOT MERGE: Fix bug in WifiStateMachine for EAP-SIM." into nyc-mr2-dev
d45abba86c33bd93863fc9d8f7c84ca28deb17b2 14-Dec-2016 Etan Cohen <etancohen@google.com> [AWARE] Use WifiInjector in WifiAware library

Convert the WifiAware library to use the WifiInjector.
- Reduces use of reflection to configure unit tests
- Lays the ground work for merging all Wi-Fi handler threads

Bug: 27924886
Test: boots & unit tests passing
Change-Id: I43f1896182a64bc89249e49b6e2bbce238f68f82
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/aware/WifiAwareDiscoverySessionState.java
ndroid/server/wifi/aware/WifiAwareNative.java
ndroid/server/wifi/aware/WifiAwareService.java
ndroid/server/wifi/aware/WifiAwareServiceImpl.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
63a4b3a94ac3a0f3f211b03df4472a3ad4314849 21-Dec-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: allow for unit tests" am: 56924e1d3b am: f11afa777a am: 1f872290ad
am: ee88665dee

Change-Id: I0bcd09a81e660b9c31b2e7283969cdbf78883049
56924e1d3b0d360406d661f051d500e6bc16a953 21-Dec-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: allow for unit tests"
843ee4e8b0b3332e6f7403fe3d8346cbb991f9b8 20-Dec-2016 pkanwar <pkanwar@google.com> DO NOT MERGE: Fix bug in WifiStateMachine for EAP-SIM.

WifiStateMachine was not looking for the right keys. Add condition to
look for WPA_EAP, in addition to IEEE8021X.
Bug:31003437

Change-Id: Icc72644de77927a23c2ad5a4fbea640ba392e9ae
ndroid/server/wifi/WifiStateMachine.java
ce6f8e9530c34bc871e46e025ca671ecb2c04ef3 20-Dec-2016 Paul Stewart <pstew@google.com> Fix 802.1x check for needsUnlockedKeyStore()

The previous logic was incorrect since either the WPA_EAP or the
IEEE8021X should trigger enterprise configuration checks. The
two do not need to be specified. In fact, there's a utility
method around that we should use.

Bug: 33785765
Change-Id: I69f8b397f2f95d492bd74e4b838cfe9331754585
Test: Full regression test
ndroid/server/wifi/WifiConfigManager.java
14145984773a3ffb992723045dd6d829c6328b83 19-Dec-2016 pkanwar <pkanwar@google.com> DO NOT MERGE: Allow Carriers to specify Wifi Networks.

Added support for Carrier networks. Added functionality to read
Carrier networks from Carrier Config.

Bug: 31003437
Test: Added new tests, regression tests passed (frameworks-wifi).
Change-Id: I9c3c03e2ab4a459898bec125f9dea8f96977e04f
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
504f61f20a0c57f28a861711b4b2c44f58d8c8ed 19-Dec-2016 Peter Qiu <zqiu@google.com> Merge "hotspot2: ANQP elements cleanup Part 1" am: 1d1a1faf15 am: d2256a2562 am: b8dc14ed1f
am: 62984a3ec8

Change-Id: I1f9014c35c611a11ab0738894388950743e5272a
1d1a1faf157dbdee628aee0919b089b10e0a7ed0 19-Dec-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: ANQP elements cleanup Part 1"
02cd4e24fbd3dcc08cd26d630c04504bdd3d7fc1 19-Dec-2016 Peter Qiu <zqiu@google.com> Merge "Cleanup support for parsing various length integer and string from ByteBuffer" am: 865cdd2060 am: ccf757e9a8 am: 754c513378
am: ba796d3e92

Change-Id: I26bd4eb3e04e831c9f5278ad44508764633ed491
710639ecf8ff2ab929c30121e7194c0a1b20d003 19-Dec-2016 Sohani Rao <sohanirao@google.com> Log API surfaces of WifiScanningService am: 4fbaf3821b am: 993626cd83 am: 688db32a92
am: 8e3ac94e9d

Change-Id: I7f6df4508e7be56abd00f2392b56f270809b3bb6
dae88422361659296f15679a20c53a9c5219345e 19-Dec-2016 Sohani Rao <sohanirao@google.com> Add logging for messages sent to WifiP2pService am: 5d56030554 am: 5a7a92f737 am: c5b15f2cba
am: 5707880132

Change-Id: I16173b3ce0e4404d4a071def62eca5b2a6538aa5
3f8871cd399f53fcf1c9c5caaf052e3f32783601 19-Dec-2016 Sohani Rao <sohanirao@google.com> Subclass Handler to log incoming messages am: 7275c974c1 am: 088dc00ac8 am: 02dae78ec2
am: 63bbb0a8ac

Change-Id: Iea1ccb3cad523c4f86191787ce962a774d3d47a4
865cdd20600fff47cca95971f2a343fc960bb217 19-Dec-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Cleanup support for parsing various length integer and string from ByteBuffer"
993626cd83d0911c01d2c90a045fb527f8ace37c 19-Dec-2016 Sohani Rao <sohanirao@google.com> Log API surfaces of WifiScanningService
am: 4fbaf3821b

Change-Id: I3f02dc2bc37835499a9952ed086c6fbc1913710c
5a7a92f737fe10b2073aeecb421312f9a786b563 19-Dec-2016 Sohani Rao <sohanirao@google.com> Add logging for messages sent to WifiP2pService
am: 5d56030554

Change-Id: I8cbc92340474a4339bf3b9e41fa212858f93e388
088dc00ac8289bae49da65990cb7c1d6b7b297d2 19-Dec-2016 Sohani Rao <sohanirao@google.com> Subclass Handler to log incoming messages
am: 7275c974c1

Change-Id: I6e8754ace2157beb0d5153e0df7b6ca07c561e18
f64b4f9cab2e72bea96f8243055c539fff3d19a7 19-Dec-2016 Sohani Rao <sohanirao@google.com> Merge changes from topic 'WifiHandler'

* changes:
Log API surfaces of WifiScanningService
Add logging for messages sent to WifiP2pService
Subclass Handler to log incoming messages
dd7234a74ace79c2c8b43702d8e2b0abfb9864d4 19-Dec-2016 Peter Qiu <zqiu@google.com> Merge "passpoint: initial support for matching passpoint providers" am: 3114533107 am: 0425f01e8b am: eb39381ef9
am: cd328cfca9

Change-Id: Ib0898ab857d809182b4a866deafca74f684ec65d
3114533107f4fb87b4f1f9cca61829d37d2c2d03 19-Dec-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "passpoint: initial support for matching passpoint providers"
4fbaf3821bd5c3056c7c4cdd1aee3e17ac7046d0 29-Nov-2016 Sohani Rao <sohanirao@google.com> Log API surfaces of WifiScanningService

Add logging to trace the following API surfaces in WifiScanningService
- AIDL methods calls,
- Async Channel messages sent to the scanning service
- Use WifiHandler instead of Handler to define the client handler to
trace incoming messsages
- Async Channel messages sent by the service
- Use WifiAsyncChannel to trace reply messages sent by the service
- Fully connected Async Channel is used here, therefore, it can send
messages directly to the client's messenger without using Async
channel methods. Add logging in replySucceeded() and replyFailed()
to trace messages sent by the service directly to the client.

Bug: 33085782
Test: Unit test suite, verify logging, sanity test (power on and
connect to Wifi Access Point)

Change-Id: I8df4f4077801c359e11a93fde2c1ce5ea811a0e4
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
5d5603055452debfeb6e958a17c419be516f4572 23-Nov-2016 Sohani Rao <sohanirao@google.com> Add logging for messages sent to WifiP2pService

Use WifiHandler in WifiP2pService in order to
log incoming messages.

Bug: 33089660
Test: Unit test and sanity test

Change-Id: I52df6301daca5bed8c2d756e24ae72c00b23efc4
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
7275c974c1d7b9451d1e67ae8d56a9d57742303c 18-Nov-2016 Sohani Rao <sohanirao@google.com> Subclass Handler to log incoming messages

A new class WifiHandler that overrides handleMessage() method to log
incoming messages and associated unit tests. In order to instantiate
WifiLog, an instance of WifiInjector is required. WifiHandler is
expected to be used by any service in wifi, including WifiP2pService.
Since this service is started before WifiService is started,
WifiInjector which is created in WifiServiceImpl would not be available
to instantiate WifiHandler if is required in the constructor. For now,
we use lazy initialization and invoke WifiInjector.getInstance() once
to get the WifiInjector and then make a WifiLog object the first time
a message is logged. In order to enable testing of this class, a hidden
API is exposed only for testing to set the logging field in the class.

Bug: 33085782
Test: Unit test suite, Sanity tests (power on, Wifi connection)

Change-Id: I9110eacb28a5faea331a818998ef25295aa589a8
ndroid/server/wifi/util/WifiHandler.java
054ddcd931164dcb6ce42a5a981748f89e6744e1 05-Dec-2016 Ivan Podogov <ginkage@google.com> In permission review mode, always request user's consent to toggle WiFi.

Bug: 33155556
Change-Id: I41d9adb916c12327643d59fd05a50d097800e2ac
ndroid/server/wifi/WifiServiceImpl.java
709f2f151a4c6990758297e12ec3da89952ddeef 16-Dec-2016 Roshan Pius <rpius@google.com> WifiConfigStore: Start with no user store am: 1a2b2242a2 am: 67bdb24910 am: 1f966d53e7
am: ad3737f336

Change-Id: I45eae3cc34ce27ccb7cd10e04b4ddb988ec9ae42
da918df16e03ee19be62343313d954027d3eb3ab 28-Nov-2016 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: allow for unit tests

Some structural cleanup that allows for WifiServiceImplTest development.

Bug: 33167818
Test: runtests.sh
Change-Id: Ic3ca545f210dfaa3277cc28166b2611b3c818408
ndroid/server/wifi/WifiNotificationController.java
ndroid/server/wifi/WifiService.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiTrafficPoller.java
ndroid/server/wifi/WifiWakeupController.java
74339de52d7066f22771d914e698da503232c107 06-Dec-2016 Peter Qiu <zqiu@google.com> hotspot2: ANQP elements cleanup Part 1

Cleanup and add unit tests for the following ANQP elements (and
the underlying classes used by those elements):
- HSFriendNameElement
- IPAddressTypeAvailabilityElement
- RoamingConsortiumElement
- VenueNameElement

The cleanup included using a static #parse function for parsing
raw bytes into an element object, the new ByteBufferReader APIs
for reading integer and string from ByteBuffer, and documented
possible runtime exceptions.

Additional changes include:
- remove the unnecessary setting of byte order for
the ByteBuffer, since we're not using the ByteBuffer's APIs
for reading integer values (all reads are either byte or byte
array).
- remove the unused functions in ANQPFactory

More ANQP elements cleanup will be done in the upcoming CLs.

Bug: 33000864
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I6da918c83722d5c0ca7a2374ff5fa5f630cdea6d
ndroid/server/wifi/hotspot2/PasspointEventHandler.java
ndroid/server/wifi/hotspot2/PasspointMatchInfo.java
ndroid/server/wifi/hotspot2/anqp/ANQPFactory.java
ndroid/server/wifi/hotspot2/anqp/HSFriendlyNameElement.java
ndroid/server/wifi/hotspot2/anqp/I18Name.java
ndroid/server/wifi/hotspot2/anqp/IPAddressTypeAvailabilityElement.java
ndroid/server/wifi/hotspot2/anqp/RoamingConsortiumElement.java
ndroid/server/wifi/hotspot2/anqp/VenueNameElement.java
fa04a81daf829e6e5c099c9a249b8dd8dd112102 02-Dec-2016 Peter Qiu <zqiu@google.com> Cleanup support for parsing various length integer and string from ByteBuffer

Move and cleanup the parsing functions from
com.android.server.wifi.hotspot2.anqp.Constants to the newly created
ByteBufferReader, since these are generic parsing functions (not
specific to ANQP).

An unchecked runtime exception will be thrown when an error is
encountered. The possible exceptions are documented for each
API. It is the caller's responsibility to handle those
exceptions appropriately (e.g. propagate the exceptions upwards
with appropriate documentation or catch the exception).

The handling of unchecked runtime exceptions for ANQP elements
parsing will be added in the follow-on CL as part of the ANQP cleanup.

b/33296974 is filed for tracking handling of unchecked runtime
exceptions for parsing information elements.

Bug: 33000864
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I6964520e7cc86071b2096408d6cb0503e0f618ff
ndroid/server/wifi/ByteBufferReader.java
ndroid/server/wifi/hotspot2/anqp/Constants.java
ndroid/server/wifi/hotspot2/anqp/DomainNameElement.java
ndroid/server/wifi/hotspot2/anqp/I18Name.java
ndroid/server/wifi/hotspot2/anqp/IconInfo.java
ndroid/server/wifi/hotspot2/anqp/NAIRealmData.java
ndroid/server/wifi/hotspot2/anqp/RoamingConsortiumElement.java
ndroid/server/wifi/util/InformationElementUtil.java
3d42402e0d282dc75f9c65f29d0f9e0eea753100 30-Nov-2016 Peter Qiu <zqiu@google.com> passpoint: initial support for matching passpoint providers

Bug: 33246489
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: If137412dfc27548062fb4a1bfbeca9c73f575c45
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointObjectFactory.java
ndroid/server/wifi/hotspot2/PasspointProvider.java
3fb203353288aa65e768c5e52e9f17af231c415d 22-Nov-2016 Roshan Pius <rpius@google.com> DO NOT MERGE: WifiConfigManager: Ignore disabled networks in PNO list

These networks are not connectable even if they're detected by PNO
scans. So, ignore them in the PNO list.

Bug: 33055484
Bug: 33606172
Test: Integration tests
Change-Id: I3a33e0444639969195506321f630430520bbfcd5
(cherry picked from commit eb77c40b3d17153fe91ca1691aaf2ad16f3f7267)
ndroid/server/wifi/WifiConfigManager.java
1a2b2242a2f30e0ad6dfa1d43265a15059db2a8a 15-Dec-2016 Roshan Pius <rpius@google.com> WifiConfigStore: Start with no user store

Since the user store file is not accessible at bootup, start
WifiConfigStore with no user store file instance. When the user
eventually logs in, WifiConfigManager will invoke
|switchUserStoreAndRead| to set the user store.

Note: WifiConfigStoreData already handles the user/shared store
data being null.

Bug: 33659400
Test: Added unit test, modified couple of existing ones.
Test: Device boots up fine auto-connects to one of the saved networks.
Change-Id: I8c3c48211ec3bd5be734568cd3cbc20fde1a1f48
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiInjector.java
8d4dc66e1631568f1632026312b97393567ee1f9 15-Dec-2016 Robin Lee <rgl@google.com> Merge "Send CMD_DISCONNECT after removing app/user configs DO NOT MERGE" into nyc-mr2-dev
b7717222501caa963b21ff9d59f6a102013a4b58 14-Dec-2016 Peter Qiu <zqiu@google.com> Merge "hotspot2: simplify ANQP cache management" am: 79c9eb4cfa am: 60d1489155 am: 468097bc74
am: 22682af789

Change-Id: I49b1a30645532ded45bc17dbf92e4e9ee8080d11
79c9eb4cfa9b7a45fc4f26ec2ed304f5b76fb9ff 14-Dec-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: simplify ANQP cache management"
221019b17266c3cc751a72197fd7fd69fed5dbc5 14-Dec-2016 Peter Qiu <zqiu@google.com> Merge "hotspot2: cleanup DomainMatcher" am: 227865949b am: ba89c8a3a6 am: 1bebd49570
am: 44ec92e18d

Change-Id: Ia9f21676cb4cd9d10ec2cbbaaf3dc486ac2fcbdc
227865949b847b2598867947b96e63ee6a04860c 13-Dec-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: cleanup DomainMatcher"
c4ab3a215e66b9745bd8ad0b48372f090919cb7c 13-Dec-2016 Roshan Pius <rpius@google.com> Merge "WifiScanninService: Reject bgscan requests on invalid caps" am: cb5d15ae89 am: 22be8e6da9 am: cf13c9cb33
am: c8ec943671

Change-Id: I39d0c640877baae11c3fbdffb57374e93bc06fe4
cb5d15ae89f519a78df0ac34db72aeed814e4402 13-Dec-2016 Roshan Pius <rpius@google.com> Merge "WifiScanninService: Reject bgscan requests on invalid caps"
50eacd7524a94a6be52ebf8c09f235f861e3744c 13-Dec-2016 Randy Pan <zpan@google.com> Merge "Remove obsoleted HAL API set_bssid_blacklist"
d505cbe510e1600162e1128c1b30270647feae98 13-Dec-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "DO NOT MERGE: WifiStateMachine: Add null check in CMD_AUTO_ROAM" into nyc-mr2-dev
1b76ca405029249b41b38424a253a8c5fa72dab1 13-Dec-2016 Roshan Pius <rpius@google.com> WifiScanninService: Reject bgscan requests on invalid caps

Reject any bgscan requests if the HAL returns invalid capabilities at
startup.

Bug: 33566846
Test: Added unit test.
Change-Id: I1a6a986194dd0da2ef139f13307657aafd67b4e4
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
db144d481502fafec1c9249bf29628d3a157298a 02-Dec-2016 Roshan Pius <rpius@google.com> DO NOT MERGE: WifiStateMachine: Add null check in CMD_AUTO_ROAM

The crash reported by the user seems to have occured as the user
was turning off/on wifi.
The networkID selected by WifiConnectivityManager may be invalid by
the time this message is processed by WifiStateMachine. So, add an
explicit null check to abort the roam request.

Bug: 33106930
Test: Will send for regression tests.
Change-Id: I992a35e099d7af922da046107fa8e41052b5d2c1
ndroid/server/wifi/WifiStateMachine.java
901a2f5a351f32f4870d48f2cf378401ee2f61fb 13-Dec-2016 Svetoslav Ganov <svetoslavganov@google.com> Add WiFi toggle prompts - wifi
am: 989265e3f6

Change-Id: I0d14152af46887794ec59f6b9d56d5214277a38d
ae3c78445ae65f94147003120bed08b65b6d3793 13-Dec-2016 Sundeep Ghuman <sghuman@google.com> Remove old WifiNetworkScoreCache.java am: c8701c8ad0 am: 58c7c9c375 am: 01cd711798
am: b2389d7dd9

Change-Id: I071a2419a7b4dde2143c239582e6def5320494aa
c8701c8ad058ec7fa69a2e3c60495f27708bced5 05-Dec-2016 Sundeep Ghuman <sghuman@google.com> Remove old WifiNetworkScoreCache.java

Updates references to this file to use the score cache defined in
frameworks/base.

Bug: 33050254
Test: Compiles successfully
Change-Id: Id8b3eed40c3f0005fa289e0a2ae67297b4e4434f
Topic: WifiNetworkScoreCacheMove
ndroid/server/wifi/ExternalScoreEvaluator.java
ndroid/server/wifi/RecommendedNetworkEvaluator.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNetworkScoreCache.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
ndroid/server/wifi/WifiNative.java
de3de10eec061d39c5691bc1ba7556d22a6d2ecb 12-Dec-2016 Peter Qiu <zqiu@google.com> configparse: do not delete passpoint configuration file

It is the caller's responsibility for deleting configuration files.

This avoids the ConfigBuilder from deleting arbitrary files
(specified by URI) pass-in by the callers.

Bug: 33178389
Test: Verify Passpoint Configuration installation works using Shamu
Change-Id: I54803dc711ede98a1ec1259077522032c543dca1
ndroid/server/wifi/configparse/ConfigBuilder.java
269bad0e354933a02c990209214b134aec6f79ab 12-Dec-2016 Amin Shaikh <ashaikh@google.com> Implement RecommendedNetworkEvaluator. am: d0258ee481 am: 36c16cdb08 am: bcdb7b4471
am: 500f72a1d4

Change-Id: I58d16a38b0b2acf1155c88bef975b7d0d635ab6f
afeeefe502c3c99b72bab3bb79f4d5d896bdc878 12-Dec-2016 Randy Pan <zpan@google.com> Merge "Remove obsoleted HAL API set_bssid_blacklist"
d0258ee4816148ff4ab9ac6b854fc5c51ea53be3 05-Dec-2016 Amin Shaikh <ashaikh@google.com> Implement RecommendedNetworkEvaluator.

- Gate usage on NETWORK_RECOMMENDATIONS_ENABLED flag
- Delegate WifiConfiguration selection to NetworkScoreManager
- Added RecommendedNetworkEvaluatorTest

Test: runtest frameworks-wifi

Bug: 33158114
Change-Id: I10b870df891269fd474daa2db53d43ac5050af2c
ndroid/server/wifi/RecommendedNetworkEvaluator.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiInjector.java
29960c67c57247b52402d8e55688a9924601fa78 10-Dec-2016 Sarah Fortune <sfortune@google.com> Removed unused param wifi state machine. am: 3b363f83de am: 37adeda6dc am: 5be3306d0e
am: c75b0570fc

Change-Id: I101e05afcd7cff1509b058f3d67900e313191350
154e631c5c93fa854feb9abcdcc5bca8ed175df3 09-Dec-2016 Pankaj Kanwar <pkanwar@google.com> Revert "Merge commit 'e22b68960966645a77cb71042879a4ab0d9bd638' into manual_merge_e22b689"
am: 4aa0b26c50

Change-Id: I3b7f2bc64fe363abc876b68a1936ec6759fc7381
4aa0b26c50bfeb8b51c24184bc14736751169318 09-Dec-2016 Pankaj Kanwar <pkanwar@google.com> Revert "Merge commit 'e22b68960966645a77cb71042879a4ab0d9bd638' into manual_merge_e22b689"

This reverts commit a20e8d7d6c6788823d6cf49434f98fa5142583d2.

Change-Id: Idb379cb0ec34f8a6ef8070fd8ec9c7df7385e100
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
edf3c6370293a13df7666569040ee06bb135ef6e 09-Dec-2016 pkanwar <pkanwar@google.com> Merge commit 'e22b68960966645a77cb71042879a4ab0d9bd638' into manual_merge_e22b689
am: a20e8d7d6c

Change-Id: I8728390f9aa1fe49f0b9a6eb85fff159f247eb9d
6126ecd658387dd5d3d3337d7e0119ffa1d75eba 01-Dec-2016 Robin Lee <rgl@google.com> Send CMD_DISCONNECT after removing app/user configs DO NOT MERGE

Otherwise they might linger in wpa_supplicant longer than they were
supposed to.

This is already done by every other callsite for removing networks which
might still be in use.

Test: runtest -x tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java
Bug: 32660379
Change-Id: I45b0bcc87129be02bcce940f07f7c48543207bf0
(cherry-picked from commit 1fe1065da82165183fa057ddbbd2e33bc5708c1b)
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.java
3b363f83de09574fe91de54e44e56a967237f4fd 02-Dec-2016 Sarah Fortune <sfortune@google.com> Removed unused param wifi state machine.

Bug: 32981261
Test: refactoring CL. Existing unit tests still pass.
Change-Id: Ifb442b90980e5bcbe8350d65b402eaf97020998a
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNotificationController.java
1ab6453d34abe83b9f47e293e2835729299b1fc3 08-Dec-2016 Roshan Pius <rpius@google.com> WifiConfigStore: Log the exception in buffered write am: 082c01c010 am: 4c6b9e6f44 am: bb110b5fb9
am: 8c379cd111

Change-Id: I073883f93c95768d4d2e8154241fe72ee973e5c6
6477f7406f455e55cd50ff18890442e3f67b9a9d 08-Dec-2016 Roshan Pius <rpius@google.com> WifiSupplicantControl: Remove config validity check am: 2ce17fab00 am: eeaf887167 am: d60cfadd55
am: 6c609a55e2

Change-Id: If1c09f30c117aa35a2be2ed1cdc478f50f120b99
796c8c1d7f2cba73ce730fa25cc01c201e5dee27 08-Dec-2016 Robin Lee <rgl@google.com> Send CMD_DISCONNECT after removing app/user configs am: 1fe1065da8 am: 68305c9d85 am: e43e3015d5
am: e2928d9bbf

Change-Id: I1286fd98dfc8932d4cc5655002a5feca0cb44789
4c6b9e6f449867172b4dc65e3d0d4bf732ab64e6 08-Dec-2016 Roshan Pius <rpius@google.com> WifiConfigStore: Log the exception in buffered write
am: 082c01c010

Change-Id: I734b978425073dd2be45c2d75357b58e65f8c7c6
eeaf8871674af76b53a6958f19eb6b86537b34fe 08-Dec-2016 Roshan Pius <rpius@google.com> WifiSupplicantControl: Remove config validity check
am: 2ce17fab00

Change-Id: Iaa114443a34dba7ae7ad5d7ef5925ea57aef1808
bb474466b43342d6179941d911c6ef9a10ebd9c2 08-Dec-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge changes Iff6bef5a,I2d19e4c4

* changes:
WifiConfigStore: Log the exception in buffered write
WifiSupplicantControl: Remove config validity check
082c01c010b86246e425d54269757449aaef353e 08-Dec-2016 Roshan Pius <rpius@google.com> WifiConfigStore: Log the exception in buffered write

I suspect the store file write failures reported via wtf are due to
the user's CE store not being visible (device is still booting up). This
should be pretty harmless because we would eventually write out the
data when the user unlocks. So, add the exception reason to the wtf to
confirm the root cause before putting in a fix.

Bug: 33446122
Test: Compiles
Change-Id: Iff6bef5acc4e55067169c3e2b74500df28c4e694
ndroid/server/wifi/WifiConfigStore.java
2ce17fab002eace9722bf2437ca1fbd470af671c 08-Dec-2016 Roshan Pius <rpius@google.com> WifiSupplicantControl: Remove config validity check

This was added as a part of
https://partner-android-review.googlesource.com/#/c/216033/. Its not
clear why this is needed since this validity method was
intended to be used only for network configurations received from
WifiManager API's.

Bug:33399220
Test: Manual tests
Change-Id: I2d19e4c4bbdd5e5d985c683a625bfaebb3cf88d4
ndroid/server/wifi/WifiSupplicantControl.java
1fe1065da82165183fa057ddbbd2e33bc5708c1b 01-Dec-2016 Robin Lee <rgl@google.com> Send CMD_DISCONNECT after removing app/user configs

Otherwise they might linger in wpa_supplicant longer than they were
supposed to.

This is already done by every other callsite for removing networks which
might still be in use.

Test: runtest -x tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java
Bug: 32660379
Change-Id: I45b0bcc87129be02bcce940f07f7c48543207bf0
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.java
4d994ad007ac426680a55f585af46a8b7f6ec980 08-Dec-2016 Michael Plass <mplass@google.com> Remove user-triggered disconnect counters am: 50a5e65be9 am: ce62b4f982 am: b1653c1821
am: 0bb1e431af

Change-Id: I44976f54de756aa6050b98741a438039a5908ad7
a20e8d7d6c6788823d6cf49434f98fa5142583d2 08-Dec-2016 pkanwar <pkanwar@google.com> Merge commit 'e22b68960966645a77cb71042879a4ab0d9bd638' into manual_merge_e22b689

Bug: 31003437
Test: NA
Change-Id: Icecde06bc324801671169720b5d0966bc08001c4
bb8380c9a79ad58f83ed6de5cec2a92a303086a7 07-Dec-2016 Randy Pan <zpan@google.com> Blacklist AP immediately if its capacity is full am: 805966beca am: 751d00144e am: d986cc527d
am: 067d0defc6

Change-Id: Ie9d1736237b40e9534b9fd667b219777d021d39d
50a5e65be9656e369b65cdeea8739ca993d349af 21-Nov-2016 Michael Plass <mplass@google.com> Remove user-triggered disconnect counters

Bug: 33013630
Test: unit tests pass
Change-Id: I3f6eb83334805aa7009780512dca8415b88a6c6f
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiScoreReport.java
ndroid/server/wifi/WifiStateMachine.java
d98d7625e0a47c2fdaa8c85819391eb622a5249a 07-Dec-2016 Roshan Pius <rpius@google.com> Merge "DO NOT MERGE: WifiConfigStore: Remove config validity check" into nyc-mr2-dev
805966beca772f5755be73ac1fe0819142ec294b 06-Dec-2016 Randy Pan <zpan@google.com> Blacklist AP immediately if its capacity is full

Blacklist a BSSID immediately when the association to it was
rejected because the AP cannot handle new stations. Previously
we treat all the association rejection the same and blacklist
the AP after 3 times of rejection.

Bug: 32745407
Test: Wifi framework unit tests
Change-Id: Ie64e7b2c659ee27d4cfa109b879d36fe836ee65b
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiNetworkSelector.java
ndroid/server/wifi/WifiStateMachine.java
1affbf49a887c464d69f09a31cac11120a77c68a 07-Dec-2016 Stephen Chen <stewchen@google.com> Merge "Refactor WifiNetworkScoreCache in ExternalScoreEvaluator to WifiInjector." am: da7751c15b am: 4efaf39fe7 am: ae877b30c6
am: 3240e68142

Change-Id: I890908bd841049ae5174157499aad0bfdbf7f14e
da7751c15bf4715eeb178b556fcb2a012dd160f7 07-Dec-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Refactor WifiNetworkScoreCache in ExternalScoreEvaluator to WifiInjector."
ef31a2f1ce9d98e55641c8529aec14b9df0eed5b 07-Dec-2016 Roshan Pius <rpius@google.com> DO NOT MERGE: WifiConfigStore: Remove config validity check

This was added as a part of
https://partner-android-review.googlesource.com/#/c/216033/. Its not
clear why this is needed since this validity method was
intended to be used only for network configurations received from
WifiManager API's.

Bug:33399220
Test: Manual tests
Change-Id: Ie5bbb3ea5d97e45950e5cb374af402c2b8b9716f
ndroid/server/wifi/WifiConfigStore.java
139a17fd50072bcc04749c18e0f2ebf3385f29b8 07-Dec-2016 Pankaj Kanwar <pkanwar@google.com> Merge "DO NOT MERGE: Allow Carriers to specify Wifi Networks." into nyc-mr2-dev
e22b68960966645a77cb71042879a4ab0d9bd638 23-Nov-2016 pkanwar <pkanwar@google.com> DO NOT MERGE: Allow Carriers to specify Wifi Networks.

Added a new evaulator for Carrier networks. Added functionality to read
Carrier networks from Carrier Config.

Bug: 31003437
Test: Added new tests, regression tests passed (frameworks-wifi)Allow
Carriers to specify Wifi Networks.
Change-Id: I226fb716a2a2883a8b2630c0d4e8cd51636b1089
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
0b9616e0e126221238edf5843a01b0cd3ec4daee 06-Dec-2016 Stephen Chen <stewchen@google.com> Refactor WifiNetworkScoreCache in ExternalScoreEvaluator to WifiInjector.

This allows us to share the cache in WifiNotificationController

Bug: 33355924
Test: runtest --path
frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java
runtest --path
frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ExternalScoreEvaluatorTest.java

Change-Id: I934b29fb5287180610355588ed7fa43018ccd4aa
ndroid/server/wifi/ExternalScoreEvaluator.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiInjector.java
3026560151dd89294adb434cf6026c3af7aaa73e 06-Dec-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiConnectivityManager: add dump call" am: d4828aff7a am: c8328efc2e am: b6a6e66dd7
am: c5d901aa8e

Change-Id: I2dbd2f7d3f38970c1324033a32e18e5c381e2f7d
c8328efc2e99d4c3d54f3c6b04aed56141bfbf59 06-Dec-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiConnectivityManager: add dump call"
am: d4828aff7a

Change-Id: I773c2e5d5225aaa43c4b1a9bf01edbfd9c6f6119
d4828aff7aece6bed3db16bfd74633d497b0a9cf 06-Dec-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiConnectivityManager: add dump call"
f1b7517b04fedc6fd81f34a8cb84ce583b8ea63e 30-Nov-2016 Peter Qiu <zqiu@google.com> hotspot2: simplify ANQP cache management

This makes the AnqpCache just a simple data cache, all the logic
related to the ANQP query (e.g. pending query, backoff timeout) will
be handled elsewhere (e.g. PasspointManager).

Also simplify the cache entry expiration timeout (entries with ANQP
domain ID vs entries without ANQP domain ID) by using one timeout
for all entries, since this is already factored in the ANQP entry key.
Entries without ANQP domain ID will be keyed per AP (SSID + BSSID)
and entries with ANQP domain ID will be keyed per ESS (either SSID or
HESSID).

TODO: update unit tests once the cleanup for ANQP elements are completed,
so that we can easily construct an ANQPElement objects (without constructing
a raw byte buffer).

Bug: 31348912
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I6d85f69181755afa7845f9f742c2dfb762c3194c
ndroid/server/wifi/hotspot2/ANQPData.java
ndroid/server/wifi/hotspot2/ANQPNetworkKey.java
ndroid/server/wifi/hotspot2/AnqpCache.java
b40ba9e6ef82ac6c82869d1b562701483b8f1fc2 22-Nov-2016 Peter Qiu <zqiu@google.com> hotspot2: cleanup DomainMatcher

- Cleanup the implementation
- Add documentation
- Add unit tests

Bug: 33050774
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I694ab0fc24ed9e8bcd9cd24a4d22208e123dcc5f
ndroid/server/wifi/hotspot2/DomainMatcher.java
ndroid/server/wifi/hotspot2/anqp/NAIRealmData.java
ndroid/server/wifi/hotspot2/anqp/NAIRealmElement.java
d74b2ec6d15b7a14ac865ff6957f84ae0063c029 05-Dec-2016 Stephen Chen <stewchen@google.com> Create an empty implementation of WifiWakeupController. am: f09b6de086 am: cf6d5cb018 am: c3eb58141d
am: 191fe2dc6a

Change-Id: I7dfcec238cf5f08208fa066ca79672cc041907b4
cf6d5cb0182cd9ed7f5c5955eb3b7e931ba761d8 05-Dec-2016 Stephen Chen <stewchen@google.com> Create an empty implementation of WifiWakeupController.
am: f09b6de086

Change-Id: I6ba4b4dfd4cdd719250c4add323c467acf73fec3
f09b6de086d5a00417613886aa43402285d2a8ab 17-Nov-2016 Stephen Chen <stewchen@google.com> Create an empty implementation of WifiWakeupController.

Bug: 32918599
Test: runtest --path
frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/WifiWakeupControllerTest.java

Change-Id: Ib3926ff77be29e5e8364791dc68d8c22a2c6fa1d
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiWakeupController.java
989265e3f6ec0cf4cdfc5b58e60db684827bf4b5 27-Jul-2016 Svetoslav Ganov <svetoslavganov@google.com> Add WiFi toggle prompts - wifi

If permission review is enabled toggling WiFi on or off
results in a user prompt to collect a consent. This applies
only to legacy apps, i.e. ones that don't support runtime
permissions as they target SDK 22.

bug:28715749

Change-Id: Ie60ae91bd8e9c67a3e14a2820055234f669df1df
ndroid/server/wifi/WifiServiceImpl.java
deda34b1ae044159bc5cecab66ee91b67da1547b 03-Dec-2016 Paul Stewart <pstew@google.com> Upgrade WPA/EAP connections to their fast-transition equivalent am: f229afcd54 am: 6cc31d8ca9 am: a4ff2a3eee
am: 6ec4408dc6

Change-Id: I1f7b0ffd210dc392fff012e49d80959d0e6c3531
6cc31d8ca94e61193a27b395282defeed33cf7be 03-Dec-2016 Paul Stewart <pstew@google.com> Upgrade WPA/EAP connections to their fast-transition equivalent
am: f229afcd54

Change-Id: I80ba13a82c3da0a6f760df08de2540243f6a9d40
f229afcd54fc31eaf0f66cfb9e548cfc49d689e1 02-Nov-2016 Paul Stewart <pstew@google.com> Upgrade WPA/EAP connections to their fast-transition equivalent

The developer-visible API and settings should not have to know
whether an AP supports BSS fast transitions, but from a system
point of view it is beneficial (and in some cases necessary)
to take advantage of it where it is possible. From a config
point of view there is no additional information required
except to enable the authentication type. This allows us to
handle the feature addition at the lowest layer possible,
assuming that the underlying hardware supports (and is
validated) the fast transition feature.

This implementation will be replaced with one in wificond
once pushing configuration to wpa_supplicant is moved there.

Bug: 32607043
Change-Id: I89a1e0bea3bba3ec8506fc9b239bea8b51c3d45c
Test: Manual: Create an FT-only AP and attempt connections
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiSupplicantControl.java
f718539daedb3f202d695b966753deaeabf9ccdc 02-Dec-2016 Randy Pan <zpan@google.com> SavedNeworkEvaluator: compare networks via networkId am: d335557ef8 am: 8bb86aa622 am: b1db02037a
am: 215bd6ce44

Change-Id: I63616a39cf71ddb3d0541cfe979ad747dfc28438
8bb86aa62255c646f897d59b5eed3bb9e16f5d22 02-Dec-2016 Randy Pan <zpan@google.com> SavedNeworkEvaluator: compare networks via networkId
am: d335557ef8

Change-Id: I9c09c911cbd7b8ec5f1cf1d3632e16017473eec2
c05b60f706ef4cbee6d12c01224afe07fad725be 02-Dec-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "DO NOT MERGE: Upgrade WPA/EAP connections to their fast-transition equivalent" into nyc-mr2-dev
d335557ef8c724395a39c8fdda26653c90dcc1c5 02-Dec-2016 Randy Pan <zpan@google.com> SavedNeworkEvaluator: compare networks via networkId

After the WifiConfigManager refactoring it's no longer
valid to compare networks via their WifiConfiguration
objects.

Bug: 33296226
Test: runtests.sh
Change-Id: I3cc4d734901df02c841e8ef02b2975f478190d47
ndroid/server/wifi/SavedNetworkEvaluator.java
ff862e399bfdffc5c6d2d15acc75ae8cbadb5bde 01-Dec-2016 Rebecca Silberstein <silberst@google.com> WifiConnectivityManager: add dump call

Adding a dump call to WifiConnectivityManager (that passes through to
WifiNetworkSelector). The motivation for this change is to remove
the need to have another class to hold a reference to
WifiNetworkSelector (beyond WifiConnectivityManager) and will allow
the removal of getNetworkSelector from WifiInjector at a later date.

Bug: 33271805
Test: runtests.sh
Test: checked bugreport for NetworkSelector section
Change-Id: I948291a458946ae9d8b7e8fa87cf9936cc913dcf
ndroid/server/wifi/WifiConnectivityManager.java
509da42e69f5802ac855e50a9bcdd3b7462aa12a 02-Dec-2016 Peter Qiu <zqiu@google.com> hotspot2: anqp: update package name to reflect the updated location am: 8ca4ac971a am: c95194176b am: 53afc80147
am: 661d9901c6

Change-Id: I15725e96131f9e8ee78927e84439c6baf974cd09
e0f7834ae53bbab50af17ea7937439efc0b31b52 02-Dec-2016 Peter Qiu <zqiu@google.com> hotspot2: move anqp related code to under hotspot2 am: 450a34955b am: d75467ac47 am: acf776a71e
am: e79c194140

Change-Id: Iadf38633a667566d93ffb45ae4c72a466f32ece5
c95194176bcc03c4a8f13fcf8aff13d07f9a6108 02-Dec-2016 Peter Qiu <zqiu@google.com> hotspot2: anqp: update package name to reflect the updated location
am: 8ca4ac971a

Change-Id: I77031d9462bc16780a06afbafca8ae90b12d037e
d75467ac478d2cbc5b5af6e7da51d7c60d080d24 02-Dec-2016 Peter Qiu <zqiu@google.com> hotspot2: move anqp related code to under hotspot2
am: 450a34955b

Change-Id: I89a4c0c09b316a16ca4ef6df8f5cd07be0caa92e
b8da1eaf580f53fec4c744fc2dc1c5822c105caf 02-Dec-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge changes from topic 'anqp rename'

* changes:
hotspot2: anqp: update package name to reflect the updated location
hotspot2: move anqp related code to under hotspot2
1200cb27c41ffaa5ff7df61b1758f28be19b01d3 02-Nov-2016 Paul Stewart <pstew@google.com> DO NOT MERGE: Upgrade WPA/EAP connections to their fast-transition equivalent

The developer-visible API and settings should not have to know
whether an AP supports BSS fast transitions, but from a system
point of view it is beneficial (and in some cases necessary)
to take advantage of it where it is possible. From a config
point of view there is no additional information required
except to enable the authentication type. This allows us to
handle the feature addition at the lowest layer possible,
assuming that the underlying hardware supports (and is
validated) the fast transition feature.

This implementation will be replaced with one in wificond
once pushing configuration to wpa_supplicant is moved there.

Bug: 32607043
Change-Id: I89a1e0bea3bba3ec8506fc9b239bea8b51c3d45c
Test: Manual: Create an FT-only AP and attempt connections
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
be4579469f51b0eed4dca9ceeb608da7c98ddaf4 02-Dec-2016 Peter Qiu <zqiu@google.com> Merge "hotspot2: install Passpoint certificates and keys in keystore" am: 81bbe4d0cf am: ea90a101f6 am: 2461823b9e
am: 7f01ce14cf

Change-Id: Idc0cf35cf31aefdd1181eb8d2f7dcce6a0cdf1e9
ea90a101f6ce45fe97764ec25ca59ef0cee1380d 02-Dec-2016 Peter Qiu <zqiu@google.com> Merge "hotspot2: install Passpoint certificates and keys in keystore"
am: 81bbe4d0cf

Change-Id: I6317a195623e7f241e9e153d7ffd17fcff59631f
81bbe4d0cff298e51faad18262a8699791815207 02-Dec-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: install Passpoint certificates and keys in keystore"
4495383322279ec3a58e29c4ba08c3ee337a2714 01-Dec-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Disconnect from private network on user switch am: 1cb361461f am: 9560d5358a am: 476320b581
am: 78096e6753

Change-Id: I58eb760379d4c5d2fdeb166ef4f09348d0d112f7
7945effaf6a9d320941c22e79ca9b14131578543 01-Dec-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Don't load shared networks on user unlock/switch am: 2ce074c7df am: 506ef7c018 am: c2bd6f3403
am: c9747908a5

Change-Id: Id51df4f28f56b785116447a44071516fa2c3efa5
9560d5358a62b46482725ad62a4b94267e4a9893 01-Dec-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Disconnect from private network on user switch
am: 1cb361461f

Change-Id: I655871a43cf36fcd3d372bd5e63427bca8a67ad8
506ef7c01800526c9654965532648c048bbc2e86 01-Dec-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Don't load shared networks on user unlock/switch
am: 2ce074c7df

Change-Id: I13d963e56a680ac3098aec5ac6daeea965e3c766
420386fb15194adec45aa8d7b511ccdda649a241 01-Dec-2016 Roshan Pius <rpius@google.com> Merge changes Ibe1523fc,I84f6f011

* changes:
WifiConfigManager: Disconnect from private network on user switch
WifiConfigManager: Don't load shared networks on user unlock/switch
7d1ca1300bc6a52534f80f06ba93ee84dc1d85b0 17-Nov-2016 Randy Pan <zpan@google.com> Remove obsoleted HAL API set_bssid_blacklist

Bug: 32907214
Test: Bulid
Change-Id: Ibeedb6f95349ce8f225228ba02cdd4eedc599074
ndroid/server/wifi/WifiNative.java
8ca4ac971a9b862fbd69c57af3a3c0029a6b9f4d 18-Nov-2016 Peter Qiu <zqiu@google.com> hotspot2: anqp: update package name to reflect the updated location

Bug: 33000864
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: If842197a027a2c8381aacf5b256191f81bcbd1bb
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/hotspot2/ANQPData.java
ndroid/server/wifi/hotspot2/AnqpCache.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/hotspot2/PasspointEventHandler.java
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointMatchInfo.java
ndroid/server/wifi/hotspot2/Utils.java
ndroid/server/wifi/hotspot2/anqp/ANQPElement.java
ndroid/server/wifi/hotspot2/anqp/ANQPFactory.java
ndroid/server/wifi/hotspot2/anqp/CellularNetwork.java
ndroid/server/wifi/hotspot2/anqp/Constants.java
ndroid/server/wifi/hotspot2/anqp/DomainNameElement.java
ndroid/server/wifi/hotspot2/anqp/GenericBlobElement.java
ndroid/server/wifi/hotspot2/anqp/HSConnectionCapabilityElement.java
ndroid/server/wifi/hotspot2/anqp/HSFriendlyNameElement.java
ndroid/server/wifi/hotspot2/anqp/HSWanMetricsElement.java
ndroid/server/wifi/hotspot2/anqp/I18Name.java
ndroid/server/wifi/hotspot2/anqp/IPAddressTypeAvailabilityElement.java
ndroid/server/wifi/hotspot2/anqp/IconInfo.java
ndroid/server/wifi/hotspot2/anqp/NAIRealmData.java
ndroid/server/wifi/hotspot2/anqp/NAIRealmElement.java
ndroid/server/wifi/hotspot2/anqp/RawByteElement.java
ndroid/server/wifi/hotspot2/anqp/RoamingConsortiumElement.java
ndroid/server/wifi/hotspot2/anqp/ThreeGPPNetworkElement.java
ndroid/server/wifi/hotspot2/anqp/VenueNameElement.java
ndroid/server/wifi/hotspot2/anqp/eap/AuthParam.java
ndroid/server/wifi/hotspot2/anqp/eap/Credential.java
ndroid/server/wifi/hotspot2/anqp/eap/EAP.java
ndroid/server/wifi/hotspot2/anqp/eap/EAPMethod.java
ndroid/server/wifi/hotspot2/anqp/eap/ExpandedEAPMethod.java
ndroid/server/wifi/hotspot2/anqp/eap/InnerAuthEAP.java
ndroid/server/wifi/hotspot2/anqp/eap/NonEAPInnerAuth.java
ndroid/server/wifi/hotspot2/anqp/eap/VendorSpecificAuth.java
ndroid/server/wifi/util/InformationElementUtil.java
450a34955b855f0d813400013a9dbeead9d84c7b 18-Nov-2016 Peter Qiu <zqiu@google.com> hotspot2: move anqp related code to under hotspot2

ANQP is specific to Hotspot 2.0, so move all related code to under
hotspot2/.

This CL is a purely rename operation.

Bug: 33000864
Test: None
Change-Id: I17c3eb5bce37290a13c2e0720b62c82450daae9b
ndroid/server/wifi/anqp/ANQPElement.java
ndroid/server/wifi/anqp/ANQPFactory.java
ndroid/server/wifi/anqp/CellularNetwork.java
ndroid/server/wifi/anqp/Constants.java
ndroid/server/wifi/anqp/DomainNameElement.java
ndroid/server/wifi/anqp/GenericBlobElement.java
ndroid/server/wifi/anqp/HSConnectionCapabilityElement.java
ndroid/server/wifi/anqp/HSFriendlyNameElement.java
ndroid/server/wifi/anqp/HSWanMetricsElement.java
ndroid/server/wifi/anqp/I18Name.java
ndroid/server/wifi/anqp/IPAddressTypeAvailabilityElement.java
ndroid/server/wifi/anqp/IconInfo.java
ndroid/server/wifi/anqp/NAIRealmData.java
ndroid/server/wifi/anqp/NAIRealmElement.java
ndroid/server/wifi/anqp/RawByteElement.java
ndroid/server/wifi/anqp/RoamingConsortiumElement.java
ndroid/server/wifi/anqp/ThreeGPPNetworkElement.java
ndroid/server/wifi/anqp/VenueNameElement.java
ndroid/server/wifi/anqp/eap/AuthParam.java
ndroid/server/wifi/anqp/eap/Credential.java
ndroid/server/wifi/anqp/eap/EAP.java
ndroid/server/wifi/anqp/eap/EAPMethod.java
ndroid/server/wifi/anqp/eap/ExpandedEAPMethod.java
ndroid/server/wifi/anqp/eap/InnerAuthEAP.java
ndroid/server/wifi/anqp/eap/NonEAPInnerAuth.java
ndroid/server/wifi/anqp/eap/VendorSpecificAuth.java
ndroid/server/wifi/hotspot2/anqp/ANQPElement.java
ndroid/server/wifi/hotspot2/anqp/ANQPFactory.java
ndroid/server/wifi/hotspot2/anqp/CellularNetwork.java
ndroid/server/wifi/hotspot2/anqp/Constants.java
ndroid/server/wifi/hotspot2/anqp/DomainNameElement.java
ndroid/server/wifi/hotspot2/anqp/GenericBlobElement.java
ndroid/server/wifi/hotspot2/anqp/HSConnectionCapabilityElement.java
ndroid/server/wifi/hotspot2/anqp/HSFriendlyNameElement.java
ndroid/server/wifi/hotspot2/anqp/HSWanMetricsElement.java
ndroid/server/wifi/hotspot2/anqp/I18Name.java
ndroid/server/wifi/hotspot2/anqp/IPAddressTypeAvailabilityElement.java
ndroid/server/wifi/hotspot2/anqp/IconInfo.java
ndroid/server/wifi/hotspot2/anqp/NAIRealmData.java
ndroid/server/wifi/hotspot2/anqp/NAIRealmElement.java
ndroid/server/wifi/hotspot2/anqp/RawByteElement.java
ndroid/server/wifi/hotspot2/anqp/RoamingConsortiumElement.java
ndroid/server/wifi/hotspot2/anqp/ThreeGPPNetworkElement.java
ndroid/server/wifi/hotspot2/anqp/VenueNameElement.java
ndroid/server/wifi/hotspot2/anqp/eap/AuthParam.java
ndroid/server/wifi/hotspot2/anqp/eap/Credential.java
ndroid/server/wifi/hotspot2/anqp/eap/EAP.java
ndroid/server/wifi/hotspot2/anqp/eap/EAPMethod.java
ndroid/server/wifi/hotspot2/anqp/eap/ExpandedEAPMethod.java
ndroid/server/wifi/hotspot2/anqp/eap/InnerAuthEAP.java
ndroid/server/wifi/hotspot2/anqp/eap/NonEAPInnerAuth.java
ndroid/server/wifi/hotspot2/anqp/eap/VendorSpecificAuth.java
ae791278c9032a8b10cf818b98b571c0396add4a 18-Nov-2016 Peter Qiu <zqiu@google.com> hotspot2: install Passpoint certificates and keys in keystore

When adding a Passpoint provider, install the certificates and
keys specified in the configuration to the keystore.

While there, move the object creation for Passpoint related
objects out of the WifiInjector and into newly created
PasspointObjectFactory.

Bug: 32619189
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I42ee22a31d30e2c9fa05ece8713b95ebea71256e
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiKeyStore.java
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointObjectFactory.java
ndroid/server/wifi/hotspot2/PasspointProvider.java
72afac62750be26bcdd32a15c8bb58dc65421eec 01-Dec-2016 Amin Shaikh <ashaikh@google.com> Merge "Refactor NetworkScoreAppManager for testing." am: 9333b67ffd am: adfcb42a90 am: ae4ad40fef
am: f858119c28

Change-Id: Idf4621610f21a7a985a725cf00a30ed6234a8be5
adfcb42a9088564cb2afdc12c40bafb6d209e16b 01-Dec-2016 Amin Shaikh <ashaikh@google.com> Merge "Refactor NetworkScoreAppManager for testing."
am: 9333b67ffd

Change-Id: Ib1cca73dce31490448882a33162e1042fce4542e
9333b67ffda8534ee84c383dc3bbad23aee198a2 01-Dec-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Refactor NetworkScoreAppManager for testing."
cdcce5b5fc6d232d9dfd663d8a75ca97b73dce75 01-Dec-2016 Sohani Rao <sohanirao@google.com> resolve merge conflicts of d76a7df to stage-aosp-master

Change-Id: Id29617452a102dfcd3111ba21f335ba75c7cd96c
d76a7df1df71f8ed4d98d5d1b1aec2d4ce0d550b 30-Nov-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Synchronize AOSP and internal master"
92e5de9c1991e2d992ee8668147662aeac6b422b 30-Nov-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiInjector: add WifiConnectivityManager" am: 585cd77a9c am: 671a6d626d am: 4727b32723
am: ad47a70d42

Change-Id: I094ad8d7c331cba1eb09294f1861592ef4918e4f
cb46b737eaf8f59f07270e57b37bfddcfc121fdb 22-Nov-2016 Amin Shaikh <ashaikh@google.com> Refactor NetworkScoreAppManager for testing.

Bug: 32913019
Test: runtest frameworks-wifi
Change-Id: If4bef94b6a275215ce47c8e77edb1af8cf4df3c0
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/util/WifiPermissionsUtil.java
ndroid/server/wifi/util/WifiPermissionsWrapper.java
671a6d626dc3297f0de822fb45aedea8a1e4d43a 30-Nov-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiInjector: add WifiConnectivityManager"
am: 585cd77a9c

Change-Id: I7666adfdcf01c55bb470267e96c61a7efdbf0e5c
1cb361461f6ecc684761fc3940c1db622192cad1 29-Nov-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Disconnect from private network on user switch

If the device is connected to the old user's private network when
switching to a new user, trigger a disconnect.

Bug: 32802464
Test: Unit tests.
Test: Will send for regression testing.
Change-Id: Ibe1523fcf9e88a05dd7e8ee34b0a0decab1235f0
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.java
2ce074c7dfa6f99812f67cad3c1a98a6edd36028 28-Nov-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Don't load shared networks on user unlock/switch

Currently, we reload all the store data (private + shared) on user
switching/first unlock. Loading of shared store data is unnecessary and
causes undesired side effect of the shared networks changing it's ID
after the reload. Instead, add a new method in WifiConfigStore to only
read the user's store file (holding private network configurations).

Changes in the CL:
1. Modify the |WifiConfigStore.switchUser| method to switch the user
store and also read out the data from the user store file.
2. When handling user switches/unlocks, delete only the private networks
of the old user from memory and then load the new user's private
networks.

TODO: This CL will handle the case where the device was connected to a
shared network when the user unlocked or switched. Still need to initiate
disconnect if we're connected to one of the old user's private networks.
This will be added in a follow up CL.

Bug: 32802464
Test: Added Unit tests.
Test: Will send for regression testing.
Change-Id: I84f6f011bbd851f986e4294262af7a47e525524b
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiConfigStoreData.java
585cd77a9c472af47ecd67ccd47e119b6a26bc38 30-Nov-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiInjector: add WifiConnectivityManager"
fc89f368e4fe25e2cff7410da959cda1d7ca7d74 30-Nov-2016 Etan Cohen <etancohen@google.com> [AWARE] Data-path creation roles hard-coded for discovery sessions am: c2d0f22f7b am: 21eb696336 am: da707aeee5
am: 9dde820f9c

Change-Id: I5500167bdeafd3fe0991ee788cf111f958f4bd1c
21eb6963363f96064964b33dd7fbc0616b712cd1 30-Nov-2016 Etan Cohen <etancohen@google.com> [AWARE] Data-path creation roles hard-coded for discovery sessions
am: c2d0f22f7b

Change-Id: Ia654e647ef9b5548cc5d71c0601d9c0d7f1ddc8a
c2d0f22f7b29507d29e517c329d82a0d30342f44 16-Nov-2016 Etan Cohen <etancohen@google.com> [AWARE] Data-path creation roles hard-coded for discovery sessions

Data-path roles (initiator & responder) are hard-coded for discovery
session participants by the spec: subscriber <-> initiator and
publisher <-> responder.

Added checks for role to session type mismatch. Added unit-tests
to validate negative condition: i.e. no data-path setup on such
mismatched requests.

(cherry-pick of commit 80a2a2558b3b64918a20434422a5307b03b68799)

Bug: 32883026
Test: unit-tests and integration (sl4a) tests passing.
Change-Id: Iad0727e5ad522e67222a6053918ce99fda1260b4
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareDiscoverySessionState.java
eb77c40b3d17153fe91ca1691aaf2ad16f3f7267 22-Nov-2016 Roshan Pius <rpius@google.com> DO NOT MERGE: WifiConfigManager: Ignore disabled networks in PNO list

These networks are not connectable even if they're detected by PNO
scans. So, ignore them in the PNO list.

Bug: 33055484
Test: Integration tests
Change-Id: I3a33e0444639969195506321f630430520bbfcd5
ndroid/server/wifi/WifiConfigManager.java
d098b17dcef5b03a0626f34cc72d5fbce1bacb8f 23-Nov-2016 Sohani Rao <sohanirao@google.com> Synchronize AOSP and internal master

Move one line in WifiServiceImpl.java to ensure the files are in sync
between AOSP and the internal master.

Bug: 33085010
Test: Unit test
Change-Id: I27f5496a5f8f55ac68c9c3b06357509b36743f80
Merged-In: I27f5496a5f8f55ac68c9c3b06357509b36743f80
ndroid/server/wifi/WifiServiceImpl.java
b4de842310ca698d59ed5b9117d38362e2945947 22-Nov-2016 Rebecca Silberstein <silberst@google.com> WifiInjector: add WifiConnectivityManager

Add call to create a WifiConnectivityManager instance to WifiInjector
and remove the direct call from WifiStateMachine.

Bug: 33052869
Test: runtests.sh
Test: verified connection to network after toggling wifi
Change-Id: Ic7a11a3696a24274a178ddedec18e62ca42d3a2d
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
2f5f0395e707c3d5e1b8c08c3e70edfac8b331fc 22-Nov-2016 Peter Qiu <zqiu@google.com> hotspot2: maintain a copy of PasspointConfiguration in PasspointProvider am: dc6361c58a am: 32a9f2518e am: 59cb51df32
am: eba14dffa9

Change-Id: Iec5ab05c851a9e88f25649700d80a8a7698ae623
32a9f2518eb96779832707567eae1bb456891c3f 22-Nov-2016 Peter Qiu <zqiu@google.com> hotspot2: maintain a copy of PasspointConfiguration in PasspointProvider
am: dc6361c58a

Change-Id: I93699bd3c87d6be691d29f097b8c5312701975a0
dc6361c58a4eb2e7dd931ffe1cc0fb5129f004c9 15-Nov-2016 Peter Qiu <zqiu@google.com> hotspot2: maintain a copy of PasspointConfiguration in PasspointProvider

This avoids the Passpoint configuration maintained in PasspointProvider
from being updated by others.

Bug: 32714562
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I7101ae0c1bcf70585343e6da5608d7fe1267e689
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointProvider.java
bb1279ed2e06bab67225af56a718aad148ff6138 22-Nov-2016 Peter Qiu <zqiu@google.com> resolve merge conflicts of 5cee8f8 to stage-aosp-master

Change-Id: Ifa47dab6071ef021fad70377cf728c5937f752e7
5cee8f82a0845ecf28a8543ed3e169f44646bd4b 22-Nov-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: add support for managing Passpoint configurations"
4c7f5899ac0d8dfaadeff087c1b5e5722668c9c8 22-Nov-2016 Jeff Sharkey <jsharkey@android.com> Merge "Detect non-oneway calls leaving system_server." am: a3bc4bd66d am: ea4483a484 am: 0d6fbfd1f3
am: 30e09f1156

Change-Id: If9894214ec608c77382a96aa4841995c9923ed2a
ea4483a484666732d1827f893ff11957e643c376 22-Nov-2016 Jeff Sharkey <jsharkey@android.com> Merge "Detect non-oneway calls leaving system_server."
am: a3bc4bd66d

Change-Id: I911e76ef7a361c74c61b67fba6fabbd43726e3e9
a3bc4bd66d786359d0336410fee7b6bee25850a9 22-Nov-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Detect non-oneway calls leaving system_server."
c04479601696f56c9cc240d4c7fc49fa99f51825 02-Nov-2016 Peter Qiu <zqiu@google.com> hotspot2: add support for managing Passpoint configurations

Add the initial support to PasspointManager for managing Passpoint
configurations.

More todos:
- add support to WifiKeyStore for installing/removing keys and certificates
in the Passpoint configurations
- add support to WifiConfigStore for loading/storing Passpoint configurations
from/to the persistent storage

Bug: 32618351
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: download/install Boingo passpoint profile and verify configure is installed
using log messages
Merged-In: Id394bcf7514157bfaa3038b3f9f4d1003671d11f
Change-Id: Id394bcf7514157bfaa3038b3f9f4d1003671d11f
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointProvider.java
4781e9e2904824ef1fbf8a0cf75e89fa957d6a92 02-Nov-2016 Peter Qiu <zqiu@google.com> hotspot2: add support for managing Passpoint configurations

Add the initial support to PasspointManager for managing Passpoint
configurations.

More todos:
- add support to WifiKeyStore for installing/removing keys and certificates
in the Passpoint configurations
- add support to WifiConfigStore for loading/storing Passpoint configurations
from/to the persistent storage

Bug: 32618351
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: download/install Boingo passpoint profile and verify configure is installed
using log messages

Change-Id: Id394bcf7514157bfaa3038b3f9f4d1003671d11f
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/hotspot2/PasspointManager.java
ndroid/server/wifi/hotspot2/PasspointProvider.java
f16f0eaa84adea07ae98bad60e17962b80ee79ab 21-Nov-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachinePrime: allow for configs in softap am: fa528234cf am: 8cc7a77953 am: 7b736a8db5
am: 648f488c8d

Change-Id: I654b02274906916912dc4d5d104927dcaa43e7ec
620e64b73a6ce8d8c76caabdad25218ad58c2c99 21-Nov-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachinePrime: Implement SoftApMode path am: bfc30bd4c2 am: 9dee6afa78 am: 27a04fe2a5
am: 48376967cc

Change-Id: I7f18fc2d1a848a10ae24163b526c78f904754c46
8cc7a77953dca3ec2d6c8bdc62ca789c508b1efb 21-Nov-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachinePrime: allow for configs in softap
am: fa528234cf

Change-Id: I5c44ca0c80956d65a8c35429c9b4aa5a57927645
9dee6afa78e114fb6405746d3f40502a34978002 21-Nov-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachinePrime: Implement SoftApMode path
am: bfc30bd4c2

Change-Id: I6ec7a1f7270387ba2faeee033b4464ba7169f757
fa528234cf518fda63435cf9c4956576d64e8860 30-Sep-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachinePrime: allow for configs in softap

WifiConfigurations need to be passed to SoftApManager. Add this path to
SoftApMode and SoftApModeActiveState along with tests.

Bug: 31846822
Test: runtests.sh
Change-Id: Ied383499f699619e55d4b05ba93260bf7a8440f5
ndroid/server/wifi/WifiStateMachinePrime.java
bfc30bd4c2ff0c62d6cfff22088a935878966a46 22-Sep-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachinePrime: Implement SoftApMode path

Implement the logic to start, stop and maintain softap mode in
WifiStateMachinePrime. This CL covers the implementation and tests, but
does not include the call from WifiController to start softap with the
new code.

Bug: 31831721
Test: runtests.sh

Change-Id: Ib3250eb804b5b6a8e2b3b7218145a422205b2b45
ndroid/server/wifi/WifiStateMachinePrime.java
3d043294e07f76a69dd72a9c74c95a08fe6d41bd 08-Nov-2016 Jeff Sharkey <jsharkey@android.com> Detect non-oneway calls leaving system_server.

To protect system stability, any Binder calls leaving the
system_server must carefully be performed using FLAG_ONEWAY (or
the 'oneway' verb in AIDL) which prevents the call from blocking
indefinitely on the remote process.

Allow blocking calls to a handful of known-safe interfaces.

Test: builds, boots, runs with minimal logs triggered
Bug: 32715088
Change-Id: I7754a829564fdbf610c02303f7c6aae908834b61
ndroid/server/wifi/WifiStateMachine.java
768c0af58a5f3c0d89cd17e67675915f3fa3d75c 18-Nov-2016 Roshan Pius <rpius@google.com> Merge "WifiConnectivityManager: Disable PNO scans" am: c6e5fba1ef am: 44a2888f8d am: e28c3e8aa3
am: 8a1e62e670

Change-Id: I216659597cd67b05640a5433dd8d5a360b719920
44a2888f8d4d213c013c9976fb4df1c9b9a99ff6 18-Nov-2016 Roshan Pius <rpius@google.com> Merge "WifiConnectivityManager: Disable PNO scans"
am: c6e5fba1ef

Change-Id: I070299f16171b871fd1e572be6785c00c619f983
c6e5fba1ef04ea394a3c3ee7b97b3bdb6a746155 18-Nov-2016 Roshan Pius <rpius@google.com> Merge "WifiConnectivityManager: Disable PNO scans"
e88dedcf9ba70cc57ed0f18d8076c94d2ab9da01 18-Nov-2016 Sohani Rao <sohanirao@google.com> Merge "Fix indentation for WifiP2pServiceImpl.java"
am: c5b7435293

Change-Id: I1f61139fa54621a247cb1a8832adf9eb382b3586
2fe5f9f039fa923da64084dd8d3b6dd143303929 18-Nov-2016 Sohani Rao <sohanirao@google.com> Merge "Fix indentation for WifiP2pServiceImpl.java"
c5b7435293e18228c1ae003f0d041f975266f38a 18-Nov-2016 Sohani Rao <sohanirao@google.com> Merge "Fix indentation for WifiP2pServiceImpl.java"
2bf8cc9cabe26484345f416136495a767b453e01 17-Nov-2016 Roshan Pius <rpius@google.com> WifiConnectivityManager: Disable PNO scans

Will enable this back once wificond is ready to accept PNO scan
requests from WifiScanningService. For now, we'll perform periodic
single scans instead of PNO when screen if off & disconnected.

Bug: 32907581
Test: Will send for regression tests
Change-Id: I6a4ade71626524fadbe515720f07fed3c28aa967
ndroid/server/wifi/WifiConnectivityManager.java
a98acb37d4c6bf43d61b676817a5f839e11641e6 03-Oct-2016 Sohani Rao <sohanirao@google.com> Fix indentation for WifiP2pServiceImpl.java

Bug: 31906663
Test: Check style fixes only, passes unit tests
Change-Id: I274fbb9b84f65f4f644fd752cf15a07f3985387b
Merged-In: I274fbb9b84f65f4f644fd752cf15a07f3985387b
ndroid/server/wifi/p2p/WifiP2pService.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
4e6ce9734302393b1a61c7ee28bcd7a5ca71799a 17-Nov-2016 Peter Qiu <zqiu@google.com> Merge "hotspot2: remove OMADM and PPS code"
am: 4365d22b77

Change-Id: I01c4e273ddc0a8d44bfba1c7535e2eebcde0b4f5
4365d22b77f31af7567fc12a90786c63cdc5c484 17-Nov-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: remove OMADM and PPS code"
b378283f8783e0e20e70a3cbbcdcb3e07b434493 01-Nov-2016 Peter Qiu <zqiu@google.com> hotspot2: remove OMADM and PPS code

Now that we are switching over to use PasspointConfiguration parcelable
object for data exchange between the app and the framework, the
existing OMADM parser and the PPS code is no longer needed. So remove
them.

Bug: 32512868
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Merged-In: I5efb2f39e40488c25720efb5db8534e3bbfdd651

Change-Id: I5efb2f39e40488c25720efb5db8534e3bbfdd651
ndroid/server/wifi/anqp/NAIRealmData.java
ndroid/server/wifi/anqp/NAIRealmElement.java
ndroid/server/wifi/anqp/eap/EAPMethod.java
ndroid/server/wifi/hotspot2/DomainMatcher.java
ndroid/server/wifi/hotspot2/OMADMAdapter.java
ndroid/server/wifi/hotspot2/PasspointMatchInfo.java
ndroid/server/wifi/hotspot2/omadm/MOTree.java
ndroid/server/wifi/hotspot2/omadm/ManagementTreeRoot.java
ndroid/server/wifi/hotspot2/omadm/MultiValueMap.java
ndroid/server/wifi/hotspot2/omadm/NodeAttribute.java
ndroid/server/wifi/hotspot2/omadm/OMAConstants.java
ndroid/server/wifi/hotspot2/omadm/OMAConstructed.java
ndroid/server/wifi/hotspot2/omadm/OMAException.java
ndroid/server/wifi/hotspot2/omadm/OMANode.java
ndroid/server/wifi/hotspot2/omadm/OMAParser.java
ndroid/server/wifi/hotspot2/omadm/OMAScalar.java
ndroid/server/wifi/hotspot2/omadm/PasspointManagementObjectManager.java
ndroid/server/wifi/hotspot2/omadm/XMLNode.java
ndroid/server/wifi/hotspot2/pps/Credential.java
ndroid/server/wifi/hotspot2/pps/DomainMatcher.java
ndroid/server/wifi/hotspot2/pps/HomeSP.java
ndroid/server/wifi/hotspot2/pps/Policy.java
ndroid/server/wifi/hotspot2/pps/SubscriptionParameters.java
ndroid/server/wifi/hotspot2/pps/UpdateInfo.java
3bd303ce93dd5ad13a876ba05198b71e72e7493f 17-Nov-2016 Ningyuan Wang <nywang@google.com> Merge "Use enum instead of strings to store security parameters" am: 25fff067f6 am: 07826eac96 am: 24b38a0ed7
am: 13c9571a71

Change-Id: Ib4d17a107f9b63863a955962cbfbcfba4eaa5355
ddda3bfe14102129ca573d57d55b3300a55c25f8 17-Nov-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: remove OMADM and PPS code"
13c9571a7123b20c92962d87332388c77c464957 17-Nov-2016 Ningyuan Wang <nywang@google.com> Merge "Use enum instead of strings to store security parameters" am: 25fff067f6 am: 07826eac96
am: 24b38a0ed7

Change-Id: Iafcc6a46eb9c40aa7c58d1a9809c5c79fb61eb0d
07826eac96938f169ea62d858731129ffb0de927 17-Nov-2016 Ningyuan Wang <nywang@google.com> Merge "Use enum instead of strings to store security parameters"
am: 25fff067f6

Change-Id: I42ba11db2dfb6baefde222e44cbe42eef90721c5
6862101a7cca8132c0d58afd4a96d890d55e2d79 03-Oct-2016 Sohani Rao <sohanirao@google.com> Fix indentation for WifiP2pServiceImpl.java

Bug: 31906663
Test: Check style fixes only, passes unit tests
Change-Id: I274fbb9b84f65f4f644fd752cf15a07f3985387b
ndroid/server/wifi/p2p/WifiP2pService.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
25fff067f6e3e8fc822889817bd904b52c49e25c 17-Nov-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Use enum instead of strings to store security parameters"
466a3e55dfa9da9cd465e22438af2b19346fbf00 17-Nov-2016 Roshan Pius <rpius@google.com> WifiStateMachine: Ignore connection when the network Id is unknown am: af54bfce47 am: 35be00b7bc am: 7d882480d3
am: 463ee1e143

Change-Id: I438e121ec09031333286a4ca3336538473b20bd4
463ee1e1434fbc196809294ff7712f9f3abb413c 17-Nov-2016 Roshan Pius <rpius@google.com> WifiStateMachine: Ignore connection when the network Id is unknown am: af54bfce47 am: 35be00b7bc
am: 7d882480d3

Change-Id: I1e2b7961af75d056b8fc5107284a0bd69658d07b
35be00b7bc35096d299741d5e0276b7be1230af5 16-Nov-2016 Roshan Pius <rpius@google.com> WifiStateMachine: Ignore connection when the network Id is unknown
am: af54bfce47

Change-Id: Icd784fb2ecdfc05cf9bf77989decb865d60151e9
963c4f2e6a192e1822c259e96202021c66b3f7f4 01-Nov-2016 Peter Qiu <zqiu@google.com> hotspot2: remove OMADM and PPS code

Now that we are switching over to use PasspointConfiguration parcelable
object for data exchange between the app and the framework, the
existing OMADM parser and the PPS code is no longer needed. So remove
them.

Bug: 32512868
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: I5efb2f39e40488c25720efb5db8534e3bbfdd651
ndroid/server/wifi/anqp/NAIRealmData.java
ndroid/server/wifi/anqp/NAIRealmElement.java
ndroid/server/wifi/anqp/eap/EAPMethod.java
ndroid/server/wifi/hotspot2/DomainMatcher.java
ndroid/server/wifi/hotspot2/OMADMAdapter.java
ndroid/server/wifi/hotspot2/PasspointMatchInfo.java
ndroid/server/wifi/hotspot2/omadm/MOTree.java
ndroid/server/wifi/hotspot2/omadm/ManagementTreeRoot.java
ndroid/server/wifi/hotspot2/omadm/MultiValueMap.java
ndroid/server/wifi/hotspot2/omadm/NodeAttribute.java
ndroid/server/wifi/hotspot2/omadm/OMAConstants.java
ndroid/server/wifi/hotspot2/omadm/OMAConstructed.java
ndroid/server/wifi/hotspot2/omadm/OMAException.java
ndroid/server/wifi/hotspot2/omadm/OMANode.java
ndroid/server/wifi/hotspot2/omadm/OMAParser.java
ndroid/server/wifi/hotspot2/omadm/OMAScalar.java
ndroid/server/wifi/hotspot2/omadm/PasspointManagementObjectManager.java
ndroid/server/wifi/hotspot2/omadm/XMLNode.java
ndroid/server/wifi/hotspot2/pps/Credential.java
ndroid/server/wifi/hotspot2/pps/DomainMatcher.java
ndroid/server/wifi/hotspot2/pps/HomeSP.java
ndroid/server/wifi/hotspot2/pps/Policy.java
ndroid/server/wifi/hotspot2/pps/SubscriptionParameters.java
ndroid/server/wifi/hotspot2/pps/UpdateInfo.java
fef4b474b74c838edf9d810bf13df757012571a3 02-Nov-2016 Ningyuan Wang <nywang@google.com> Use enum instead of strings to store security parameters

Bug: 32512793
Test: compile, unittests

Change-Id: Ic7c1d9a029adad7008f9f8ad32a1139fa1262d75
ndroid/server/wifi/util/InformationElementUtil.java
af54bfce479e1dfb634cb939105b4800d3f1e2a7 16-Nov-2016 Roshan Pius <rpius@google.com> WifiStateMachine: Ignore connection when the network Id is unknown

This is a temporary fix to prevent a NPE crash when the wpa_supplicant
decides to connect to a network on it's own and we've reloaded from
config store and hence changed network Id's.
This will be removed once we migrate to WifiStateMachinePrime.

Bug: 32834043
Test: Will send for regression testing.
Change-Id: I1f5c6e47f954fc609ca4836c24b4ed241b8aef36
ndroid/server/wifi/WifiStateMachine.java
a5847dea76362c2ba3521824d11f226a9ba04cbf 16-Nov-2016 Peter Qiu <zqiu@google.com> Remove HomeSP dependency from ScanDetail am: 01282351e9 am: fb9899dfc1 am: 9d10c3d55b
am: 8c77c51b9e

Change-Id: Ica43ff3156b120316d5d8663be7a1d6532556274
8c77c51b9ea5fdb7bfc9289765c962faa97c5cbd 16-Nov-2016 Peter Qiu <zqiu@google.com> Remove HomeSP dependency from ScanDetail am: 01282351e9 am: fb9899dfc1
am: 9d10c3d55b

Change-Id: Ibe85d5a631e456938e6c21279f9f8adbdaeda490
fb9899dfc18c0afb9648902d710da834e6d9dea9 16-Nov-2016 Peter Qiu <zqiu@google.com> Remove HomeSP dependency from ScanDetail
am: 01282351e9

Change-Id: Ibbbc3133a80ce741cd81d3ab896329b583d9eb96
24b366aefff73952e209bed436fecc0d923b2810 16-Nov-2016 Peter Qiu <zqiu@google.com> configparse: remove support for ConfigBuilder am: 19831fa56c am: 2a64b3f713 am: e3a1095867
am: 704f3be37a

Change-Id: I050e37bef28319e6e225218a9e92b286c44dbd2a
9932bb51ce2f4c952717abd505cbd621f4615691 16-Nov-2016 Peter Qiu <zqiu@google.com> Remove support for unused Hotspot 2.0 Release 2 APIs am: 4bfade8d51 am: a1546ed515 am: 45b422fe76
am: ca05493b55

Change-Id: I1bff72c04c08b5ab73a36a0d88a0a951cabd44ae
704f3be37acfb0753401780735be300d35ddd7f0 16-Nov-2016 Peter Qiu <zqiu@google.com> configparse: remove support for ConfigBuilder am: 19831fa56c am: 2a64b3f713
am: e3a1095867

Change-Id: I42d696f07a53319b4c0ea7c79ed7946fec73ebd6
ca05493b55af9275ceb13d26a9beece58ec1b796 16-Nov-2016 Peter Qiu <zqiu@google.com> Remove support for unused Hotspot 2.0 Release 2 APIs am: 4bfade8d51 am: a1546ed515
am: 45b422fe76

Change-Id: Ic1b3085a94fcf04c35d90a98d8e0175e0c94b543
2a64b3f7130d2f9c5da3c85cf2d34cd6ac907e1b 16-Nov-2016 Peter Qiu <zqiu@google.com> configparse: remove support for ConfigBuilder
am: 19831fa56c

Change-Id: I89c2da7887ad9ed2403617ae0361f560c8c2686b
a1546ed5156b6ef90a5a8e5ae9205d0834707233 16-Nov-2016 Peter Qiu <zqiu@google.com> Remove support for unused Hotspot 2.0 Release 2 APIs
am: 4bfade8d51

Change-Id: I786289cd355b62502387b8c7b0f3d8e01cc9a007
8306d3079ef84fd7edfa529b27658c0b29afc5f5 15-Nov-2016 Peter Qiu <zqiu@google.com> DO NOT MERGE: OMAParser: throw IOException when parsing a null XML string
am: 81080a8430

Change-Id: Iec0454c2d4a956edc0e9c42b6f2b1261f53d4db8
3da163761890870f03c3df95e1e0a315c5068e44 15-Nov-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "DO NOT MERGE: OMAParser: throw IOException when parsing a null XML string" into nyc-mr2-dev
01282351e9b99a4929a6f30ac9813c2567c7f829 13-Sep-2016 Peter Qiu <zqiu@google.com> Remove HomeSP dependency from ScanDetail

Processing of scan result and mapping to passpoint service provider
will be done inside of PasspointManager, so no need to carry it
around in ScanDetail.

Bug: 31364818
Test: runtest frameworks-wifi

Change-Id: Ie1df66bf2d62fda0d715e94eb385d51e144fd9fe
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/ScanDetailCache.java
ndroid/server/wifi/util/ScanResultUtil.java
19831fa56c886da84e0006377e11c4c0b66ab9c3 31-Oct-2016 Peter Qiu <zqiu@google.com> configparse: remove support for ConfigBuilder

ConfigBuilder was used by the Hotspot 2.0 Release 1 app (WifiInstaller)
for parsing the installation file data to a WifiConfiguration.
WifiInstaller will be updated to use the new framework API
(android.net.wifi.hotspot2.ConfigBuilder) instead, so the support in
WifiService is no longer needed.

Bug: 32509661
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I452d5d686c8fcd926d32a432dd042836abc0f2cf
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/configparse/ConfigBuilder.java
ndroid/server/wifi/configparse/MIMEContainer.java
4bfade8d51ddbf6d6bee854883935d3674a97678 31-Oct-2016 Peter Qiu <zqiu@google.com> Remove support for unused Hotspot 2.0 Release 2 APIs

These APIs are used for installing/modifying the PerProviderSubscription
Management Object tree in XML string representation and are used only by
the unreleased Hotspot 2.0 Release 2 app (OSU app). The OSU app will be
updated to use the new APIs which uses Parcelable objects to represent
provider configuration.

Bug: 32509661
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I93a991a50fb96475e0e2d4ed2c891c66f351c312
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
1c551baa319f1d81024ad452113d1cf4325aec51 15-Nov-2016 Randy Pan <zpan@google.com> Merge "WifiConfigManager: partial scan channel list" am: 2c698ca1d1 am: 7fc0608153 am: 5a5acf265a
am: 3e95d9d308

Change-Id: I4d6062dcba76bddaf6b772b191fad05ff33a864d
7fc06081539bbfdc51aee58698e73bf8cb933a5a 15-Nov-2016 Randy Pan <zpan@google.com> Merge "WifiConfigManager: partial scan channel list"
am: 2c698ca1d1

Change-Id: I895d5a9bdf013122d1f4e750067b58672c86a20d
2c698ca1d1b0460f61c84373a5a1f96e07e6a28b 15-Nov-2016 Randy Pan <zpan@google.com> Merge "WifiConfigManager: partial scan channel list"
37f51664e08bbaa15b168b328da357840eee8bff 15-Nov-2016 Etan Cohen <etancohen@google.com> Merge "[AWARE] Update framework code for simplified HAL error codes" am: 6b25452574 am: b98623f849 am: 865b69d45c
am: 5cabb50485

Change-Id: I8ac409b3acd7b8cfa56cef945a6401e060251d98
b98623f8491bc0690f8f7ea723b8df78e50dc499 15-Nov-2016 Etan Cohen <etancohen@google.com> Merge "[AWARE] Update framework code for simplified HAL error codes"
am: 6b25452574

Change-Id: I13049886fc3137986df87241a8c7b2b342a5f602
6b25452574623a2b7d12e47b588b15aec2321e79 15-Nov-2016 Etan Cohen <etancohen@google.com> Merge "[AWARE] Update framework code for simplified HAL error codes"
44d38891fd7454e5eb4a6ad4dc51be12380fae04 15-Nov-2016 Colin Cross <ccross@android.com> Fix mismerge of Id2aeae2739af3a73ef06cd092d936a4b01523ed6

The previous cherry-pick mismerged back to master, causing two
hunks to be duplicated.

Bug: 28715749
Test: builds
Change-Id: Ie4daa448e63b275ef1b0b385bfb5f435442dfa15
ndroid/server/wifi/WifiServiceImpl.java
872017d7b011734f87e9b742e512fc0b3e9ca71f 15-Nov-2016 Svetoslav Ganov <svetoslavganov@google.com> Add WiFi toggle prompts - wifi am: 154bcdd913 am: d38b373265
am: 9f364f01b7

Change-Id: Ib4e2bf68bf274745f904237708b0b52562abfd55
154bcdd91306505f3c52cffaba296384f6468427 27-Jul-2016 Svetoslav Ganov <svetoslavganov@google.com> Add WiFi toggle prompts - wifi

If permission review is enabled toggling WiFi on or off
results in a user prompt to collect a consent. This applies
only to legacy apps, i.e. ones that don't support runtime
permissions as they target SDK 22.

bug:28715749

Original-Change-Id: Ie60ae91bd8e9c67a3e14a2820055234f669df1df
Change-Id: Id2aeae2739af3a73ef06cd092d936a4b01523ed6
(cherry picked from commit dcf967aa402a4ab1a79c727aea934b8013c1fa6a)
ndroid/server/wifi/WifiServiceImpl.java
69689c0657d0b6c7a2616ff9a55ecae15d1f084d 10-Nov-2016 Etan Cohen <etancohen@google.com> [AWARE] Update framework code for simplified HAL error codes

HAL error codes have been simplified (fewer) and a description
string (vendor-specific) added. Update framework code to use the
new error codes and log the description string.

(cherry-pick of commit 53007ea43c28fb700e37ba1fa74dc51953d5be71)

Bug: 27914592
Test: unit tests + integration tests passing
Change-Id: Ifb8d1c694e4ca72ecc0c4fe60c180b8a189f43d7
ndroid/server/wifi/aware/WifiAwareNative.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
60ecc292c27e34df1a9414da0d6482cce718efbc 11-Nov-2016 Randy Pan <zpan@google.com> WifiConfigManager: partial scan channel list

Always include the channel of the currently connected network in
the channel set returned by
fetchChannelSetForNetworkForPartialScan().

Bug: 32745312
Test: Wifi unit tests.
Change-Id: I94a653a2e15222c7f615e9f2c1c3234ba0f1bb09
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiStateMachine.java
b218f16c74d2aa2df9be59c12a2f73714d53c86d 14-Nov-2016 Sohani Rao <sohanirao@google.com> Merge "Add WiFi toggle prompts - wifi"
9f2a6209c9f4c73f4ce0bb7e46157c6bab5d0605 14-Nov-2016 Sohani Rao <sohanirao@google.com> Merge "Permissions check for Wifi Display configuration"
am: 37d2c635d6

Change-Id: I4263cdde87f57a6189c2b05be3ddd6d284507647
37d2c635d6d3ede95893f2d425b9508b878287a4 14-Nov-2016 Sohani Rao <sohanirao@google.com> Merge "Permissions check for Wifi Display configuration"
0469548a809654861f74dc42a3409f29ae750550 27-Jul-2016 Svetoslav Ganov <svetoslavganov@google.com> Add WiFi toggle prompts - wifi

If permission review is enabled toggling WiFi on or off
results in a user prompt to collect a consent. This applies
only to legacy apps, i.e. ones that don't support runtime
permissions as they target SDK 22.

Bug: 28715749
Test: Unit test and sanity tests

Change-Id: Ie60ae91bd8e9c67a3e14a2820055234f669df1df
Merged-In: Ie60ae91bd8e9c67a3e14a2820055234f669df1df
ndroid/server/wifi/WifiServiceImpl.java
f42abad834d95e716d8e423bcfc0d17bce90d021 30-Sep-2016 Sohani Rao <sohanirao@google.com> Permissions check for Wifi Display configuration

Wifi Display is configured using the AIDL call setMiracastMode()
and using a message over the async channel SET_WFD_INFO.
Enforce permissions on the calling uid before updating the config

Bug: 18668877
Test: Unit tests
Change-Id: Idd08e1f769f2fa37596cbec67fbf92919c4fd67b
Merged-In: Idd08e1f769f2fa37596cbec67fbf92919c4fd67b
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
a4f058d55d6934a4fbf587e22d3c5e0c7592e410 14-Nov-2016 Sohani Rao <sohanirao@google.com> Merge "Permissions check for Wifi Display configuration"
8d25131816fda4f166a7e8e181e9ce7d42d58b22 14-Nov-2016 Paul Stewart <pstew@google.com> Merge "WifiNotificationController: Explicitly ignore cases" am: 4f4d1b8c3c am: ae7f612158 am: 72dabaa2d0
am: ac602fdef7

Change-Id: I6dade96a76be8bc4fe00e3c9fc4bbd705ed1516b
ae7f612158cdd25f37f730601baf6ff968779b09 14-Nov-2016 Paul Stewart <pstew@google.com> Merge "WifiNotificationController: Explicitly ignore cases"
am: 4f4d1b8c3c

Change-Id: I5a162534a8bcf7131bbcbab44b011ad9c47464b1
4f4d1b8c3c38e66ed142d29bd162827b56745c40 14-Nov-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "WifiNotificationController: Explicitly ignore cases"
6fd0346c73ca08c6ceab758fec31a9b937688dd8 12-Nov-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Remove legacy store files am: b2c8d28046 am: cc441d0d50 am: 27fb2ae865
am: 92b6fc5c15

Change-Id: Ie0117f32489b9741447b407f7b0f7d23f0fe4aac
62638a75bce0dc07f66c82b6d68d8c599aec0c50 12-Nov-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Don't trigger store writes for ephemeral networks am: bbf3b21e42 am: 5df1c07e16 am: a908b685d8
am: 15e23ec00a

Change-Id: I87b30c981850ed97bef16b952fa3c6f9b14a45f9
cc441d0d50cf3c1c6deeb7b143c1c58cb761c14d 12-Nov-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Remove legacy store files
am: b2c8d28046

Change-Id: Id1a07c13940d33d41d7c07bea4c336f7ee9db15e
5df1c07e161cfa6176c3b1f5a708562cd35e2c58 12-Nov-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Don't trigger store writes for ephemeral networks
am: bbf3b21e42

Change-Id: I7d2fa862620e32c72d33fa13c1e78cf46bbab513
da0d52dd85b54d6ced2a2083423c883ec3e20449 12-Nov-2016 Roshan Pius <rpius@google.com> Merge changes I5fbdd533,I547ae5aa

* changes:
WifiConfigManager: Remove legacy store files
WifiConfigManager: Don't trigger store writes for ephemeral networks
014accd527934faef3f86b4fcf570a8ea477f474 12-Nov-2016 Ningyuan Wang <nywang@google.com> Get association frequency from wificond am: 45ff377d33 am: dc4ea8d40c am: dcf6c5195e
am: d06e12e2dd

Change-Id: I86197f6d8b88338782a37ce358426e5dfa972afa
dc4ea8d40c0f7e79e849a90c7de0c6932ab9be75 12-Nov-2016 Ningyuan Wang <nywang@google.com> Get association frequency from wificond
am: 45ff377d33

Change-Id: I7383d1da69d76881527a5be20df79609a7e27ce1
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
7d3653a51786618cbdb293bcf0edd6ebb41046d5 11-Nov-2016 Ningyuan Wang <nywang@google.com> Merge "Create parceable class NativeScanResult" am: 2a657b3627 am: 2aadc51b8d am: 73239a4d9d
am: b6942078ae

Change-Id: Iadc08c6540e6785acd1deec8172af307d6d9d7e5
2aadc51b8d539ece2215fe2d9cef9197695c6a6d 11-Nov-2016 Ningyuan Wang <nywang@google.com> Merge "Create parceable class NativeScanResult"
am: 2a657b3627

Change-Id: I883494d5c50c6f6d6030743d1155799833f1f88b
2a657b36273d27cb9f54fd5b4c48d52c49eeca42 11-Nov-2016 Ningyuan Wang <nywang@google.com> Merge "Create parceable class NativeScanResult"
b2c8d28046e96c4506482e030c6320cda6db8f30 11-Nov-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Remove legacy store files

This was commented out in the initial submission. Ensure that the old
config store files (networkHistory.txt, ipconfig.txt) are removed after
migration.

Bug: 31273501
Test: Unit tests
Test: Will send for integration testing.
Change-Id: I5fbdd53372f720fcdcbd43d4ced388a2aee3c01c
ndroid/server/wifi/WifiConfigManager.java
bbf3b21e42e6f13bddd1c30e4266b5be0d1404be 11-Nov-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Don't trigger store writes for ephemeral networks

Don't trigger store writes for ephemeral network additon/removal.
The ephemeral network is anyway removed from the list to persist
in |saveToStore|. So, this write is redundant.

Bug: 32809494
Test: Added unit tests.
Change-Id: I547ae5aa3b5361a4320d2611f2571e3a379b410a
ndroid/server/wifi/WifiConfigManager.java
2904c965a0ea9d2bf3aa5fbce2324e2450a769a1 11-Nov-2016 Roshan Pius <rpius@google.com> WifiConfigStore: Move log for store read/write times am: b88000ed53 am: f72715cc4f am: 0fdc124b9b
am: 91c1e35787

Change-Id: I2d2fe8f801aa3195811ce9c438613765c2601029
7b0962e7d07142fc68e3a5cb49be166ba035d224 11-Nov-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Remove unnecessary loads from store am: b3706e8c20 am: 19dc032ab0 am: 033936cd4b
am: 4585b6d5b4

Change-Id: I1d2bccea4ce7819a25a256b4fba7446b7aee7c88
f72715cc4f998aefba0f1002cbb223fac9ed164a 11-Nov-2016 Roshan Pius <rpius@google.com> WifiConfigStore: Move log for store read/write times
am: b88000ed53

Change-Id: I32f507e46a9460d7728a573cdd94235117660688
19dc032ab0cfe0eba8cec9fe9ed5f530905eb206 11-Nov-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Remove unnecessary loads from store
am: b3706e8c20

Change-Id: I72a6689e9e2d04011ffbf68f3523f571828b9c67
b88000ed5302860e71e32646695daf661f56d927 10-Nov-2016 Roshan Pius <rpius@google.com> WifiConfigStore: Move log for store read/write times

The write API in WifiConfigManager is used for both buffered & immediate
writes. So, the log in WifiConfigManager which indicates the time taken
for write for buffered writes is misleading (it's only the time taken
for scheduling the alarm in that case).
So, move it to WifiConfigStore where the eventual write takes place.

Bug: 32778120
Test: Manual tests
Change-Id: I8af5364f735117a1729f737cb476c0f83d447f27
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStore.java
b3706e8c20fdf0a0e2b4ec15355ae6f98588b732 10-Nov-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Remove unnecessary loads from store

We are currently loading from store for every user unlock. This is
unnecessary. We want to load from store only in the following scenario:
1. First unlock after device bootup.
2. First unlock after user switch if user was locked during switch.

This should fix the crash in the associated bug where the networkID
changed because of a user unlock (and hence caused an unnecessary store
load previously).

Bug: 32777050
Test: Unit tests
Change-Id: Ie7731900a790e1ecfaf0ad6d7b42addb461b6d40
ndroid/server/wifi/WifiConfigManager.java
48ce8ad81b5de2948fbadf29709c330782ab6cd8 30-Sep-2016 Sohani Rao <sohanirao@google.com> Permissions check for Wifi Display configuration

Wifi Display is configured using the AIDL call setMiracastMode()
and using a message over the async channel SET_WFD_INFO.
Enforce permissions on the calling uid before updating the config

Bug: 18668877
Test: Unit tests
Change-Id: Idd08e1f769f2fa37596cbec67fbf92919c4fd67b
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
32ec467da69fd7fec4dfef07581f5f097777e8ff 11-Nov-2016 Sohani Rao <sohanirao@google.com> Merge "Async Channel with Logging for Wifi Services" am: a541bf342d am: 07891953f9 am: b9a46b9faa
am: 56ecae0965

Change-Id: Ia3f499b00efcd3e1e16937ca0c349e1a2659910b
3e4478ef45f7221041ad257887cfb9f5a8d3f002 11-Nov-2016 Sohani Rao <sohanirao@google.com> Merge "Trace permissions check to access scan results" am: 573654d47a am: ce95b349a7 am: 2dc58e4349
am: 27133e1484

Change-Id: Id015e398cd6f2818aebe5ee5e521ef8f30163af5
07891953f9722c9a23dc1a876a8a8e39268a16a2 10-Nov-2016 Sohani Rao <sohanirao@google.com> Merge "Async Channel with Logging for Wifi Services"
am: a541bf342d

Change-Id: I87f5c1dffaa754e1cf519a38890556b83a9eccb9
697d6710d8a136243ab8f9cadabfb7d01c3367f9 10-Nov-2016 Ningyuan Wang <nywang@google.com> Create parceable class NativeScanResult

This class is used for passing scan result between framework
and wificond.

Test: compile, unittests, manual test
Bug: 30746278

Change-Id: I3a1e6bc16cb959a08ba21258d200e789fe3d36be
ndroid/server/wifi/wificond/NativeScanResult.java
ce95b349a740fab4dfdb242ae30c3288bd6c9efe 10-Nov-2016 Sohani Rao <sohanirao@google.com> Merge "Trace permissions check to access scan results"
am: 573654d47a

Change-Id: I3322dd795836c041f5e1812a1c36359e75a3ecd1
a541bf342d7014f6ca9dde2194e0304e1553cee0 10-Nov-2016 Sohani Rao <sohanirao@google.com> Merge "Async Channel with Logging for Wifi Services"
3f1a096b98daf0f87e70f24faf51501d298481a6 10-Nov-2016 Peter Qiu <zqiu@google.com> Merge "hotspot2: stub implementation of Passpoint APIs" am: e0cf5f612d am: 1c16ca526d am: f2f57134ee
am: c4af2d7965

Change-Id: Ic06169607eacdc64d58c7e359f8b3d602be831c7
573654d47ace707f0cae2a50462dce05feef30d0 10-Nov-2016 Sohani Rao <sohanirao@google.com> Merge "Trace permissions check to access scan results"
1c16ca526d9789fa432da75c35a70c7c70f6f02c 10-Nov-2016 Peter Qiu <zqiu@google.com> Merge "hotspot2: stub implementation of Passpoint APIs"
am: e0cf5f612d

Change-Id: I803b667ddfee882d87bfe7af617c8c29a191192d
7f8476aaa3fe8af8d23987683f461e39a76e91a4 10-Nov-2016 Randy Pan <zpan@google.com> WNS: less agressive roaming am: 6491dffa52 am: 504b3fe457 am: 87835e11fc
am: 66ef7c5806

Change-Id: Ieb4d9f5f7b248b83b19c0cfd67af3bcabf03d72e
e0cf5f612d9a63132af9c9596751da5cd620deaf 10-Nov-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: stub implementation of Passpoint APIs"
504b3fe45783e37a921554d609abfa0d58aac463 10-Nov-2016 Randy Pan <zpan@google.com> WNS: less agressive roaming
am: 6491dffa52

Change-Id: I160aeb5c7831a7e1aa06677292783540fff97346
862b2876315938851baf9b8f4e69a2b64261f9c8 03-Nov-2016 Sohani Rao <sohanirao@google.com> Trace permissions check to access scan results

To help debug denial of permission to access scan results, add logging
to WifiPermissionsUtil.

Bug: 32616662
Test: Unit tests and verified logging in verbose mode
Change-Id: I4e7c16ee46b8c6e01c250308c4ada994ffb53156
ndroid/server/wifi/util/WifiPermissionsUtil.java
6491dffa5242829ccafa59a9a7243d56beafe7e6 10-Nov-2016 Randy Pan <zpan@google.com> WNS: less agressive roaming

When connected, WNS no longer triggers network switching if the
current network didn't show up in the scan results.

While there, fixed the comments of
WifiNetworkSelectorTest#filterOutBlacklistedBssid.

Bug: 31707128
Test: Wifi Unit Tests
Change-Id: Ieebc71151396608cd63e0b834e3f1c572e4cb557
ndroid/server/wifi/WifiNetworkSelector.java
94cd70823b2ec76d4ceb2a5b2cc7273362527378 10-Nov-2016 Randy Pan <zpan@google.com> Merge "WNS: feed filtered scan results to network evaluators" am: 836fdd6fdf am: 7767bd5078 am: 1a8b4ccb0e
am: 293c90bbd1

Change-Id: Ib6c5f898028e38adbc26362a2c542b48ca505ad4
7767bd5078d33afd4cfed9ab4c161ed89ab92c5f 10-Nov-2016 Randy Pan <zpan@google.com> Merge "WNS: feed filtered scan results to network evaluators"
am: 836fdd6fdf

Change-Id: I798d8072503c293b3c4431f318e083a474567026
836fdd6fdf021f058eb9f9d5dfd40e39f75d4ca0 10-Nov-2016 Randy Pan <zpan@google.com> Merge "WNS: feed filtered scan results to network evaluators"
95752ad26a312d7438ca84fc5493a26a26990889 10-Nov-2016 Randy Pan <zpan@google.com> Merge "Wifi link layer statistics sample timestamp" am: 9ef27dae81 am: deae681b9e am: a0d86e2d98
am: 936e9fb616

Change-Id: I3c8f7ec56d87a0d51f4679c12c36d6103f4f6bf9
deae681b9e79cbbd5eb7dfcc5ad3bcef51c8f901 10-Nov-2016 Randy Pan <zpan@google.com> Merge "Wifi link layer statistics sample timestamp"
am: 9ef27dae81

Change-Id: Ifc93dad0e7e621c44965219ca992bfbfa6a376eb
9ef27dae81ed11facbb381e4995feda590da546f 10-Nov-2016 Randy Pan <zpan@google.com> Merge "Wifi link layer statistics sample timestamp"
cda805612a020057f7363b8e89be72ca9d6958f9 19-Oct-2016 Sohani Rao <sohanirao@google.com> Async Channel with Logging for Wifi Services

Subclassing AsyncChannel to override and add logging calls to
- sendMessage()
- replyToMessage()
- sendMessageSynchronously()

Bug: 31746964
Test: Flash and bringup phone, verify logging for services
using the WifiAsyncChannel instead of AsyncChanel

Change-Id: I0b075f3db16284ffcae0fa2881e5e73310c14e72
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
ndroid/server/wifi/util/WifiAsyncChannel.java
bab1104d9cdce66688e45aa04f49d36966bc49e0 09-Nov-2016 Randy Pan <zpan@google.com> WNS: feed filtered scan results to network evaluators

Bug: 32745148
Test: Wifi unit tests
Change-Id: I32a3e8e2698f2ab7aa58123c0606872e762e151d
ndroid/server/wifi/WifiNetworkSelector.java
f2b6f6c60027d9967ecd1c5b66d8c745624e0053 09-Nov-2016 Sohani Rao <sohanirao@google.com> Merge "Check permissions before returning peer list"
am: 88723c5e3e

Change-Id: I8100cf7c914fa37067827e56c93791bd2b2fb69c
88723c5e3ecadc1b057e5cd849cc88c92a5b06b9 09-Nov-2016 Sohani Rao <sohanirao@google.com> Merge "Check permissions before returning peer list"
65df832deaa7c9cdbb66a6b3bcb45d2deee8c149 03-Nov-2016 Randy Pan <zpan@google.com> Wifi link layer statistics sample timestamp

Pass in the timestamp for Tx/Rx rate computation.

Bug: 30982272
Test: Ran the new image and compared the rates with the previous
algorithm.
Change-Id: I0eaafda0d072a5b69b6c95dec41a74af60c50f24
ndroid/server/wifi/WifiStateMachine.java
7c1a92f49b30f915192eb42aea24befc80569ee0 09-Nov-2016 Tamas Berghammer <tberghammer@google.com> Merge "Update package names to work with the proto3 compiler"
4fc252c549f4c95348b6b24e6368df6bf5dd3b3b 08-Nov-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachine: add DisabledState am: 613dbfbefb am: 61543b41d9 am: ad6258066b
am: 8e596e54c8

Change-Id: Ic633b22173210c4ae11a39fe57836cd223903f08
9eb8bef51400f4ebc606d1aca1de7a5b3dd89ac7 03-Nov-2016 Sohani Rao <sohanirao@google.com> Check permissions before returning peer list

Ensure the uid requesting peers has the permissions
to access scan results for Apps version O or later

Bug: 30760540
Test: Unit Test Suite, Wifi Direct get peers mannual test
Change-Id: I3c7bd876ca203ef42b3fea228e5e0152c48d9830
Merged-In: I3c7bd876ca203ef42b3fea228e5e0152c48d9830
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
61543b41d91efd3c3ac445f6d1c31e925792d171 08-Nov-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachine: add DisabledState
am: 613dbfbefb

Change-Id: Ie7ef4e9f0097e7f63257f93eab5f8b87e796f57a
613dbfbefbe570c2fd5e1e6d959411bf75f6265b 25-Oct-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachine: add DisabledState

Add a disabled state to maintain messages in the WifiStateMachinePrime
state machine.

Bug: 32402687
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I636e70968ff2f97f457769d594ce3ce724d845a5
ndroid/server/wifi/WifiStateMachinePrime.java
da94688198c864bb29be2e9603ebbe9ae6492a87 01-Nov-2016 Tamas Berghammer <tberghammer@google.com> Update package names to work with the proto3 compiler

Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
70570f92c6e0a65c144c8df2e5639ef454f1dc7a 05-Nov-2016 Randy Pan <zpan@google.com> DO NOT MERGE: QNS: less agressive roaming

When connected, QNS no longer triggers network switching if the
current network didn't show up in the scan results.

While there, fixed a QNS unit test failure.

Bug: 31707128
Test: Wifi Unit Tests
Change-Id: I24a16828fb60af4015a4faf4e00c356898729173
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
000bccdead6ff9e7bb66c9f3aed2bf2d78524286 07-Nov-2016 Sohani Rao <sohanirao@google.com> Merge "Check permissions before returning peer list"
a59f7d1ab2b9e912a9918eef96a29676c1725824 06-Nov-2016 Etan Cohen <etancohen@google.com> [NAN-AWARE] Rename NAN to Aware
am: c29acea6ce

Change-Id: I83892bc745ae27e0b9d5dcee5799d4aa0baab968
c29acea6ceda3aa4ee537c05ce7d05dac2655cf9 26-Oct-2016 Etan Cohen <etancohen@google.com> [NAN-AWARE] Rename NAN to Aware

Rename only (and any reformatting needed to pass lint) - no
functional changes!

(cherry-pick of commit a61b9fb569153917a650f1d48efa20ba8846a9f3)

Bug: 32263750
Test: All unit tests and integration (sl4a) tests pass.
Merged-In: Idd8d0ad8d1fa1058c1bcd0de169a02e1fad9d070
Change-Id: I761b8f5b588d74eea66d7150a2f9a1e1ac5c1dfd
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/aware/WifiAwareClientState.java
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareDiscoverySessionState.java
ndroid/server/wifi/aware/WifiAwareNative.java
ndroid/server/wifi/aware/WifiAwareRttStateManager.java
ndroid/server/wifi/aware/WifiAwareService.java
ndroid/server/wifi/aware/WifiAwareServiceImpl.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanDataPathStateManager.java
ndroid/server/wifi/nan/WifiNanDiscoverySessionState.java
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanRttStateManager.java
ndroid/server/wifi/nan/WifiNanService.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanStateManager.java
f9e7782647c7008e5e589f42c618669fd11d18ef 05-Nov-2016 Etan Cohen <etancohen@google.com> Merge "[NAN-AWARE] Rename NAN to Aware"
81080a8430568399a14e9b85007a8aaea5c2e6eb 20-Sep-2016 Peter Qiu <zqiu@google.com> DO NOT MERGE: OMAParser: throw IOException when parsing a null XML string

This avoids a NullPointerException when parsing a null XML string.
OMAParser.parse is only used by PasspointManagementObjectManager for
adding/building/modifying a HomeSP from a XML string.

It is fine to use IOException since it is already being handled
gracefully by its upstream callers.

Bug: 31497435
Test: unit tests
Test: Verify system server crashes when executing the command below without the fix
and doesn't crash with the fix:
"adb shell service call wifi 8 i32 0"

Change-Id: If2ad13b8573d49ba0ccbea2427f3c63d841f866d
(cherry picked from commit 519056861a467ae64e142ff07d53891514ef9c70)
ndroid/server/wifi/hotspot2/omadm/OMAParser.java
a92271db17326d6b48fe6cd8b9839e9901e38289 04-Nov-2016 Paul Stewart <pstew@google.com> Merge "WifiStateMachine: Send DHCP_ACTION_COMPLETE if p2p is missing" am: 4291fff510 am: 91710061f8 am: b41c03cb51
am: 24c5c53365

Change-Id: I9726e5cc81b3a86b9ae4a22288767945f1dcae7d
91710061f8cff2aec476bcecfacc160b85706b5b 04-Nov-2016 Paul Stewart <pstew@google.com> Merge "WifiStateMachine: Send DHCP_ACTION_COMPLETE if p2p is missing"
am: 4291fff510

Change-Id: I9ee6c93529aedd8da7d456fdb18d5d720f967a32
4291fff510f6da3ce81f149608189971fb5f431b 04-Nov-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "WifiStateMachine: Send DHCP_ACTION_COMPLETE if p2p is missing"
22c27de2e480c285755b18d006e7e6a483f21ed7 03-Nov-2016 Sohani Rao <sohanirao@google.com> Check permissions before returning peer list

Ensure the uid requesting peers has the permissions
to access scan results for Apps version O or later

Bug: 30760540
Test: Unit Test Suite, Wifi Direct get peers mannual test
Change-Id: I3c7bd876ca203ef42b3fea228e5e0152c48d9830
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
4b13f1b486440044f27de0418e13afb8bd24f35c 26-Oct-2016 Etan Cohen <etancohen@google.com> [NAN-AWARE] Rename NAN to Aware

Rename only (and any reformatting needed to pass lint) - no
functional changes!

(cherry-pick of commit a61b9fb569153917a650f1d48efa20ba8846a9f3)
(cherry-pick of commit 78f9a8e00349e151341dac063e959cb3cf81e42e)

Bug: 32263750
Test: All unit tests and integration (sl4a) tests pass.
Change-Id: Idd8d0ad8d1fa1058c1bcd0de169a02e1fad9d070
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/aware/WifiAwareClientState.java
ndroid/server/wifi/aware/WifiAwareDataPathStateManager.java
ndroid/server/wifi/aware/WifiAwareDiscoverySessionState.java
ndroid/server/wifi/aware/WifiAwareNative.java
ndroid/server/wifi/aware/WifiAwareRttStateManager.java
ndroid/server/wifi/aware/WifiAwareService.java
ndroid/server/wifi/aware/WifiAwareServiceImpl.java
ndroid/server/wifi/aware/WifiAwareStateManager.java
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanDataPathStateManager.java
ndroid/server/wifi/nan/WifiNanDiscoverySessionState.java
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanRttStateManager.java
ndroid/server/wifi/nan/WifiNanService.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanStateManager.java
52f0452bbc9e7088a6eee0aea244b3415f9a650e 28-Oct-2016 Paul Stewart <pstew@google.com> WifiNotificationController: Explicitly ignore cases

Explicitly ignore all known cases for NetworkInfo.DetailedState
so build tools can alert us when new cases are added that we have
not yet considered here.

Bug: 32490639
Change-Id: I8091a93073ea8f85878471ebb5c01792f0f1e4f0
Test: Compile only -- trivial change
ndroid/server/wifi/WifiNotificationController.java
74e575e723914197eeceb64ee247329c06566da8 03-Nov-2016 Michael Plass <mplass@google.com> Merge "Update logging tag and prefixes in WifiScoreReport" am: d22557025e am: 6365c1163b am: 7d6f6f21dc
am: 22fe5e1d1d

Change-Id: I853d0a546bcbab3e88dabbab49ef215d0e70caee
6365c1163b0253a344222b9fd668679fa3680624 03-Nov-2016 Michael Plass <mplass@google.com> Merge "Update logging tag and prefixes in WifiScoreReport"
am: d22557025e

Change-Id: I90f3b1ed610faf633ba06d8ae44779df967bacdd
d22557025e4c2278a55be8b9993befc4134beb93 03-Nov-2016 Michael Plass <mplass@google.com> Merge "Update logging tag and prefixes in WifiScoreReport"
f5e79c1df904ed887959e57edc370f9976917c3c 03-Nov-2016 Paul Stewart <pstew@google.com> WifiStateMachine: Send DHCP_ACTION_COMPLETE if p2p is missing

With ag/1066617, null checks were added for mWifiP2pChannel
in WifiStateMachine. An issue was created during DHCP setup where
in this null condition the CMD_PRE_DHCP_ACTION_COMPLETE message is
never delivered, since the original code depended on WifiP2pService
to deliver it. In the null case, we take responsibility to deliver
this message directly from WifiStateMachine.

Bug: 32621474
Change-Id: I7814d089479cbbb9c2407e782578a09e4c823b08
Test: Manual: remove mWifiP2pChannel initialization in InitialState.enter
ndroid/server/wifi/WifiStateMachine.java
e86c12f27386013940007fcf5a57fe38a5f54151 03-Nov-2016 Shinji Sogo <shinji.sogo@sonymobile.com> Merge "P2P dialog is dismissed when touched outside" am: bf15bfba07 am: 20c488ce48 am: 47b3cb7648
am: a6594fd9c1

Change-Id: I9c58bde0c5e95c0a19cf1ea9827494782de103b7
20c488ce481d3f9a85249a2c5e8b601243795c72 03-Nov-2016 Shinji Sogo <shinji.sogo@sonymobile.com> Merge "P2P dialog is dismissed when touched outside"
am: bf15bfba07

Change-Id: I45c23b5c0e6f3f722f9186931ff871ad24671ad3
bf15bfba07dcd7ce77ec4090712101797bb78d25 03-Nov-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "P2P dialog is dismissed when touched outside"
9d31ad0596555971395980fdd0a3ccbd5b1b1123 03-Nov-2016 Michael Plass <mplass@google.com> Update logging tag and prefixes in WifiScoreReport

Since the class has only one method that logs, don't use method
names in the log messages.

Test: runtests, check log for new tags
Bug: 32380868
Change-Id: I14ff48c41176ed145fe1a4909f4ec487fd310ef6
ndroid/server/wifi/WifiScoreReport.java
ddfa9ad2546319ce31db50443849de1accd2457b 02-Nov-2016 Randy Pan <zpan@google.com> WCM & WNS: covert Log.x to LocalLog am: f174a7cfe9 am: 065383f264 am: cf5e912acf
am: 58a863a98f

Change-Id: Ia35b231f311a0a779a207a753e28a5f75a05edc2
065383f264fb1023a8a8b5dcf5356df9380e7f4a 02-Nov-2016 Randy Pan <zpan@google.com> WCM & WNS: covert Log.x to LocalLog
am: f174a7cfe9

Change-Id: Icbdb28d90840cd16d4a6270d6d5df61b6dd88d28
9488cc856e18fd67dc065e5d4b5d5694228b7b18 12-Jan-2014 Shinji Sogo <shinji.sogo@sonymobile.com> P2P dialog is dismissed when touched outside

When P2P connection request dialog is shown and user touches
outside the dialog, it will be dismissed. This is not good UX.
For example, tablet has large screen so user may touch outside
unexpectedly. The dialog should be dismissed only when Back key,
Decline button or Accept button is tapped.

Bug:32602558

Change-Id: Ie35fce405247132776e20e31b00f4b4fc0b6503c
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
f174a7cfe941a9c2776440ee42e9a3300963260f 01-Nov-2016 Randy Pan <zpan@google.com> WCM & WNS: covert Log.x to LocalLog

Unify the logging mechanism so we always have a complete picture
of the WCM and WNS logs.

Bug: 32573962
Test: Build, flash and run.
Change-Id: I3a3d3f74ddcd6c999c8a43c49218bce6eab73213
ndroid/server/wifi/ExternalScoreEvaluator.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiNetworkSelector.java
3ebf0b17fd1cdd3a0ef22d9e199c1686c01dcc9f 25-Oct-2016 Peter Qiu <zqiu@google.com> hotspot2: stub implementation of Passpoint APIs

Bug: 32282711
Change-Id: If1b9801c0fe021b7b5817f51455dd5e0f7404b2c
Test: None
ndroid/server/wifi/WifiServiceImpl.java
7ed659dfe00c43008f76ea2b054007fb3e205bdd 01-Nov-2016 Peter Qiu <zqiu@google.com> Merge "passpoint: initial support for PasspointManager"
am: b4de659a6d

Change-Id: I1d7d6e5b7244365a523c62593ff9a971306726d0
b4de659a6d54c1633cf95fc9763e9a9d81a46916 01-Nov-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "passpoint: initial support for PasspointManager"
eaa6ff2e246151fe8f42d7111541225ee0e3f346 12-Sep-2016 Peter Qiu <zqiu@google.com> passpoint: initial support for PasspointManager

Added handling for passpoint icon responses and Wireless Network
Management (WNM) frames.

Bug: 31430212
Test: runtest frameworks-wifi

Change-Id: I21c606f122b22dded37e8faf7bcdea8cd910e2e0
Merged-In: I21c606f122b22dded37e8faf7bcdea8cd910e2e0
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/PasspointManager.java
ab35652bdb1369b057711ae37b483a01bac542e6 31-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "passpoint: initial support for PasspointManager"
ee55ff8403954af0dc320fa5780861d0da61d3bb 31-Oct-2016 Ningyuan Wang <nywang@google.com> Merge "Add group and pairwise cipher suite info to Capabilities object" am: fd413331c8 am: 327737eaf4 am: fa5d81a03f
am: d04309bc2f

Change-Id: Ibfad61c837c3273b4071c80f332035495b6bca3d
298ffd7660854e562ccc32a98de6b3d6833fc588 12-Sep-2016 Peter Qiu <zqiu@google.com> passpoint: initial support for PasspointManager

Added handling for passpoint icon responses and Wireless Network
Management (WNM) frames.

Bug: 31430212
Test: runtest frameworks-wifi

Change-Id: I21c606f122b22dded37e8faf7bcdea8cd910e2e0
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/PasspointManager.java
327737eaf4e5834f440964be9fcd65e8ab56c320 31-Oct-2016 Ningyuan Wang <nywang@google.com> Merge "Add group and pairwise cipher suite info to Capabilities object"
am: fd413331c8

Change-Id: I6b2f588e92e9016c21f211f3d131622a3a4665ec
fd413331c84f7fade11830efb3d9ed3dddc4e98f 31-Oct-2016 Ningyuan Wang <nywang@google.com> Merge "Add group and pairwise cipher suite info to Capabilities object"
7cfe9dcd2275e6c1dd1f56c6b27325655777ec88 31-Oct-2016 Sohani Rao <sohanirao@google.com> Merge "WifiPermissionsUtil: Resolve refactoring bug"
am: 77b8a3f928

Change-Id: I4fc27d520cb9f77b4a158480800380f50d133465
77b8a3f928ba485b86c10dd65b39833b6b54ee33 31-Oct-2016 Sohani Rao <sohanirao@google.com> Merge "WifiPermissionsUtil: Resolve refactoring bug"
63a4c8e9abc4f75f7885331360e67e8ac8c4f7dd 25-Oct-2016 Sohani Rao <sohanirao@google.com> WifiPermissionsUtil: Resolve refactoring bug

The function canAccessScanResults() changes the semantics of the
permissions check. Specifically, it enforces INTERACT_ACROSS_USERS_FULL
permission on all callers. The original code only enforces this when
the user or profile is not current. Update WifiPermissionsUtil and
WifiPermissionsUtilTest to ensure this functionality. Also, ensure
there's no logical change in the permissions check needed.

Bug: 32400436
Test: Unit test, cherry-pick to master and verify SetupWizard
can access scan results even though it may not have the
INTERACT_ACROSS_USERS_FULL permission

Change-Id: I84565946f1a62258b84af0a7b817bcff248d2eda
Merged-In: I84565946f1a62258b84af0a7b817bcff248d2eda
ndroid/server/wifi/util/WifiPermissionsUtil.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/util/InformationElementUtil.java
868b692e6faa9ec3c8dd0cd42d4302082e28b992 01-Sep-2016 Sohani Rao <sohanirao@google.com> Wifi Permissions Utility to check scan permissions

Abstracted permissions check for returning scan results into a
central module - WifiPermissionsUtil
- provides a method that validates the calling uid's permissions
to access scan results
- fix permission bug by ensuring the calling uid is used instead
of uid of the system server
- ensures backward compatilibity for legacy apps and enforces
location permissions on apps of a certian version or later
- Ensure that INTERACT_ACROSS_USERS_FULL permission is only required
if the User or profile is not current. Fixed build breakage.
Added a class WifiPermissionsWrapper to wrap static methods and
dependencies to enable testing

Test: Unit tests, Added unit tests, Tested manually
Ensure Setup Wizard and Settings UI can access scan results
Bug: 32400436

Change-Id: I84565946f1a62258b84af0a7b817bcff248d2eda
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiSettingsStore.java
ndroid/server/wifi/util/WifiPermissionsUtil.java
ndroid/server/wifi/util/WifiPermissionsWrapper.java
a8a5644b48660a166adfad9fdc274cbdb44cdf4b 27-Oct-2016 Randy Pan <zpan@google.com> DO NOT MERGE: Check on whether an ephemeral network is deleted

Add quotes to ScanResult.SSID before passing it to
WifiConfigManager#waswasEphemeralNetworkDeleted.

While there, improved the java doc of
WifiConfigManager#waswasEphemeralNetworkDeleted to make it clear
that SSID surrounded by quotes is expected.

Bug: 32205260
Test: Ephemeral network added by WiFi Assistant can be forgotten
Change-Id: I45afd45fd7257a31ec16aca5b6ae765d417ecead
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
ndroid/server/wifi/util/ScanDetailUtil.java
6eda1466400670de6163962f3a74b35b30159332 26-Oct-2016 Paul Stewart <pstew@google.com> Merge "Make disconnect due to NUD_FAILURE optional" am: f3bd5cd12b am: a6968beb6f am: e2e1ef2e6e
am: cacaa1b5c7

Change-Id: If715c8b935e7b18929991aa2bef45f6501600ee4
a6968beb6f54b9d392d822b2c99794de6db167d5 26-Oct-2016 Paul Stewart <pstew@google.com> Merge "Make disconnect due to NUD_FAILURE optional"
am: f3bd5cd12b

Change-Id: I8d96ce025b7799d87d07a7040086430ada873d2d
f3bd5cd12bb1910c10d6b54d3289341e863500b3 26-Oct-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Make disconnect due to NUD_FAILURE optional"
84ee4726383fd968ab43caf120d15d9f47a51a54 24-Oct-2016 Paul Stewart <pstew@google.com> Make disconnect due to NUD_FAILURE optional

Provide a special dumpsys parameter to inhibit disconnect due to IP
connectivity failure. Running "dumpsys wifi set-ipreach-disconnect disabled"
will enable this functionality. This will be useful for performing tests
where we would like to understand what happens if we stay online after
a NUD_FAILURE.

Bug: 32331899
Test: run "adb shell dumpsys wifi set-ipreach-disconnect" on DUT

Change-Id: I12474671e22871c4e1c2f755af2a1cac8f652f5b
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
9cd9c8b8a8f75a21ef755b0796ac14f3c03acf4c 25-Oct-2016 Michael Plass <mplass@google.com> Merge "WifiScoreReport: Add/update some comments" am: 6d1a4d3bbe am: 6b4a270909 am: 6ac7aad021
am: cca314b356

Change-Id: Ic38e80d2d67e49bd7f4fdb662b040d7c12964059
6b4a2709099d583d6b8c5c0942e6df800f873fa7 25-Oct-2016 Michael Plass <mplass@google.com> Merge "WifiScoreReport: Add/update some comments"
am: 6d1a4d3bbe

Change-Id: I6be0a2a76cf8bbcad08f154eaa15a176a948b2e4
6d1a4d3bbe2e7c17578a8a93454591d3fd03dc1d 25-Oct-2016 Michael Plass <mplass@google.com> Merge "WifiScoreReport: Add/update some comments"
5949f40846ab201cde00c010477a826e6b72d826 21-Oct-2016 Michael Plass <mplass@google.com> WifiScoreReport: Add/update some comments

Test: No actual code changes.
Bug: 27324715

Change-Id: I67eb060e8a4d5fb1c4cac17f758fb620daf19349
ndroid/server/wifi/WifiScoreReport.java
711e3921dca0d2065576a503c313cd05c4e7f51a 25-Oct-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachine: create mode manager classes am: 4569b3880b am: ab4c7a3a18 am: da46517dc4
am: 14b1d92d85

Change-Id: Ieaa003a7af069bb338e3ac180326ccd50ba974be
ae7a94601fd02b4503ae2b26bb85fd87fc3a8d6a 25-Oct-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachine: create class file for refactor am: 33b9e8b153 am: 686d51dbfe am: 9423533d63
am: b9e6482f76

Change-Id: Ib1e5cd4014665572517211e68c325c69590b98a9
ab4c7a3a183d15d1c02b7acf1908b13bc90c5df0 24-Oct-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachine: create mode manager classes
am: 4569b3880b

Change-Id: Iced57b0150f0c687c93a7a5f6aff1260ae7f34bb
686d51dbfe67b503ab2739c78dcf9e38be50aaae 24-Oct-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachine: create class file for refactor
am: 33b9e8b153

Change-Id: I5dee15b66662905631d438cba65ebe0a7f57efca
4569b3880ba8d741d466e2f880f91b29b56d5e18 02-Sep-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachine: create mode manager classes

Add states and mode managers for WifiStateMachine refactor.

Bug: 31470190
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: Iac6069316efddf17288fb1ad8a8b81ba054e40de
ndroid/server/wifi/ActiveModeManager.java
ndroid/server/wifi/ClientModeManager.java
ndroid/server/wifi/ScanOnlyModeManager.java
ndroid/server/wifi/SoftApManager.java
ndroid/server/wifi/WifiStateMachinePrime.java
33b9e8b153b1600e4e2187bd41075b367d9c15e0 01-Sep-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachine: create class file for refactor

Create a new class called WifiStateMachinePrime that will be used as the
basis for the WifiStateMachine refactor.

Bug: 31478795
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: I451bcb7c03d38d80ce2e3b6c2a52bd4b49ed5509
ndroid/server/wifi/WifiStateMachinePrime.java
85a2569ce42ae4a733c2f20a48cffc3dc8956021 24-Oct-2016 Rebecca Silberstein <silberst@google.com> SoftApManager: move config argument to constructor am: 79d069c370 am: 7dec8b6b64 am: 96a9f4b7ad
am: 53bf07d4f8

Change-Id: I48ff5fda20f160e5c98bdadc44a84be118cdb3e4
404b9ae7bbaa45165f8f413f505ed4b12a24efb1 24-Oct-2016 Rebecca Silberstein <silberst@google.com> WifiInjector: add WifiApConfigStore to injector am: 990818e78a am: 0ef978afe4 am: ac7c9b3c55
am: 0175bc8481

Change-Id: Ia9458f952f4c9c675d6a05c506f8c4f07f71ad2c
7dec8b6b64b5cbd82f07ac3688dd812780ce5763 24-Oct-2016 Rebecca Silberstein <silberst@google.com> SoftApManager: move config argument to constructor
am: 79d069c370

Change-Id: I70895e1a12dd17668302b97950cd29ab30c3f7c7
0ef978afe4d5f4b3dd7306450f28a2abec9733a8 24-Oct-2016 Rebecca Silberstein <silberst@google.com> WifiInjector: add WifiApConfigStore to injector
am: 990818e78a

Change-Id: If81c30766dd6558a0d264b8c8bc4998ca1105335
79d069c37009c62f4f9e1dd0fc623fcf50aab919 06-Sep-2016 Rebecca Silberstein <silberst@google.com> SoftApManager: move config argument to constructor

This CL moves the softap configuration argument from the start command
to the constructor. This allows a generic start() method to be used
instead of sending the config with the CMD_START message. Additionally,
the default config will be used if a config is not provided. An error
will be triggered if the default config is not loaded properly.

Existing unit tests were updated to reflect the changes above and
additional tests were added to cover a failure loading the default
config. The tests were also modified to check the SSID name from the
config when start is called. This allows the test to distinguish the
default from provided configs in the constructor.

Bug: 31631674
Test: manual testing and runtests.sh
Change-Id: I3be2ee36eb8119647fc42623785e1bbd4c7ad9b1
ndroid/server/wifi/SoftApManager.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
990818e78ab62c0ae0ec5b0b24803aed664feaeb 02-Sep-2016 Rebecca Silberstein <silberst@google.com> WifiInjector: add WifiApConfigStore to injector

Move creation of the WifiApConfigStore to WifiInjector instead of
creating the WifiApConfigStore in WifiStateMachine.

Bug: 31267375
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually started tethering with and without a sim
Test: started tethering, changed ap config and softap restarted
Change-Id: I801d1861fdf003a9db1068c1f52a430decb24c94
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
4244d52b20ac90b3f0881e490aa5867526d725bd 24-Oct-2016 Roshan Pius <rpius@google.com> WSM: Don't trigger unnecessary reconnection am: ca30314375 am: d15bec5d6e am: cb0f0f5962
am: 624fa5d8c8

Change-Id: I2e1bef53ad76537091615ef60913adab231a4be7
d15bec5d6e3ec6babcc7f677e945dc41d0dc3487 24-Oct-2016 Roshan Pius <rpius@google.com> WSM: Don't trigger unnecessary reconnection
am: ca30314375

Change-Id: I4a79a04a776644936d29eb5b5b5f79e38475e61f
ca30314375993a3d4c1fbf3d1fb7ee7c5b644f9e 24-Oct-2016 Roshan Pius <rpius@google.com> WSM: Don't trigger unnecessary reconnection

If the device is already connecting/connected to the user selected
network, don't trigger an unnecessary reconnect.

Bug: 31552082
Test: Unit tets
Test: Manually testing on device.
Change-Id: I59062ba981d837f8b94dde1906fc3f876bbfb9af
ndroid/server/wifi/WifiStateMachine.java
862ef3b0f4433dee7fbcd78aa34d0c71bb2d4c2c 21-Oct-2016 Sohani Rao <sohanirao@google.com> Merge "Revert "Wifi Permissions Utility to check scan permissions""
86c849795d49fd407f6b68443c246550a0efd62c 21-Oct-2016 Sohani Rao <sohanirao@google.com> Revert "Wifi Permissions Utility to check scan permissions"

This reverts commit 5bb7281f66dd79fb8c818f3b5594a69a339cb299.

Change-Id: I584141157a3c531b9ae7f2a737468060462f8972
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiSettingsStore.java
ndroid/server/wifi/util/WifiPermissionsUtil.java
ndroid/server/wifi/util/WifiPermissionsWrapper.java
ef64f56d8c4d242a01ad4b6c3d5319cbb57872a2 20-Oct-2016 Sohani Rao <sohanirao@google.com> Wifi Permissions Utility to check scan permissions
am: 92f4d52b14

Change-Id: Ide9ebe636b68dc9777b3ca3f1a1cfe4ef743f5f8
92f4d52b14d8847f6f81712bf3bbfa0f1203eef5 01-Sep-2016 Sohani Rao <sohanirao@google.com> Wifi Permissions Utility to check scan permissions

Abstracted permissions check for returning scan results into a
central module - WifiPermissionsUtil
- provides a method that validates the calling uid's permissions
to access scan results
- fix permission bug by ensuring the calling uid is used instead
of uid of the system server
- ensures backward compatilibity for legacy apps and enforces
location permissions on apps of a certian version or later
Added a class WifiPermissionsWrapper to wrap static methods and
dependencies to enable testing

Bug: 30761439
Test: Unit tests, Added unit tests, Tested manually
Merged-In: Ic212821830a67a3799bd99ae9cd09fcaeae1d0e1

Change-Id: Ic212821830a67a3799bd99ae9cd09fcaeae1d0e1
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiSettingsStore.java
ndroid/server/wifi/util/WifiPermissionsUtil.java
ndroid/server/wifi/util/WifiPermissionsWrapper.java
ad65970ae7990451ddf08949a92b0d07ffe0c332 19-Oct-2016 Sohani Rao <sohanirao@google.com> Merge "Wifi Permissions Utility to check scan permissions"
5bb7281f66dd79fb8c818f3b5594a69a339cb299 01-Sep-2016 Sohani Rao <sohanirao@google.com> Wifi Permissions Utility to check scan permissions

Abstracted permissions check for returning scan results into a
central module - WifiPermissionsUtil
- provides a method that validates the calling uid's permissions
to access scan results
- fix permission bug by ensuring the calling uid is used instead
of uid of the system server
- ensures backward compatilibity for legacy apps and enforces
location permissions on apps of a certian version or later
Added a class WifiPermissionsWrapper to wrap static methods and
dependencies to enable testing

Bug: 30761439
Test: Unit tests, Added unit tests, Tested manually

Change-Id: Ic212821830a67a3799bd99ae9cd09fcaeae1d0e1
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiSettingsStore.java
ndroid/server/wifi/util/WifiPermissionsUtil.java
ndroid/server/wifi/util/WifiPermissionsWrapper.java
6ce84f660485a8856f2ac69fdac8899c66dcaf3b 19-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "OMAParser: throw IOException when parsing a null XML string"
0452821638ba0af9b324e3c92e376f72ef6f9c82 17-Oct-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Ignore invalid network id in user selected network am: 73e2ea97e4 am: 4cfd9576b6
am: f66a68339d

Change-Id: I750d356ff70283b8371cbeeef22e4eb443659e64
710bf9bfc14a15ae0aeae93dd6938add7c7ab8eb 17-Oct-2016 Roshan Pius <rpius@google.com> NetworkSelector: Remove redundant network lookup am: c301f93e03 am: 2d62e700a5
am: b44f861196

Change-Id: I654f9ff65cc53b8aff4946a424c37635d0038660
4cfd9576b658963eea5a36234b2bf9b66296916f 17-Oct-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Ignore invalid network id in user selected network
am: 73e2ea97e4

Change-Id: I5f78dbc0af36df67d3efff6942ca4f4a0a476f5e
2d62e700a5fc188699e1133932308e2ef6757aec 17-Oct-2016 Roshan Pius <rpius@google.com> NetworkSelector: Remove redundant network lookup
am: c301f93e03

Change-Id: I27e511c7e13d6546859671afbd67e0dd1e88a9c7
d93a164b8459a8577fa535a18f1c783b5c1c01c6 17-Oct-2016 Roshan Pius <rpius@google.com> Merge changes I9e6e06a5,I13d96a04

* changes:
WifiConfigManager: Ignore invalid network id in user selected network
NetworkSelector: Remove redundant network lookup
73e2ea97e43c7d56568a3acea4197b59e9f9c5a6 17-Oct-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Ignore invalid network id in user selected network

Look up the user selected network configuration only if the
|mLastSelectedNetworkID| != INVALID_NETWORK_ID.

While there,
Don't perform map lookup for network ID == -1.

Bug: 32156160
Test: Unit test
Change-Id: I9e6e06a57a01dc0ad6774680e2ec025b8e9d8ec5
ndroid/server/wifi/WifiConfigManager.java
c301f93e031e6a2c470524f98045fad771545a7e 17-Oct-2016 Roshan Pius <rpius@google.com> NetworkSelector: Remove redundant network lookup

There is no need to lookup the WifiConfiguration corresponding to the
last selected network since we're anyway only comparing the network
ID's.
This spews unnecessary error logs when there is no user selected network
set.

While there,
Change the scan result lookup log log from local log to verbose log to
prevent filling up the local log with these entries.

Bug: 32156160
Test: Compiles
Change-Id: I13d96a045e150485060b184e241418822d6dd9b7
ndroid/server/wifi/SavedNetworkEvaluator.java
ndroid/server/wifi/WifiConfigManager.java
519056861a467ae64e142ff07d53891514ef9c70 20-Sep-2016 Peter Qiu <zqiu@google.com> OMAParser: throw IOException when parsing a null XML string

This avoids a NullPointerException when parsing a null XML string.
OMAParser.parse is only used by PasspointManagementObjectManager for
adding/building/modifying a HomeSP from a XML string.

It is fine to use IOException since it is already being handled
gracefully by its upstream callers.

Bug: 31497435
Test: unit tests
Test: Verify system server crashes when executing the command below without the fix
and doesn't crash with the fix:
"adb shell service call wifi 8 i32 0"

Change-Id: If2ad13b8573d49ba0ccbea2427f3c63d841f866d
ndroid/server/wifi/hotspot2/omadm/OMAParser.java
13b546495d3e54ae8a7e025cbe850e1103f01856 17-Oct-2016 Christopher Wiley <wiley@google.com> Merge "SoftApManager should listen for interface up/down" am: 7f4785d575 am: faaf6ba27c
am: 62b1804762

Change-Id: I8b7d5c2449f6b9c84799a2cb3db5ceb4aa178f8e
6a50a7af090c3701cec32e19a0d8c65e13df5b8d 17-Oct-2016 Christopher Wiley <wiley@google.com> Merge "Rely on wificond to set interfaces down" am: 3bb3065f91 am: 1e64816dea
am: ed6b845c43

Change-Id: I3d22365da1d0df77ce00aa8a03327b3596039e9f
faaf6ba27cf55bf6429b635380ce0ffea8128ace 17-Oct-2016 Christopher Wiley <wiley@google.com> Merge "SoftApManager should listen for interface up/down"
am: 7f4785d575

Change-Id: Id08cbc87e9c0a411c8cd9725b7f5c4c580195347
1e64816dea99f65446c5148b63159ea9bf81d5ad 17-Oct-2016 Christopher Wiley <wiley@google.com> Merge "Rely on wificond to set interfaces down"
am: 3bb3065f91

Change-Id: Ifaceb9f611496e06f0e469fbb74b75763159136a
7f4785d57547501b73d3a742443b22d54a9702f0 17-Oct-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "SoftApManager should listen for interface up/down"
3bb3065f91930979881372e7cab4d00f4c050bf9 17-Oct-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Rely on wificond to set interfaces down"
df4d257041212ad0ff0c874e3bdb152ab5774740 17-Oct-2016 Randy Pan <zpan@google.com> Check on whether an ephemeral network is deleted am: 5025be991a am: 09162d177f
am: 905391c173

Change-Id: Ic5f1d6f1389b7ea56187803b831293bad5cf9d78
09162d177fefa99bd9331286c1f3b8e1bae1d0fa 17-Oct-2016 Randy Pan <zpan@google.com> Check on whether an ephemeral network is deleted
am: 5025be991a

Change-Id: I7ed03365435c2b67063afa88d16d168e20b580d0
5025be991a665c43c884d12f2c3abe459fba1ae9 15-Oct-2016 Randy Pan <zpan@google.com> Check on whether an ephemeral network is deleted

Add quotes to ScanResult.SSID before passing it to
WifiConfigManager#waswasEphemeralNetworkDeleted.

While there, improved the java doc of
WifiConfigManager#waswasEphemeralNetworkDeleted to make it clear
that SSID surrounded by quotes is expected.

Bug: 32021656
Test: Ephemeral network added by WiFi Assistant can be forgotten
Change-Id: I404109c2cd949032ecae0bf6b2f8c998fa656364
ndroid/server/wifi/ExternalScoreEvaluator.java
ndroid/server/wifi/WifiConfigManager.java
38e0acc794d3d036089b96d63759b1a2fc05c101 14-Oct-2016 Paul Stewart <pstew@google.com> SupplicantStateTracker: Add Scan State to ConnectionActiveState am: 3a07ab2662 am: 421cf8303a
am: f53c2ee7f8

Change-Id: I9e6d2fe01953194ee703b3804f6c21aec170b2ce
421cf8303adb304514fb23bf986e73569211f2fa 14-Oct-2016 Paul Stewart <pstew@google.com> SupplicantStateTracker: Add Scan State to ConnectionActiveState
am: 3a07ab2662

Change-Id: I9400fc1ab1d8f016a82e6941094ecfb0177900c0
3a07ab26624e317adfa27828f675d21183c3571d 28-Sep-2016 Paul Stewart <pstew@google.com> SupplicantStateTracker: Add Scan State to ConnectionActiveState

Notify callers of Wi-Fi being disabled if ths happens during scanning.

Bug: 31592441
Change-Id: I89b0d2ab5a8ad0548914353af3d7cca2cfc3aad8
Test: Added CL:278088, and "adb shell dumpsys wifi reset" while scanning
ndroid/server/wifi/SupplicantStateTracker.java
dd7d0468fa2d3babaf0d9db37f348fb766881a14 13-Oct-2016 Peter Qiu <zqiu@google.com> Do not send ANQP queries when no Hotspot 2.0 provider is configured
am: affb7a1ef3

Change-Id: Ibdf4670d0789f5c60a88d71c2f987f62d0566cba
fe3e7f39c4acf1517b31d6ff7123d075c1e6de25 27-Sep-2016 Christopher Wiley <wiley@google.com> SoftApManager should listen for interface up/down

Defer reporting AP bring up as complete until we see the interface
going up. Since wificond takes down the interface at each tear
down, the interface should always be initially down, so we should
always see this event.

Bug: 31337216
Test: unittests pass

Change-Id: If5d5e3908887df33f7da9a61af1bd648d8b8cc5a
ndroid/server/wifi/SoftApManager.java
ndroid/server/wifi/WifiInjector.java
f47472e802bee892d111a9b2af689c11c9af0196 01-Oct-2016 Christopher Wiley <wiley@google.com> Rely on wificond to set interfaces down

Also update the comments to indicate that exiting SoftAp
mode will leave the IP address of the AP configured on an interface.

Bug: 31337216
Test: unittests pass
Change-Id: Ib4dc601d73dae3149ac56575ab9a5639296cd491
ndroid/server/wifi/WifiStateMachine.java
5f6250083ef98c8008ee852c400b12304aafa699 11-Oct-2016 Randy Pan <zpan@google.com> ExternalScoreEvaluator: factor in active network am: 0b9b32c53a am: 818ebf5894 am: 67075d5538
am: c6bb020ed7

Change-Id: I913930c60f31de67c3541a2ae15aa1df98994854
affb7a1ef39dba5ec6febdf7fafc76cc52db9aca 11-Oct-2016 Peter Qiu <zqiu@google.com> Do not send ANQP queries when no Hotspot 2.0 provider is configured

Sending ANQP queries without Hotspot 2.0 provider is only needed
for supporting Hotspot 2.0 Release 2. Since the Release 2 app
(OSU) is not ready in NYC, remove the sending of ANQP queries in
this situation to avoid unnecessary power consumptions.

Bug: 31989358
Test: run frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manual - verify no ANQP queries being sent with no Hotspot 2.0
provider configured
Test: manual - install a Boingo Hotspot 2.0 configuration, verify
device will automaically connect to a Boingo AP

Change-Id: Id0bcec28c36169079fbf0e96e0429fe6cef94f03
ndroid/server/wifi/WifiConfigManager.java
c6bb020ed7716acea6d143caef04ff082c4005ec 11-Oct-2016 Randy Pan <zpan@google.com> ExternalScoreEvaluator: factor in active network am: 0b9b32c53a am: 818ebf5894
am: 67075d5538

Change-Id: I3bb9a70a537cd9c564c9e7b253a72a18ae146e08
818ebf58946a7235aa5d54e9afce9e9d22b945e3 10-Oct-2016 Randy Pan <zpan@google.com> ExternalScoreEvaluator: factor in active network
am: 0b9b32c53a

Change-Id: I9cdaad1221048b6494ffef562d80eb8b68068b24
0b9b32c53a83dea56417bda7bc9ddc1dc1e4222e 05-Oct-2016 Randy Pan <zpan@google.com> ExternalScoreEvaluator: factor in active network

When obtaining the score for an externally scored network, indicate
whether the network is the currently connected one, which is
favored by the external scorer. This helps avoid unnecessary
roaming caused by RSSI fluctuation.

Bug: 31928897
Test: Wifi framework unit tests
Change-Id: I4a0657de58f4dab3fc5e004082dcf5d7c4a02e31
ndroid/server/wifi/ExternalScoreEvaluator.java
6a5e90ea3e9054ad67f74483215d37cd6d712675 15-Aug-2016 Sohani Rao <sohanirao@google.com> Define and track Wifi scores to report Wifi metrics

Add a proto definition to track counts corresponding to wifi scores
Scores are calculated in WifiScoreReport and metrics are updated in
calculateAndReportScore. Wifi scores are limited in a range [0, 60]
where the max score is the base score assigned by Network Agent.
To ensure the size of the map is limited, any scores out of this
range will be dropped. Updated test framework to validate score
tracking and check out of bound values are dropped. The unit tests
also ensure the base score is within reasonable limits.
BUG=29418013

TEST=Wifi Unit tests, Walk tests and log scores via dumpsys

(cherry picked from commit 24b18e8d3e9ec4c5a1ac9d4c6968663ef65bc453)

Change-Id: I574d6b26ac5a558bb1eb071a9b6604335872de07
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiScoreReport.java
ndroid/server/wifi/WifiStateMachine.java
4ebe061b49a61501987c42f19451d108a32ef6db 06-Oct-2016 Glen Kuhne <kuh@google.com> Merge "WiFi Metrics: Add RSSI delta metric (poll v scan)"
407b67dabe82aa6aa2b7ea56d4b2708af8cd31de 06-Oct-2016 Randy Pan <zpan@google.com> Move WifiNetworkSelector to WifiInjector am: 2dfadf313b
am: c168540bd2

Change-Id: I084ad68ef855de68a614fef435faa1b9894bb9e1
2dfadf313b3e5194d56d2fa24b9270086cda165a 03-Oct-2016 Randy Pan <zpan@google.com> Move WifiNetworkSelector to WifiInjector

While there, move WifiInfo to be an input parameter of
WifiNetworkSelector#selectNetwork and make WifiInfo the
sole source for obtaining information of the currently
connected network.

Bug: 31383992
Test: Wifi framework unit tests
Change-Id: I107ba600165b008079cebf230865f8b2082740a8
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNetworkSelector.java
ndroid/server/wifi/WifiStateMachine.java
c99f344e111308961090154f0705b16c7695b2a3 06-Oct-2016 Glen Kuhne <kuh@google.com> WiFi Metrics: Add RSSI delta metric (poll v scan)
am: 5cab82f2e7

Change-Id: I27eee0a732b02abee35226e512da761f8e6d7156
e08a4eb91d8fdc9da6de3e490fa2bd12273f8486 06-Oct-2016 Glen Kuhne <kuh@google.com> Merge "WiFi Metrics: Add RSSI delta metric (poll v scan)" into nyc-mr1-dev-plus-aosp
2e4c946e15dff5a207816ea21c0c3e8d5de01f08 06-Oct-2016 Randy Pan <zpan@google.com> Merge changes from topic 'WifiNetworkSelector' into stage-aosp-master

* changes:
Unit tests for ExternalScoreEvaluator
Unit tests for SavedNetworkEvaluator
WifiNetworkSelector unit tests.
WCM: unit tests
Wifi Network Selector
e2b3915ca8abad6914c081eec05c41fdb60dbf09 06-Oct-2016 Etan Cohen <etancohen@google.com> [NAN] Expose NAN characteristics as an API am: 002ae45918 am: 387fb1854f am: 8e9270f11f
am: 407eeab2b7

Change-Id: Ic450f706cbbad2449d127899067459374f75d7f4
407eeab2b7ff2f06b970e36537965facf5bd98d3 06-Oct-2016 Etan Cohen <etancohen@google.com> [NAN] Expose NAN characteristics as an API am: 002ae45918 am: 387fb1854f
am: 8e9270f11f

Change-Id: Ia4c2c889b918114ce33d9bf2a8c86faec5eabcda
387fb1854fb66e878ac655939e767c336e0c380d 06-Oct-2016 Etan Cohen <etancohen@google.com> [NAN] Expose NAN characteristics as an API
am: 002ae45918

Change-Id: I56f53ec55f226bb21f5dce8d0e3638a1dfb780bd
002ae45918d75c5d42c2f1ba90a99b5848f5d75e 04-Oct-2016 Etan Cohen <etancohen@google.com> [NAN] Expose NAN characteristics as an API

Service API to provide NAN characteristics (capabilities).

(cherry-pick of commit ad58e1b0145c799f0d2fd4b620ddc45a224eba4a)

Bug: 31912101
Test: build and validate API updates
Change-Id: I0a1e628828e4b8d969bf10e29e83396ecf4ecf27
ndroid/server/wifi/nan/WifiNanServiceImpl.java
cd9d8d43a11810ec6f0808b7138d0f4a9031e39b 06-Oct-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Add COARSE_LOCATION permission check to NAN discovery" am: 12d0a0a894 am: 823d24ece8 am: dc3409e392
am: 38c12da9b4

Change-Id: I2a9dbabfd158b59e0773082f65c88afa96d020a2
38c12da9b41d65213e12b08d5764f653867d19b1 06-Oct-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Add COARSE_LOCATION permission check to NAN discovery" am: 12d0a0a894 am: 823d24ece8
am: dc3409e392

Change-Id: I390b91ab9657693ab1e353cc436940f95ff6d907
823d24ece8301ab9552909a59608c7647eeb98ca 06-Oct-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Add COARSE_LOCATION permission check to NAN discovery"
am: 12d0a0a894

Change-Id: Ie6b5276e489ccec397cc40fbb1266f2010187619
12d0a0a894c13c043fda7511392cea569fcd60f9 06-Oct-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Add COARSE_LOCATION permission check to NAN discovery"
60cf847709fd2c853882a804c7d2e8206cc90371 21-Sep-2016 Glen Kuhne <kuh@google.com> WiFi Metrics: Add RSSI delta metric (poll v scan)

Created a new metric that logs the difference in RSSI values between a
ScanResult and the first RSSI poll received after attempting to connect
to the AP in that ScanResult.

RSSI poll must come within 3 seconds of framework's connections attempt,
and is not counted if the connection attempt fails.
The value logged is:
delta = poll.rssi - scanResult.rssi

While I was here: Updated wifi.proto to match downstream placeholder
metrics.

Test: Added unit tests
Bug: 31239324
Merged-In: Ice3768df3e8b5c05ff74e7d75e205748403430dc
Change-Id: Ice3768df3e8b5c05ff74e7d75e205748403430dc
ndroid/server/wifi/WifiMetrics.java
5cab82f2e70c360de79e6ca50da25c7657ed345d 21-Sep-2016 Glen Kuhne <kuh@google.com> WiFi Metrics: Add RSSI delta metric (poll v scan)

Created a new metric that logs the difference in RSSI values between a
ScanResult and the first RSSI poll received after attempting to connect
to the AP in that ScanResult.

RSSI poll must come within 3 seconds of framework's connections attempt,
and is not counted if the connection attempt fails.
The value logged is:
delta = poll.rssi - scanResult.rssi

While I was here: Updated wifi.proto to match downstream placeholder
metrics.

Test: Added unit tests
Bug: 31239324
Change-Id: Ice3768df3e8b5c05ff74e7d75e205748403430dc
ndroid/server/wifi/WifiMetrics.java
b68b891ef2d3cb516fe70a3e016eaf99b2e3baf5 06-Oct-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Use NAN capability information to validate configurations" am: 8acd9c88b0 am: ed67732404 am: 3e4395fe4c
am: cd9718e4be

Change-Id: Iba3a209c88adfa05dd2c67cf1e2f2f53b0734b66
eb56ed8c101a6fccff73e66b4a8b79a6ef185d21 04-Oct-2016 Etan Cohen <etancohen@google.com> [NAN] Add COARSE_LOCATION permission check to NAN discovery

NAN discovery can expose location based on service signatures.

(cherry-pick of commit fa4fadc0522006c1503a9503ced38564d7ac2940)

Bug: 31907534
Test: unit test + integrated (sl4a) testing
Change-Id: Ic2aa0531f05c58b664c04f2ca96d06f6347777e8
ndroid/server/wifi/nan/WifiNanServiceImpl.java
b2213b373794719cb1377c3b68e58578fbd610da 03-Sep-2016 Randy Pan <zpan@google.com> Wifi Network Selector

Set up the layout of the new Wifi Network Selector. Add the implementation
of Save Network Evaluator and Exernally Scored Network Evaluator.

Bug: 31089538
Test: unit tests and manual tests
Change-Id: Ieb269060669df220c3d1777eb3aac3b119d4fdc1
ndroid/server/wifi/ExternalScoreEvaluator.java
ndroid/server/wifi/SavedNetworkEvaluator.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiNetworkSelector.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
ndroid/server/wifi/WifiStateMachine.java
2911c010f39f8925907df2a50c61a2542b601d5a 05-Oct-2016 Glen Kuhne <kuh@google.com> Merge "Wifi Metrics: dumpsys arg for clean output"
am: a96abb03c7

Change-Id: I512c12480686e45a09425d795f7659735e9f4663
a96abb03c7e31ffae1e19faa24b12e55d270fa03 05-Oct-2016 Glen Kuhne <kuh@google.com> Merge "Wifi Metrics: dumpsys arg for clean output"
cd9718e4bebe7a375ee53e491a249c8f854e3d6b 05-Oct-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Use NAN capability information to validate configurations" am: 8acd9c88b0 am: ed67732404
am: 3e4395fe4c

Change-Id: I1b72c87c70e9bc74d5f72e8a0146fbf3ddb8c0be
ed67732404cca8272a09d78f046871176483fbed 05-Oct-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Use NAN capability information to validate configurations"
am: 8acd9c88b0

Change-Id: Ife22029d1c035efa7da95c9b79111ee9bba82e66
8acd9c88b0e2e408e685eac3964135f40a783756 05-Oct-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Use NAN capability information to validate configurations"
4c172f57fbad84033ef1ef0638f360d33ec7ccf5 03-Oct-2016 Etan Cohen <etancohen@google.com> [NAN] Use NAN capability information to validate configurations

Validate publish and subscribe configurations and message length using
the NAN configuration retrieved from the firmware.

(cherry-pick of commit b7383caf0cabd676ca3994d401a5ab7227d1a97c)

Bug: 31912101
Test: unit tests
Change-Id: I864876c91bf7157fff0c73d5095e78e9b2a6e3c8
ndroid/server/wifi/nan/WifiNanDataPathStateManager.java
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanStateManager.java
da247f42ad1ee4071e15f0115ef57e73e1143ef1 17-Sep-2016 Glen Kuhne <kuh@google.com> Wifi Metrics: dumpsys arg for clean output

Modify the way dumpsys works in wifi so that
'dumpsys wifi wifiMetricsProto clean'
outputs only serialized base64 encoded wifi metrics proto bytes.

Bug: 31556602
Test: Created new unit test

Change-Id: I7aa5e8b944c155a10ebebd913359818fcd82d14e
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiStateMachine.java
13ce6f9eda34d9ee88e5430c92932e1ac12705cb 03-Oct-2016 Randy Pan <zpan@google.com> Move WifiNetworkSelector to WifiInjector

While there, move WifiInfo to be an input parameter of
WifiNetworkSelector#selectNetwork and make WifiInfo the
sole source for obtaining information of the currently
connected network.

Bug: 31383992
Test: Wifi framework unit tests
Change-Id: I107ba600165b008079cebf230865f8b2082740a8
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNetworkSelector.java
ndroid/server/wifi/WifiStateMachine.java
6c90568a19e32a1825e06a608e59d3f36daff9ca 03-Oct-2016 Randy Pan <zpan@google.com> Move WifiNetworkSelector to WifiInjector

While there, move WifiInfo to be an input parameter of
WifiNetworkSelector#selectNetwork and make WifiInfo the
sole source for obtaining information of the currently
connected network.

Bug: 31383992
Test: Wifi framework unit tests
Change-Id: I107ba600165b008079cebf230865f8b2082740a8
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNetworkSelector.java
ndroid/server/wifi/WifiStateMachine.java
69579a1c9289e53294ef870ac3727a0f09619793 03-Oct-2016 Ningyuan Wang <nywang@google.com> Merge "Remove unused getFreqCapability()" am: f5d99b0d79 am: 93de9618a6 am: 557ce50c45
am: 59062f8fb0

Change-Id: Iefe80b662e7276df15ea2d0cc7f7933e65dcdc76
59062f8fb08c9a5587e0155e01df1b9dda24f840 03-Oct-2016 Ningyuan Wang <nywang@google.com> Merge "Remove unused getFreqCapability()" am: f5d99b0d79 am: 93de9618a6
am: 557ce50c45

Change-Id: I80bcd66cf6eacdb525c8eee3831488c37d2f3c99
93de9618a65c2e28573539d039718499d48e0d3d 03-Oct-2016 Ningyuan Wang <nywang@google.com> Merge "Remove unused getFreqCapability()"
am: f5d99b0d79

Change-Id: If2fd13ffe22e7052c802cf9fb63c14cbe9049ebd
f5d99b0d7990488da938ea69be821c48f4bfa9b7 03-Oct-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Remove unused getFreqCapability()"
b367278a44c79f8b8cfd803f657281f89426e97c 01-Oct-2016 Ningyuan Wang <nywang@google.com> Merge "Add wificond to RttService" am: f13fd2d666 am: 9c3856b850 am: 3f9aacb676
am: 55d10ee9ca

Change-Id: I9afdcd66a2e7ca7e92d1cda715442e5bfb95bc52
45e55df6919568a13af1d0d7cbbe08b1b90944ae 01-Oct-2016 Randy Pan <zpan@google.com> Remove the obsoleted ScanResult.isAutoJoinCandidate am: e04f61522a am: 9040b4e0ed am: cc46e98ac3
am: 104cc05ef2

Change-Id: I364c98942d21842611a7a64437c16d1acc60aab2
2346407ae1d03ea85082792d30bee1e667a678fe 01-Oct-2016 Ningyuan Wang <nywang@google.com> Remove unused getFreqCapability()

Bug: 31864245
Test: compile
Change-Id: I6d91e6c67ea1b59390ed9f8d285ac834a95b8f5a
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
55d10ee9ca5d7a498e91c69a14836899257e5cd9 30-Sep-2016 Ningyuan Wang <nywang@google.com> Merge "Add wificond to RttService" am: f13fd2d666 am: 9c3856b850
am: 3f9aacb676

Change-Id: I504a1638df49b9cb843a383ac7dfab20d2f92d2e
9c3856b8502a986ed411ef4f3d7471e6fdf840c4 30-Sep-2016 Ningyuan Wang <nywang@google.com> Merge "Add wificond to RttService"
am: f13fd2d666

Change-Id: Ic9711ac4e12806c046d093097dfee0c52a479332
f13fd2d6660d50e60c41a3e4eada4a21a6298851 30-Sep-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Add wificond to RttService"
104cc05ef2d077eff61681d02f7e1e328a920324 30-Sep-2016 Randy Pan <zpan@google.com> Remove the obsoleted ScanResult.isAutoJoinCandidate am: e04f61522a am: 9040b4e0ed
am: cc46e98ac3

Change-Id: I1efd07d59461a51a9a699ed9f157fcf1961c625f
9040b4e0ed38be2ea528fbb056a621c6ca8497ee 30-Sep-2016 Randy Pan <zpan@google.com> Remove the obsoleted ScanResult.isAutoJoinCandidate
am: e04f61522a

Change-Id: I50c0119b6b059998d69d38310d7aaa41496c2bc8
435236f48f94a8373fa71251a3223e642f446e77 22-Sep-2016 Ningyuan Wang <nywang@google.com> Add wificond to RttService

Wificond is a new wifi daemon handling the communicaton between
java framework and lower level implementation, such as HAL,
wpa_supplicant, and NL80211.

This adds wificond binder objects to RttService, allowing all the
rtt request to go through wificond instead of WifiNative in the future.

Bug: 30633278
Test: compile, manual tests, unit tests

Change-Id: Ic8b910f24d1a269579d79efcf7a4bd0a11be70a7
ndroid/server/wifi/RttService.java
e04f61522a496efcb6ab5b106253a0496fc1ef1f 29-Sep-2016 Randy Pan <zpan@google.com> Remove the obsoleted ScanResult.isAutoJoinCandidate

Bug: 31565767
Test: unit tests
Change-Id: I6f6dea5ef8ed7bf3b84fbff9da372e6ee47eba1e
ndroid/server/wifi/WifiConfigManager.java
75381beb160f85e127f9baf929aac7226b5d1754 29-Sep-2016 Randy Pan <zpan@google.com> WSM: Fix roaming log message

Fix the log message which prints out the roaming target network
BSSID.

Bug: 31317756
Test: unit tests
Merged-In: I4a7d2dbacbbaa73d4141be306e58369eba16fbba
Change-Id: I4a7d2dbacbbaa73d4141be306e58369eba16fbba
ndroid/server/wifi/WifiStateMachine.java
7c9cbb1586264b416bc1321902cdf908a56f859c 28-Sep-2016 Paul Stewart <pstew@google.com> SupplicantStateTracker: Notify callers on Supplicant reset am: 81cc7a93e0 am: fdc203f0ec am: 2adfd8c2b5
am: 5fa652820a

Change-Id: I432c0b8c16b181c2ff6e7359257963589a17cd06
5fa652820a03c7ad78d65cf2580a693d921770e1 28-Sep-2016 Paul Stewart <pstew@google.com> SupplicantStateTracker: Notify callers on Supplicant reset am: 81cc7a93e0 am: fdc203f0ec
am: 2adfd8c2b5

Change-Id: I85aecd8a3499e04064c1320ebd5bb269c16c375c
fdc203f0ece0bcfbd241d42fef154a2e8270ef60 28-Sep-2016 Paul Stewart <pstew@google.com> SupplicantStateTracker: Notify callers on Supplicant reset
am: 81cc7a93e0

Change-Id: I3495b501cde90adda8731a78e24415b31a1ea858
81cc7a93e0f248f69e1d14487c0ea52aef789c15 22-Sep-2016 Paul Stewart <pstew@google.com> SupplicantStateTracker: Notify callers on Supplicant reset

If the supplicant is reset during any connection establishment
state, notify callers that we've exited an active state. This
will make WiFi activity tracking more accurate.

Bug: 31592441
Test: Added CL:278088, and "adb shell dumpsys wifi reset" while connected
Change-Id: I3f26b33225f69643eb7bd2711c51a27cb7f1dc7f
ndroid/server/wifi/SupplicantStateTracker.java
cf69e50f5344898a0a89f838f63322a2df01bf5d 21-Sep-2016 Randy Pan <zpan@google.com> WCM: forced connectivity scan

WCM starts a full band single scan when user forces a connectivity
scan and wait for the full band scan results to make network
selection.

Bug: 30897947
Test: unit tests and manual test
Merged-In: Ie220c25dd60a0534afbf33f62691f32515f7062b
Change-Id: Ie220c25dd60a0534afbf33f62691f32515f7062b
ndroid/server/wifi/WifiConnectivityManager.java
076069cd8e4be00c353b48c8b9f1b61b2fe076d7 27-Sep-2016 Randy Pan <zpan@google.com> Wifi Network Selector
am: c6370683f6

Change-Id: If25a536198f9167664d55e044a01f12a2cf9bc30
f2a46f11dd92f2820e96b1b8b69b433012d6bcef 03-Sep-2016 Randy Pan <zpan@google.com> Wifi Network Selector

Set up the layout of the new Wifi Network Selector. Add the implementation
of Save Network Evaluator and Exernally Scored Network Evaluator.

Bug: 31089538
Test: unit tests and manual tests
Merged-In: Ieb269060669df220c3d1777eb3aac3b119d4fdc1
Change-Id: Ieb269060669df220c3d1777eb3aac3b119d4fdc1
ndroid/server/wifi/ExternalScoreEvaluator.java
ndroid/server/wifi/SavedNetworkEvaluator.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiNetworkSelector.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
ndroid/server/wifi/WifiStateMachine.java
c6370683f6f500cd69fe1b6de1a08aa941365e59 03-Sep-2016 Randy Pan <zpan@google.com> Wifi Network Selector

Set up the layout of the new Wifi Network Selector. Add the implementation
of Save Network Evaluator and Exernally Scored Network Evaluator.

Bug: 31089538
Test: unit tests and manual tests
Change-Id: Ieb269060669df220c3d1777eb3aac3b119d4fdc1
ndroid/server/wifi/ExternalScoreEvaluator.java
ndroid/server/wifi/SavedNetworkEvaluator.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiNetworkSelector.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
ndroid/server/wifi/WifiStateMachine.java
99328360c248e9233fbf81b648545cd5294f78aa 26-Sep-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Change Broadcast for NAN status change to notification only" am: 85b7d80902 am: d2ff3e269d am: 0b3586bbae
am: 364a6e47d7

Change-Id: Ib82f4aa35fab8dab5ab2df642c761cc0d81d2292
364a6e47d717019a25b9fa612a2d7b5d423c0180 26-Sep-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Change Broadcast for NAN status change to notification only" am: 85b7d80902 am: d2ff3e269d
am: 0b3586bbae

Change-Id: I3030c717238b7683b832e9f718ec3b3902375db8
d2ff3e269d7964f3f5f0d935862e0628e5eb00f0 26-Sep-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Change Broadcast for NAN status change to notification only"
am: 85b7d80902

Change-Id: I772937e2ce7d8a3a219390eeb5e79df512086258
3c6c29b3e38a039958d80107f90c7a1711205366 26-Sep-2016 Etan Cohen <etancohen@google.com> [NAN] Remove failure reason codes from API per API review am: 4a3de13483 am: 89845c4eb2 am: e5c34c613e
am: 99a53787d0

Change-Id: Ia0e7de8af366134f9b63d8a45a6b68df9cd11b53
99a53787d0284c8560de39cdbb5014c6c42277fa 26-Sep-2016 Etan Cohen <etancohen@google.com> [NAN] Remove failure reason codes from API per API review am: 4a3de13483 am: 89845c4eb2
am: e5c34c613e

Change-Id: Icf5e135764335e925070b39d1270e87a60820e55
89845c4eb293eeb36aa54a1829a05fd0836bf0b5 26-Sep-2016 Etan Cohen <etancohen@google.com> [NAN] Remove failure reason codes from API per API review
am: 4a3de13483

Change-Id: I73ab4dcf1de2a19c0229d84c2568d4e99c8a291c
9fd1ebd50a95fdee9ef9409c39c40dda9bb09815 22-Sep-2016 Etan Cohen <etancohen@google.com> [NAN] Change Broadcast for NAN status change to notification only

Remove information about current status of NAN. Receiver will have
to query that information explicitly. New pattern (per API council
review) - helps reduce window for having old information.

(cherry-pick of commit 2704d666f07ca2e37de89c2ee8d829134d168872)

Bug: 31470256
Test: unit tests & integration (sl4a) tests.
Change-Id: I6f4d9b05f403ab520e9d45f358ffadcb30d72a32
ndroid/server/wifi/nan/WifiNanStateManager.java
4a3de13483a29b6e25fc0357a28b9cff7879d03f 21-Sep-2016 Etan Cohen <etancohen@google.com> [NAN] Remove failure reason codes from API per API review

Not all codes are actionable. Will add back if/as needed.

(cherry-pick of commit 945a03af7ce119cd0c9c999f700dddd8609f4785)

Bug: 31470256
Test: unit tests & integration (sl4a) tests.
Change-Id: I5b5cb44a205c32ed0d27a54467df89b0e1361f57
ndroid/server/wifi/nan/WifiNanDiscoverySessionState.java
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanStateManager.java
2bee9f3cc7ecae5802ed0fbc36bd870967f782b9 25-Sep-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Separate ATTACH from IDENTITY_CHANGE callbacks." am: f5e05ebd61 am: 7763f13d7b am: d768b28f01
am: d0f8408592

Change-Id: I8e96aa79bae6eaf1e1e6ccd7adb80d2a68e490b1
9ab5b8c089f34e1dd0762611c1cab1f530eb6055 24-Sep-2016 Randy Pan <zpan@google.com> resolve merge conflicts of 2b151f2 to nyc-mr1-dev-plus-aosp
am: bd69256a87

Change-Id: Icef840ba5211eb2089d36707800f8186d2549ace
d2334ed60c0b016cb1d8f7d3468f4594765383f3 24-Sep-2016 Christopher Wiley <wiley@google.com> Remove implementation of user selected WiFi bands am: 026cb51837 am: 4b867c0b86 am: 7b3423c97e
am: 37adabc792

Change-Id: I81c389801d67562f8d2bc687cfc7bce1c8756521
d0f84085920a4f7df0c9f3061d5374a88d73589f 23-Sep-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Separate ATTACH from IDENTITY_CHANGE callbacks." am: f5e05ebd61 am: 7763f13d7b
am: d768b28f01

Change-Id: I6183fe67e10456a3675ab5ae68bdf396cd772ac3
7763f13d7b24fd4de1702dfedf2698255836f510 23-Sep-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Separate ATTACH from IDENTITY_CHANGE callbacks."
am: f5e05ebd61

Change-Id: I5e6be7bf4800a4daa02a9fc207b41dd0bb617a03
f5e05ebd619e8dade24bee9e5ab6176694ef62bd 23-Sep-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Separate ATTACH from IDENTITY_CHANGE callbacks."
bd69256a872ed36c6371b882b13419150f5516d6 23-Sep-2016 Randy Pan <zpan@google.com> resolve merge conflicts of 2b151f2 to nyc-mr1-dev-plus-aosp

Change-Id: I33c1f2addd4faf6829e17d8ac1b9076bca04477f
00af5a62e82f77b31044fd06c72b7e1959d44d5a 23-Sep-2016 Rebecca Silberstein <silberst@google.com> WifiNotificationController: use WifiScanner am: 22f57da33e am: 291f8f8bf9 am: 4c4172d582
am: 19e7d15471

Change-Id: I44321424e69708a98f06f4eff7de856c946d34a8
445a6a1690349c58bf4a6741942652a95dd8efcc 23-Sep-2016 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: move scan results dump to scanner am: a049f83a30 am: 97bb7de2ed am: 0885e66bb6
am: 195dab0106

Change-Id: I73efef9aa6b6d0b9a06407d7e3f7b510da0b9eef
37adabc792b511474dd6fe98f0b6c71c1b18c67e 23-Sep-2016 Christopher Wiley <wiley@google.com> Remove implementation of user selected WiFi bands am: 026cb51837 am: 4b867c0b86
am: 7b3423c97e

Change-Id: I0d5e194abb7fba5f65c38b0c264533a0fba830c3
4b867c0b86a4b14951d1dc0de3c5ef7dcb869b3e 23-Sep-2016 Christopher Wiley <wiley@google.com> Remove implementation of user selected WiFi bands
am: 026cb51837

Change-Id: I8ce32dffbf06d19a92e09d150375c10b2704d8f1
2b151f29936ffd04cb203013ba24fea8099cc5d3 23-Sep-2016 Randy Pan <zpan@google.com> WCM: forced connectivity scan
am: 8cf5bfbee9

Change-Id: I013b1c16f6f8785def56fe2e074adec7238ee43b
7d7c671b6dea0c8f947afdf9300548b797db4483 23-Sep-2016 Randy Pan <zpan@google.com> Merge "WCM: forced connectivity scan" into nyc-mr1-dev
19e7d15471831fc55a7392ca1c6fb0b2e1e45e2c 23-Sep-2016 Rebecca Silberstein <silberst@google.com> WifiNotificationController: use WifiScanner am: 22f57da33e am: 291f8f8bf9
am: 4c4172d582

Change-Id: I02d4b4612075e44981a53a842af166f71d841e78
195dab01064ffa5274e75df1942154073f18a527 23-Sep-2016 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: move scan results dump to scanner am: a049f83a30 am: 97bb7de2ed
am: 0885e66bb6

Change-Id: Id900f73ca5319ebf2a88071805092d0b6ee09e4e
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
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
291f8f8bf99e3348eb7d21f66868cbe9e6e3081f 22-Sep-2016 Rebecca Silberstein <silberst@google.com> WifiNotificationController: use WifiScanner
am: 22f57da33e

Change-Id: Ife764786d099ca09ed67e1446ed5869d9c28378d
97bb7de2edb9e6d1fa5098739d8f51222366ed86 22-Sep-2016 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: move scan results dump to scanner
am: a049f83a30

Change-Id: Id80eb4021afcf2ba691230c970109c28720f8895
45b585a229623387a0576c12f04c53f1a63ec975 22-Sep-2016 Wei Liu <luciferleo@google.com> Merge "Merge "WifiStateMachine: Mask RTT capabilities against System Properties" am: a78a579804 am: 21b6b83067 am: 8c0d84239a am: dd25b8603d" into cw-f-dev
22f57da33e6b132a0e7e4bd6d986f74b53d19527 19-Sep-2016 Rebecca Silberstein <silberst@google.com> WifiNotificationController: use WifiScanner

Update WifiNotificiationController to use
WifiScanner.getSingleScanResults() instead of WifiStateMachine. This
involves plumbing WifiInjector to retrieve WifiScanner. Also updated
the test to mock the getSingleScanResults call instead of the
WifiStateMachine.syncGetScanResultsAsList call.

BUG: 31504903
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manual testing looking for notification and reported dump values
Change-Id: I6449e953c4fd35941096586383252e7c24c504db
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiNotificationController.java
a049f83a308e7753b68c1a5036ab67d9806807ec 15-Sep-2016 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: move scan results dump to scanner

The dump command includes the most recent scan results. This
information should be dumped directly from WifiScanningServiceImpl
instead of WifiServiceImpl.

The output was also updated to better reflect the age of the entries.
Invalid scan result timestamps are output with "___?___". Values that
are older than the allotted characters are displayed as ">1000.0".
Valid ages were not changed. The character representing
isAutoJoinCandidate was removed from the output. SSID names that are
longer than 32 characters are truncated.

BUG: 31523862
Test: manual check of bugreport output
Test: manual check of adb shell dumpsys wifi output
Test: manual check of adb shell dumpsys wifiscanner output
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I6529fa7b125a6d7d283fd7dc5f8938632ae4e93f
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
ffc764fd0c6f17688a4717dcb51cb73dc0446b8a 22-Sep-2016 Roshan Pius <rpius@google.com> Merge "WifiStateMachine: Switch to ACTION_LOCKED_BOOT_COMPLETED"
am: 8a694cf52d

Change-Id: I6ba0f4f0a990318f2266e244e8a7808934196c97
8a694cf52d152ee11dc2a40727f1ae9127514e8a 22-Sep-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "WifiStateMachine: Switch to ACTION_LOCKED_BOOT_COMPLETED"
f7237ad859aa94bbb0ed4f5cb94ee4b9bfed4045 21-Sep-2016 Etan Cohen <etancohen@google.com> [NAN] Separate ATTACH from IDENTITY_CHANGE callbacks.

Provide separate mechanism to attach with a request for identity
change listener.

(cherry-pick of commit 2023a4a9f8b3621d972c85969c609e5dc96728f1)

Bug: 31470256
Test: unit tests & integration (sl4a) tests.
Change-Id: Idf8fcb8029ce7e81596b378416a8483074ecaadc
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanStateManager.java
dc0b0445b042e3bfcdae778c585f92741337937b 22-Sep-2016 Mitchell Wills <mwills@google.com> Merge "Ignore disconnect messages that don't indicate the channel is dead"
am: 12d334fb48

Change-Id: I8c713b8967e01db086cb7f041878e059eb5a071c
12d334fb48ba34885f3da198cfa45c6f138967ef 22-Sep-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Ignore disconnect messages that don't indicate the channel is dead"
039161b238576b3eb3d9d49df371811889a42225 17-Sep-2016 Roshan Pius <rpius@google.com> WifiStateMachine: Switch to ACTION_LOCKED_BOOT_COMPLETED

Use the |ACTION_LOCKED_BOOT_COMPLETED| broadcast instead of
|ACTION_BOOT_COMPLETED| broadcast to initiate connection attempts. For
FBE enabled devices, the |ACTION_BOOT_COMPLETED| is only received after
user unlock.

Bug: 31189385
Test: Verfied on FBE enabled device
Change-Id: If7c511076aafc37760e050a116a05290780793c4
(cherry picked from commit b5cec87f420d63c6dba97f85b4229fbeb5f13e4b)
ndroid/server/wifi/WifiStateMachine.java
02565aaa3ac0bc66acbf3a8ca17905a027d11606 21-Sep-2016 Etan Cohen <etancohen@google.com> [NAN] Refactor WifiNanManager to create separate sessions per connect. am: b42d3c062d am: 7fa17a8507 am: 998275e7f8
am: f672db0622

Change-Id: Icafa4a51d8662d66fdbd5ec3550eb3710c3a0d3e
f672db0622aac42cf8ae4c63e39447b02bb1a790 21-Sep-2016 Etan Cohen <etancohen@google.com> [NAN] Refactor WifiNanManager to create separate sessions per connect. am: b42d3c062d am: 7fa17a8507
am: 998275e7f8

Change-Id: I7fd1a06da526f4d216eca52bf341c59c42e6bf5e
7fa17a850763118e477b812829a36b393081c32f 21-Sep-2016 Etan Cohen <etancohen@google.com> [NAN] Refactor WifiNanManager to create separate sessions per connect.
am: b42d3c062d

Change-Id: I20b092b8032b009eaf82c097ce48b3a28632666e
c9c91fd93350151a33d87fca768921520c256256 20-Sep-2016 Mitchell Wills <mwills@google.com> Ignore disconnect messages that don't indicate the channel is dead

Bug: 29368784
Test: mmma frameworks/opt/net/wifi/tests && runtest frameworks-wifi
Change-Id: I5ae3665898565379b101c4ac0c5570c9debb1228
(cherry picked from commit d76a14997a969ea44daa47756dcc8f83aee96935)
(also includes cherry picked from commit ca0add40bb7138b361c8a86e42aa5facc4fa5f2d)
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
092f6414addc4611623276741b13445ca8bfc974 21-Sep-2016 Mitchell Wills <mwills@google.com> Ignore disconnect messages that don't indicate the channel is dead am: d76a14997a am: 76f5ec1e8d
am: 69f463aee8

Change-Id: I7e62abf7e063ca58990aec1db44cd65491159e82
b42d3c062d8c542798f631c29275506c82e3bde3 19-Sep-2016 Etan Cohen <etancohen@google.com> [NAN] Refactor WifiNanManager to create separate sessions per connect.

Separate session enables separate namespace for functions which depend
on a connection to exist.

(cherry-pick of commit 471025fa5ecbb3eaedd22e249f16e91fecaf3494)

Bug: 31470256
Test: unit tests
Change-Id: I9d043f53adbba4044db4ffb1f7045ae78d75fb8b
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanStateManager.java
8cf5bfbee9d70dac8c83729a979bd7208a47d44d 21-Sep-2016 Randy Pan <zpan@google.com> WCM: forced connectivity scan

WCM starts a full band single scan when user forces a connectivity
scan and wait for the full band scan results to make network
selection.

Bug: 30897947
Test: unit tests and manual test
Change-Id: Ie220c25dd60a0534afbf33f62691f32515f7062b
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiStateMachine.java
69f463aee83c117e297e2380a8f6f30be0258a3e 21-Sep-2016 Mitchell Wills <mwills@google.com> Ignore disconnect messages that don't indicate the channel is dead am: d76a14997a
am: 76f5ec1e8d

Change-Id: I26cacd1ee8346d47b4f8af1581d0b99f655a95fd
479d5367092e2d1ef3c0fceff13d068371fb5d44 21-Sep-2016 Ningyuan Wang <nywang@google.com> Use wificond to do signal poll am: 857b7b568e am: 4c46acb1f2 am: 09608bab44
am: 9d76a802dc

Change-Id: I877c0881552e59c1672b848698ee837bb71f1d15
9d76a802dc2f00e05bf69512b7e4b9115468c147 21-Sep-2016 Ningyuan Wang <nywang@google.com> Use wificond to do signal poll am: 857b7b568e am: 4c46acb1f2
am: 09608bab44

Change-Id: I06b08a062110e06bf793395cfc6931599c5e7882
4c46acb1f2bd3e64d5ea06f01a5b594d000f14d5 21-Sep-2016 Ningyuan Wang <nywang@google.com> Use wificond to do signal poll
am: 857b7b568e

Change-Id: I25684d73b50c924f96366ddb8a2db1b4337dc3c0
7ccfb551c8af753da37855096e98cab7f6272cd5 21-Sep-2016 Christopher Wiley <wiley@google.com> Remove superfluous checks concerning mWifiConnectivityManager am: 4c3ec2f8d1 am: d24211a41f am: ed70ff80f5
am: a1ecfa5372

Change-Id: I3bd8b9927cb59ef54805d91ec448530639d755ef
26d98c77415e2ff58b8d560b4ef41c2f21584340 21-Sep-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Rename to make discovery explicit" am: 646b2bb6b2 am: 11fc5c7160 am: a8b101f905
am: 8303a09ca9

Change-Id: I8909e61572e2f406ee2679b033c75b993d969d61
5cc95b0c3ceae76858994ffe3b251535db05b8bc 21-Sep-2016 Glen Kuhne <kuh@google.com> Wifi Metrics: dumpsys arg for clean output am: 9ff7dea01b am: f23ded8ccf
am: 2c535417a5

Change-Id: Ic36b8942abd0eb85cf3bd05dcd87e68b55ce8d67
4ce0961ca85d50aa3a02db93fae953bcc9134a6c 21-Sep-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiService: get scan results from WifiScanner" am: 47d45048b5 am: e69c048bc2 am: 1f4e0d7e64
am: 9283b5f78f

Change-Id: I9cb49ad909d2a95b61c5b30b3a306b442e96921c
a1ecfa5372c26dc507f0903919bd7904f9dac466 21-Sep-2016 Christopher Wiley <wiley@google.com> Remove superfluous checks concerning mWifiConnectivityManager am: 4c3ec2f8d1 am: d24211a41f
am: ed70ff80f5

Change-Id: I146f605d1a8873ebea6ac9551b1a047cef0372a1
d24211a41f04a7689c42edc99665b1e78568a214 20-Sep-2016 Christopher Wiley <wiley@google.com> Remove superfluous checks concerning mWifiConnectivityManager
am: 4c3ec2f8d1

Change-Id: Id4d843fd6d5a0f322aac00d39bccf6b10a33eaa5
857b7b568e863bebcffe542390c935f0a4625eab 20-Sep-2016 Ningyuan Wang <nywang@google.com> Use wificond to do signal poll

Bug: 30978872
Change-Id: I7110800efe8cce450934cc6717db280c1bdce2c3
Test: compile, manual tests
ndroid/server/wifi/WifiStateMachine.java
4c3ec2f8d10f56776596a6ea86badbe7c8ba20ed 10-Sep-2016 Christopher Wiley <wiley@google.com> Remove superfluous checks concerning mWifiConnectivityManager

This object always exists after the first time we enter the
SupplicantStartedState. Since these checks are all in child states,
it is safe to remove them.

Bug: 31146676
Test: unit tests pass on bullhead

Change-Id: I5cf3cfa012756f66d268c9fb8081d3958e6c0e3d
ndroid/server/wifi/WifiStateMachine.java
d76a14997a969ea44daa47756dcc8f83aee96935 20-Sep-2016 Mitchell Wills <mwills@google.com> Ignore disconnect messages that don't indicate the channel is dead

Bug: 29368784
Test: mmma frameworks/opt/net/wifi/tests && runtest frameworks-wifi
Change-Id: I5ae3665898565379b101c4ac0c5570c9debb1228
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
168a9ff770b90983aaa14b9a7e21419dfb7b0917 20-Sep-2016 Paul Stewart <pstew@google.com> Merge "WifiStateMachine: Mask RTT capabilities against System Properties" am: a78a579804 am: 21b6b83067 am: 8c0d84239a
am: dd25b8603d

Change-Id: Ic0a06fdcb8536389682c0da0ac877e73a109bc1b
(cherry picked from commit 0703e1b30fbe529fe7d015802a4c9f2f56885cf9)
ndroid/server/wifi/PropertyService.java
ndroid/server/wifi/SystemPropertyService.java
ndroid/server/wifi/WifiStateMachine.java
8303a09ca9400c995cf3f82e77cbe25bda0ddd10 20-Sep-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Rename to make discovery explicit" am: 646b2bb6b2 am: 11fc5c7160
am: a8b101f905

Change-Id: I58a7aa9a3116b4912316372566310f82bda92cf1
11fc5c7160416c20e14057505d437a1ca5cda380 20-Sep-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Rename to make discovery explicit"
am: 646b2bb6b2

Change-Id: Ib4be3a7e73380109743fa6c0c78d59b763f93614
646b2bb6b2e47e721ca9e21fbb03046b34150457 20-Sep-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Rename to make discovery explicit"
2c535417a5a1b039b8ebb2492a84b08ac0c5a7db 20-Sep-2016 Glen Kuhne <kuh@google.com> Wifi Metrics: dumpsys arg for clean output am: 9ff7dea01b
am: f23ded8ccf

Change-Id: Ica8f3a5ecfcf8d112aad6e92709f4f2d1e87e5d6
f23ded8ccfb2b248dd6bfac02b296d3c53c2ffd1 20-Sep-2016 Glen Kuhne <kuh@google.com> Wifi Metrics: dumpsys arg for clean output
am: 9ff7dea01b

Change-Id: I0f70d997c1db1f13a4907e9701ad9adf55c25bd7
29efc8850355c5d4ddd316aede20039156419c8c 20-Sep-2016 Roshan Pius <rpius@google.com> WifiStateMachine: Switch to ACTION_LOCKED_BOOT_COMPLETED am: b5cec87f42 am: 8555909dae
am: 8ee22d6ebc

Change-Id: Iaf2d4c220b8a6d8081b30f81ad107fb8e0debfe1
5e816a8c6f96076f69dd8bbb0110203d92940c4e 20-Sep-2016 Glen Kuhne <kuh@google.com> Merge "Wifi Metrics: dumpsys arg for clean output" into nyc-mr1-dev
9283b5f78f7e591916e994aeb79812b3e86d15ee 20-Sep-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiService: get scan results from WifiScanner" am: 47d45048b5 am: e69c048bc2
am: 1f4e0d7e64

Change-Id: Ic88440cd83713315ed7bc586dc0894c31352144d
8ee22d6ebc1ecfbc55e6b45636c820a70437a77c 20-Sep-2016 Roshan Pius <rpius@google.com> WifiStateMachine: Switch to ACTION_LOCKED_BOOT_COMPLETED am: b5cec87f42
am: 8555909dae

Change-Id: I60171da6db3b0607199f43ad716365450a476304
e69c048bc2767d568987a9a15869c20403718c3a 20-Sep-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiService: get scan results from WifiScanner"
am: 47d45048b5

Change-Id: I2c3d0d8d43b6c5c05ca2221c04f8ee9178c25a08
8555909dae36d2e96675a8ae318b4de158adead3 20-Sep-2016 Roshan Pius <rpius@google.com> WifiStateMachine: Switch to ACTION_LOCKED_BOOT_COMPLETED
am: b5cec87f42

Change-Id: Id2ffd658456fbf8d3e374f7c3271120a57c642c3
47d45048b5309a8a31ae55761df13366a9b9995d 20-Sep-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiService: get scan results from WifiScanner"
dbba9f8bd63a53a6f2750949e2a0cc0299006e22 20-Sep-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiStateMachine: Switch to ACTION_LOCKED_BOOT_COMPLETED" into nyc-mr1-dev
0703e1b30fbe529fe7d015802a4c9f2f56885cf9 20-Sep-2016 Paul Stewart <pstew@google.com> Merge "WifiStateMachine: Mask RTT capabilities against System Properties" am: a78a579804 am: 21b6b83067 am: 8c0d84239a
am: dd25b8603d

Change-Id: Ic0a06fdcb8536389682c0da0ac877e73a109bc1b
dd25b8603da3207e6e1cc1b89045d420dd441c1a 20-Sep-2016 Paul Stewart <pstew@google.com> Merge "WifiStateMachine: Mask RTT capabilities against System Properties" am: a78a579804 am: 21b6b83067
am: 8c0d84239a

Change-Id: If669b18f07c9b31b6c8a368b3fd75c026f6304b7
21b6b83067ceb38877f9916c09bbecf47ab1207d 20-Sep-2016 Paul Stewart <pstew@google.com> Merge "WifiStateMachine: Mask RTT capabilities against System Properties"
am: a78a579804

Change-Id: I12d4a1375a269061643ef0e38f5de88e584f9061
e18d6159cfdfa9416386836d7b18249c82df0750 13-Sep-2016 Paul Stewart <pstew@google.com> WifiStateMachine: Mask RTT capabilities against System Properties

Report support for RTT features only if the system supports it.
If SystemProperties disabled RTT, remove the RTT capability flags
from the returned bitset.

Change-Id: Iac888af289649596ff2fcc3ccba5f01a13bf5fc7
BUG: 31437934
ndroid/server/wifi/PropertyService.java
ndroid/server/wifi/SystemPropertyService.java
ndroid/server/wifi/WifiStateMachine.java
9cf4a36a02bf894569d05b9fdc6dbe27993c69e1 14-Sep-2016 Etan Cohen <etancohen@google.com> [NAN] Rename to make discovery explicit

Pure rename operation - no other functional changes.

(cherry-pick of commit 6c6abae6a6d6b1033a409140c1156766ed352bd3)

Bug: 31470256
Test: unit-tests, integrated (sl4a) tests
Change-Id: Ia788c5cecfea7fe710105efcac95dfa803f28931
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanDataPathStateManager.java
ndroid/server/wifi/nan/WifiNanDiscoverySessionState.java
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
9ff7dea01b09f658492b7b8fa122695e56d28cdc 17-Sep-2016 Glen Kuhne <kuh@google.com> Wifi Metrics: dumpsys arg for clean output

Modify the way dumpsys works in wifi so that
'dumpsys wifi wifiMetricsProto clean'
outputs only serialized base64 encoded wifi metrics proto bytes.

BUG=31556602
Test: Created new unit test

Change-Id: Id1aa319a03a5e2bcffb1276057cb770679015abd
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiStateMachine.java
55a757eb24c020fa9f3f32f163921dfda5c50e73 19-Sep-2016 Ningyuan Wang <nywang@google.com> Remove unused getTxPacketRate() and getRxPacketRate() am: b4d42fdb2c am: 37db5e9bc2 am: 3f14bd7c2d
am: 9c7196212c

Change-Id: If90c5780d05d340ac494c6de0c926a9c929a5b22
9c7196212c33c95eb2db918230e8404f8eccb7cf 19-Sep-2016 Ningyuan Wang <nywang@google.com> Remove unused getTxPacketRate() and getRxPacketRate() am: b4d42fdb2c am: 37db5e9bc2
am: 3f14bd7c2d

Change-Id: Iebf93b1904cbcd927414fb931d5b9e7425a724a5
37db5e9bc2ca5d22a5669285fcc0edd232329da0 19-Sep-2016 Ningyuan Wang <nywang@google.com> Remove unused getTxPacketRate() and getRxPacketRate()
am: b4d42fdb2c

Change-Id: Idcd40a9ad1367a4beef961e8b2511fdcb7dd2f6f
b4d42fdb2cf18cc32123a18c540f855ed84145f9 16-Sep-2016 Ningyuan Wang <nywang@google.com> Remove unused getTxPacketRate() and getRxPacketRate()

BUG=None
TEST=compile

Change-Id: I65bf9afd89fa0dd1c51dc7da1df8e07832bda3f0
ndroid/server/wifi/WifiStateMachine.java
f43ae747a29e72c1f28d55f82c68328166c4de1a 19-Sep-2016 Ningyuan Wang <nywang@google.com> Get packet counters from wificond am: 0183b78a48 am: e6003b89aa am: f534287b95
am: c102f05126

Change-Id: I5be1ffcc1b17a62c05795ec876a1ad0877e3d976
c102f051261d6ee714191038b82d93b8d441525a 19-Sep-2016 Ningyuan Wang <nywang@google.com> Get packet counters from wificond am: 0183b78a48 am: e6003b89aa
am: f534287b95

Change-Id: I69fa850860d164fa7a3f37e96d8571b8df67a5e1
e6003b89aa56dcd9b182f91af49094355bb00ee7 19-Sep-2016 Ningyuan Wang <nywang@google.com> Get packet counters from wificond
am: 0183b78a48

Change-Id: I5c1d4dcd3b3ecfbc52bbcf8874eecb8057ea46a3
d94a62ffdf0e7f282948109d05d96e682eb32eef 15-Sep-2016 Rebecca Silberstein <silberst@google.com> WifiService: get scan results from WifiScanner

Retrieve scan results in WifiServiceImpl from WifiScanner instead of
WifiStateMachine. This utilizes a new method and message type in
WifiScanner. Tests are added to verify the scan results are returned,
updated and cleared properly. This CL additionally fixes a few typos
in tests.

Removal of cached scan results from WifiStateMachine will be included in
a separate CL.

BUG: 31444878
Test: manually tested from settings UI
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: ran GTS CtsNetTestCases
Change-Id: I02c4e24030d2801eb195a84177d908574de0596e
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
0183b78a485c5b0f6cb28b42a872c2685a3ac560 16-Sep-2016 Ningyuan Wang <nywang@google.com> Get packet counters from wificond

BUG=30978872
TEST=compile, manual tests

Change-Id: Ic0f729deeda1d606b004b600af4c1c664e52ad7d
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
949a8adf83ad103624cd8c43bcfa66cec805b069 17-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Handle duplicate network adds am: 5c96fb2af0 am: 0c6c35f0b9 am: 54f94828e7
am: b641abd969

Change-Id: I8dd08bfe2cb8ed419ab2b77df3dbff1958d5ca94
f7a4cff953db3d0d0574efd1f73758985c0a5f79 17-Sep-2016 Roshan Pius <rpius@google.com> WifiScanningService: Change hidden/PNO scan params am: 6259b630dd am: 76879eb60d am: 9c96ce2d55
am: 1d94f073ca

Change-Id: If0157fbca3bf8d352a3f17e91ed43d7554855d17
ae7f83337e60986e1b2a37ac3b217038b840ab5d 17-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Hidden network list retrieval am: 5c6da02cf7 am: c551cf5075 am: 979802ac8f
am: ed9d93fa21

Change-Id: I65bf313e728098c70f8c33747c8b00ce67a108b8
b641abd9690216dc2a2f773cad584c583a80ef53 17-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Handle duplicate network adds am: 5c96fb2af0 am: 0c6c35f0b9
am: 54f94828e7

Change-Id: Ia9eab40c012b5f419af3a62d325080aa8aa8971f
1d94f073ca965a56cd0c1901275c57fa0f1a4282 17-Sep-2016 Roshan Pius <rpius@google.com> WifiScanningService: Change hidden/PNO scan params am: 6259b630dd am: 76879eb60d
am: 9c96ce2d55

Change-Id: I81bfd2c18582968051c8f632de176a9d38250b46
ed9d93fa216c9b49a2c8fb2559fea010f0e961d9 17-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Hidden network list retrieval am: 5c6da02cf7 am: c551cf5075
am: 979802ac8f

Change-Id: Ib5437e89cf7c0c13ecf65fdb3b41479e5d294ff2
0c6c35f0b98e4de3947f396654dec139cf32de35 17-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Handle duplicate network adds
am: 5c96fb2af0

Change-Id: Ica0eb068bc03d7780a61a7ebfe15096912b1cdc3
76879eb60d08d8e0af014f863839a78855e7928b 17-Sep-2016 Roshan Pius <rpius@google.com> WifiScanningService: Change hidden/PNO scan params
am: 6259b630dd

Change-Id: I758877bf94c15b04556644703deb775387feeefa
c551cf50753e2a23e211f219cd0679e955181eab 17-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Hidden network list retrieval
am: 5c6da02cf7

Change-Id: Ib5e49bd86191ccb9f5e8ce0ca26cf631aa45d880
5c96fb2af01e2db3060aab970891355fa63542fd 14-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Handle duplicate network adds

When apps add multiple networks with an empty |allowedKeyMgmt| & same
|SSID| field, we end up adding multiple networks with the same config
key currently. This is because the configKey (SSID + allowedKeyMgmt)
changes once the defaults for the network configuration are set (when
the respective fields are empty in the provided config).

Changes in the CL:
1. When a new config is added, first check if we already have a network
with the same configKey in our internal records.
2. If no, create a new network with the defaults set and fields merged
from the external config.
3. Then check again if we have a duplicate network with the same
configKey as the new internal config.
4. If yes, treat this as a network update instead of add.

Refactored existing methods for the above changes.

BUG: 31473411
TEST: Added Unit test fails without the fix.
Change-Id: I2044503d5d14e46412713e9309ae77b018421cf1
ndroid/server/wifi/WifiConfigManager.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
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigurationUtil.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiSupplicantControl.java
ndroid/server/wifi/scanner/BackgroundScanScheduler.java
ndroid/server/wifi/scanner/SupplicantWifiScannerImpl.java
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
5c6da02cf7736d4ba9fc388151177f5277464c89 12-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Hidden network list retrieval

Add a method to retrieve the hidden saved networks and sort this list
similar to PNO scans. We want to prioritize recently/most often
connected hidden networks over the others since the driver supports
limited number of such networks per scan.

BUG: 29503772
TEST: Added unit test.
Change-Id: I86d55501edf23501552453cb3bed25654b31756a
ndroid/server/wifi/WifiConfigManager.java
b5cec87f420d63c6dba97f85b4229fbeb5f13e4b 17-Sep-2016 Roshan Pius <rpius@google.com> WifiStateMachine: Switch to ACTION_LOCKED_BOOT_COMPLETED

Use the |ACTION_LOCKED_BOOT_COMPLETED| broadcast instead of
|ACTION_BOOT_COMPLETED| broadcast to initiate connection attempts. For
FBE enabled devices, the |ACTION_BOOT_COMPLETED| is only received after
user unlock.

BUG: 31189385
Change-Id: If7c511076aafc37760e050a116a05290780793c4
ndroid/server/wifi/WifiStateMachine.java
60702d4fc616360479ee3c4217a18f5c82c7c558 16-Sep-2016 Ningyuan Wang <nywang@google.com> Clean up interfaces before WifiStateMachine configures interfaces am: fec7883273 am: 71e1e77a74 am: abfa9c9bc6
am: 8331abfda0

Change-Id: I24e3df070aee038c5c9e81b328fd8344692d6d9a
8331abfda0a2c5b3a1264fe3e93b10ae8c8b4a66 16-Sep-2016 Ningyuan Wang <nywang@google.com> Clean up interfaces before WifiStateMachine configures interfaces am: fec7883273 am: 71e1e77a74
am: abfa9c9bc6

Change-Id: I95efb0d7cb21b9b938975745ce92e6a279f8d112
71e1e77a74b19631fc53675feff36aa9bbeb90bb 16-Sep-2016 Ningyuan Wang <nywang@google.com> Clean up interfaces before WifiStateMachine configures interfaces
am: fec7883273

Change-Id: I170a5095bdf4943dd16dca6963f54fb698aed3ce
fec788327369ade5d0bfb9fba080c368e8471827 16-Sep-2016 Ningyuan Wang <nywang@google.com> Clean up interfaces before WifiStateMachine configures interfaces

This ensures that wificond continue to work even if java framework
crashes.

BUG=31524948
TEST=compile, manual tests

Change-Id: Id2d296b63a00d345a83405527161d9cfeb016d53
ndroid/server/wifi/WifiStateMachine.java
24b18e8d3e9ec4c5a1ac9d4c6968663ef65bc453 15-Aug-2016 Sohani Rao <sohanirao@google.com> Define and track Wifi scores to report Wifi metrics

Add a proto definition to track counts corresponding to wifi scores
Scores are calculated in WifiScoreReport and metrics are updated in
calculateAndReportScore. Wifi scores are limited in a range [0, 60]
where the max score is the base score assigned by Network Agent.
To ensure the size of the map is limited, any scores out of this
range will be dropped. Updated test framework to validate score
tracking and check out of bound values are dropped. The unit tests
also ensure the base score is within reasonable limits.
BUG=29418013

Change-Id: Iaf22ed7dc7fb73413739507406ec88d7719b362e
TEST=Wifi Unit tests, Walk tests and log scores via dumpsys
Merged-In: Iaf22ed7dc7fb73413739507406ec88d7719b362e
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiScoreReport.java
ndroid/server/wifi/WifiStateMachine.java
548f0f98b99282be0d4dc44e9cc56db5fdb48397 15-Sep-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiScanningService: Move scan results bcast" am: 7bf5276316 am: b34913b66e am: 2fce9df0a2
am: fd7de292a6

Change-Id: I427ddd6e904f4b8c7d027385a21a2d1fb1f63fe4
fd7de292a6d1dc79c35976dcd8b42ae1f9e68899 15-Sep-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiScanningService: Move scan results bcast" am: 7bf5276316 am: b34913b66e
am: 2fce9df0a2

Change-Id: Ib70109eeee8096fbcbcbb3a1e295b4f9115e52b1
7bf5276316bac6ea27248bd15494ad6115b74a16 15-Sep-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiScanningService: Move scan results bcast"
97efb4138571cec69f38376bcf0c9d2a4a16bbfb 15-Sep-2016 Ningyuan Wang <nywang@google.com> Merge "Remove unused SetInterfaceUp()" am: 21117dae18 am: c0e0617dbd am: 7df05f9fbb
am: 8bf823014f

Change-Id: Ifd700ec7695e9a7cc9879a46cd636e573025db22
8bf823014f83e16c58ede09377f1c4ff77e4486f 15-Sep-2016 Ningyuan Wang <nywang@google.com> Merge "Remove unused SetInterfaceUp()" am: 21117dae18 am: c0e0617dbd
am: 7df05f9fbb

Change-Id: I005ff3a167293c839eb6d05e5f7f27b4d5021097
21117dae184f3b47676976b75de1909de23e5184 15-Sep-2016 Ningyuan Wang <nywang@google.com> Merge "Remove unused SetInterfaceUp()"
6c11cd5d6ff04afdf1bbbc99a850025d46c7bdc9 12-Sep-2016 Rebecca Silberstein <silberst@google.com> WifiScanningService: Move scan results bcast

A WifiManager.SCAN_RESULTS_AVIALABLE_ACTION broadcast is sent when scan results
are returned for an app/user initiated scan. This broadcast is now
located in the WifiScanningService instead of WifiStateMachine. Further
cleanup will move retrieval of the scan results from WifiStateMachine to
WifiScanningService. Tests were added to WifiScanningServiceTest to
verify the broadcast is sent in both scanning success and failure cases.

BUG: 31347837
TEST: frameworks/opt/net/wifi/tests/wifitests/runtests.sh on angler
Change-Id: I7c11d571552090057593539b0ed736bc2cedeb00
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
e3313c477905eab7ec0ee9ce9c3023501bac9037 14-Sep-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigStore: Ignore store dir creation failure" am: 09ab1afb01 am: af053f83ba am: 647166f8df
am: a88646bf67

Change-Id: Idc5a28f15097ee9da4ed874bf32e06cf57cc5737
d79df9503b8e600d29911436acec1ae63cdb1c6c 14-Sep-2016 Roshan Pius <rpius@google.com> WSM: Handle Disconnect in DisconnectedState am: 27eb2abdd4 am: b0a2d0f12e am: 75e9b64bdd
am: 106a634f04

Change-Id: If31bcfc2a8b1f8465daf882e1ccb1e94d40edb3c
b32a4e8070d2b8373d926a784975717decf0584f 14-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Trigger buffered store writes am: cdd9c486c7 am: 11c5e66cf2 am: 9537f33b38
am: d552e7b28c

Change-Id: I604c1decbf635c13a98015f8fa26590a24db98bc
b3d64dfb93a5e98531ec19907d77d00c13c3bf3e 14-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Enhance the dump method am: 42ed8f87e7 am: 48f1b446f7 am: 8cacd64bee
am: 88b34aefd6

Change-Id: Iea8e85dfee482585254fed56e9899c99e4c33173
092b35888f37f0edd0e00488919259b633d73487 14-Sep-2016 Sohani Rao <sohanirao@google.com> Merge "@Override missing for methods implementing AIDL" am: c67ca63935 am: 942076ffe5 am: a4accbdc19
am: fdfe80f1e0

Change-Id: I0c9c5f8c62614ab6eee482bf7fc06fe27904fc6f
444cf51b73afa21b2e5c9019253abe539c8a0dac 14-Sep-2016 Mitchell Wills <mwills@google.com> Merge "Add a flag to indicate if a ScanData is for a scan for all channels" am: f74f751c4d am: ea41f77d21 am: 80262c0003
am: 6e03ee3853

Change-Id: I86bd4faebf881215671da08fd9b357de6ce7d79b
a88646bf678d4f58713718b7493ace8c547c9780 14-Sep-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigStore: Ignore store dir creation failure" am: 09ab1afb01 am: af053f83ba
am: 647166f8df

Change-Id: I06c5d93a91647ac7c62e0340a6be3facdda7e10c
09ab1afb011f891166ac34368ef61b88a1250ed9 14-Sep-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "WifiConfigStore: Ignore store dir creation failure"
106a634f0440b2981c81eea0428669ff23ceeb87 14-Sep-2016 Roshan Pius <rpius@google.com> WSM: Handle Disconnect in DisconnectedState am: 27eb2abdd4 am: b0a2d0f12e
am: 75e9b64bdd

Change-Id: If0f67fc6e0cb249fe294896f06297a65ea751c0d
d552e7b28c852124f93e09bd64f84220aa099302 14-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Trigger buffered store writes am: cdd9c486c7 am: 11c5e66cf2
am: 9537f33b38

Change-Id: I143c8e22b674a89f483215aec434a4d5338194bf
88b34aefd686ef131f31f13da65d58cb778ac734 14-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Enhance the dump method am: 42ed8f87e7 am: 48f1b446f7
am: 8cacd64bee

Change-Id: I7745af466b5928a2c8d5c8fb06cf750950f6be3c
c7266ce57118ebc5e639175543f0151106f85903 14-Sep-2016 Ningyuan Wang <nywang@google.com> Remove unused SetInterfaceUp()

BUG=None
TEST=compile, wifi still works

Change-Id: I9060f67fc9848bba8de82f7dc17e59fcdebc8d2f
ndroid/server/wifi/WifiNative.java
b81d4218fa219591f8ae78716e2c249edd7b6e8f 14-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigStore: Ignore store dir creation failure

Modify |createFile| to always return a valid |StoreFile| instance even
if it fails to create the store directory. This may fail for user store
files if the user has not unlocked when wifi service is loaded for
example.
The user store file not being readable/writeable is already handled
specially in |StoreFile.read()| & |StoreFile.write()|. So, there is no
need to return a null here.

BUG: 31470077
Change-Id: Ibf9d1a6f8250548545200da43aac3d2ea7dfed65
ndroid/server/wifi/WifiConfigStore.java
27eb2abdd40c6e567cb2a1deb92fc6b3f8555cdb 09-Sep-2016 Roshan Pius <rpius@google.com> WSM: Handle Disconnect in DisconnectedState

With the new config manager changes, we issue disconnect when the current
network that is connected/connecting to is either removed or disabled.
Since we don't have a "ConnectingState", we need to handle the
disconnect command in the DisconnectedState to ensure that we can cancel
any ongoing wpa_supplicant connection requests.

BUG: 31340625
TEST: Autojoin ACTS test passes now.
Change-Id: Ie4ac75c65ef26f062075404a1916901c4945d243
ndroid/server/wifi/WifiStateMachine.java
cdd9c486c7c3282ba95f4b52c68457b4ff12e93f 09-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Trigger buffered store writes

Trigger buffered store writes for frequently occuring internal
configuration updates. The buffered write API of WifiConfigStore
batches together all writes in a 10 second window.

While there,
Convert the scan detail cache to a normal hash map. This was a
concurrent hash map in the old config manager. But, there are no
multithreading concerns in the wifi stack now.

BUG: 31380765
TEST: Unit tests
Change-Id: I537af4f02e9bf3a50de1883598118077d8eab583
ndroid/server/wifi/WifiConfigManager.java
42ed8f87e72cdf7780dc3cc87da751253a6d74ed 08-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Enhance the dump method

Dump method should print out the list of saved networks along with
other internal state of the network.

While there, rename couple of internal variable names to better reflect
what they're representing:
1. Rename |mLastSelectedNetwork| to |mLastSelectedNetworkId|.
2. Rename |mLastNetworkId| to |mNextNetworkId|.

BUG: 31375675
Change-Id: Id51133bd6942e71f800026b24f05f34eede79bc9
ndroid/server/wifi/WifiConfigManager.java
fdfe80f1e0c4e285a067d7b4786f1953079e82b9 13-Sep-2016 Sohani Rao <sohanirao@google.com> Merge "@Override missing for methods implementing AIDL" am: c67ca63935 am: 942076ffe5
am: a4accbdc19

Change-Id: I096f9a5f9498985232f336bd1e38c747f02857c2
c67ca63935095ef2bdefd71e8f6ad2c4a6304619 13-Sep-2016 Sohani Rao <sohanirao@google.com> Merge "@Override missing for methods implementing AIDL"
6e03ee3853ed74749f418163d0e623e32cf3064e 12-Sep-2016 Mitchell Wills <mwills@google.com> Merge "Add a flag to indicate if a ScanData is for a scan for all channels" am: f74f751c4d am: ea41f77d21
am: 80262c0003

Change-Id: I1abbdaec4a4f6644d41dd675615086c2d31abe98
c6499c03ffeddecb4cda5df79c69e0d0a7677f9a 12-Sep-2016 Mitchell Wills <mwills@google.com> Add a flag to indicate if a ScanData is for a scan for all channels
am: 4e1f32efce

Change-Id: I2bf308cfd12827d268913954da139e7ed0bac288
f74f751c4d9c53231b61d9ae48b180a0ef494dcd 12-Sep-2016 Mitchell Wills <mwills@google.com> Merge "Add a flag to indicate if a ScanData is for a scan for all channels"
1eb13bbe2067a536dbf5ab7fd43f9e7a75454963 12-Sep-2016 Christopher Wiley <wiley@google.com> Merge "Learn the screen on state at the beginning of time" am: a82f0e4fd9 am: 1b2cd61970 am: 301a16ad9d
am: 9244d689f2

Change-Id: I11743b487d9ce323a75301f675b27067bd21fc64
9244d689f287bb833f8a1b10fe890fbca86b74d3 12-Sep-2016 Christopher Wiley <wiley@google.com> Merge "Learn the screen on state at the beginning of time" am: a82f0e4fd9 am: 1b2cd61970
am: 301a16ad9d

Change-Id: I3202552f1fd46d8f00c13ce6ce01e551e4902f61
3219e97566a093ed10b2a9d6fe77ed9089084d63 07-Sep-2016 Mitchell Wills <mwills@google.com> Add a flag to indicate if a ScanData is for a scan for all channels

BUG=30897947

Change-Id: I989a25dd3df3f473090b76b4e3cb798a2d513490
(cherry picked from commit 4e1f32efceee1db37bfb1e2624b434dbfb055686)
ndroid/server/wifi/scanner/ChannelHelper.java
ndroid/server/wifi/scanner/KnownBandsChannelHelper.java
ndroid/server/wifi/scanner/NoBandChannelHelper.java
ndroid/server/wifi/scanner/SupplicantWifiScannerImpl.java
891bba121efd35038a2b17744779acc01ead8ad0 12-Sep-2016 Mitchell Wills <mwills@google.com> Merge "Add a flag to indicate if a ScanData is for a scan for all channels" into nyc-mr1-dev
2bcc19ef15dcd8ac1b0b2c098dc19821463e46e5 12-Sep-2016 Wei Wang <weiwa@google.com> DO NOT MERGE: Remove spam logs for Wifi RTT
am: f4bd8974d7

Change-Id: Iac64e9b90fae792ae8ab094ce87472ac0a20aff2
dba4b452b6d6cb3b6a8283ad6b68115fbd122c21 29-Aug-2016 Christopher Wiley <wiley@google.com> Learn the screen on state at the beginning of time

Spare ourselves the complexity of lazily tracking the screen on state
by simply reading it once in the constructor of WifiStateMachine.
We'll still update our knowledge based on broadcasts we receive from
the system.

Bug: 31146624
Test: unit tests pass on bullhead

Change-Id: I70155b3a8e5eba332f1c933bb660349a875dc905
ndroid/server/wifi/WifiStateMachine.java
918820374a229eb03257fee0d6baa1f00ec5c919 12-Sep-2016 Wei Wang <weiwa@google.com> Merge "DO NOT MERGE: Remove spam logs for Wifi RTT" into nyc-mr1-dev
74bac12740ae0649504dec5c7b3ae15fffbfd282 12-Sep-2016 Sohani Rao <sohanirao@google.com> @Override missing for methods implementing AIDL

WifiP2pServiceImpl.java implements the AIDL methods
@Override is required in the implementations

BUG: 31414287
TESTS = Unit test Suite

Change-Id: Ieb7097fe1505b52275ee53fbb683aa546737efcf
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
4e1f32efceee1db37bfb1e2624b434dbfb055686 07-Sep-2016 Mitchell Wills <mwills@google.com> Add a flag to indicate if a ScanData is for a scan for all channels

BUG=30897947

Change-Id: I989a25dd3df3f473090b76b4e3cb798a2d513490
ndroid/server/wifi/scanner/ChannelHelper.java
ndroid/server/wifi/scanner/KnownBandsChannelHelper.java
ndroid/server/wifi/scanner/NoBandChannelHelper.java
ndroid/server/wifi/scanner/SupplicantWifiScannerImpl.java
fa596a44736507efcf1f5b8c75bd964e61fafcc9 09-Sep-2016 Randy Pan <zpan@google.com> resolve merge conflicts of 7ded02e to nyc-mr1-dev-plus-aosp
am: d119325c40

Change-Id: I68b1f12908740126d8b75fb7f3936986d5fe0fe2
d119325c401126d31d65a0561c2a68847e166b8f 09-Sep-2016 Randy Pan <zpan@google.com> resolve merge conflicts of 7ded02e to nyc-mr1-dev-plus-aosp

Change-Id: I0552655b500c9829809e6f3f52497335e5b6bd31
d935353c93cc288cad0c94126a4f53c5c94431ac 09-Sep-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiInjector: Move WifiScanner to WifiInjector" am: 90e57d9537 am: 6e43a2b358 am: 7bb6fbd17a
am: d44d2917e7

Change-Id: I27b3c591f600e1360aded35ac50301febaf3dc93
d44d2917e7f176cce9d7fe10005bc6326e2ed805 09-Sep-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiInjector: Move WifiScanner to WifiInjector" am: 90e57d9537 am: 6e43a2b358
am: 7bb6fbd17a

Change-Id: Id9e46f9b3387fbfdb05c6aefb8ad236552212616
90e57d9537773f86e76cde86b2bee875521a03aa 09-Sep-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiInjector: Move WifiScanner to WifiInjector"
b5641f770d20a1fe3458be5e8a91f6fbb9e26b71 08-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Ensure new networks are disabled am: 0ce3ad57f3 am: 8abed9608d am: e8664c4d66
am: 7cb583b2ed

Change-Id: If58bfbe75a546b1be3ecc24d8afa4cdd22cfbc08
7cb583b2edb4106c3376f8b7101ac6704e857d47 08-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Ensure new networks are disabled am: 0ce3ad57f3 am: 8abed9608d
am: e8664c4d66

Change-Id: Ib1227b215fbeddfbeeaaf80c9125895d7c858b53
dc93140010ce36189b29fd58bc8f25d7636101f5 08-Sep-2016 Rebecca Silberstein <silberst@google.com> WifiInjector: Move WifiScanner to WifiInjector

WifiStateMachine currently obtains an instance of WifiScanner from
FrameworkFacade and this is now relocated to WifiInjector.

This CL also fixes a few style issues.

BUG: 31366047
TEST: frameworks/opt/net/wifi/tests/wifitests/runtests.sh on angler
TEST: manually tested that angler could scan and connect to wifi.
Change-Id: I223fa6dbe8661d46cef3da4d2a072629c9bf6534
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
0ce3ad57f3ce7fcfab17930e8cd48e6da57006fb 08-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Ensure new networks are disabled

According to WifiManager.addNetwork documentation, all newly added
networks start out disabled and need to be enabled explicitly later. So,
ensure that the status field of newly added networks are always disabled.

BUG: 31364809
TEST: Unit tests
Change-Id: I816789f3d95b1a25b0d628be7d9d556352106b9d
ndroid/server/wifi/WifiConfigManager.java
f4ebc97c1a206d5891947288613cacc81e9d46c4 08-Sep-2016 Peter Qiu <zqiu@google.com> passpoint: refactor PasspointEventHandler am: 09044adabb am: 63976f2f46 am: 1241b8e9be
am: 7ff2191502

Change-Id: Ifb744937d6485365aa353126552b829439814190
43eca05dd5c904fa1258d212106afbfc8cb03355 08-Sep-2016 Peter Qiu <zqiu@google.com> Passpoint: rename SupplicantBridge to PasspointEventHandler am: c49f45c75b am: bebaa96e93 am: 5a48851ace
am: e0b5b4d169

Change-Id: Ic2fa43a96b0e83a173fea8a1820496541157b75d
0a0ee55c5feb49529d9c01fb0110579e2b7a0834 08-Sep-2016 Randy Pan <zpan@google.com> WSM: Fix roaming log message

Fix the log message which prints out the roaming target network
BSSID.

Bug: 31317756
Change-Id: I4a7d2dbacbbaa73d4141be306e58369eba16fbba
ndroid/server/wifi/WifiStateMachine.java
fbc0f388aacac432f5abfadfd25e212d5e4b159b 08-Sep-2016 Randy Pan <zpan@google.com> QNS: currently connected network BSSID

Always get the currently conntect network BSSID from WifiInfo in
case that firmware roaming switched the device to a different
BSSID than the one previously chosen by QNS.

Bug: 31317902
Change-Id: I6f69144e2a386481d127dbd1ba997e2879c6e000
Tests: unit tests and manual test
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
7ff2191502142f6e6f377738743a2ffeed48a483 08-Sep-2016 Peter Qiu <zqiu@google.com> passpoint: refactor PasspointEventHandler am: 09044adabb am: 63976f2f46
am: 1241b8e9be

Change-Id: Ie10e97ebd5088d49b9af19ea425bdec9d7ce8e6e
e0b5b4d16998aae64c62724fb8bb0d81b801138a 08-Sep-2016 Peter Qiu <zqiu@google.com> Passpoint: rename SupplicantBridge to PasspointEventHandler am: c49f45c75b am: bebaa96e93
am: 5a48851ace

Change-Id: Ida0792884ab7850bd6123b5fef99157f3336d5bb
65ccdbc1afee0abf05e8f75257f23763f117fb00 08-Sep-2016 Roshan Pius <rpius@google.com> WSM: Handle external connection requests am: fa25be15a3 am: bc39a43ae8 am: 8e60e3c706
am: 00b04a54ec

Change-Id: I6b3386ac006db5a06f19243304b648c36a02cfdc
f7c6cb24aa0a3f38e6b1931c2d0a931d11349123 08-Sep-2016 Roshan Pius <rpius@google.com> ConfigurationMap: Remove unused code am: 7ed63f101d am: ba3fa52acd am: 5adf0352ed
am: 02018f9bf4

Change-Id: Ic5e75c183e7b172faf978001f13d1321ab3f47d4
738af581a729e2b67564dbfe94a1211f256dd7f6 08-Sep-2016 Roshan Pius <rpius@google.com> WifiServiceImpl: Remove unused methods am: b1fa71f05e am: e65e45fa1c am: c97b6860dd
am: d6459bffd7

Change-Id: I6f403b9452ae5c2aa97d6db9df291aaf3df9dcbf
00b04a54ec9f07dbca88b4400539418735ae9616 08-Sep-2016 Roshan Pius <rpius@google.com> WSM: Handle external connection requests am: fa25be15a3 am: bc39a43ae8
am: 8e60e3c706

Change-Id: Id9a7e9cd619059d4f5976b9f480b72e70ce2d1fc
02018f9bf4b3d73578a72d50c24f676e6a5a5690 08-Sep-2016 Roshan Pius <rpius@google.com> ConfigurationMap: Remove unused code am: 7ed63f101d am: ba3fa52acd
am: 5adf0352ed

Change-Id: Iee21207a052bdc1eef8a51b98523637a81ef8410
d6459bffd7d83d851a49767a03093ab6503d763c 08-Sep-2016 Roshan Pius <rpius@google.com> WifiServiceImpl: Remove unused methods am: b1fa71f05e am: e65e45fa1c
am: c97b6860dd

Change-Id: Ifdd2828bdf5cc0580b58fb58aeb876622c364ffb
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
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/hotspot2/PasspointEventHandler.java
c49f45c75b1db93cd80b8bac4dd5fa8930fcb242 02-Sep-2016 Peter Qiu <zqiu@google.com> Passpoint: rename SupplicantBridge to PasspointEventHandler

Also move WnmData to hotspot2/ since it is passpoint specific.

BUG: 31264540
TEST: Build and test in the follow-on CL

Change-Id: I8cf5d30ad3a3041569e845c75a4c6d3338db54d3
ndroid/server/wifi/WnmData.java
ndroid/server/wifi/hotspot2/PasspointEventHandler.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
ndroid/server/wifi/hotspot2/WnmData.java
fa25be15a3dab0fda8d041798c4cac531d0d0866 07-Sep-2016 Roshan Pius <rpius@google.com> WSM: Handle external connection requests

The current implementation of enableNetwork() with disableOthers flag
set to true returns failure if the app does not hold the
OVERRIDE_WIFI_CONFIG permission. This is not backward compatible.

Instead, handle any external connect requests
(using enableNetwork, connect or save_network) using the following logic:
1. If the app holds the OVERRIDE_WIFI_CONFIG permission, immediately
trigger a connection to the requested network.
2, If not, force a connectivity manager scan and let QNS pick the best
network to connect to.

While there,
Remove the persist flag from QNS & WCM and rename the network
select method. The new name better reflects that we're just setting a
connect choice and not actually initiaing a connection.

BUG: 31272462
BUG: 31275240
BUG: 31216628
TEST: Unit tests
TEST: The WifiUtil.apk app used for smoke test verification now can call
enableNetwork successfully and ensure that we connect to the required
network.
TEST: android.net.wifi.cts.WifiManagerTest#testWifiManagerNetWork passes
now.

Change-Id: I540143e46dae55cd114711350b3676cd071f9930
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
ndroid/server/wifi/WifiStateMachine.java
342cc22087c43ee4b34d14f226d0bdae94385702 07-Sep-2016 Roshan Pius <rpius@google.com> XmlUtil: Add couple of missing elements in WifiConfiguration am: 241605aebc am: 3682e25b31 am: 6fc6c02c36
am: 474a802cea

Change-Id: I7fce81bdf5a4dc2e58c4f6c1975dea7a146937e2
ea2afd2c7e74afb0237f2811773baf7742b4cd57 07-Sep-2016 Roshan Pius <rpius@google.com> Changes in tests for the WifiEnterpriseConfig refactor am: d83ef7d8c4 am: 9546a7a7f0 am: 177a95cc0b
am: 3c44178de4

Change-Id: Ieff2590a47ab170d0aaf8f20e8ff6376d98024a3
474a802ceae1ea6f861cd3d2fc60599905458770 07-Sep-2016 Roshan Pius <rpius@google.com> XmlUtil: Add couple of missing elements in WifiConfiguration am: 241605aebc am: 3682e25b31
am: 6fc6c02c36

Change-Id: Iec4ad5a7fdb3145ab1769e1f56d68273a4d268de
3c44178de440c10db0c7303abf425f811cb70a3b 07-Sep-2016 Roshan Pius <rpius@google.com> Changes in tests for the WifiEnterpriseConfig refactor am: d83ef7d8c4 am: 9546a7a7f0
am: 177a95cc0b

Change-Id: Iccc02020f19e1295ee936ce130dbe998c07cfffe
3682e25b3100ac7e6bcca53bc125ee14d84adc8d 07-Sep-2016 Roshan Pius <rpius@google.com> XmlUtil: Add couple of missing elements in WifiConfiguration
am: 241605aebc

Change-Id: I0d6a1960f30820596630ec79b67d6d290cc28903
9546a7a7f0c5e6c8bac844912746f379df68dc29 07-Sep-2016 Roshan Pius <rpius@google.com> Changes in tests for the WifiEnterpriseConfig refactor
am: d83ef7d8c4

Change-Id: If900fb5762c0de668d5b9112e21aa00c2d15c1a2
7ed63f101d79aa942eb17541fd61fe5d5bd468d8 06-Sep-2016 Roshan Pius <rpius@google.com> ConfigurationMap: Remove unused code

Remove the unused methods from configuration map:
1. handleUserSwitch() is no longer handled in this class. ConfigManager
always clears the list and adds back the new user's network on user
switch.
2. Remove the flaky config key hashcode to WifiConfiguration map. This
was used for looking up data from ipConfigStore before.
3. Set of hidden networks. This interface will need to be redone since
we longer have all the networks in wpa_supplicant.

Modified unit tests to reflect the new behaviour.

BUG: 31195095
TEST: Unit tests
Change-Id: I43a3d619365aec70c4d54f115c437cbb998887fa
ndroid/server/wifi/ConfigurationMap.java
b1fa71f05ec213e1638545e512446674d5efbbd0 06-Sep-2016 Roshan Pius <rpius@google.com> WifiServiceImpl: Remove unused methods

Remove the unused hidden methods from WifiManager.

BUG: 29449615
TEST: Compiles, boots up.
Change-Id: If5f0eb83df26efc2ba5e68c208e0f8e13a2d590a
ndroid/server/wifi/WifiServiceImpl.java
539cb96aba723b1f63649ae6cc7344ca2359d15e 07-Sep-2016 Roshan Pius <rpius@google.com> Merge changes from topic 'wifi_enterprise_config'

* changes:
XmlUtil: Add couple of missing elements in WifiConfiguration
Changes in tests for the WifiEnterpriseConfig refactor
59ac77f3c0b03e045f65d6b9e9dcdd02860bcc75 07-Sep-2016 songjinshi <songjinshi@xiaomi.com> Merge "[WifiScanningServiceImpl]:Fixes the system server crash issue." am: 85543ae8e1 am: e66a0eacdd am: ff7dd7e68c
am: 26837ff9e2

Change-Id: I3b225040219527f4325db873fdb05e5d1f1a5eaf
26837ff9e2ffa7397e6d32319f012e37863421ac 07-Sep-2016 songjinshi <songjinshi@xiaomi.com> Merge "[WifiScanningServiceImpl]:Fixes the system server crash issue." am: 85543ae8e1 am: e66a0eacdd
am: ff7dd7e68c

Change-Id: Ibb3b1b6731693d7ae419e16ff1ceec7b0430396f
85543ae8e14429441d96b09ec47a2946ae69bd60 07-Sep-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "[WifiScanningServiceImpl]:Fixes the system server crash issue."
2e1104c70b77faf6117e01f96bcfd20f4f96a079 06-Sep-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigStoreData: Check WifiEntepriseConfig validity" am: 3ea7596a91 am: 36bccc38c3 am: c37e21b676
am: 0d052be4fd

Change-Id: I24ed8493de822bd9f8912fad8b0326a4b51923d6
0d052be4fd5249e89e5fc55491364f7d95852bb1 06-Sep-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigStoreData: Check WifiEntepriseConfig validity" am: 3ea7596a91 am: 36bccc38c3
am: c37e21b676

Change-Id: I04df915750c81a4b6cf709d4df64233f98a4cfae
241605aebc6a8f55624026e8b72246bceb1c2ac2 03-Sep-2016 Roshan Pius <rpius@google.com> XmlUtil: Add couple of missing elements in WifiConfiguration

Add the cipher elements missing in the serialization/deserialization of
WifiConfiguration data. These fields generally have a default value set
in wpa_supplicant and so it wasn't detected earlier.
Also, add the missing requirePMF field.

BUG: 31246524
TEST: Unit tests
TEST: Verified that we can still connect to an EAP TLS network after
reboot.
Change-Id: I7bf1850738f15ec9d25b32521312db0b678c1e19
ndroid/server/wifi/util/XmlUtil.java
d83ef7d8c4948afc328d8ef0e746b32c195f271e 02-Sep-2016 Roshan Pius <rpius@google.com> Changes in tests for the WifiEnterpriseConfig refactor

The |getFieldValue| with prefix has been made private now. So, change to
the public version of it everywhere.

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

Change-Id: Ib23a384088ad17bcd928c7b5c1ac997e5e289c94
ndroid/server/wifi/util/XmlUtil.java
3ea7596a91cf9ce157c8289c9407e44856d7ed66 06-Sep-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigStoreData: Check WifiEntepriseConfig validity"
ae0c8aed34708eba147c016a7b4a437db3483843 06-Sep-2016 Liu Changcheng <changcheng.liu@intel.com> check variable value before operating its field am: 0bceea54d1 am: f4983d3d0e am: 6f72a0565c
am: b9bc0756dc

Change-Id: Ia57c21441bb21755930ce3f29dbcd3362ca69de9
b9bc0756dc4bb634d80a636f8a8632b83a7395d0 06-Sep-2016 Liu Changcheng <changcheng.liu@intel.com> check variable value before operating its field am: 0bceea54d1 am: f4983d3d0e
am: 6f72a0565c

Change-Id: I7ab921ed3f83e413e5f587329aef464eaad1a598
0bceea54d1c551801865f0ffa1f86073578ca19c 06-Sep-2016 Liu Changcheng <changcheng.liu@intel.com> check variable value before operating its field

This is an obvious logic error while checking variable
value after operating its field member.

Change-Id: I79a2e4e39600ee87687fcb62c250759314f73e1d
Signed-off-by: Liu Changcheng <changcheng.liu@intel.com>
Signed-off-by: Jerry Liu <primerlink@gmail.com>
ndroid/server/wifi/WifiStateMachine.java
909a6e58d5cb6222f329ac8b3f2083db2345eed7 25-Aug-2016 songjinshi <songjinshi@xiaomi.com> [WifiScanningServiceImpl]:Fixes the system server crash issue.

When the ScanData results is null we should return to aviod the crash issue.

https://code.google.com/p/android/issues/detail?id=219999

Change-Id: I4ccf4808208ec8dc7a96b798330cfc99551100cc
Signed-off-by: songjinshi <songjinshi@xiaomi.com>
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
19445ad39f8eb6229d3a08ec9b713534ed5a759e 03-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigStoreData: Check WifiEntepriseConfig validity

Ensure that that the enterprise config data is valid using the eap
method. This is initialized to -1 (NONE). Using the the existing
|WifiConfiguration.isEnterprise()| leaves us in the mercy of apps
providing a valid enterpiseConfig field.

BUG: 31275240
TEST: Added Unit test. The test reproduces the exception reported in the
bug without the fix.
Change-Id: Ie9c5ee17315798b175bac23e03fc600c9e4a1d7b
ndroid/server/wifi/WifiConfigStoreData.java
07e579e5b4899d49b95ccfe49b9fc53a9c73b502 03-Sep-2016 Roshan Pius <rpius@google.com> WSM: Return the network ID of the newly added netework am: 4b887af1fa am: 2b1bca8719 am: 1cff232379
am: 28e1df8a63

Change-Id: I1d862f4a5bfb7fbd200eff453de1bbc48f3d449f
28e1df8a635a40384211e2295602da2ec05e6e1a 03-Sep-2016 Roshan Pius <rpius@google.com> WSM: Return the network ID of the newly added netework am: 4b887af1fa am: 2b1bca8719
am: 1cff232379

Change-Id: If91af298c4416daecbaea6ce83279c4ac95acdd8
4b887af1faf74bc5aa0660925b481822407bb2f7 03-Sep-2016 Roshan Pius <rpius@google.com> WSM: Return the network ID of the newly added netework

CTS test caught a bug in the handling of the ADD_OR_UPDATE_NETWORK
message handling. Instead of returning the networkID of the
added/updated network ID, it was returning success/failure.

BUG: 31272462
TEST: Some of the failing CTS tests are passing now.
Change-Id: I401d2940f11298bd777dadb8f698e7de580d8cc9
ndroid/server/wifi/WifiStateMachine.java
8e78c2fca2794f85b5aeb81fd1940203b1fdb8fb 03-Sep-2016 Sohani Rao <sohanirao@google.com> DO NOT MERGE ANYWHERE: resolve merge conflicts of 275e60e to nyc-mr1-dev-plus-aosp

Change-Id: If2a00151eadc7b7e6b1aa3202f204a4f3393f3ee
391f859fb3a8720868632b849fcde625262f61ab 02-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Fix a bug in key updation am: 0f166e9103 am: 270f997ae5 am: 7995757e15
am: e2a774dd46

Change-Id: If6772634d273c51f26d4aca2131dd4b4d68958db
184a0d372f1781e21fb913e16f183be402b0ec3e 02-Sep-2016 Roshan Pius <rpius@google.com> Integrate new config manager am: 3bc487aa49 am: 32d44f939e am: c826f25f9f
am: ee22339f31

Change-Id: I63ce1f98f9e50eb475a95f2a88c3fd945d9e496c
04e27f61481a0a187f5f48a0897b034ecd3834f9 02-Sep-2016 Roshan Pius <rpius@google.com> WSM: Integrate new config manager am: fe993ca464 am: bce3cf35b0 am: 98b16bc845
am: 6f7efb8e34

Change-Id: I8e9d1e020fbb318f6e7c739cd592b132ecec769b
35b34545a51a728434b2088ca3247577cd989123 02-Sep-2016 Roshan Pius <rpius@google.com> WSM: Remove unused code am: d66ec7b0b5 am: 2ff1320470 am: 985cb2aabf
am: f4cffde05c

Change-Id: I2f846b4d083a30e5e03734fa6fdcb0465351e7ac
057d01f45c5855a3ac75b484ce10f71be838238b 02-Sep-2016 Roshan Pius <rpius@google.com> WifiSupplicantControl: Integrate new config manager am: b0c3fcb2df am: e0db7e5a0c am: fb7a305302
am: c06146fef7

Change-Id: Ie83690d8c917208074ce11ebcbcda4d6925969b5
2a377ea83a73214fb332f4fe9c1e22ccc51ad3d1 02-Sep-2016 Roshan Pius <rpius@google.com> QNS: Integrate new config manager am: 009ba55ea7 am: cdbb060e98 am: 0245c9a759
am: cc48c3eb20

Change-Id: I61addc3f5c13610b794fd0416c2d153c31cbff74
05fbddf005b09c0f94c9be734810ffc181a029ef 02-Sep-2016 Roshan Pius <rpius@google.com> WCM: Integrate new config manager am: 94eec4ff65 am: 437c1131dc am: 3beedf8ebf
am: 0c4b944d35

Change-Id: Id4e7afb2ae2132dbce52301e6f80dcc731a326ca
7e6bc672588ebdc5db57910ad0d4acc9d6ec4c00 02-Sep-2016 Roshan Pius <rpius@google.com> Rename new WifiConfigManager/Store class and tests am: a6eb5e6da1 am: 1f88036f67 am: 1b706c6242
am: e53b0dc264

Change-Id: Ifa1593139060e8cc9fe3a09476f6d2d24165880c
0d877901b45abe452fe3708a31ea2d095766ec84 02-Sep-2016 Roshan Pius <rpius@google.com> Remove old WifiConfigManager class and tests am: 01d42ec810 am: e90dc93f68 am: 560329625f
am: d97e5a8040

Change-Id: I29ddf2a75d4ffac55dc33113da6ff2c526a7d894
e2a774dd4650739f1664530f822f122e4ccc73e2 02-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Fix a bug in key updation am: 0f166e9103 am: 270f997ae5
am: 7995757e15

Change-Id: Id4a40bd5423c5d99ae9c9a0500eb8874aba024e0
ee22339f3189f4ca7194764ef7b74a2decfb42be 02-Sep-2016 Roshan Pius <rpius@google.com> Integrate new config manager am: 3bc487aa49 am: 32d44f939e
am: c826f25f9f

Change-Id: I15bb50a96caf099f4725a848484c68cea4ab4299
6f7efb8e3411ace12c1ddcc44536e2d835312bbb 02-Sep-2016 Roshan Pius <rpius@google.com> WSM: Integrate new config manager am: fe993ca464 am: bce3cf35b0
am: 98b16bc845

Change-Id: I436cd6b2a534e18cd3bb032103f4bae0fe635f11
f4cffde05ca44d03e02a77e94cb75382ad0fa0d5 02-Sep-2016 Roshan Pius <rpius@google.com> WSM: Remove unused code am: d66ec7b0b5 am: 2ff1320470
am: 985cb2aabf

Change-Id: Ifdab16734256de23d0f016df8804742b3e956819
c06146fef7ddaab1d5ba2a0f68cd96e0d5b00359 02-Sep-2016 Roshan Pius <rpius@google.com> WifiSupplicantControl: Integrate new config manager am: b0c3fcb2df am: e0db7e5a0c
am: fb7a305302

Change-Id: I30c206474c850de0925569eb1ccf444a7fa934f4
cc48c3eb20fdeb3e5d99f2bc2f0f3d9165618b33 02-Sep-2016 Roshan Pius <rpius@google.com> QNS: Integrate new config manager am: 009ba55ea7 am: cdbb060e98
am: 0245c9a759

Change-Id: I2e3a5e3895705590087c755e9559dd50bd31421d
0c4b944d3530393ebd3a09ceb60ba2cc1b40de59 02-Sep-2016 Roshan Pius <rpius@google.com> WCM: Integrate new config manager am: 94eec4ff65 am: 437c1131dc
am: 3beedf8ebf

Change-Id: I7225ae6ee5257967a0bdb18528eff29ce128d361
e53b0dc2643948ffe3f79bb2197aa40653e66e5c 02-Sep-2016 Roshan Pius <rpius@google.com> Rename new WifiConfigManager/Store class and tests am: a6eb5e6da1 am: 1f88036f67
am: 1b706c6242

Change-Id: I2fc5ea113f3ba59e0ab5fc764941fb7b25d7a070
d97e5a8040a577093fc3e098b727b5b5ba56cb84 02-Sep-2016 Roshan Pius <rpius@google.com> Remove old WifiConfigManager class and tests am: 01d42ec810 am: e90dc93f68
am: 560329625f

Change-Id: Iab10843e2dca1aa927ae385015bfe61b5b9af05f
0f166e9103c4ef46eaa49ad20359ce0db2ef9791 01-Sep-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Fix a bug in key updation

Pass in the new internal WifiConfiguration object to WifiKeyStore for
enterprise networks.

While there,
Cleanup logging in WifiSupplicantControl. Few error logs are wrongly
under the verbose logging flag.

BUG: 31185953
TEST: Sending for ACTS sanity retest.
TEST: Added unit test.
Change-Id: Ie5c0b8224c003a3b782ccf9425664352cb4716a4
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiSupplicantControl.java
3bc487aa49deecbc358ee819e0dd4b2534412281 30-Aug-2016 Roshan Pius <rpius@google.com> Integrate new config manager

Misc changes in other modules to integrate the new
WifiConfigManager class.

BUG: 31009287
TEST: Unit tests
TEST: Integrated with WSM and verified wifi connectivity.
Change-Id: I389ff314160ee6288c25c578c62c2a4102bdb88e
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/SupplicantStateTracker.java
ndroid/server/wifi/WifiConfigStoreLegacy.java
ndroid/server/wifi/WifiConfigurationUtil.java
ndroid/server/wifi/WifiNetworkHistory.java
ndroid/server/wifi/WifiScoreReport.java
ndroid/server/wifi/WifiService.java
ndroid/server/wifi/WifiServiceImpl.java
fe993ca46449a8aab3f7f55e2132456064bcee94 30-Aug-2016 Roshan Pius <rpius@google.com> WSM: Integrate new config manager

Changes in the CL:
1. Separated out the config management control path from wpa_supplicant
interactions.
2. All configuration updates are fully handled in WifiConfigManager and
hence remove all redundant code from WSM.
3. All connection requests are now handled from |CMD_AUTO_CONNECT|. Any
user/app selections will be routed to |CMD_AUTO_CONNECT|. This message
will now mark all wpa_supplicant interations for new connection
attempt. This ensures that we have a single control path for all
connection attempts going forward.
4. Similarly |CMD_AUTO_ROAM| will be used for all roam requests.
5. Replaced all the exiting WifiConfigManager methods with equivalent
ones from the new WifiConfigManager class.
6. All networkId's recieved via WifiMonitor events needs to be
translated to internal networkId using |lookupNetworkId| method.
7. Removed all passpoint config management code and added TODO's for
zqiu to tackle later.

BUG: 31009287
TEST: Unit tests
TEST: Integrated with WSM and verified wifi connectivity.
Change-Id: Id9e209a3cb1b3fef47ba7469c1de020210e3ca60
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
d66ec7b0b5156179b675dfadeee57790587d0cec 30-Aug-2016 Roshan Pius <rpius@google.com> WSM: Remove unused code

Remove some dead code:
1. CMD_AUTO_SAVE_NETWORK handling.
2. Add/Clear blacklists.

BUG: 29449615
TEST: Compiles, unit tests
Change-Id: I6e9df4f783d4281bf13b7477ab75e3848582466a
ndroid/server/wifi/NetworkUpdateResult.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
b0c3fcb2df8636412dbea7de45fc0eeb780f45fd 30-Aug-2016 Roshan Pius <rpius@google.com> WifiSupplicantControl: Integrate new config manager

Remove all the unused code in WifiSupplicantControl related to config
management. Now that configurations are not cached in wpa_supplicant, we
need to add networks before initiaing connections.
Add 2 new methods to initiate connections from WifiStateMachine:
1. connectToNetwork - Is used to initiate connection to a new network.
This adds a new network with required parameters and initiates
connection to it.
2. roamToNetwork - Is used to initiate roam to a new AP on the same
connected network.

WifiSupplicantControl will cache the network ID of the active network in
wpa_supplicant and will help in looking up the internal network ID for
any events received from wpa_supplicant.

BUG: 31009287
TEST: Unit tests
TEST: Integrated with WSM and verified wifi connectivity.
Change-Id: I8ee06750ee5c5296229a35c27f3778f26193c69c
ndroid/server/wifi/WifiSupplicantControl.java
22fcd83c560e45deaadb22795dd2683ebd923914 15-Aug-2016 Sohani Rao <sohanirao@google.com> Define and track Wifi scores to report Wifi metrics

Add a proto definition to track counts corresponding to wifi scores
Scores are calculated in WifiScoreReport and metrics are updated in
calculateAndReportScore. Wifi scores are limited in a range [0, 60]
where the max score is the base score assigned by Network Agent.
To ensure the size of the map is limited, any scores out of this
range will be dropped. Updated test framework to validate score
tracking and check out of bound values are dropped. The unit tests
also ensure the base score is within reasonable limits.
Merge details:
This is a merge from CL 1326502 on master. Merge conflicts were
mainly due to code placement and only major difference was the call
to calculateScore as it has different arguments on the branches.

BUG=29418013

Change-Id: Iaf22ed7dc7fb73413739507406ec88d7719b362e
TEST=Wifi Unit tests, Walk tests and log scores via dumpsys
DEVICE=angler
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiScoreReport.java
ndroid/server/wifi/WifiStateMachine.java
009ba55ea70190ab6f98d72698d6ee426bcefd9e 30-Aug-2016 Roshan Pius <rpius@google.com> QNS: Integrate new config manager

Changes in the CL:
1. Replaced all old WifiConfigManager methods with equivalent ones in
the new WifiConfigManager class.
2. Use setters for updating any configuration. The new WifiConfigManager
class provides copies of network configuration, so any local updates
will not take effect in the central store.
3. Modified all tests to reflect the same.
4. Modified the "currentNetworkNotQualifiedDueToOpenNetwork" test
because |isOpenNetwork| is moved to the |WifiConfigurationUtil| now and
hence cannot be mocked.
5. Read all device configs and cache it locally.

BUG: 31009287
TEST: Unit tests
TEST: Integrated with WSM and verified wifi connectivity.
Change-Id: I10c12fa5a229f1ae4fc2457a064c6d09ee5f9a94
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
94eec4ff65e7e4c1c06c3e817655842b46c02b0a 30-Aug-2016 Roshan Pius <rpius@google.com> WCM: Integrate new config manager

Most of the changes in the CL are just replacing the old config manager
methods with equivalent ones from the new config manager. Other than
that, all device config values are read directly by WCM and cached
instead of reading it from WifiConfigManager.

BUG: 31009287
TEST: Unit tests
TEST: Integrated with WSM and verified wifi connectivity.
Change-Id: I51b08b817eb884dc1d5186b0e929872db495878a
ndroid/server/wifi/WifiConnectivityManager.java
a6eb5e6da171c5426a96a8d0f97c75d1b8a46db0 29-Aug-2016 Roshan Pius <rpius@google.com> Rename new WifiConfigManager/Store class and tests

Replace the old WifiConfigManager/Store clas with the new ones.

BUG: 31009287
TEST: Unit tests
TEST: Integrated with WSM and verified wifi connectivity.
Change-Id: Ieadf85d6f2f2852e643b45d29661aa8cfc193dd8
ndroid/server/wifi/ConfigurationMap.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigManagerNew.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiConfigStoreNew.java
ndroid/server/wifi/WifiInjector.java
01d42ec8106d27cd6ff47101dd6020c4a39e5226 29-Aug-2016 Roshan Pius <rpius@google.com> Remove old WifiConfigManager class and tests

This will be replaced with the new class in following CL's.

BUG: 31009287
TEST: Unit tests
TEST: Integrated with WSM and verified wifi connectivity.
Change-Id: I58b9ad84ec989af305f5ce9a4e42b9dc2e61e890
ndroid/server/wifi/WifiConfigManager.java
b84a2efcb46fe928e57bcf2c37a08e4cf073b5a5 02-Sep-2016 Glen Kuhne <kuh@google.com> Merge "resolve merge conflicts of d0afd7c to nyc-mr1-dev-plus-aosp" into nyc-mr1-dev-plus-aosp
0d1c55f9765dd6849b2cadcb04acd0dd2ca9a5bf 02-Sep-2016 Roshan Pius <rpius@google.com> Merge commit '23571' into stage-aosp-master am: b69d2534d9 am: 1bee124c74
am: 802c3c730b

Change-Id: I75ec4e1c2bd433da60a007d26550ddf0ecb65fc0
802c3c730b6f28f07d3a7e45cef2f22c1dfb5aa8 02-Sep-2016 Roshan Pius <rpius@google.com> Merge commit '23571' into stage-aosp-master am: b69d2534d9
am: 1bee124c74

Change-Id: I420a5ec9b50ac606776d9bdbce6de3556a207cb0
23571215e97f2ead59c36f16d4d5822cbd64709d 02-Sep-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge changes Ife876fab,I4fbaf032,I6e159b9d,I4fd2f4b2

* changes:
WifiConfigManagerNew: Integrate to WSM (Part 4)
WifiConfigManagerNew: Integrate to WSM (Part 3)
WifiConfigManagerNew: Integrate to WSM (Part 2)
WifiConfigManagerNew: Integrate to WSM (Part 1)
85ba9071add5cfe01a4be3c73c62af021da30e47 02-Sep-2016 Glen Kuhne <kuh@google.com> resolve merge conflicts of d0afd7c to nyc-mr1-dev-plus-aosp

Change-Id: I2b51bb2b0594f04d42de65752ad39accf45d4280
b72b5dd4e8d36f873aa8a261d046a01eade136d0 02-Sep-2016 Glen Kuhne <kuh@google.com> Fix yet another build breakage

Cherry picked wifi metrics CL's to MR1, resolved merge conflict which
introduced a build breakage.

Change-Id: Id7178a028ff06e44bf0b7fd5340214757c54c33b
ndroid/server/wifi/WifiMetrics.java
8661c9caaeec7b7bf50c98a44f635d3138d3910f 02-Sep-2016 Glen Kuhne <kuh@google.com> resolve merge conflicts of c55e365 to nyc-mr1-dev-plus-aosp
am: 1c52cb43b4

Change-Id: If309678198da946878a1bda11841c7f536f69797
1c52cb43b42b50374d7836930ac0b17495628290 02-Sep-2016 Glen Kuhne <kuh@google.com> resolve merge conflicts of c55e365 to nyc-mr1-dev-plus-aosp

Change-Id: I8790d63db4a6935f7d576c8a60db3fe85a667152
da002510e507e4935b11e55f756a2a3b75a9be5c 02-Sep-2016 Glen Kuhne <kuh@google.com> resolve merge conflicts of c4176b0 to nyc-mr1-dev-plus-aosp

Change-Id: Icf590f8a8e543bc6035e7adc253c580e88e12afd
e3159200aaf7b5d760e7dac4d36cb9a549b76d85 27-Aug-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Integrate to WSM (Part 4)

Changes in CL:
1. Ignore masked value sent in by apps when updating network params.
2. Migrate over method from old WifiConfigManager to update scan detail
cache using the updated RSSI values in WifiInfo.
3. Migrate over the DTIM parameter setting in network to WifiConfigManagerNew
from state machine. This is to remove the duplicate scan result handling
in WifiStateMachine.
4. Some logging/javadoc description cleanups.

BUG: 31009287
BUG: 31120106
Change-Id: Ife876fabcbfb375a695b7b0f6e9f54f28ba5e99a
TEST: Unit tests
TEST: Integrated with WSM and verified wifi connectivity.
ndroid/server/wifi/WifiConfigManagerNew.java
b44c61bbdad7d973af94566172c99eb4ec502783 27-Aug-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Integrate to WSM (Part 3)

Changes in the CL:
1. Update the external status of the network as CURRENT after
connection to it.
2. Reset the external status of the network as ENABLED after
disconnection from it.
3. Remove connect choices from all networks when the network is removed.

BUG: 31009287
Change-Id: I4fbaf0326302f4d2a1b60fd0f5bc1de26bfbf6a6
TEST: Unit tests
TEST: Integrated with WSM and verified wifi connectivity.
ndroid/server/wifi/WifiConfigManagerNew.java
65245230dda9f9892af4d9b6afe82ae2e46aeb96 27-Aug-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Integrate to WSM (Part 2)

Add methods to remove all networks for a specific user/app to be used
when the either the user or app is deleted.

While there,
Add a bunch of setters to set various WifiConfiguration parameters in the
internal configuration objects.

BUG: 31009287
Change-Id: I6e159b9dd5bdcf6a18ee76db23603f42bcb7acb6
TEST: Unit tests
TEST: Integrated with WSM and verified wifi connectivity.
ndroid/server/wifi/WifiConfigManagerNew.java
96241bee619ff7073635f680a36869f61a11a225 27-Aug-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Integrate to WSM (Part 1)

Changes in WifiConfigManagerNew to integrate with WifiStateMachine.

When the device boots up for the first time, the user's CE directory is
not accessible until the user unlocks. So, move the user store
switching to |loadFromStoreAndMigrateAfterUserSwitch|. This will ensure
that we set the user store file after unlock. Remove the |pendingRead|
flag since we will always use |onUserUnlock| to load from store.

The changes also include the following methods migrated from
existing ConfigManager:
1. Add Telephony manager a dependency to WifiConfigManagerNew so that it
can be used for resetting sim networks state.
2. Method to add a network to the deleted ephemeral list.
3. Method to check if we need an unlocked keystore.
4. Reorder the initialization of WifiConfigManagerNew in WifiInjector.
Config manager needs to initialized before state machine.

BUG: 31009287
Change-Id: I4fd2f4b20a3c6ba1e810267797617ce0479a743f
TEST: Unit tests
TEST: Integrated with WSM and verified wifi connectivity.
ndroid/server/wifi/WifiConfigManagerNew.java
ndroid/server/wifi/WifiInjector.java
65a71384b3e043dea2fcd71c9b804459950b2f9a 01-Sep-2016 Ningyuan Wang <nywang@google.com> Remove unused fetchAnqp() am: 4fb2665730 am: 8a2465c961 am: dd0bd89627
am: dec4e23363

Change-Id: Ib3c4026a406a71f71f6887e3d576b4f9f1637161
090c831bfece1308bfbff997e2c78e5251044795 01-Sep-2016 Ningyuan Wang <nywang@google.com> Build ScanResult.capabilities from IE and capability mask am: 1146b64b7e am: 27c48c2d54 am: 07b591540c
am: 4a9f459d2a

Change-Id: I1ade3b09ce419ee07f55f7b163389eaa6def88ab
4fb2665730fb7be67d716cd8a1264d4931476724 01-Sep-2016 Ningyuan Wang <nywang@google.com> Remove unused fetchAnqp()

BUG=None
TEST=compile

Change-Id: Idfd32411377b5300ae4dbe1b0b5eb5e15e9b3924
ndroid/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
ndroid/server/wifi/WifiNative.java
7a36be372edfa3f7fe0e37320b9b21a5fbadf277 01-Aug-2016 Glen Kuhne <kuh@google.com> WiFiMetrics: Count hidden & passpoint networks

1. Extended the WiFiMetrics proto to include counts for hidden and
passpoint networks, counting these for all saved networks, connections
and scan results.
2. Extended the counting of Open, Personal and Enterprise network to
include scans.
3. Extended ConnectionEvent logging to detect and flag passpoint network
connections.
4. Implemented the checks that detect if a scan Result is a hidden network.
While I was here: Cleaned up a couple old WifiMetrics <TODO>s, which we will not be doing.
BUG=28634987

Change-Id: I2e22bf8d79ccbda84ead700272ff0f1b0f13d2e7
Test: Extended unit tests, executed manually
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/util/InformationElementUtil.java
242978afe141e91c3a1baf42ac30a3f5408911f0 30-Aug-2016 Mitchell Wills <mwills@google.com> DO NOT MERGE Revert "Add WiFi toggle prompts - wifi"

This reverts commit dcf967aa402a4ab1a79c727aea934b8013c1fa6a.

Change-Id: I5a34d9680f24120957a7598ccaf5864e4f6f6a71
ndroid/server/wifi/WifiServiceImpl.java
1c50de232acb3d6148c454941a6b9a79e0663b81 26-Jul-2016 Glen Kuhne <kuh@google.com> WiFiMetrics: Add LastResortWatchdog success metric

Added a metric that tracks how often WifiLastResortWatchdog triggers
successfully fix wifi, allowing wifi to connect to a network after
triggering. It does not count a success, if the connection occurs
after a new network becomes available.

BUG=30407550
TEST=Unit Tests

Change-Id: I68d1f003fee9eb8074c04db141bd7b5c3089d57b
ndroid/server/wifi/WifiLastResortWatchdog.java
ndroid/server/wifi/WifiMetrics.java
a284841edf33e4070748816a034c47f996bfeb81 12-Aug-2016 mukesh agrawal <quiche@google.com> WifiMetrics: add metric for alert reasons

Add metric to track the number of alerts triggered
by Wifi driver/firmware. This will give us a
concrete measurement of stability in the field.

BUG=29158746
TEST=tests/wifitests/runtests.sh

Change-Id: I435e5d792a97c197fe685e5b2c05d7b8efda62f0
ndroid/server/wifi/WifiLoggerHal.java
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiStateMachine.java
4569ebc2277f35b9bd1baa98194f963388e0c4ca 15-Aug-2016 Sohani Rao <sohanirao@google.com> Define and track Wifi scores to report Wifi metrics

Add a proto definition to track counts corresponding to wifi scores
Scores are calculated in WifiScoreReport and metrics are updated in
calculateAndReportScore. Wifi scores are limited in a range [0, 60]
where the max score is the base score assigned by Network Agent.
To ensure the size of the map is limited, any scores out of this
range will be dropped. Updated test framework to validate score
tracking and check out of bound values are dropped. The unit tests
also ensure the base score is within reasonable limits.
BUG=29418013

Change-Id: Iaf22ed7dc7fb73413739507406ec88d7719b362e
TEST=Wifi Unit tests, Walk tests and log scores via dumpsys
DEVICE=angler
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiScoreReport.java
ndroid/server/wifi/WifiStateMachine.java
a87858b2d738e777639d811c261c706d9e57cfd6 29-Aug-2016 Glen Kuhne <kuh@google.com> Merge "WiFiMetrics: Count hidden & passpoint networks"
8381c56df953265b362d66bee9028d535960f410 27-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove unused code in SupplicantBridge"
59f9a74676831ba4634b35d56a1e2bbe9bf4e322 01-Aug-2016 Glen Kuhne <kuh@google.com> WiFiMetrics: Count hidden & passpoint networks

1. Extended the WiFiMetrics proto to include counts for hidden and
passpoint networks, counting these for all saved networks, connections
and scan results.
2. Extended the counting of Open, Personal and Enterprise network to
include scans.
3. Extended ConnectionEvent logging to detect and flag passpoint network
connections.
4. Implemented the checks that detect if a scan Result is a hidden network.
While I was here: Cleaned up a couple old WifiMetrics <TODO>s, which we will not be doing.
BUG=28634987

Change-Id: I2e22bf8d79ccbda84ead700272ff0f1b0f13d2e7
Test: Extended unit tests, executed manually
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/util/InformationElementUtil.java
ca62e5b2c8e533e481f7ed0ee7ca1b80670fc8f5 26-Aug-2016 Ningyuan Wang <nywang@google.com> Remove unused code in SupplicantBridge

BUG=31117677
TEST=compile

Change-Id: Ic7b6d1b353aaa5f29b1008ed0f3066338649726a
ndroid/server/wifi/hotspot2/SupplicantBridge.java
bb820957bbce91b24af6a2889039d4c77ab1cb30 26-Aug-2016 Roshan Pius <rpius@google.com> Merge changes Ibf88ba16,Id7fe3439,Ia279a95a,I6e757ec2

* changes:
ScanResultUtil: Add a method to create ephemeral networks
WifiConfigManagerNew: Add couple of missing methods
WifiScoreReport: Refactor calculateScore
WifiInjector: Add WifiConfigManagerNew and dependencies.
55b645ab4d044fbe7e0aa1c8cbb9bfdb5c17ff1d 25-Aug-2016 Roshan Pius <rpius@google.com> ScanResultUtil: Add a method to create ephemeral networks

Add a method to create ephemeral network configuration from provided
scan result.

While there,
Move the scan result matching to network matching logic entirely to
ScanResultUtil.

Change-Id: Ibf88ba1640ff71f864b1eec1c25d89404f33cd38
TEST: Added unit tests.
BUG: 31009287
ndroid/server/wifi/WifiConfigManagerNew.java
ndroid/server/wifi/util/ScanResultUtil.java
674b332946074bba7fae1bb4d0d6d2c72d70f3a8 24-Aug-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Add couple of missing methods

Add a couple of methods missing in the new WifiConfigManager to start
integrating it with QNS/ConnectivityManager.
The methods added are:
1. A method to fetch a configured network using configKey.
2. Methods to set/clear the QNS connect choice in networks.
3. Method to check if the provided ssid was in the deletedEphemeralSSID
list.

While there,
1. Refactored the creation of copy of WifiConfiguration objects to be
passed to external modules into a common method.
2. Default |allowedAuthAlgorithms| should be set to OPEN.

BUG: 31009287
TEST: Modified existing unit test for [3]. Didn't add any new tests for
[1] & [2] because they're trivial setters/getters.

Change-Id: Id7fe34393737b2faa3de7d301a62e23d85053fe2
ndroid/server/wifi/WifiConfigManagerNew.java
6867feee7608fa47f9f7eb7042459ba55e7d0d21 23-Aug-2016 Roshan Pius <rpius@google.com> WifiScoreReport: Refactor calculateScore

Refactor WifiScoreReport.calculateScore method to remove the direct
WifiConfigManager references for fetching device configs.
WifiScoreReport will now be a member of WifiStateMachine instead of
being reset every time we get a new score.

WifiScoreReport.reset() will be used to clear out thew last cached
report.
WifiScoreReport.calculateAndReportScore() will send the updated score to
the provided network agent instance. It will also cache the report so
that it can be logged in WifiStateMachine.

BUG: 31013937
Change-Id: Ia279a95a90bab59cea5e0c24ac2041decce71abf
TEST: Compiles, existing unit tests pass
ndroid/server/wifi/WifiScoreReport.java
ndroid/server/wifi/WifiStateMachine.java
ac7f9b5a077ffced53d0615a25ea95d39a87c486 26-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove unused fetchAnqp()"
8f3a60a18a52a28d03f459bd65754317d94e745e 26-Aug-2016 Ningyuan Wang <nywang@google.com> Remove unused fetchAnqp()

BUG=None
TEST=compile

Change-Id: I601607ca0772e436ca66a555aa1359d76c04d677
ndroid/server/wifi/WifiNative.java
8d43400ab673700546876f922c5f96e8866633ee 26-Aug-2016 Randy Pan <zpan@google.com> Track if untrusted wifi network is allowed am: 41b85e0341 am: f8a278fee2
am: ce8a5e36eb

Change-Id: Id1e316fe76f14630ae04a2f9e5a8514fe3de37af
1ecbde12cbde58696b784df5d41e486ea5d51026 25-Aug-2016 Randy Pan <zpan@google.com> resolve merge conflicts of 3f6f755 to master

Change-Id: I4af48aba54c674cad8147e67daf162a068b03fa6
f4bd8974d7f3ce05eb6e7325cabcb706d6ac5999 05-Aug-2016 Wei Wang <weiwa@google.com> DO NOT MERGE: Remove spam logs for Wifi RTT

Removed debug logs for RTT params and adjusted log levels.

Bug: 30115441
Change-Id: I89d6757c8ebb59851eff67f91abe71b095ade327
ndroid/server/wifi/WifiNative.java
0fd8e37b6285c448d971fb4b61b287b5b0a27c6f 15-Jul-2016 zhangshuxiao <zhangshuxiao@xiaomi.com> Some networks can not connect automatically.

Becasuse the key of scan cache is supplicant's networkid,
when supplicant process restart, the supplicant's networkid
may be regenerated, so clear scan cache when loading the
configured networks.

BUG: 30158982

Change-Id: Iec94e8eef517bd0411eb0be53a31cdb34a1494cf
Signed-off-by: zhangshuxiao <zhangshuxiao@xiaomi.com>
ndroid/server/wifi/WifiConfigManager.java
e445510f55e09d4c63ad08d725395563038cee76 23-Aug-2016 Roshan Pius <rpius@google.com> WifiInjector: Add WifiConfigManagerNew and dependencies.

Add the WifiConfigManagerNew object instantiation and all it's dependencies.
Only the WifiConfigManagerNew & WifiSupplicantControl objects need to be
exposed through getters.
Refactored WifiStateMachine object instantiation to add WifiNative instance
in the contructor and modified unit tests.

BUG: 31009287
Change-Id: I6e757ec2a80813a8cc453cd0293cae679e5683ce
TEST: Unit tests.
TEST: Successfully tested Connection to a network on the device.
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
d58768eee13969fda1c4dd465b09aef6db30c14c 22-Aug-2016 Roshan Pius <rpius@google.com> WifiConfigStoreNew: Change location of user store files

Change the location of user store files to
/data/misc_ce/<UserId>/wifi/WifiConfigStore.xml. The directory "wifi"
under the user's misc directory will be created if it doesn't already exist.

BUG: 31015069
Change-Id: Ia69acca05876778bcefe1c41bb573166c5660e55
TEST: Existing unit tests
ndroid/server/wifi/WifiConfigStoreNew.java
a95a5d9dfc327f165d4e254f1b11a9204974037d 22-Aug-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Keep track of user selected network

The only way an app can request connection to a specific network
today using the WifiManager API's is by specifying |disableOthers| flag
in WifiManager.enableNetwork() method. So, pass that flag onto
WifiConfigManagerNew and use that to set a variable which can be queried
by network selector to determine the last app/user selected network.

This will only be cleared when either the set network is
disabled/removed.

While there,
Add some verbose logsfor enable/disableNetwork.

BUG: 31013636
Change-Id: Ib2ebe427deef76d1a749ded000ae53967dea6fc3
TEST: Added unit test
ndroid/server/wifi/WifiConfigManagerNew.java
3a738a26918230b2469d917dbf14323234edd39b 22-Aug-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Migration from legacy stores

Integrated the new |WifiConfigStoreLegacy| into the new WifiConfigManager.
Every invocation of |loadFromStore| will check if there is any data to
be migrated from legacy store files if the new store files are not
present. If legacy store data is present, it will migrate all of the
data from those stores and delete them permanently.
The deletion of legacy stores is commented out in the first roll out of
the new config store changes. This will be re-enabled once things are
stable so that we can revert to this data if needed.

BUG: 29337176
Change-Id: I35d626ed8bae70c676cb10b307cb116ed837a529
TEST: Existing unit tests.
ndroid/server/wifi/WifiConfigManagerNew.java
ndroid/server/wifi/WifiConfigStoreLegacy.java
ndroid/server/wifi/WifiConfigStoreNew.java
ce8a5e36ebb810f8ffba6bbfe091e05b7011cff6 24-Aug-2016 Randy Pan <zpan@google.com> Track if untrusted wifi network is allowed am: 41b85e0341
am: f8a278fee2

Change-Id: I4d045f680139e592e7f945e18e5ea0ec08d48e35
3f6f7553a75bdb6936e3677d416c6dadaea61d68 27-Jul-2016 Randy Pan <zpan@google.com> Fix WiFiNetworkAgent#unwanted

1) No longer blacklist a network when it's unwanted by NetworkAgent.
2) Deprecate the network disable reason BAD_LINK.
3) Stop WiFi Auto_Connect attempt if neither saved Wifi network nor
untrusted WiFi network is requested.

Bug: 28558417
Tests: Unit Tests and manual tests
Change-Id: I2b245cfb357b92ed925d89603e0fefded9d6865a
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/WifiConfigStoreLegacy.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiNetworkHistory.java
ndroid/server/wifi/WifiSupplicantControl.java
f8a278fee2f81afc618dadaa64de848343fccdf7 23-Aug-2016 Randy Pan <zpan@google.com> Track if untrusted wifi network is allowed
am: 41b85e0341

Change-Id: I456f6a43343224353c45fe69d0986c4c748d0af2
3b04f4bb91bb4787aa84027e5379caeced2ab537 23-Aug-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Fix NAN RTT access to COARSE" into mm-wireless-dev
am: 34081265d6

Change-Id: Iebbcdfd4a1c1e5b2497072cb76fac2c43c4ffc2d
c410715d5686f72ae9c41eb85a93b48a81fa8b64 23-Aug-2016 Etan Cohen <etancohen@google.com> [NAN] API changes/fixes addressing apilint issues
am: 58d41e915a

Change-Id: Id5cc355d4b356a1272b7a5388e4c4960684efb0c
34081265d6f58ff5ddaccf7a3ba79313f35bb7cd 23-Aug-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Fix NAN RTT access to COARSE" into mm-wireless-dev
cd2948d67e8b730ccbb92c9dd15d7bfdd0f8b39b 23-Aug-2016 Etan Cohen <etancohen@google.com> [NAN] Fix NAN RTT access to COARSE

COARSE is the standard permission for Wi-Fi location.

Bug: 30928192
Change-Id: If34156baa7dd5dfeb3401b6179cc33f4d29d3d9e
ndroid/server/wifi/nan/WifiNanServiceImpl.java
58d41e915aac9f1f4bab51ca1fc1dec604b6a522 22-Aug-2016 Etan Cohen <etancohen@google.com> [NAN] API changes/fixes addressing apilint issues

Bug: 30983968
Change-Id: Ie48e1d36f51d59e4f32e7b71c622dd42469820a4
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanStateManager.java
d792e1b8cf0d53c9e892f9e99bf88f7385bea6f1 22-Aug-2016 Mukesh Agrawal <quiche@google.com> Merge "WifiMetrics: add metric for alert reasons"
9d60f8726575683f345cfe527e2d1afb2367c92f 22-Aug-2016 Randy Pan <zpan@google.com> Merge "Track if untrusted wifi network is allowed" into nyc-mr1-dev
8bc512d77b002fdd4a4a920ab8737e70f74a4f0d 22-Aug-2016 Randy Pan <zpan@google.com> Merge "Fix WiFiNetworkAgent#unwanted" into nyc-mr1-dev
503d588975085552863f781d38e2d77aae10c75b 20-Aug-2016 Roshan Pius <rpius@google.com> SupplicantWifiScannerImpl: Restart PNO on settings change am: 1bf983a421 am: 1a21f2a41d
am: b486a6e4a6

Change-Id: I2045dbda093b03f05e41e17479bc2bef10168803
9e8137eeb25049792c66e8dc63092dd03804cac2 20-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "resolve merge conflicts of e78bb65 to master"
7af19f18a11f465e158d77916e75a63349d6ef5f 20-Aug-2016 Roshan Pius <rpius@google.com> Merge changes Ia03490c9,I4269b27a,If0507bdd

* changes:
WifiConfigManagerNew: Check UID belongs to foreground user
WifiConfigManagerNew: handle User Switches
WifiConfigManagerNew: Migration from old store (Part 1)
69df67eeaeb6b2271acb103979035c69e4e97bb8 20-Aug-2016 Etan Cohen <etancohen@google.com> [NAN] Enforce SystemApi checks using CONNECTIVITY_INTERNAL
am: f46c53450a

Change-Id: I4309321a55caf14b35c4346bc58c799128000b3e
6d9904fdafe96b09babe5b2ec2b90557e75ce94c 17-Aug-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Check UID belongs to foreground user

Add a utility method to check if the provided UID belongs to either the
current foreground user or if the SysUI. This is used to check the UID
of the app in all the methods invoked from public WifiManager API's.

This utility method is used to validate the following methods:
1. addOrUpdateNetwork
2. removeNetwork
3. enableNetwork
4. disableNetwork
5. checkAndUpdateLastConnectUid

While there,
a. Add the missing |uid| parameter in |removeNetwork| &
|removeNetworkInternal|. We need to check both if the the uid belongs to
the current user and that the uid has enough permission to delete the
network.
b. Setup the user profiles for the default user in the setup for each test.

BUG: 30891063
Change-Id: Ia03490c9dce7722b8d046a324004448e911257b6
TEST: Added a Unit test.
ndroid/server/wifi/WifiConfigManagerNew.java
ndroid/server/wifi/WifiConfigurationUtil.java
c381d005c60603aadd30581ce675e979b3fec3fe 11-Aug-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: handle User Switches

On user switch WifiConfigManager needs to
1. Switch the user store file in WifiConfigStore.
2. Check if the user is already unlocked.
3. If user is already unlocked, reload all the configurations
from the store files. This would ensure that the old user's
private networks are hidden.
4. If user is not unlocked, wait for the user to unlock to reload all
the configurations from the store files.
5. Write the store files again to write any private networks of the new
user that were in the shared store perviously to the user's store file.

Since we no longer have a single store file for all users, we don't need
the |ConfigurationMap.handleUserSwitch| method which was essentially
doing the same thing as above (but all user's networks were always
loaded in memory). So mark the method deprecated and remove it once the
old WifiConfigManager is removed.

BUG: 30783976
TEST: Added unit test

Change-Id: I4269b27ab5534b2e4ed4dfed1abd8327d354c66a
ndroid/server/wifi/ConfigurationMap.java
ndroid/server/wifi/WifiConfigManagerNew.java
ndroid/server/wifi/WifiConfigStoreData.java
ndroid/server/wifi/WifiConfigStoreNew.java
f11073c03746f1c79e6a316884bc59574b562a8b 12-Aug-2016 mukesh agrawal <quiche@google.com> WifiMetrics: add metric for alert reasons

Add metric to track the number of alerts triggered
by Wifi driver/firmware. This will give us a
concrete measurement of stability in the field.

BUG=29158746
TEST=tests/wifitests/runtests.sh

Change-Id: I435e5d792a97c197fe685e5b2c05d7b8efda62f0
ndroid/server/wifi/WifiLoggerHal.java
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiStateMachine.java
21b5a23a28006e1e5bb446100d135c5bacee9b85 10-Aug-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Migration from old store (Part 1)

In the new config store design, none of the other users private
networks should even be in memory because the other user's store files
are not accessible to the current user. However as we load networks
from the old store (all networks were in a single file) and migrate to
the new store, we might have a bunch of private networks from other
users in memory. We cannot write these private networks to the
respective store file until the corresponding user logs in to the
device after upgrade. So, move all such networks to the shared store file.
When the corresponding user logs in, their private networks will be sent
from the shared store file to the specific user store file and
eventually the shared store file will not contain any user private networks.

Changes in the CL:
1. Don't split the configurations to be sent for shared vs user store file inside
|WifiConfigStoreData|. This is now accepted as 2 separate lists in the
constructor.
2. Hide the members of |WifiConfigStoreData| and add getters to retrieve
the necessaty data.
3. |WifiConfigManagerNew| will send all private networks in memory not
visible to the current user along with any shared networks to the
shared store file.
4. Changes to the existing tests to account for #1 & #2 above.

BUG: 29337176
TEST: Ran existing tests. Will add unit tests for the specific scenario in
the next CL.

Change-Id: If0507bdd5df4296cfe94e0ff5492c4f6b354021d
ndroid/server/wifi/WifiConfigManagerNew.java
ndroid/server/wifi/WifiConfigStoreData.java
274cb7b17018d86ea71e97fdcf7e9a8e12a3ec57 19-Aug-2016 Roshan Pius <rpius@google.com> resolve merge conflicts of e78bb65 to master

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

Change-Id: I13fc81d9d03df86dbf8c22fef203da95a4e396c4
e78bb65416985cecbcba31b31a5565b54ed0a5c7 19-Aug-2016 Roshan Pius <rpius@google.com> SupplicantWifiScannerImpl: Ignore PNO stop failure am: e483fd4a31
am: b14b43c87c

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

Change-Id: Id7eeeeaa7bc6ac1b735cef7d1c8ca01cc7c21aad
b14b43c87ce64dab8860df230d20bf4fcde38ce5 19-Aug-2016 Roshan Pius <rpius@google.com> SupplicantWifiScannerImpl: Ignore PNO stop failure
am: e483fd4a31

Change-Id: I09dbe09d9aff3475ec32e0d25153fd07c9181c34
d5bfc592dd08cd01395497f2463b14d3fb244bd6 19-Aug-2016 Roshan Pius <rpius@google.com> Merge changes Ib328abd8,If75993eb into nyc-mr1-dev

* changes:
SupplicantWifiScannerImpl: Restart PNO on settings change
SupplicantWifiScannerImpl: Ignore PNO stop failure
f46c53450a5706846fe4dbc1acc35c15eec17018 19-Aug-2016 Etan Cohen <etancohen@google.com> [NAN] Enforce SystemApi checks using CONNECTIVITY_INTERNAL

Enforce for API:
- Enabling/disabling NAN usage
- Creating a non-default configuration

Bug: 27696149
Change-Id: I402577a92f5adfe0ba57f2e567b64e0d068552eb
ndroid/server/wifi/nan/WifiNanServiceImpl.java
f0c2934a3c1fae411e41f8a700a38bacaa706454 19-Aug-2016 Etan Cohen <etancohen@google.com> resolve merge conflicts of 87aa822 to master

Change-Id: I7755b30e80965db360998b5554b2860e36273c75
87aa8222c1454cf9249056ef833dd2806e24ecad 19-Aug-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Gate local identity information (MAC) based on LOCATIONING permission" into mm-wireless-dev
ce98615677a3f99d8fec8826ea1e0f1eeedb0692 18-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Rely on wificond to start/stop supplicant"
4a7c1572ca96489fc385cb4199e62de5807beb81 16-Aug-2016 Wei Wang <weiwa@google.com> Merge "Dump interal states for RttService."
d57031521f4687a573e82298843f6ac1906eddde 11-Aug-2016 Wei Wang <weiwa@google.com> Dump interal states for RttService.

More info can be added in the future as needed.

Bug: 30116990
Change-Id: I06177041880ec314e6178a988b9693f46bc38dd0
ndroid/server/wifi/RttService.java
5db8a1300094801edda2184a8428325ee04592e0 15-Aug-2016 Etan Cohen <etancohen@google.com> [NAN] Replace HashMap with ArrayMap - reduce memory usage
am: 6323ae3253

Change-Id: Ie8e078a4f02b61366a3b941990617ddbdc50faca
6323ae3253059c844a7f29cb9265729f5af8ebff 15-Aug-2016 Etan Cohen <etancohen@google.com> [NAN] Replace HashMap with ArrayMap - reduce memory usage

Bug: 30815162
Change-Id: Ib443b42a0618c97af8cc173fa82dbb18fe936a55
ndroid/server/wifi/nan/WifiNanDataPathStateManager.java
ndroid/server/wifi/nan/WifiNanStateManager.java
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/scanner/SupplicantWifiScannerImpl.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
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ae719e944792a5bc36ec26230bee16f1415ce141 02-Aug-2016 Etan Cohen <etancohen@google.com> [NAN] Gate local identity information (MAC) based on LOCATIONING permission

Gate providing MAC address of NAN discovery interface to app by LOCATIONING
permission.

Bug: 30000323
Change-Id: I2cfb224413a900a88f4e6504d2bf9edfa96f6a4c
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanStateManager.java
4999fc8cdc0533ff46255457ba5d684a1956c0c8 11-Aug-2016 Christopher Wiley <wiley@google.com> Merge "Remove dead code related to stopping/starting driver"
5e65ce256de8034210db6d6334d0b81e4bbecb21 11-Aug-2016 Jeff Sharkey <jsharkey@android.com> Fix bugs around manager fetching.
am: 4d0c50e6c8

Change-Id: I96601fcfac88128a971880771c30596b91172f27
4d0c50e6c8cc282a0bbdc4e6f88ce0bb2004661a 11-Aug-2016 Jeff Sharkey <jsharkey@android.com> Fix bugs around manager fetching.

A recent patch started returning "null" when a Binder service
required to provide a manager wasn't yet registered.

This fixes one of those locations by checking for the feature before
fetching the manager.

Bug: 28634953
Change-Id: I1dac9c23dd60c5e7dfece89ba2e74b10a905dc43
ndroid/server/wifi/WifiStateMachine.java
6fc0ba1e06093f943e9eadf4a3139fa49f8f9845 11-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't manipulate driver state from WifiController"
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
a4fbb5f3e68204a07939a8b544693d6899beb3ed 06-Aug-2016 Christopher Wiley <wiley@google.com> Don't manipulate driver state from WifiController

After this change, all states related to driver state are noops
in the WifiStateMachine. They will be removed in the following change.

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

Change-Id: Ife8bb2d57a300350749d920ff89dee12ad86d310
ndroid/server/wifi/WifiController.java
ndroid/server/wifi/WifiStateMachine.java
76ce30a5555c3b4cac8fda825902910da7f1bc1c 11-Aug-2016 Glen Kuhne <kuh@google.com> Merge "resolve merge conflicts of d5c734a6 to master"
e8b3c1f6c2ad3a0f1fd198e5493c85b28ca0969f 10-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add WiFi toggle prompts - wifi"
f2df22160313e49138d34dd7b6774921c0ed7d42 10-Aug-2016 Mukesh Agrawal <quiche@google.com> Merge changes I5d55b287,I3d39c193,If60282ad,I132fd395,I09a7f6f5

* changes:
WifiLog: add CheckReturnValue annotation
logging: add convenience APIs for literal messages
WifiDiagnostics: migrate to chained logging API
logging: add chained logging API
WifiDiagnostics: remove getAllRingBufferData()
af69f62f92a27accf8abc973ab4b562f00a40482 10-Aug-2016 Glen Kuhne <kuh@google.com> resolve merge conflicts of d5c734a6 to master

Change-Id: I034b25a5ec735098cd1dc675af3525172888e77d
a37f802e10f8c69dd6fc17825c040f4e8ee73e45 10-Aug-2016 Glen Kuhne <kuh@google.com> resolve merge conflicts of b843fca to nyc-dev am: 2709be1ecb
am: f49876f2c9

Change-Id: I6a2fd2a35a3335230f2ca903db794b6d3ef91b70
f49876f2c98b9ab5298cdc3eeca242102ed0166d 10-Aug-2016 Glen Kuhne <kuh@google.com> resolve merge conflicts of b843fca to nyc-dev
am: 2709be1ecb

Change-Id: I41ad20f61dda33ba0b3a938330f12cd273f35ae3
d5c734a69f50bce150c3c25b9aa7ba3c2c64580e 10-Aug-2016 Glen Kuhne <kuh@google.com> resolve merge conflicts of b843fca to nyc-dev am: 2709be1ecb
am: 2e51799736

Change-Id: I7eebd8116398f43862dc89b4df76c454d17b6399
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
2e51799736d5a1bde1b6124192e65f00d09e0a6f 10-Aug-2016 Glen Kuhne <kuh@google.com> resolve merge conflicts of b843fca to nyc-dev
am: 2709be1ecb

Change-Id: I194ca0310e928e2e8134e14a4950b3cfab705d8a
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
171eee1ff5730e54411e17b9ca702a01ac561523 10-Aug-2016 zhangshuxiao <zhangshuxiao@xiaomi.com> Merge "Don't log identity in to bugreport" am: 2cc6820c70
am: ebfe1fbec6

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

Change-Id: I4ba3511102b2ed13a431a5447e8cd6e68863ec17
2cc6820c700a12d9ed9bda4d1ac0e199d388ca83 10-Aug-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Don't log identity in to bugreport"
2709be1ecb0062e301dc2d3ea9eef11951a5b958 10-Aug-2016 Glen Kuhne <kuh@google.com> resolve merge conflicts of b843fca to nyc-dev

Change-Id: I9dd10e35d901404b6d77d9ca0f99dbc8c2294b2f
b843fca514bf16b3ba2cf2ddfec626e280dd0713 10-Aug-2016 Samuel Tan <samueltan@google.com> ANQPFactory: catch all potential parsing errors am: 6154eb070b am: eda4e04ebc
am: b3c997c5f5

Change-Id: Idec74f1035a8cb117d3898d35eae6828c59a799d
b3c997c5f528977db0ba170d17ca738d58ebedc6 10-Aug-2016 Samuel Tan <samueltan@google.com> ANQPFactory: catch all potential parsing errors am: 6154eb070b
am: eda4e04ebc

Change-Id: I50e99a7a5f781be6e9668ef6732c593f2db23376
eda4e04ebc9f382f754bfd7679d420d696c31f39 10-Aug-2016 Samuel Tan <samueltan@google.com> ANQPFactory: catch all potential parsing errors
am: 6154eb070b

Change-Id: I59977b90dd905e5a8d72275ddef0594c2b9906f5
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>
ndroid/server/wifi/WifiNative.java
c128ca137db16c1c2381f062fdbffb54f729106f 10-Aug-2016 Mitchell Wills <mwills@google.com> resolve merge conflicts of d81fcbc to nyc-mr1-dev-plus-aosp
am: a62c2d36e9

Change-Id: I0e6e8ccfa01489d1339e98bbc45c619405a33625
e4c87d4f40bbbcd0ba1d0d8d17953763b2ad320e 05-Aug-2016 mukesh agrawal <quiche@google.com> WifiLog: add CheckReturnValue annotation

We'd like ErrorProne to flag misuse of the WifiLog API.
Add the @CheckReturnValue annotation, so that ErrorProne
can help us out.

Note that the @CheckReturnValue annotation requires adding
jsr305 to the WifiService build. This is not, however, a
new dependency for the framework in general. In particular,
jsr305 is already used by frameworks/base/packages/EasterEgg.

While there: fix-up use of @ThreadSafe in LogcatLog. (Now
that we're pulling in jsr305, we can actually use the
annotation, instead of having the annotation commented out.)

BUG=30738484
TEST=wifitests/runtests.sh
TEST=mma -j32 RUN_ERROR_PRONE=true javac-check (might fail)
TEST=find . -name '*.java' | xargs touch
TEST=mm -j32 RUN_ERROR_PRONE=true javac-check (should pass)

Change-Id: I5d55b287b197710cde3fa0d31c8a5ccf09edd2fa
ndroid/server/wifi/LogcatLog.java
ndroid/server/wifi/WifiLog.java
f5d90be206db98bbd5894afc8d757dd32360b2d9 05-Aug-2016 mukesh agrawal <quiche@google.com> logging: add convenience APIs for literal messages

Literal messages are reasonably common, so we should make
them easy to log. Add APIs for that purpose, and migrate
WifiDiagnostics to use them.

Note that, functionally speaking, the LogcatLog implementations
of these APIs behave the same their corresponding legacy APIs.

However, we add these APIs for two reasons:
- To track which log messages have been audited, to determine
whether or not they contain parameters.
- So that the WifiLog implementation for the new backend can
inform the backend that these messages are clean (free of
any sensitive data).

Finally, we note that these convenience APIs may also provide
a performance benefit. (Because the message is parameter-less,
there's no need to create a LogMessage.)

While there: change the level of some WifiDiagnostics log
messages, to fit our new logging guidelines.

BUG=30737889
TEST=wifitests/runtests.sh

Change-Id: I3d39c1932800af6a818c59b6497c868f8399f8fa
ndroid/server/wifi/FakeWifiLog.java
ndroid/server/wifi/LogcatLog.java
ndroid/server/wifi/WifiDiagnostics.java
ndroid/server/wifi/WifiLog.java
f46c533931224296b11d98798344c049f88db9a1 06-Aug-2016 mukesh agrawal <quiche@google.com> WifiDiagnostics: migrate to chained logging API

Migrate parameterized log messages in WifiDiagnostics
to the new chained logging API.

Along the way: add DummyLogMessage and FakeLog, to
facilitate testing. (Alternatively, we could bake their
behavior into WifiDiagnosticsTest. But it seems likely
that other tests will want the same behavior.)

While there:
- fix ordering of imports (WifiDiagnostics, WifiDiagnosticsTest)
- remove unused imports (WifiDiagnostics)
- change the level of some WifiDiagnostics log message, to
fit our new guidelines

BUG=30736898
TEST=wifitests/runtests.sh

Change-Id: If60282adf40d58e80cdaa0d7e1e7008c490d545b
ndroid/server/wifi/DummyLogMessage.java
ndroid/server/wifi/FakeWifiLog.java
ndroid/server/wifi/WifiDiagnostics.java
573de1504ea684a2a647613659d4771c2a315eea 06-Aug-2016 mukesh agrawal <quiche@google.com> logging: add chained logging API

Add a new logging API, which uses call-chaining to generate
log messages. The chaining approach will reduce the cost
of disabled log messages, as such messages won't need to
be formatted.

While there: add some missing @override annotations.

BUG=30736748
TEST=wifitests/runtests.sh

Change-Id: I132fd3955426b8528208a21f4f1ecd402962ffd0
ndroid/server/wifi/LogcatLog.java
ndroid/server/wifi/WifiLog.java
e483fd4a3151e59b3d0a596572b4d9f035fa8424 09-Aug-2016 Roshan Pius <rpius@google.com> SupplicantWifiScannerImpl: Ignore PNO stop failure

Ignore PNO stop failures when resetting the |mCurrentPnoState| flag. The
stop PNO command failure indicates that wpa_supplicant has already
stopped PNO scan internally. So, we should reset our flag to reflect that.
Otherwise, the next attempt to turn on PNO scans will be silently ignored by
|SupplicantWifiScannerImpl|.

BUG: 30764879
Change-Id: If75993ebe3bfc853628a96a698bb5806f0da5962
TEST: Unit tests
TEST: `act.py -c connectivity_basic.config -tb basic_wifi_tethering -tc
TelLiveDataTest:test_lte_wifi_switching`
ndroid/server/wifi/scanner/SupplicantWifiScannerImpl.java
a62c2d36e9013501784b7044511ae4484642d610 09-Aug-2016 Mitchell Wills <mwills@google.com> resolve merge conflicts of d81fcbc to nyc-mr1-dev-plus-aosp

Change-Id: I8db788aefe20cc0aa8732b1401a770c49f87937c
d81fcbc2cdfbbac61d62198a800c395b19ccdeab 09-Aug-2016 Daichi Ueura <daichi.ueura@sonymobile.com> Include WPA_EAP network into the building identity logic am: e66e9b84a7
am: 38c17b8e11

Change-Id: I8bc59c0a40102cdb658bf926733f5985d0df2d6b
38c17b8e118a0928b1cb6ef007e83d9dfe9dd9b1 09-Aug-2016 Daichi Ueura <daichi.ueura@sonymobile.com> Include WPA_EAP network into the building identity logic
am: e66e9b84a7

Change-Id: I9a719c0bc4f3c9a191ade5e68acf3a62e539acd2
645e1d7ec0289b3ab827ee6ce39b80a615f6ebc7 09-Aug-2016 Roshan Pius <rpius@google.com> Merge changes I22798f4e,I3e2a18ba,I84f9949f

* changes:
WiifConfigManagerNew: Fixing some nits
WifiConfigManagerNew: Implement channel set creation
WifiConfigManagerNew: Implement linking of networks
73adc5b40164da0f2dc92a47cc23a58ce0d5cc79 09-Aug-2016 Roshan Pius <rpius@google.com> WiifConfigManagerNew: Fixing some nits

Changes in the CL:
1. Move the |set/clearNetworkCandidateScanResult| method to the
cluster of network setter/getter methods.
2. Rename "QNS" with "Network Selector" throughout the class.
3. Add an error log to all the versions of |getConfiguredNetwork|
and remove the log from the call sites.

BUG: 30156343
Change-Id: I22798f4ed36c11f369a93e2ada7dd45c80d38b89
TEST: Existing unit test.
ndroid/server/wifi/WifiConfigManagerNew.java
2dac6c1d0a510eca1ae2a178fd3423b947196e79 06-Aug-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Implement channel set creation

Implement the channel list creation for the currently connected network
for partial scans. The channel list is created using the scan detail
cache for that network and any linked networks. Scan results which are
stale beyond the provided the age are ignored during channel list
creation.

While there,
1. Set the |ScanResult.seen| parameter when ScanDetail is created. This
was a pending todo from b/29877741 (See comment#3) which we wanted to do
in master branch.
2. Truncate the length of the SSID base used to create SSID's in
|WifiConfigurationTestUtil|. This was exceeding the max size of SSID
(32) when the number of networks created during tests exceed 99.

BUG: 30156343
TEST: Added Unit tests
Change-Id: I3e2a18ba72c9c244235971fc29e0711526510295
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/WifiConfigManagerNew.java
8600bb5b23872d2f67cf7a12c3d8c40c5f990e84 06-Aug-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Implement linking of networks

Implement the linking of networks for QNS roaming decisions.

Networks are considered linked if:
1. Share the same GW MAC address.
2. Scan results for the networks have AP's with MAC address which
differ only in the last nibble.

BUG: 30156343
TEST: Added Unit tests

Change-Id: I84f9949f07d6f6739a9270a8d047441648416f03
ndroid/server/wifi/WifiConfigManagerNew.java
dcf967aa402a4ab1a79c727aea934b8013c1fa6a 27-Jul-2016 Svetoslav Ganov <svetoslavganov@google.com> Add WiFi toggle prompts - wifi

If permission review is enabled toggling WiFi on or off
results in a user prompt to collect a consent. This applies
only to legacy apps, i.e. ones that don't support runtime
permissions as they target SDK 22.

bug:28715749

Change-Id: Ie60ae91bd8e9c67a3e14a2820055234f669df1df
ndroid/server/wifi/WifiServiceImpl.java
e66e9b84a7fa750382c618340c79f7ae641d355e 20-Nov-2015 Daichi Ueura <daichi.ueura@sonymobile.com> Include WPA_EAP network into the building identity logic

The current code of building identity only handles the networks
that specify IEEE8021X as key management. This doesn't make sense
since not only IEEE8021X but also WPA_EAP should be handled in this
use case. This results in connection failure if the networks have
WPA_EAP only because identity is not built.

Bug:30467318

Change-Id: I00415552f0cf0f913cded18dc802cb8370b72f27
ndroid/server/wifi/WifiStateMachine.java
6bf4508828b5191bdbed7a99ba76831a3c6ce879 08-Aug-2016 Etan Cohen <etancohen@google.com> [NAN] Update link properties after creating agent.
am: 4ab83906ab

Change-Id: Ib1eb5f356025714bae1cc137aeb7317ffeca54c0
f737aee5bc7cd35196fedd3887189308c83281c0 08-Aug-2016 Mitchell Wills <mwills@google.com> Merge "Log the message contents received from disconnected clients"
41b85e0341099cc2da048e7400a72046336c1cce 08-Aug-2016 Randy Pan <zpan@google.com> Track if untrusted wifi network is allowed

Always notify WifiConnectivityManager if untrusted wifi network is
allowed right after WifiConnectivityManager is initialized.

Bug: 30634120
Change-Id: I8cb13ab476d4845ede8a0b57c3d8e20350e59926
Tests: WiFi Framework Unit Tests
ndroid/server/wifi/WifiStateMachine.java
1581a6e6da810df4173dcbb62a1c51eb624ad427 06-Aug-2016 Mitchell Wills <mwills@google.com> Log the message contents received from disconnected clients

BUG=29368784

Change-Id: I7c34366132985de93e03d9b316c137dcbc99fbcb
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
11064a5b4949a8e5bc275d1cd27c1971fadf1278 03-Aug-2016 mukesh agrawal <quiche@google.com> WifiDiagnostics: remove getAllRingBufferData()

This method is unused. Remove it.

BUG=27173141
TEST=wifitests/runtest.sh

Change-Id: I09a7f6f5eb9fcd60c9bd1841f7e7f2a1a2a0d5fa
ndroid/server/wifi/WifiDiagnostics.java
0f0cd745dce43b211bf1ea52cf6096c5ffea9b5b 05-Aug-2016 Wei Wang <weiwa@google.com> Merge "Remove spam logs for Wifi RTT"
e92ef5d5cbdfed45cb3a818499a7eafb63d34b01 05-Aug-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachine: update new mode in initial state am: 173dae0427 am: 5870db3561
am: 673719204b

Change-Id: I7bdebc4a09cdeb8050696c715ee0892bf9f5bfac
673719204b0e689be876a4fa8e753609a1eef868 05-Aug-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachine: update new mode in initial state am: 173dae0427
am: 5870db3561

Change-Id: I8c5003b86d30d4a0297cff2df46f3d2960ba239d
5870db356197f38fbf5f2e9d344d4312090a0b46 05-Aug-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachine: update new mode in initial state
am: 173dae0427

Change-Id: I914335d6ade8f7e8cc9b98a62492f4d91c36a190
173dae04272c1b40488292f6392a922b4c4b2949 05-Aug-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachine: update new mode in initial state

When WifiController calls setOperationalMode a CMD_SET_OPERATIONAL_MODE
message is sent to WifiStateMachine. When this message is received in
the InitialState, it is not handled where it is then dropped in the
default state. Dropping this message causes WifiController and
WifiStateMachine to get out of sync on the operating mode.

BUG:29938263
Change-Id: I8481af8d6826f3da18f5762833a7b145d81b74dd
TEST:runtest frameworks-wifi
ndroid/server/wifi/WifiStateMachine.java
c279df77a547187bd883383c967c6b9642dbb289 05-Aug-2016 Rebecca Silberstein <silberst@google.com> [DO NOT MERGE] WifiStateMachine: check verbosity level in update am: 01dafe766c
am: 2e818f6401

Change-Id: If0b94be6917d3948f16a467179ebc56398a9084a
2e818f6401f66a6eeffec4b0dfcaee1ead30d341 05-Aug-2016 Rebecca Silberstein <silberst@google.com> [DO NOT MERGE] WifiStateMachine: check verbosity level in update
am: 01dafe766c

Change-Id: I0c01e190bf3431dbb90a698167ac4df582fff916
01dafe766c969517561dd9fd733ec475bc8eee5d 04-Aug-2016 Rebecca Silberstein <silberst@google.com> [DO NOT MERGE] WifiStateMachine: check verbosity level in update

When updating the setting for verbose logging, first check if we are
already at the desired setting. If we are, return from
enableVerboseLogging immediately. This avoids updating the size in the
underlying StateMachine log record vectors, and thereby avoids clearing
them.

BUG: 30675249
Change-Id: I005f236baa3149c46470e79dee3491e691908da0
TEST: runtest frameworks-wifi
TEST: manual testing
ndroid/server/wifi/WifiStateMachine.java
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
ndroid/server/wifi/WifiNative.java
2efcaa62b92a20fed7c370a18b948ea1fcdd7e51 27-Jul-2016 Randy Pan <zpan@google.com> DO NOT MERGE ANYWHERE: Fix WiFiNetworkAgent#unwanted

1) No longer blacklist a network when it's unwanted by NetworkAgent.
2) Deprecate the network disable reason BAD_LINK.
3) Stop WiFi Auto_Connect attempt if neither saved Wifi network nor
untrusted WiFi network is requested.

Note: this CL is a cherry-pick of ag/1261693, as that CL cannot be
submitted until after N DR cutoff date (expect submission on 8/18).

Bug: 28558417
Tests: Unit Tests and manual tests
Change-Id: I2b245cfb357b92ed925d89603e0fefded9d6865a
(cherry pick from commit c4d044acc589188f25b8dcd962db52e1fc08fe8d)
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiStateMachine.java
92af55cbe38c2ee44d66cde2c711d4ab53e0dcba 04-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove unused driver management JNI calls"
d3c8b9e63ef211c523199b8676e5c8911ae6e900 04-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use wificond to setup client interfaces"
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
ndroid/server/wifi/WifiNative.java
a598d61dcfdbd14c42c36241e3c148eb661867be 02-Aug-2016 Christopher Wiley <wiley@google.com> Use wificond to setup client interfaces

Bug: 30041062
Test: Can connect to open networks before and after restarting wificond.
unittests pass

Change-Id: I4f76cef3b4960a6c0601519019e1d3a4fa8acc4d
ndroid/server/wifi/WifiStateMachine.java
259fb5a5265e0a2aa8a851d5e694d28afe9a87f2 28-Jun-2016 Mitchell Wills <mwills@google.com> Move some of the SIM network code out of WifiStateMachine

Also add unit tests

TEST: Unit tests, boots and connects to open network
Bug: 29776729
Change-Id: I79161f87cee55abce464fb1bdbc643a92c069ffb
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiSupplicantControl.java
ndroid/server/wifi/util/TelephonyUtil.java
5b06b91ac414e5c756e0974063f87e23cce8d68c 03-Aug-2016 mukesh agrawal <quiche@google.com> WifiDiagnostics: fix overly long line

Forgot to check the line length after the
search-and-replace. Fix that. :-)

BUG=30630020
TEST=wifitests/runtests.sh

Change-Id: Icbf8d8324e260727d0968b9be08df87acf1b7adc
ndroid/server/wifi/WifiDiagnostics.java
01ff84d15bce1eccdf585657c3f56ba834f94114 03-Aug-2016 Rebecca Silberstein <silberst@google.com> WifiController: correct active state after ap mode am: 24750cd1f8 am: c2a5d4f9e8
am: 947bc70db1

Change-Id: Icdc9fba30c0a4abf8841c8c58f03376eb006518c
947bc70db184a3a8fd2ab40ecf17f8f147ff9556 03-Aug-2016 Rebecca Silberstein <silberst@google.com> WifiController: correct active state after ap mode am: 24750cd1f8
am: c2a5d4f9e8

Change-Id: I8853ca2ada5881731a2c9bcc7108cfd63709ed3a
c4d044acc589188f25b8dcd962db52e1fc08fe8d 27-Jul-2016 Randy Pan <zpan@google.com> Fix WiFiNetworkAgent#unwanted

1) No longer blacklist a network when it's unwanted by NetworkAgent.
2) Deprecate the network disable reason BAD_LINK.
3) Stop WiFi Auto_Connect attempt if neither saved Wifi network nor
untrusted WiFi network is requested.

Bug: 28558417
Tests: Unit Tests and manual tests
Change-Id: I2b245cfb357b92ed925d89603e0fefded9d6865a
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiStateMachine.java
a2a129cf524e3363d871cd1f4fbda19064af17b4 03-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes I46ebd8e7,Iee374b9e,I9e32eff0,Idd907c4b

* changes:
WifiDiagnostics: test a log call
move WifiDiagnostics creation from facade to injector
WifiDiagnostics: move to WifiLog API
WifiService: add WifiLog interface
a078645184af3f8f2729df676b60c7b13b6b1b14 03-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiLogger: rename to WifiDiagnostics"
63fad8b4722c94ce9107690b647cdbe7e8a1c4f9 29-Jul-2016 mukesh agrawal <quiche@google.com> WifiDiagnostics: test a log call

Use WifiDiagnosticss to add an example of how to
test logging calls.

And to facilitate this: add a makeLog() method
to WifiInjector.

BUG=30566702
TEST=wifitests/runtests.sh

Change-Id: I46ebd8e79c90bce4bb75c077a6e6cc2b0aa9d3ee
ndroid/server/wifi/WifiDiagnostics.java
ndroid/server/wifi/WifiInjector.java
d68fa5a0cb9715a20cc06010b40ccbe6ba8cb64c 29-Jul-2016 mukesh agrawal <quiche@google.com> move WifiDiagnostics creation from facade to injector

We're about to change the WifiDiagnostics ctor, to
take an extra argument. As long as we're going to be
mucking with the WifiDiagnostics ctor, let's move the
WifiDiagnostics construction call over to WifiInjector.
(WifiInjector is where kuh@ and all the cool kids
hang out these days).

Additional benefits of this change:
- The change slightly simplifes the WifiStateMachine
constructor.
- The change makes the behavior of WifiStateMachineTest
more uniform. Previously, the test would sometimes
use a mock BaseWifiDiagnostics, and sometimes use a
(real) WifiDiagnostics. Which path we took would depend
on board-specific resource settings.

BUG=30566652
TEST=wifitests/runtests.sh

Change-Id: Iee374b9ef49db9264c544e666de5d4621defdfc7
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
235d4d28542d8007c9609a84af0ac7b4c4bba02a 29-Jul-2016 mukesh agrawal <quiche@google.com> WifiDiagnostics: move to WifiLog API

As part of the log improvement effort, make
WifiDiagnostics the first user of the new WifiLog
API.

In this first step, the new API provides one
small benefit: eliminating the need to pass a
tag in to every log call.

More significant benefits will follow.

BUG=30564894
TEST=wifitests/runtests.sh

Change-Id: I9e32eff07c57bcdd30da2aa7295a59ddd96b6e2d
ndroid/server/wifi/WifiDiagnostics.java
0c96e05ef24dc72fa31b6915ed40f09dc7238276 29-Jul-2016 mukesh agrawal <quiche@google.com> WifiService: add WifiLog interface

As a first step towards updating the logging
functionality in WifiService, we need to abstract
the existing liblog-style logging that we use.

To that end, add:
1) WifiLog, an Interface for logging, and
2) LogcatLog, an implementation of WifiLog,
which uses android.util.Log as the backend.

Clients of android.util.Log, within WifiService,
will be migrated to this new API over time.
The first client to be migrated will be
WifiDiagnostics (in my very next CL).

BUG=30564891
TEST=wifitests/runtests.sh

Change-Id: Idd907c4bd8a2931d85b036593b6952018b46c6fb
ndroid/server/wifi/LogcatLog.java
ndroid/server/wifi/WifiLog.java
882e84040535c9404382d33e6327dc41c09f3fcc 03-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Split out DeathRecipient behavior"
019fda2109ea79daee3fb4442080b1b83be2e7b3 28-Jul-2016 mukesh agrawal <quiche@google.com> WifiLogger: rename to WifiDiagnostics

WifiLogger is a bit of a misnomer, as the module is
really about gathering diagnostics generally, and
not just logs in the strict sense.

Moreover, using "log" in the name might lead to
confusion with the logging code we're going to
add to the wifi service.

Rename WifiLogger, to minimize confusion.

BUG=30566052
TEST=wifitests/runtest.sh

Change-Id: I2c2e0a1c250e48f4ffcbf14b59b30ae0e3c6a68e
ndroid/server/wifi/BaseWifiDiagnostics.java
ndroid/server/wifi/BaseWifiLogger.java
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiDiagnostics.java
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiStateMachine.java
24750cd1f8148d6a935bda96f3b17f22b0c1d8bd 03-Aug-2016 Rebecca Silberstein <silberst@google.com> WifiController: correct active state after ap mode

When a device is in AP mode and wifi is toggled, the device should end
the wifi hotspot and enter the connect mode for wifi. When wifi was
toggled in ApEnabledState, a wifi toggle would trigger a switch to
StaEnabledState. This state's enter method would trigger
WifiStateMachine to start supplicant, but would not indicate it should
be in connect mode. This is done by DeviceActiveState. This CL switches
the mPendingState in ApEnabledState from StaEnabledState to
DeviceActiveState.

Added a test to WifiControllerTest to cover this situation.

BUG: 30042498
Change-Id: I0792c06521e82e07a8c36648ebbd62c8babceaff
TEST: runtest frameworks-wifi
ndroid/server/wifi/WifiController.java
29639e03da8efa2db73c5c6254324c974e3ef1e3 02-Aug-2016 Christopher Wiley <wiley@google.com> Trivial nit fixes for WifiStateMachine

Remove superfluous generic arguments and an unused variable.

Change-Id: I99cb2eddac33e4be2acf33eead3634240809edd3
ndroid/server/wifi/WifiStateMachine.java
ef8f064681d7e3b92a0c3f2fdaa55a656e68486d 02-Aug-2016 Christopher Wiley <wiley@google.com> Split out DeathRecipient behavior

We can re-use this class to monitor client interface death as well from
the WifiStateMachine.

Bug: 30041062
Test: Can kill wificond underneath the framework with tethering on
and still see tethering taken down.
Test: unittests pass

Change-Id: I4dd60bd8eb674fc06d5eb301b0d8f10218126383
ndroid/server/wifi/SoftApManager.java
ndroid/server/wifi/StateMachineDeathRecipient.java
6154eb070b9f224a8daebf0a852d61f07d2c5cf3 20-Jul-2016 Samuel Tan <samueltan@google.com> ANQPFactory: catch all potential parsing errors

The ANQP Element parsing code that parses untrusted data broadcasted
by APs is currently untested, and might contain errors that will
trigger exceptions that can crash the system service (e.g. null pointer
exceptions).

To contain this risk, catch all possible exceptions from the invoking
ANQP element parsing code from ANQPFactory, and throw them again
as ProtocolExceptions, which users of ANQPFactory already catch.

BUG: 30230534
Change-Id: Icaba02c0e6739d94482cf4a5e704b59f8d4105b4
ndroid/server/wifi/anqp/ANQPFactory.java
7386aac1f563a4091e1efef1069824cfded95ddb 02-Aug-2016 Christopher Wiley <wiley@google.com> Merge "Use wificond to configure and start hostapd"
974f4ecb02b4560f18bfdaed3f6a2c78e5d42ee0 19-Jul-2016 Christopher Wiley <wiley@google.com> Use wificond to configure and start hostapd

Bug: 30292103
Test: Can toggle tethering on/off on angler/bullhead/upcoming hardware
Test: unittests pass

Change-Id: If15658bf9b236ff4572f436077f2ac307c87728e
ndroid/server/wifi/SoftApManager.java
ndroid/server/wifi/WifiInjector.java
5e4bcea1ebd98f7fb3141784a931b7b26bd511b1 01-Aug-2016 Rebecca Silberstein <silberst@google.com> [DO NOT MERGE] WifiStateMachine: better handle disconnect am: 225b5d3d3d
am: e99577c248

Change-Id: Ic04d9c14060eb1cf61e22fb9844381a0372777ca
f10cc08a130184356aa34dbf5f5a48848fc35823 30-Jul-2016 Roshan Pius <rpius@google.com> Merge "XmlUtil: Store NetworkSelectionStatus strings"
225b5d3d3da2356a124ce4cad4fc99d1b8303d21 29-Jul-2016 Rebecca Silberstein <silberst@google.com> [DO NOT MERGE] WifiStateMachine: better handle disconnect

Allow WifiStateMachine to disconnect by handling the CMD_DISCONNECT call
if supplicant is currently connecting. If it is not connecting, the
call will be ignored (to avoid cancelling scans and confusing supplicant).

BUG: 30507955
Change-Id: Id91f372efc180c2eb0449d7d53e24960d473690b
TEST: runtest frameworks-wifi
ndroid/server/wifi/WifiStateMachine.java
c76a06097e2f32acac48578dd6215b579b7ab2ee 28-Jul-2016 Glen Kuhne <kuh@google.com> Merge "WiFiMetrics: Add LastResortWatchdog success metric"
0e2540a1c1ba3c541a229b039a90789f93c41ee7 28-Jul-2016 Roshan Pius <rpius@google.com> XmlUtil: Store NetworkSelectionStatus strings

Storing direct enum values in the XML file makes it difficult to
deprecate these enums later. So, instead store the string associated
with these status/disable reason in the XML file. If any of the
status/disable reason is deprecated, the reverse lookup of the index
from the corresponding string array will fail. Such networks are
restored as enabled (along with any temp disabled networks).

Also, moved the existing logic to re-enable temporarily disabled
networks to the |parseFromXml| method since we anyway need to perform
the above checks there.

BUG: 30448209
Change-Id: Ib8b8b1ab2b730853dddb7a1d716a2150b1a0f491
TEST: Unit tests
ndroid/server/wifi/util/XmlUtil.java
c47c15bf9a4cebb5160400bcd6265385b256278b 28-Jul-2016 Dan Willemsen <dwillemsen@google.com> Fix build

DBG has been replaced by mVerboseLoggingEnabled

Change-Id: I1ccf0121532a49f1de1bc67aab5d694a378cf572
ndroid/server/wifi/WifiStateMachine.java
e73a6fa79ec0426127a60df5d281514b5aeafc8e 28-Jul-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachine: ignore disconnect am: fd21a76011 am: 09733d8fc9
am: 16a145abad

Change-Id: Ifee948e48f52352aec8bd53b87722203e4d60925
16a145abad55232c8f39077c2fc9efdc927f0d02 28-Jul-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachine: ignore disconnect am: fd21a76011
am: 09733d8fc9

Change-Id: I24b89ea6603fe85721bd74ccb827cb76c08a087c
4f0efb22287beeb0510df934a38d97103526660a 28-Jul-2016 Samuel Tan <samueltan@google.com> Merge changes I5b2c3dae,I2519ed8b

* changes:
Remove unused ANQP parsing code
Add VenueNameElement and I18Name tests
09733d8fc94e23cd296984c66809ed1d467a08ac 27-Jul-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachine: ignore disconnect
am: fd21a76011

Change-Id: Iee6d35fdb3b0f70058191b4ee55447d74daed173
cc1fe23b4a0afab4721465124fd30e9f349be243 27-Jul-2016 Ningyuan Wang <nywang@google.com> Fix tethering failure when wifi is not started
am: 37b06cd7aa

Change-Id: I580188c104f1729927834f95efe98a722aaa31ce
e3faf01abb79fe7288d3343dc09987e9af83f137 27-Jul-2016 Roshan Pius <rpius@google.com> Merge "WifiBackupRestore: Ignore non system created networks"
a063576ca089dcc6341372c30dd1bf0a7ca82efa 27-Jul-2016 Roshan Pius <rpius@google.com> WifiBackupRestore: Ignore non system created networks

Changes in the CL:
1. For new backup data, ignore networks non system app networks
during backup data generation.
2. For older wpa_supplicant.conf backup data, ignore non system
app networks during backup data restoration.

BUG: 29201888
Change-Id: Ie22a8f6d5eae03b01edf1420e2b8d3db5979449a
TEST: Unit tests
ndroid/server/wifi/WifiBackupRestore.java
0ebc04f557e62093ce22ca16ffb1943b1b4ed4b9 25-Jul-2016 Samuel Tan <samueltan@google.com> Remove unused ANQP parsing code

Remove classes used to parse ANQP elements that are unused.
The deleted classes are:
- CapabilityListElement
- CivicLocationElement
- EmergencyNumberElement
- GEOLocationElement
- GenericStringElement
- HSCapabilityListElement
- HSIconFileElement
- HSOsuProvidersElement
- NetworkAuthenticationTypeElement
- OSUProvider

BUG: 30291919
Change-Id: I5b2c3daeb5260043fbd650cafc2a512198253a4a
TEST: Framework compiles successfully.
ndroid/server/wifi/anqp/ANQPFactory.java
ndroid/server/wifi/anqp/CapabilityListElement.java
ndroid/server/wifi/anqp/CivicLocationElement.java
ndroid/server/wifi/anqp/Constants.java
ndroid/server/wifi/anqp/EmergencyNumberElement.java
ndroid/server/wifi/anqp/GEOLocationElement.java
ndroid/server/wifi/anqp/GenericStringElement.java
ndroid/server/wifi/anqp/HSCapabilityListElement.java
ndroid/server/wifi/anqp/HSIconFileElement.java
ndroid/server/wifi/anqp/HSOsuProvidersElement.java
ndroid/server/wifi/anqp/NetworkAuthenticationTypeElement.java
ndroid/server/wifi/anqp/OSUProvider.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
d40b710d29893b89212f2bb4bddaff00ab9742b4 25-Jul-2016 Samuel Tan <samueltan@google.com> Add VenueNameElement and I18Name tests

Add tests for parsing these two ANQP elements/fields.

BUG: 30360769
Change-Id: I2519ed8bd7a0d3cd6fb8a4ad0a26ab703a64f484
TEST: Unit tests pass.
ndroid/server/wifi/anqp/Constants.java
ndroid/server/wifi/anqp/I18Name.java
ndroid/server/wifi/anqp/VenueNameElement.java
800e83d2e78ebc96e0fbc69eed6cfe489ff7fec0 27-Jul-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiStateMachine: ignore disconnect" into nyc-mr1-dev
71a2ba75b0bd28f27cac87f82093890846611915 27-Jul-2016 Samuel Tan <samueltan@google.com> Merge "Remove Venue Group and Venue Type parsing code"
1d780915a0f00d23a81e19b2157d1b16463e09b6 27-Jul-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManagerNew: PNO network list generation"
432214f7b1643c25ace740e12f9e24793d018d2e 27-Jul-2016 Nathan Harold <nharold@google.com> solve merge conflicts of 66b5e76 to master

Change-Id: I0a9ed024caaab1d1df6687882491e40896e647e7
66b5e76660cd6dcede847c39af3e8dcd33f27361 27-Jul-2016 Ningyuan Wang <nywang@google.com> Fix tethering failure when wifi is not started
am: 37b06cd7aa

Change-Id: Ib6bfbf4affb36e1258947099b592878169b52a4d
83fc97d72a76fc522b774e79ad871b951560d33a 27-Jul-2016 Ningyuan Wang <nywang@google.com> Merge "Fix tethering failure when wifi is not started" into nyc-mr1-dev
fb93fa366b9e705ff014bec41dbd1d709e29e44c 25-Jul-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: PNO network list generation

Migrate over the PNO network list generation logic from old
WifiConfigManager. We're not going to have 2 separate sorting logic for
connected/disconnected PNO now.

The general sorting algo is as follows:
Place the enabled networks first, followed by temporarily disabled
ones, followed by permanently disabled ones. Among the networks with the
same status, sort them according to the number of times the network was
associated. If they'r still the same, prefer networks that were last
seen in the scan results.

Also, add methods to set/clear the |ScanResultCandidate| parameter for the
provided network via QNS.

BUG: 30156343
TEST: Unit tests

Change-Id: Ic398feee01a99141a545b363801873d52b36f221
ndroid/server/wifi/WifiConfigManagerNew.java
ndroid/server/wifi/WifiConfigurationUtil.java
da22e3d28b62005dce5fddd75207bd3d7a1745e1 26-Jul-2016 Glen Kuhne <kuh@google.com> WiFiMetrics: Add LastResortWatchdog success metric

Added a metric that tracks how often WifiLastResortWatchdog triggers
successfully fix wifi, allowing wifi to connect to a network after
triggering. It does not count a success, if the connection occurs
after a new network becomes available.

BUG=30407550
TEST=Unit Tests

Change-Id: I68d1f003fee9eb8074c04db141bd7b5c3089d57b
ndroid/server/wifi/WifiLastResortWatchdog.java
ndroid/server/wifi/WifiMetrics.java
4ab83906ab146d871434e2ae95c17d4b7f28606a 26-Jul-2016 Etan Cohen <etancohen@google.com> [NAN] Update link properties after creating agent.

Separate creation of agent from setting link properties. Results
in correct invocation of both OnAvailable() and OnLinkPropertiesChanged()
callbacks.

Bug: 30113801
Change-Id: I0447e286132bbcf40f297495a6e88973bd2e08f3
ndroid/server/wifi/nan/WifiNanDataPathStateManager.java
e7399556522efdd3f137aba31c49cbb8d95c59d6 22-Jul-2016 Samuel Tan <samueltan@google.com> Remove Venue Group and Venue Type parsing code

We currently do not use the Venue Group and Venue Type
codes that are parsed from the ANQP Venue Name Element,
so remove the code that parses and internally exposes these
fields.

Note: The Venue Name Duples in Venue Name ANQP element are
exposed on the ScanResult public API, so keep the parsing code
for that field.

BUG: 30291919
TEST: Framework compiles successfully.

Change-Id: I7c20daec9e5c9fe41253fb322c2cfce231846701
ndroid/server/wifi/anqp/Constants.java
ndroid/server/wifi/anqp/VenueNameElement.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/util/InformationElementUtil.java
fd21a7601142e03b4c93e7d1349e900cfc0a36fe 26-Jul-2016 Rebecca Silberstein <silberst@google.com> WifiStateMachine: ignore disconnect

WifiStateMachine allows tests to inject a disconnect by using the
CMD_DISCONNECT message. This message is now ignored in the
disconnecting and disconnected states. This would previously cause a
variety of failures depending on the timing due to the tests calling
disconnect before calling connect. This caused scans to be cancelled
and tests to fail.

BUG: 30313886
TEST: Created new sl4a tests (still in development) that stress test wifi
startup and connections. The specific failure is not seen with the
included changes. WiFi framework unit tests also pass.

Change-Id: I143a762f38fe3e4ecaf1be71b21553def3cfb239
ndroid/server/wifi/WifiStateMachine.java
ab5ceccc0b0eb1351f5b71659cc9203ba52ddc4e 25-Jul-2016 Randy Pan <zpan@google.com> resolve merge conflicts of 8382101 to master

Change-Id: I8e372466f169562db5d24740c0055655196cb7fb
8382101e121df0d8fc27e5cce74954591b96859a 25-Jul-2016 Randy Pan <zpan@google.com> QNS: candidate network BSSID
am: 828b94eca5

Change-Id: I2f4ffde80536f05c639586e2c19f05d0686e72ea
828b94eca5e0ffa67448f67a9dfb4d7eb492312a 23-Jul-2016 Randy Pan <zpan@google.com> QNS: candidate network BSSID

QNS recommends a network for WCM to connect or roam to by
returning that network's configuration with the BSSID stored
in the 'candidate' field.

In a corner case that if 1) two APs are within the same network
(SSID), 2) the two APs get exactly the same QNS score (one AP has
higher RSSI value but 2.4GHz, and the other is 5GHz but lower RSSI),
and 3) the 5GHz AP shows up in the scan results before the 2.4GHz AP,
QNS sets the wrong BSSID value. This change fixes that problem.

Bug: 30184472
Change-Id: I8c67ab194571ba17b853eae617fb659017f72969
Test: WiFi Framework Unit Tests & manual tests
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
a8b352811243e5e91af7faca3f427089d3b4a4f9 22-Jul-2016 Roshan Pius <rpius@google.com> Merge changes I1fed945c,If22de02b,I543ee5ba

* changes:
WifiConfigManagerNew: Unit tests for |hasEverConnected|
WifiConfigManagerNew: Set |hasEverConnected| flag
WifiConfigManagerNew: Create copy of internal config for update
d15c971f43e479d98fa1ca47c8402275238674de 22-Jul-2016 Etan Cohen <etancohen@google.com> [NAN] Initialization changes to make sure that callbacks are registered.
am: b089eee31b

Change-Id: Idf25f730392c5ea1fcefb0ef5d91e989b9004989
37b06cd7aae7fe27cfaf1d95cc9901548765406b 20-Jul-2016 Ningyuan Wang <nywang@google.com> Fix tethering failure when wifi is not started

getCurrentCountryCode() returns the country code which we already
sent to driver.

However, sometimes when wifi and location scan are not started,
we have a valid country code but we didn't set it. In this case
getCurrentCountryCode() returns null. This will confuse SoftApManager
and break tethering. This also causes WifiApDialog not to show 5GHz
option in the UI when user creates a new wifi hotspot config.

In this CL we fix the incorrectly reported country code by adding a
function getCountryCode() which returns a valid country code regardless
of was it sent to driver or not.
SoftApManager and WifiApDialog will use this function to make decisions.

In addition, we also rename getCurrentCountryCode() to getCountryCode
SentToDriver() for better readability.

BUG=30200338
TEST=compile
TEST=unit tests
TEST=manual tests

Change-Id: I5ba576509f9f401f4d57a4628a147ac8871552c0
ndroid/server/wifi/WifiCountryCode.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
b089eee31b0a7cf4d389eda3f710840668f008cf 21-Jul-2016 Etan Cohen <etancohen@google.com> [NAN] Initialization changes to make sure that callbacks are registered.

- On disable: execute commands before uninitializing the NAN (not good
enough since can't force command order execution in queue)
- On enable: set HAL init flag to false to force re-registration (not
high cost)

Bug: 29105100
Change-Id: Iea6748aea2f73d26e2d63c17e6442e884ebc273f
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanStateManager.java
6d02f49e05363e96776062d6979240472d0e6701 22-Jul-2016 Etan Cohen <etancohen@google.com> [NAN] Modify arguments from \"array, length\" to \"array\"
am: 80a6988b53

Change-Id: Ife00dd5e7f2e10ceb849ac52740081147b529793
5c1d9b6bd552160acb5227fe4a3bcfa2cc20b957 21-Jul-2016 Samuel Tan <samueltan@google.com> VenueNameElement: fix off-by-one enum bounds check am: 48ee5f1e1c am: 37ec3aff4c am: 2d03259907 am: deab674fa9 am: 2ef5e899a8 am: eeec7aa64c
am: 010f9fcd0f

Change-Id: Ie0a900e4089972ac3f9a02ef91dd6fa4eb52cafa
010f9fcd0f5d66305ec07d2c4b82afdab441857e 21-Jul-2016 Samuel Tan <samueltan@google.com> VenueNameElement: fix off-by-one enum bounds check am: 48ee5f1e1c am: 37ec3aff4c am: 2d03259907 am: deab674fa9 am: 2ef5e899a8
am: eeec7aa64c

Change-Id: I59556031b8389a6ede44d3d138abcf54f8ded848
eeec7aa64cd91a16ccbdc51d00c40755963fa677 21-Jul-2016 Samuel Tan <samueltan@google.com> VenueNameElement: fix off-by-one enum bounds check am: 48ee5f1e1c am: 37ec3aff4c am: 2d03259907 am: deab674fa9
am: 2ef5e899a8

Change-Id: Id40ceccfd2af40c5b82b679caca1e519a39166ac
58a8f2e0ac9894831dff6d7f18c9c92df6eda381 21-Jul-2016 Samuel Tan <samueltan@google.com> VenueNameElement: fix off-by-one enum bounds check am: 48ee5f1e1c am: 37ec3aff4c am: 2d03259907 am: deab674fa9
am: 2ef5e899a8

Change-Id: Ie338a574ea975993e632a1add537664749cc5b7c
2ef5e899a8cfee7ce41e9e219b271fb250ba9cf5 21-Jul-2016 Samuel Tan <samueltan@google.com> VenueNameElement: fix off-by-one enum bounds check am: 48ee5f1e1c am: 37ec3aff4c am: 2d03259907
am: deab674fa9

Change-Id: Ie553aba21c393b83166b7c225b982cddada9424e
635e01902944c3367ccca28611a5b0b718f98bfd 21-Jul-2016 Roshan Pius <rpius@google.com> WifiScanningServiceImpl: Add ClientInfo null checks am: 5382acb5eb
am: 0df9502510

Change-Id: Ibd4c01c4a32935d2a1d72ef179dbca9d8b3ff2c7
0df95025105b818500b773c23223608e48e3cb1c 21-Jul-2016 Roshan Pius <rpius@google.com> WifiScanningServiceImpl: Add ClientInfo null checks
am: 5382acb5eb

Change-Id: I653adcc6737147a0121427929af95309700e5724
5382acb5eb3a0448a32651dcc7fe9fd634ce0e38 20-Jul-2016 Roshan Pius <rpius@google.com> WifiScanningServiceImpl: Add ClientInfo null checks

Add missing null checks for |ClientInfo| in a few places. ClientInfo
could end up being null if there was a pending cleanup of the client
before processing of the request in the appropriate state machine.

Also, add a unit test to simulate the scenario in the bug specified.

BUG: 30241457
Change-Id: Ic4412ae03b5176764b10cba357d19086c0c09e6e
TEST: Unit tests
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
2d327a58a4d39c7b1b700bf06d2fbbe7fb68c7c4 16-Jul-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Unit tests for |hasEverConnected|

Changes in the CL:
1. Migrated the existing unit test scenarios for |hasEverConnected| flag
setting to WifiConfigManagerNew.
2. Moved the enterprise config change detection tests to
|WifiConfigurationUtilTest|.

BUG: 30156343
Change-Id: I1fed945c4d5b0e65841718bfa38ca50610a90393
TEST: Unit tests
ndroid/server/wifi/WifiConfigurationUtil.java
a03a9976eb3186a25fa8341706ef807fe6ac1afd 18-Jul-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Set |hasEverConnected| flag

1. Migrate the existing |wasCredential| change method in
|WifiConfigManager| to |WifiConfigurationUtil|.
2. Integrate this into the |WifiConfigManagerNew|.
3. Move/Refactor the |hasIpChanged| & |hasProxyChanged| helper
methods to |WifiConfigurationUtil| as well.

While there,
Change couple of occurences of {@code true} to |true| in javadocs to be
consistent across the class.

BUG: 30156343
Change-Id: If22de02b6ea6f5a9b0e718c9d3dbd9693d9db599
TEST: Unit tests in the next CL.
ndroid/server/wifi/WifiConfigManagerNew.java
ndroid/server/wifi/WifiConfigurationUtil.java
1230dec4f7c696a08b71785bf1b92d0ba541eccc 18-Jul-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Create copy of internal config for update

Create copy of the internal config when updating networks. This will
ensure that the network updates are atomic (i.e any errors
in |installKeys|, etc after the merge will not modify the
original configuation).

While there,
Make clones of all externally provided config when merging them over.

BUG: 30156343
Change-Id: I543ee5ba14e2451ef77d7d511465cd8c62585491
TEST: Unit tests.
ndroid/server/wifi/WifiConfigManagerNew.java
e4a3281e33c378ebfb64192612c7164e464809bb 20-Jul-2016 Randy Pan <zpan@google.com> WCM: reset last connection BSSID am: 179d479d04
am: 0caa4737e9

Change-Id: I53ff554c262fd0e2b3a61e19326ce80f7872436c
0caa4737e93e173777d03a375d06dd87711f6593 20-Jul-2016 Randy Pan <zpan@google.com> WCM: reset last connection BSSID
am: 179d479d04

Change-Id: I74c796d55b3cf56dd159d15a6aa7b44e86889a75
deab674fa9191e4028df00532502b29f0aedba05 20-Jul-2016 Samuel Tan <samueltan@google.com> VenueNameElement: fix off-by-one enum bounds check am: 48ee5f1e1c am: 37ec3aff4c
am: 2d03259907

Change-Id: I3aec7dac23cd6e384c5b65d29d90263f1fbf34c3
2d032599075dd4bd72dc8e4f5c19ca227110f45f 20-Jul-2016 Samuel Tan <samueltan@google.com> VenueNameElement: fix off-by-one enum bounds check am: 48ee5f1e1c
am: 37ec3aff4c

Change-Id: I7e07d99f997a4bc07f2fb57626110374c84b902d
37ec3aff4c02b1cfcdd809762576348ebe9d8db0 20-Jul-2016 Samuel Tan <samueltan@google.com> VenueNameElement: fix off-by-one enum bounds check
am: 48ee5f1e1c

Change-Id: Ic85f78c41d25149e5db3840914e2b6c41a75490b
179d479d047c22d94d1db53980156986b0dba710 18-Jul-2016 Randy Pan <zpan@google.com> WCM: reset last connection BSSID

Reset WCM's record of last connection attempt BSSID when WiFi
is disconnected or WiFi/WCM is disabled.

Bug: 30140653
Tests: WiFi framework unit tests & manual tests
Change-Id: I70b285ffcc8783db587b3fcc14f8f85ffa6122f2
ndroid/server/wifi/WifiConnectivityManager.java
48ee5f1e1c6e2a2dc63e9cb84c42f532c8a6847a 18-Jul-2016 Samuel Tan <samueltan@google.com> VenueNameElement: fix off-by-one enum bounds check

Fix the off-by-one error in the conditionals that check
whether the Venue Group and Venue Type codes in the ANQP
element are in the "Reserved" range.

BUG: 30169673
BUG: 29464811
TEST: Manually set up AP with Hotspot 2.0 support, broadcasting
Venue Group value 0xc, and ensure that device does not
crash when in range of this AP.

Change-Id: I14adc3a919e19b67fc0f46bf09d0cffb88b5354e
ndroid/server/wifi/anqp/VenueNameElement.java
80a6988b532a1a63a164a6ff7f63ac88762bd633 16-Jul-2016 Etan Cohen <etancohen@google.com> [NAN] Modify arguments from "array, length" to "array"

Arrays carry their own lengths. There's no need to provide mechanism
to 'shave' the array - could be done explicitly by caller if needed.

Bug: 29617160
Change-Id: I98ca3298b104c9ad4bc9933694d0aea55b7d633d
ndroid/server/wifi/nan/WifiNanDataPathStateManager.java
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
3efd47ff5e926cc1fa042e288e129df10fa4ec83 18-Jul-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Split off Multicast Lock handling"
bf4fa051597f472719a5d07346b110845d91b7e0 15-Jul-2016 zhangshuxiao <zhangshuxiao@xiaomi.com> Some networks can not connect automatically.

Becasuse the key of scan cache is supplicant's networkid,
when supplicant process restart, the supplicant's networkid
may be regenerated, so clear scan cache when loading the
configured networks.

BUG: 30158982

Change-Id: Iec94e8eef517bd0411eb0be53a31cdb34a1494cf
Signed-off-by: zhangshuxiao <zhangshuxiao@xiaomi.com>
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigManagerNew.java
d32db337f500fb25ca0e4b7bc470521d333d2fcc 14-Jul-2016 Roshan Pius <rpius@google.com> Merge changes I281ddcd6,Ic98147a9,I2c907ba1,I341276ec

* changes:
WifiConfigManagerNew: Scan results to config lookup
WifiConfigManagerNew: Change the config merge logic
WifiConfigManagerNew: Implement enable/disableNetwork
WifiConfigManagerNew: Implement network status update
61312e14a088a9487d4db64f08285162476e870f 09-Jul-2016 Paul Stewart <pstew@google.com> Split off Multicast Lock handling

Delegate multicast lock handling in WifiServiceImpl to a separate
module named WifiMulticastLockManager. Have this delegate as
an injectable, so we can later test WifiServiceImpl.

Fixes: 30095185

Change-Id: I6201939cd089df9f6fc0aa3b0061f611ca24b4d7
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiMulticastLockManager.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
22b5eca14a99c2bbeeae8361c665923ce71e1603 28-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Scan results to config lookup

Add methods to perform:
1. Scan results to saved network lookup.
2. Cache the scan results for each saved network. Also, need to maintain
this list so that it doesn't grow uncontrolled.
3. Rename ScanDetailUtil to ScanResultUtil to accomodate scan result
helper classes for encryption type lookup.
4. Change ScanDetailCache to always trim the cache to the provided fixed
size.

While there,
Fix couple of checkstyle errors in the test.

BUG:29822168
TEST: Unit tests
Change-Id: I281ddcd606d73b8d04d6c9b33b9fc2d4f408f173
ndroid/server/wifi/ScanDetailCache.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigManagerNew.java
ndroid/server/wifi/WifiConfigurationUtil.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiNetworkHistory.java
ndroid/server/wifi/util/ScanDetailUtil.java
ndroid/server/wifi/util/ScanResultUtil.java
1fa858ae90e82658e2d5332f66c62c671e736bfb 27-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Change the config merge logic

Modify the merging logic from using |TextUtils.isEmpty()| to determine
if the field has a value to be merged or not to a simple null check. The
older check would prevent apps from resetting some fields later
if needed.

While there,
1. Add a unit test for |WifiEnterpriseConfig| object updates.
2. Add null checks for all publicly exposed fields in |WifiConfiguration|.

PS: |WifiEnterpriseConfig| copy constructor already merges the
provided configuration by checking if the value is set or not. So, we
don't need to add any special merging logic in WifiConfigManagerNew.

BUG: 29641570
Change-Id: Ic98147a9c07d2d3a878f103a9b2ea4988f96924f
TEST: Unit tests
ndroid/server/wifi/WifiConfigManagerNew.java
a44a020c95ad74b585c63e1d739942d20d009d23 24-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Implement enable/disableNetwork

Implement the |enableNetwork| & |disableNetwork| public methods
used to modify the network status from WifiManager API's.
Added unit-tests for verifying the new public methods.

While there,
1. Fixed a permission check bug in |updateLastConnectUid| and
added a unit test.
2. Handle invalid networkId's in all the public methods and add unit
tests for verification.

BUG: 29606491
Change-Id: I2c907ba19e50d7684befa3e24fbb4e232cd89ae7
TEST: Unit tests
ndroid/server/wifi/WifiConfigManagerNew.java
fc789b2227e92372b2489ca54691310800835a50 24-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Implement network status update

Implement the |updateNetworkSelectionStatus| & |tryEnableNEtwork|
public methods used to modify the network status.
Added unit-tests for verifying the new public methods.

BUG: 29606491
Change-Id: I341276ece387ce86c4ae77c097c9b8237c3f996d
TEST: Unit tests
ndroid/server/wifi/WifiConfigManagerNew.java
53d0cfeff22da1edaf94e02029355a78f789e38e 14-Jul-2016 Etan Cohen <etancohen@google.com> [NAN] Expose NAN discovery interface MAC address to app.
am: d2683c76cb

Change-Id: I7eb2e62d2832b997563edd0a3055429a15b0022e
40165256a09d6c8193bde2daed04139f5c9914aa 14-Jul-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Tear down AP when wificond's IApInterface dies"
37b8e5411db4e55b4bad55fb61e467082ea77ebf 14-Jul-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Make SoftApManager.StartedState its own state"
b71b9a142dba5fd80001aca515122f4549d72568 14-Jul-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use wificond to setup driver for soft AP"
d2683c76cbe9a518b8e9e8b1c1a725c77c1858e5 08-Jul-2016 Etan Cohen <etancohen@google.com> [NAN] Expose NAN discovery interface MAC address to app.

Feedback NAN discovery interface MAC address to app. Make sure
that callback (onIdentityChanged) is called whenever a connection
is successful - whether or not underlying HAL called it.

Bug: 30000035
Change-Id: Ibaa332992c4bb1078a72856a8ae7ca8dfebce05c
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
81409e3f8a62ca462bec2f8ed13b4c7b4ffe81e9 13-Jul-2016 Etan Cohen <etancohen@google.com> [NAN] Simplify printing (keeping track of) message types
am: 837a077af5

Change-Id: Ia1cfe762cac9c26591b6a6c70f2fc1a8af421b22
4cc3fa49712907e97dbdc4fc72a7f7e2ee523386 13-Jul-2016 Etan Cohen <etancohen@google.com> [NAN] Replace SparseArray<Integer> with SparseIntArray
am: 0e54c6d97f

Change-Id: I3138105ef372448bfa4a2546b87ff676e06ff9f6
736132bc7bc92bf17cbeeea26f0bf44d498e46e0 07-Jul-2016 Christopher Wiley <wiley@google.com> Tear down AP when wificond's IApInterface dies

Test: Can start/stop wificond with the AP on/off see the AP torn down.
Test: Added unittests
Test: Unittests pass

Bug: 29607308

Change-Id: I84f35e2240c6cd51d5deedb4042b270116078a4f
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/SoftApManager.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
a6ce5171a08d3b9c7820afe7cc07d0044dd818f6 12-Jul-2016 Christopher Wiley <wiley@google.com> Make SoftApManager.StartedState its own state

Remove StartedState as a substate of IdleState, since both states
handle all commands expected by the state machine. This has the
pleasant side effect of making transitions easier to reason about.

Bug: 29607308
Test: Tethering continues to work, unittests pass on bullhead.

Change-Id: Iee0a4aa2ba9e847d958a478f24473a53dde10498
ndroid/server/wifi/SoftApManager.java
38b756e46f913cdbe07f81d38cbb05303f135493 13-Jul-2016 Etan Cohen <etancohen@google.com> resolve merge conflicts of e27021e to master

Change-Id: Iebb3cdb6d210dbaf2905eafa5ce1b69ba428f0dc
5efa985cf2821e2b33e8bf4d40c76c154c1cd0d3 13-Jul-2016 Etan Cohen <etancohen@google.com> resolve merge conflicts of 7124382 to master

Change-Id: Ibf0fb0b4488459a2e9b31735e7d10ef8c7dc7177
ed63ba7401bc545513ca91dfbb683aec4c3851dc 24-Jun-2016 Christopher Wiley <wiley@google.com> Use wificond to setup driver for soft AP

Test: can toggle soft AP mode on and off via UI
Test: unittests pass

Bug: 29607308

Change-Id: I62b4f04a1e46bcbb1adc12eed294d47f6907f0f8
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
7a43180da4a54cb7f203b0e30435e53a3a0f7bd3 30-Mar-2015 Katsumi Ouwa <katsumi.xa.ouwa@sonymobile.com> Fix the functionality of config_wifi_enable_disconnection_debounce

The feature of link debouncing cannot be disabled even if
config_wifi_enable_disconnection_debounce is set to false. To disable
it correctly, this patch fixes the functionality of this flag.

(cleaned up from original submitter's post to match master.)

Fixes: 29591195
Change-Id: I832c251a7679b06c5377f1adfe36bf2665d1d7c2
ndroid/server/wifi/WifiStateMachine.java
67cf14f10fe795183794728ec28227ba0c1a9521 12-Jul-2016 mukesh agrawal <quiche@google.com> Merge \"WifiNative: make getLocalLog() an instance method\" into nyc-mr1-dev
am: 62a41b4a43

Change-Id: I7b31bd72900b6713d4b8c1679caaf09cd6447937
93def90bb9accc454c63b5ff8d960d953c745aea 12-Jul-2016 mukesh agrawal <quiche@google.com> WifiConfigManager: move dumping of LocalLog
am: 20d76f6f2f

Change-Id: I203dff9b54b091fd72b2cc1b0933e0dc809b684a
62a41b4a43cba3fad221291533c145863b7001f0 12-Jul-2016 Mukesh Agrawal <quiche@google.com> Merge "WifiNative: make getLocalLog() an instance method" into nyc-mr1-dev
20d76f6f2f264cc27a8821e46ad1bd1dc50700e7 23-Jun-2016 mukesh agrawal <quiche@google.com> WifiConfigManager: move dumping of LocalLog

The dump() method of WifiConfigManager dumps the
LocalLog that's used by WCM. That would make sense,
except that the LocalLog that WCM uses isn't actually
owned by WCM.

Instead, the LocalLog is allocated by WifiNative, and
shared by multiple objects. (The sharing is safe, because
LocalLog's methods are synchronized.)

Since the LocalLog in question is a shared facility,
let's move dumping of the LocalLog to WifiLogger.

BUG=29424414
TEST=unit tests
TEST=manual

Manual test
$ adb bugreport foo.zip
$ unzip foo.zip
$ grep 'WifiNative LocalLog' bugreport*.txt
-> expect a match

Change-Id: I291ac29385472fd0e56fcb522d818dcffcedfe36
(cherry picked from commit 6b42d03b9d92d6167a0629b042b2a3c2e2489a1b)
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiLogger.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
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
43734f3f4f41aa4ac1ab6c29d357e8237afbbaf3 09-Jul-2016 Samuel Tan <samueltan@google.com> ScanDetail: set scan result passpoint flag in constructor am: d0a7e444a6
am: 1c139a41a6

Change-Id: I379a55546543e04bcf0ce9b061af78fbd8f757ee
1c139a41a62f4bf421aa859a86a6a1427c4b3091 09-Jul-2016 Samuel Tan <samueltan@google.com> ScanDetail: set scan result passpoint flag in constructor
am: d0a7e444a6

Change-Id: Idd109c99bd36865826839f177f56ef15b0e3340c
837a077af5a6ff74958bb733792b0d6b978ee1de 06-Jul-2016 Etan Cohen <etancohen@google.com> [NAN] Simplify printing (keeping track of) message types

Use utility to automatically extract constants for message types.

Change-Id: Iadf1dcb751a45b680fab0736ccb8d2eb73b29342
ndroid/server/wifi/nan/WifiNanStateManager.java
0e54c6d97f9d1292fcbce53f4fab29600ecb45e2 28-Jun-2016 Etan Cohen <etancohen@google.com> [NAN] Replace SparseArray<Integer> with SparseIntArray

Code clean-up.

Change-Id: I3b0b916e87e4b17b47bf6f4ffa4efc3b5e60de60
ndroid/server/wifi/nan/WifiNanServiceImpl.java
e27021e4c8c369554880ab522a1e27942b15687b 23-Jun-2016 Etan Cohen <etancohen@google.com> [NAN] Queue all sent messages (follow-up Tx) irrespective of firmware capability

Firmware queues a limited number of messages for transmission (provides that
limit in capabilities). Add a queue on the framework side which maintains all
send message requests in a queue and forwards requests to the firmware as it
becomes available.

Does not add memory since simply queues the command objects which would be queued
in any case.

Bug: 28690415
Change-Id: I9bf1c59f7e0a6b79dcb0d3b8a4dd9548811c48e3
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
7124382d477741945bdd3af7fec99b702fd1fc23 20-Jun-2016 Etan Cohen <etancohen@google.com> [NAN] NAN data-path factory - create a network.

Create a NAN data-path link: integrates with ConnectivityService and
utilitize the NAN HAL to build the L2 link.

Bug: 26562610
Change-Id: Ibd627816df9a52fa44fbb01ac7fd0eaa1afa57e3
ndroid/server/wifi/nan/WifiNanDataPathStateManager.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
d0a7e444a6af85ccaa03e52bcb82de7f66033cfb 08-Jul-2016 Samuel Tan <samueltan@google.com> ScanDetail: set scan result passpoint flag in constructor

ScanDetail does not set the ScanResult.FLAG_PASSPOINT_NETWORK flag
for its |mScanResult| member in its constructor. This causes
problems when in WifiTracker, which uses this flag from the
ScanResult to determine whether or not to associate Passpoint configs
with Passpoint access points.

Fix this by setting this flag in the ScanDetail constructor.

BUG: 29550309
TEST: Manually verify that the "Available via $PROVIDER" subtext
appears under the SSIDs of Passpoint networks, when we have
the credentials for connecting to these passpoint networks
installed, but are currently connected to a non-Passpoint
network.

Change-Id: I1da2c0eff336331deae4dbd86f4c6afc3d456db9
ndroid/server/wifi/ScanDetail.java
6fa554aba5cb16163af42a2241b19651cfa6ceb8 08-Jul-2016 Roshan Pius <rpius@google.com> Merge changes I89184fa3,I55f1ac4f

* changes:
WifiConfigManagerNew: Add remove network unit tests
WifiConfigManagerNew: Send broadcasts & write store
cf3cc90966d3d69a50530f618161b5ef0ed31357 07-Jul-2016 Samuel Tan <samueltan@google.com> Merge "WifiConfigManager: do not use ScanDetailCache to set SSID for... passpoint networks"
cecf883aa219d68120902c6207903756e75b5ce3 07-Jul-2016 Samuel Tan <samueltan@google.com> Merge \"[DO NOT MERGE] WifiConfigManager: do not use ScanDetailCache to set SSID for... passpoint networks\" into nyc-mr1-dev
am: da2e11e7e8

Change-Id: I949bd1cf66a0af39dd54c1d9ad168729f041ff94
da2e11e7e8ba2cc022c9c74e659ada9f1f27382e 07-Jul-2016 Samuel Tan <samueltan@google.com> Merge "[DO NOT MERGE] WifiConfigManager: do not use ScanDetailCache to set SSID for... passpoint networks" into nyc-mr1-dev
ad8d44d3239610cca3aa630035bebacd9677ef5a 06-Jul-2016 Samuel Tan <samueltan@google.com> [DO NOT MERGE] WifiConfigManager: do not use ScanDetailCache to set SSID for...
passpoint networks

For passpoint networks, set the WPA supplicant SSID field for the
network being selected in WifiConfigManager.selectNetwork() to the
SSID stored in the WifiConfiguration argument, since we know that QNS
will set this field to the SSID of the network it has selected.

This replaces the previous logic of looking for the SSID in a cached
ScanDetail, which is not guaranteed to match correspond to the network
selectNetwork() is attempting to connect to.

While there:
- Remove ScanDetailCache.getFirst(), since it is no longer used
anywhere else.

BUG: 29946781
TEST: In the lab, there are currently two Passpoint APs, each
broadcasting a network that the same Passpoint profile can be
used to connect to. One of these networks ("X") rejects the Passpoint
credentials presented to it, while the other ("Y") accepts them. Verify
that a device loaded with the aforementioned Passpoint profile
will try to connect to X and fail, and then attempt to connect to
Y and succeed.

Change-Id: Ic5292d00fbb4c1e999a5c9e49390c7c13f4eb17c
ndroid/server/wifi/ScanDetailCache.java
ndroid/server/wifi/WifiConfigManager.java
f79f8aa786b7f66cfa18ab795d2e6f5829cb05ce 07-Jul-2016 Samuel Tan <samueltan@google.com> Merge \\"ConfigBuilder: only set anonymous identity for EAP-TLS/TTLS configurations\\" into nyc-mr1-dev am: 9288564d29
am: 4527956474

Change-Id: I4842ceff3ba50df9553ff64787a060865a1fddc2
452795647406bfac2ce7d2671a3158a5be20e0b4 07-Jul-2016 Samuel Tan <samueltan@google.com> Merge \"ConfigBuilder: only set anonymous identity for EAP-TLS/TTLS configurations\" into nyc-mr1-dev
am: 9288564d29

Change-Id: I619585341646fababcbb998ff43e497f6ddf474a
9288564d29d00c4f6d7fe3a581c5c70635f04d74 07-Jul-2016 Samuel Tan <samueltan@google.com> Merge "ConfigBuilder: only set anonymous identity for EAP-TLS/TTLS configurations" into nyc-mr1-dev
44381a1aa4faa21a3dfc16ec4485069a58c966a8 02-Jul-2016 Samuel Tan <samueltan@google.com> WifiConfigManager: do not use ScanDetailCache to set SSID for...
passpoint networks

For passpoint networks, set the WPA supplicant SSID field for the
network being selected in WifiConfigManager.selectNetwork() to the
SSID stored in the WifiConfiguration argument, since we know that QNS
will set this field to the SSID of the network it has selected.

This replaces the previous logic of looking for the SSID in a cached
ScanDetail, which is not guaranteed to match correspond to the network
selectNetwork() is attempting to connect to.

While there:
- Use the BSSID set by WSM for the network we are connecting to, to
get the ScanDetail we need to set |mSelectedPasspointNetwork|.
Using this BSSID ensures that we end up getting the NetworkDetail
corresponding to the passpoint network we are selecting.
- Remove ScanDetailCache.getFirst(), since it is no longer used
anywhere else.

BUG: 29946781
TEST: In the lab, there are currently two Passpoint APs, each
broadcasting a network that the same Passpoint profile can be
used to connect to. One of these networks ("X") rejects the Passpoint
credentials presented to it, while the other ("Y") accepts them. Verify
that a device loaded with the aforementioned Passpoint profile
will try to connect to X and fail, and then attempt to connect to
Y and succeed.

Change-Id: Iaac40738c952684694ef07f244cd8880e0d91fa3
ndroid/server/wifi/ScanDetailCache.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiSupplicantControl.java
ee9e67dff11a76c00f869facc4217f44fd1a9b6a 06-Jul-2016 Roshan Pius <rpius@google.com> Merge \\"WifiNetworkHistory: Ignore file not found exceptions\\" into nyc-mr1-dev am: 958eb1fb96
am: 6cb90c74c0

Change-Id: Ia26a124af0fda3ceeb7193175ab141660e43585b
6cb90c74c04b0945a36531fbc3f6d5c838dadc4c 06-Jul-2016 Roshan Pius <rpius@google.com> Merge \"WifiNetworkHistory: Ignore file not found exceptions\" into nyc-mr1-dev
am: 958eb1fb96

Change-Id: I2b2cc0be16c4597e935c39e24f65c0aceae7a1d7
958eb1fb96709b94ddd7b4310908de9ece986d2c 06-Jul-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiNetworkHistory: Ignore file not found exceptions" into nyc-mr1-dev
478dd448011f5b9cf9dfaa0c5c950399b88d90d1 06-Jul-2016 Roshan Pius <rpius@google.com> WifiNetworkHistory: Ignore file not found exceptions

Raise a info log message instead of logging an error when the
networkHistory.txt file is not found.

While there,
Cleanup the logs to remove the "reset to default" sentence from the logs.

BUG: 29641462
Change-Id: I572f248d0991d66ebdd118fc7ddb26680e1d7b15
TEST: Manual testing.
ndroid/server/wifi/WifiNetworkHistory.java
7649dca35ee5375eceb90b36923eb753f0e962ef 02-Jul-2016 Samuel Tan <samueltan@google.com> Merge "ScanDetail: do not inherit ScanResult.seen if it is unset"
bc23392fd5f2d7df4c00b1647016394b2bbbd78f 01-Jul-2016 Mitchell Wills <mwills@google.com> Merge \\"Fix NPE in WifiScanningService\\" into nyc-mr1-dev am: a03e931932
am: e5911436b9

Change-Id: I28c07eff5677aa01e76998c463ad30e17ff7a8cb
e5911436b9498b42a4bc607e62123fa4bd171605 01-Jul-2016 Mitchell Wills <mwills@google.com> Merge \"Fix NPE in WifiScanningService\" into nyc-mr1-dev
am: a03e931932

Change-Id: I6c6a9d2faa83e740160edae707a24180c29b424b
a03e931932912355c9656216813458a9e6054f59 01-Jul-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix NPE in WifiScanningService" into nyc-mr1-dev
ed70365e5a3a6e2b06c2d4d06603f97596f1124b 01-Jul-2016 Mitchell Wills <mwills@google.com> Fix NPE in WifiScanningService

Fixes: 29924121

Change-Id: Iabb8111d0d4cdef6b02710f6ea2b3545f1b6d70b
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
5b151dbe4c9dc7812bb4faaa115a254f8dd7667f 01-Jul-2016 Roshan Pius <rpius@google.com> resolve merge conflicts of 2619fd5 to master

Change-Id: Idd8dd35ab210e6b6cf3f25bd0d58e8d9b7ac9da5
2619fd50a4c6817f7635df9bdf807dab480139d6 01-Jul-2016 Roshan Pius <rpius@google.com> WifiStateMachine: Set supplicant log level after restart
am: 221874210c

Change-Id: Ia6aae70f311fe192e353d814f1c81f8c505d2b01
221874210c77844242774ba4117e61b0bdfeee27 30-Jun-2016 Roshan Pius <rpius@google.com> WifiStateMachine: Set supplicant log level after restart

Currently we lose |wpa_supplicant|'s debug log setting when we restart
|wpa_supplicant|. Re-activate the verbose logging setting for
|wpa_supplicant| (if verbose logging is enabled) after starting
supplicant every time.

BUG: 29902287
Change-Id: I04512ab82a7b16e24db1d959f9cc7e7a6d23174f
ndroid/server/wifi/WifiStateMachine.java
a9bd731cd82b371e33389b55249b376002912f07 30-Jun-2016 Samuel Tan <samueltan@google.com> ScanDetail: do not inherit ScanResult.seen if it is unset

Set |ScanDetail.mSeen| to the current system time, if the |seen| field
of the ScanResult passed to the ScanDetail constructor is unset. This
ensures that |ScanDetail.mSeen| will always contain a valid timestamp,
and consequently, that ScanDetail.getSeen() always returns a valid
timestamp.

BUG: 29877741
TEST: Manual inspection of debug messages in ScanDetailCache, indicating
the return values of ScanDetail.getSeen().

Change-Id: I46651d5b7b16f1ac0c46830fc6e0f0e187de830d
ndroid/server/wifi/ScanDetail.java
474d5ae4e27519e9f274c531aa0e89cad89c6893 29-Jun-2016 mukesh agrawal <quiche@google.com> Merge \"WifiLogger: use R for ring buffer sizing\" into nyc-mr1-dev
am: 21d43031a1

Change-Id: Ic1ea39469abf9be35992d3bcff67af7caefdca40
8e7a55438cdd329cc15e07d72d7b8aecf3987603 29-Jun-2016 mukesh agrawal <quiche@google.com> Merge \"WifiLogger: speed up compression\" into nyc-mr1-dev
am: 06a68478d7

Change-Id: I2c0d450eff1b4c3331cee062cd97ed6526d1e4c7
2b5c3084ddde8c4f332a52c2c5eb29137ab183de 29-Jun-2016 Rebecca Silberstein <silberst@google.com> Merge changes from topic \'cherrypickWifiWatchdogResetOnTrigger\' into nyc-mr1-dev
am: 9a53ff620c

Change-Id: I2bc5dcf37f16a6036ece6d863b76fe5326978db2
21d43031a1141caae823977a1e1015b596f47895 29-Jun-2016 Mukesh Agrawal <quiche@google.com> Merge "WifiLogger: use R for ring buffer sizing" into nyc-mr1-dev
06a68478d7ab476da36b70d26eee9b0adef3d03c 29-Jun-2016 Mukesh Agrawal <quiche@google.com> Merge "WifiLogger: speed up compression" into nyc-mr1-dev
9a53ff620c9281be423227bc48378d9aad3f37e0 29-Jun-2016 Rebecca Silberstein <silberst@google.com> Merge changes from topic 'cherrypickWifiWatchdogResetOnTrigger' into nyc-mr1-dev

* changes:
DO NOT MERGE WifiLastResortWatchdog: reset wifi on trigger
DO NOT MERGE WifiController: Add CMD_RESET_WIFI command
DO NOT MERGE WifiLockManager: create class to manage WifiLocks
a3a7ae2fd2d82ffd0c352f5dfbee29c571ffc810 29-Jun-2016 Randy Pan <zpan@google.com> WCM: Fix a build error introduced by auto merger.

Change-Id: I808136d68263d0802fe0e00cc50d57fae3fcbe9b
ndroid/server/wifi/WifiConnectivityManager.java
868f60b9bfbb394d113d50567da1977ec8afc890 29-Jun-2016 Randy Pan <zpan@google.com> WCM: periodic single scan timer cancellation am: ab7a54087b
am: 2fd7946753

Change-Id: Ied46e7767594bfa6a5040ef8338c9c17121f72f8
a384e26815f9a7edd760cbef9b92fb9925e9e5ca 29-Jun-2016 Randy Pan <zpan@google.com> resolve merge conflicts of fe51ea2 to master

Change-Id: I57d02ae2e0ecd7327e0be2ae5b0b5e3b43e43f70
e1db4e04054d8cc302fb96c4f78370845650504e 23-Jun-2016 mukesh agrawal <quiche@google.com> WifiLogger: use R for ring buffer sizing

Use Resources to determine ring-buffer sizing.
This is to support board-specific ring-buffer
sizes.

BUG=29225988
TEST=unit tests
TEST=manual

Manual test (bullhead): Added some Log.e() statements,
and verified that RING_BUFFER_BYTE_LIMIT_SMALL and
RING_BUFFER_BYTE_LIMIT_LARGE were 32KB and 1024KB,
respectively.

Change-Id: I25ee7d871609c4ebe186424bfdd324a8283f43e3
(cherry picked from commit eacd212af097fada70bdb49da3ed06e8d172237b)
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiStateMachine.java
2fd7946753263783cc8bb03af0891e8a1368ce56 29-Jun-2016 Randy Pan <zpan@google.com> WCM: periodic single scan timer cancellation
am: ab7a54087b

Change-Id: If08f251a16e167b984cc3b1c2f6881e5c1affeee
fe51ea28f652a15951912acdd4c7f347806a5a8f 29-Jun-2016 Randy Pan <zpan@google.com> WCM: track PNO scan state
am: 2352bf2255

Change-Id: I3fb531c6c46af3e5ff8ac3a68e832417a2247ae0
620da8a80e2b3c1a35019820f1426751fa6c0f37 29-Jun-2016 Randy Pan <zpan@google.com> WCM: Listen to all single scan results
am: cb26f07ae9

Change-Id: I037ca6768a71ebde1b04b0d05ec3502742c6a75a
969de309e3edc1795d6df24415e586d1a1587cb6 27-May-2016 Rebecca Silberstein <silberst@google.com> DO NOT MERGE WifiLastResortWatchdog: reset wifi on trigger

( cherry-pick of Icb7c3a211afcd234cfcd25a42665aed03c33f5e1 from master )

Added wifi reset on WifiLastResortTrigger. The reset is implemented by
sending the CMD_RESTART_WIFI message to WifiController.

BUG: 27856267
Change-Id: Icb7c3a211afcd234cfcd25a42665aed03c33f5e1
ndroid/server/wifi/WifiLastResortWatchdog.java
ndroid/server/wifi/WifiServiceImpl.java
5f0238c0d7b4b037dcb1c397217eb65dcfbf53ce 26-May-2016 Rebecca Silberstein <silberst@google.com> DO NOT MERGE WifiController: Add CMD_RESET_WIFI command

(cherry-pick from master)

Allow WifiController to safely restart the WiFi stack. This will
initially be used by the WifiLastResortWatchdog. The CMD_RESET_WIFI
message is only handled in the StaEnabledState where it would have been
attempting to connect. The process of bringing the wifi back up is
handled through the use of the new CMD_RESET_WIFI_CONTINUE command.
Tests are also added to verify that the new CMD_RESET_WIFI command
is ignored in other states (explicitly tests Emergency mode and
AP enabled).

BUG: 27856267
Change-Id: I778ccd6f7d555f6ee6abb195c1c16c106c2e66b7
ndroid/server/wifi/WifiController.java
9563500603c158373e2ee512c4d451783c104660 20-May-2016 Rebecca Silberstein <silberst@google.com> DO NOT MERGE WifiLockManager: create class to manage WifiLocks

( cherry-pick of Ib055078eb0a8555e9a7715d7ce10de1103e73130 from master)

Create new class to maintain WifiLocks requested by applications.

WifiLock management was closely tied to the WifiServiceImpl and made it
very difficult to write tests using different WifiLock modes in
DeviceIdle states. This CL moves the lock management to a new class,
WifiLockManager, and adds tests to check the behavior.

Bug: 28669096
Change-Id: Ib055078eb0a8555e9a7715d7ce10de1103e73130
Test: runtest frameworks-wifi
ndroid/server/wifi/WifiController.java
ndroid/server/wifi/WifiLockManager.java
ndroid/server/wifi/WifiServiceImpl.java
1480044b958c1ee30ad1644705115b87ac8e1d6f 23-Jun-2016 mukesh agrawal <quiche@google.com> WifiLogger: speed up compression

Some rough benchmarking suggests that using
BEST_COMPRESSION may cause us to take 4 seconds
to service a dump() request. The same benchmarking
indicates that using BEST_SPEED will be about
10x as fast, and yield output that's only 5%
larger.

Switch to BEST_SPEED, to avoid slowing down
bug report generation.

BUG=28986501
TEST=manual

Manual test:
- Enable Wi-Fi Verbose Logging
$ adb bugreport foo.zip
- verify that foo.zip contains base-64 encoded
ringbuffer dumps

Change-Id: I0eac83def5cf393a6babdd481079086ea11a5a96
(cherry picked from commit 9a312a13ba34712f3de7f4d0c8d04ff695a41cae)
ndroid/server/wifi/WifiLogger.java
dabb3898053f7059a231851eb6b98fc18ff13ed6 29-Jun-2016 Mukesh Agrawal <quiche@google.com> Merge "WifiConfigManager: move dumping of LocalLog"
ab7a54087b8c1874c7ca5e8b8da1faddbe1da0ce 22-Jun-2016 Randy Pan <zpan@google.com> WCM: periodic single scan timer cancellation

Cancel the periodic single scan timer only if it is started.

Bug: 28881202
Change-Id: I4d4936916daf2869bfda46476c7254a2b38e9a9b
ndroid/server/wifi/WifiConnectivityManager.java
2352bf22557051e98eb16d087d20731e91cfdc71 28-Jun-2016 Randy Pan <zpan@google.com> WCM: track PNO scan state

Add a flag to track if PNO scan is started.

Bug: 29822923
Change-Id: I96416eb5a6590a52800b962838d2e87d9f52bb1a
Tests: Wifi Framework Unit Tests
ndroid/server/wifi/WifiConnectivityManager.java
cb26f07ae9c558f8c6136c951a7f633d0ccfe79f 24-Jun-2016 Randy Pan <zpan@google.com> WCM: Listen to all single scan results

In addition to single scan results initiated by WCM itself, it
listens to the single scans requested by other modules as well.
This gives us more opportunities to connect to a network.

We don't check if a single scan is scheduled by WCM watchdog
any more since we now listen to all single scan results.

Bug: 29606099
Tests: Wifi Framework Unit Test & manual tests
Change-Id: I2a1df0337005878f415eccc425600267434c2e54
ndroid/server/wifi/WifiConnectivityManager.java
c083e644c805754ae5f4d1cbef72f6d438d71c22 20-Jan-2016 Peter Qiu <zqiu@google.com> Cherry-pick: Remove WifiWatchdogStateMachine

Wifi watchdog is not being used anymore, the associated setting
("Settings -> Wi-Fi -> Advanced -> Avoid poor internet connection")
had already been deleted from UI. So remove it.

While there, remove the unused state VerifyingLinkState in WifiStateMachine,
which is only triggered by WifiWatchdogStateMachine.

BUG=29533054
BUG=26254553

TEST=compile

Change-Id: I77dd1bc2b90cc0f3f94619e7b7df8293b068fcce
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiWatchdogStateMachine.java
cb2802ed836c1d4d7d08be4bc8a35ba2b7efc4d4 28-Jun-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiInjector: add WifiServiceImpl objects"
ca4ab9488538bde6cf74be604fc8ebf9724caa8c 28-Jun-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManagerNew: Implement add/update & remove"
fca64fc16ec43befde2e7ac7c3bfd84ced1f7778 16-Jun-2016 Rebecca Silberstein <silberst@google.com> WifiInjector: add WifiServiceImpl objects

Move objects created in WifiServiceImpl into WifiInjector to facilitate
unittests. The first call should be to create an instance of
WifiInjector. This call takes the Context as a parameter and is used to
initialize the instance. This instance is also stored in the class and
subsequent calls should use the WifiInjector.getInstance() call.
Exceptions are thrown if the constructor is called multiple times or
will a null Context parameter. An exception is also thrown if
getInstance is called before the WifiInjector constructor has been
called.

This change also allows the setWifiController method of
WifiLastResortWatchdog to be removed.

This change also removes the local variable for the
WifiLastResortWatchdog instance in WifiStateMachine. Instead of holding
the LastResortWatchdog, calls from WifiStateMachine will get the
instance from WifiInjector when they are needed. This is due to the
dependence triangle between WifiStateMachine, WifiController and
WifiLastResortWatchdog.

BUG: 28845563
Change-Id: Iad99cd9c03672b07d2d2eb67eb1f9821e402055f
TEST: runtest frameworks-wifi
TEST: manually checked connection to wifi, tethering and wifi reconnect
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiLastResortWatchdog.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
6e2780943dc04aae2e6b0fc7890d660f25e7e5fc 23-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Send broadcasts & write store

Send the expected WifiManager broadcasts on network
addition/updation/removal. Also trigger config store writes for these
network modifications.
Resturctured the unit tests to verify the broadcast sending and store
writes.

While there,
Cleaned up the existing log style. All local logs will be prefixed by
the method name in which they're in. All logcat logs will not have the
method names prefixed.

BUG: 29606878
Change-Id: I55f1ac4f8b061d3ce1c8eb7d518ee1f91db90a6b
TEST: Unit tests
ndroid/server/wifi/NetworkUpdateResult.java
ndroid/server/wifi/WifiConfigManagerNew.java
50eed92fe9556fdd9934683690181fea77ce4eac 22-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Implement add/update & remove

Implement the network addition/updation & remove methods.
This doesn't yet include passpoint/ephemeral network handling and other
stuff like sending broadcasts, etc.

For network additions, we need to:
1. Set defaults for the network.
2. Merge parameters set in the provided configuration.

For network updates, we need to:
1. Ensure that the UID has the necessary permission for updates.
2. Merge parameters set in the provided configuration.

BUG: 29606878
Change-Id: I14eac8d34ff8004ae0edd06063423e0bf29e979a
TEST: Unit tests.
ndroid/server/wifi/WifiConfigManagerNew.java
ndroid/server/wifi/WifiConfigStoreNew.java
251a38bb7fcac510ad8b0264a0346573e724519d 27-Jun-2016 Mitchell Wills <mwills@google.com> Merge \\"Add a WifiScanner API to listen for ongoing scans\\" into nyc-mr1-dev am: 450fee26a2
am: f12262368a

Change-Id: I159d7a82a9cf965b90284174c635090ee8704c26
f12262368afe3219b28dbac3bf86939239709abe 27-Jun-2016 Mitchell Wills <mwills@google.com> Merge \"Add a WifiScanner API to listen for ongoing scans\" into nyc-mr1-dev
am: 450fee26a2

Change-Id: I361d4634c2380ce9b4fd78a02dce08158386b03b
450fee26a21eb56d536df147d3e88d3549f807c0 27-Jun-2016 Mitchell Wills <mwills@google.com> Merge "Add a WifiScanner API to listen for ongoing scans" into nyc-mr1-dev
bef58daefbccf81df1a6b7a9a2d103cee7819d69 27-Jun-2016 Mitchell Wills <mwills@google.com> resolve merge conflicts of cebad71 to master

Change-Id: I9d7656a52838045aa770bb47c2b72076057e5045
cebad716edcfadb424b7052724964f072031b1bf 27-Jun-2016 Mitchell Wills <mwills@google.com> Clear auth identity if sim removed while the device is off
am: 3c8094ab45

Change-Id: Iccb90f2c6ca25cb4c82f5b9a80403cea8889cac6
1ba04405f98489f0fbd66b6566c64324be11111a 23-Jun-2016 Mitchell Wills <mwills@google.com> Add a WifiScanner API to listen for ongoing scans

Bug: 29412469
Change-Id: I1b8c6f3524e937cbc902af0be391b5e6b23e8ee2
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
3c8094ab45f3320dbe45e6460c5d62dcc24ce7ae 04-May-2016 Mitchell Wills <mwills@google.com> Clear auth identity if sim removed while the device is off

TEST: Validated that changing a SIM both when the device is on and when
it is off results in the correct identity being used when trying
to authenticate with an EAP-SIM network.
Fixes: 28163651
Change-Id: I3dda95308a527be225a9f70636c727c9826ac939
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/util/TelephonyUtil.java
6b42d03b9d92d6167a0629b042b2a3c2e2489a1b 23-Jun-2016 mukesh agrawal <quiche@google.com> WifiConfigManager: move dumping of LocalLog

The dump() method of WifiConfigManager dumps the
LocalLog that's used by WCM. That would make sense,
except that the LocalLog that WCM uses isn't actually
owned by WCM.

Instead, the LocalLog is allocated by WifiNative, and
shared by multiple objects. (The sharing is safe, because
LocalLog's methods are synchronized.)

Since the LocalLog in question is a shared facility,
let's move dumping of the LocalLog to WifiLogger.

BUG=29424414
TEST=unit tests
TEST=manual

Manual test
$ adb bugreport foo.zip
$ unzip foo.zip
$ grep 'WifiNative LocalLog' bugreport*.txt
-> expect a match

Change-Id: I291ac29385472fd0e56fcb522d818dcffcedfe36
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiLogger.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
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
9c0cea6f40a40441ccb863bc062b48e70586cb7a 25-Jun-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManagerNew: Create skeletal class"
d567fa1484ab77dc7498e4fc5926824bc18c4451 22-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigManagerNew: Create skeletal class

Create skeletal class for the new WificonfigManager. Currently, it just
contains the methods to retrieve the list of networks and the methods
used for persistence.

BUG: 29606678
Change-Id: I57a171ebdef8437537eb50c612fa35f46e944e93
TEST: Unit tests in the next CL.
ndroid/server/wifi/WifiConfigManagerNew.java
4dcf7a8d2b9253e5a58328a9cd954c524c76c7af 25-Jun-2016 Mitchell Wills <mwills@google.com> Merge \\"Reuse single scan results if a request comes in during an ongoing scan\\" into nyc-mr1-dev am: 55b1b58e72
am: b5dcbf476f

Change-Id: I341a4d5523ef20e0e44558ee12d448fd7324e0e4
b5dcbf476fe1626131de575dfc46981c713843b0 25-Jun-2016 Mitchell Wills <mwills@google.com> Merge \"Reuse single scan results if a request comes in during an ongoing scan\" into nyc-mr1-dev
am: 55b1b58e72

Change-Id: Ic55b0793cd60f0861f8d97716d92b22c885d8084
55b1b58e72df2362888c7a1c60ad76a43523bfcf 25-Jun-2016 Mitchell Wills <mwills@google.com> Merge "Reuse single scan results if a request comes in during an ongoing scan" into nyc-mr1-dev
147c210d0da98a064a9cd61276ef8725a6faa785 24-Jun-2016 Mukesh Agrawal <quiche@google.com> Merge "WifiLogger: speed up compression"
79863408e206698dd5d23e5e1f01714494b9b9be 24-Jun-2016 Mukesh Agrawal <quiche@google.com> Merge "WifiLogger: use R for ring buffer sizing"
a9b40d7093e260891d543f4fc418e6a7088f2c6c 23-Jun-2016 Samuel Tan <samueltan@google.com> ConfigBuilder: only set anonymous identity for EAP-TLS/TTLS configurations

Modify the logic in ConfigBuilder.buildConfig() so that the anonymous
identity field is only set for EAP-TLS/TTLS configurations.

WPA supplicant will use this field to send the NAI realm to the EAP
server in its EAP Identity Response packet, which is necessary for
AAA routing purposes. See the comments in the new
setAnonymousIdentityToNaiRealm() method for details.

While there, move the setting of the CA Certificate field
of the configuration's enterprise config into buildTTLSConfig() and
buildTLSConfig(), since this field is only needed for those two
protocols.

BUG: 29356519
TEST: Connected successfully to the AT&T, Boingo, and GlobalReach Passpoint
APs in the lab.

Change-Id: Idf55cd92173c0543e5426d6145ce472b5894466b
ndroid/server/wifi/configparse/ConfigBuilder.java
5751e82f645ab5b4366c63e0fbc561534c1cb3b8 22-Jun-2016 Mitchell Wills <mwills@google.com> Reuse single scan results if a request comes in during an ongoing scan

Change-Id: I590c64a4718385214e4ba803112ed7283f69b3be
Fixes: 28936380
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
9a312a13ba34712f3de7f4d0c8d04ff695a41cae 23-Jun-2016 mukesh agrawal <quiche@google.com> WifiLogger: speed up compression

Some rough benchmarking suggests that using
BEST_COMPRESSION may cause us to take 4 seconds
to service a dump() request. The same benchmarking
indicates that using BEST_SPEED will be about
10x as fast, and yield output that's only 5%
larger.

Switch to BEST_SPEED, to avoid slowing down
bug report generation.

BUG=28986501
TEST=manual

Manual test:
- Enable Wi-Fi Verbose Logging
$ adb bugreport foo.zip
- verify that foo.zip contains base-64 encoded
ringbuffer dumps

Change-Id: I0eac83def5cf393a6babdd481079086ea11a5a96
ndroid/server/wifi/WifiLogger.java
74b0945cc025e050d17fce33130e50983d73f8a2 23-Jun-2016 Glen Kuhne <kuh@google.com> Merge "resolve merge conflicts of 87d6438 to master"
eacd212af097fada70bdb49da3ed06e8d172237b 23-Jun-2016 mukesh agrawal <quiche@google.com> WifiLogger: use R for ring buffer sizing

Use Resources to determine ring-buffer sizing.
This is to support board-specific ring-buffer
sizes.

BUG=29225988
TEST=unit tests
TEST=manual

Manual test (bullhead): Added some Log.e() statements,
and verified that RING_BUFFER_BYTE_LIMIT_SMALL and
RING_BUFFER_BYTE_LIMIT_LARGE were 32KB and 1024KB,
respectively.

Change-Id: I25ee7d871609c4ebe186424bfdd324a8283f43e3
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiStateMachine.java
6203f7e8a94eccb791dfe570c95e5004008aabc9 23-Jun-2016 Etan Cohen <etancohen@google.com> [NAN] Propagate UID into client data.
am: 7cde468702

Change-Id: I4c902d95258eb82ac9c7ce15b2533da1165b9e54
d666ff40a769d51ef8e13ba5bad896da2892e409 23-Jun-2016 Etan Cohen <etancohen@google.com> [NAN] Fix/rename/clarify API: initiating data-path
am: f3136242fe

Change-Id: Id680c7a5b51abe08f0c0d2ac90c13fad8707fe60
e5d2acc0bc7835724aa2cc8ba45c8076003afeac 23-Jun-2016 Glen Kuhne <kuh@google.com> resolve merge conflicts of 87d6438 to master

Change-Id: Ifbadd9f6d58e208f32efb1bcce350796b84d8a82
8736bfe603ea5dd3f9499fa9b03520ff3d77bbc3 22-Jun-2016 Randy Pan <zpan@google.com> Merge "WCM: periodic single scan timer cancellation"
993051ed1919a0d4b68b091f40b911ef8f3b2793 22-Jun-2016 Roshan Pius <rpius@google.com> Merge changes I5ac66f61,Ic3d3f9eb,I9ed59c80,I0c6d79cd,I0fca8036, ...

* changes:
WifiConfigStoreData: Remove unwanted elements
WifiConfigStore: Remove class
WifiConfigManager: Move blacklist to WifiConfigManager
WifiConfigStoreNew: Handle file not found
WifiConfigStoreData: Add unit tests
WifiConfigStoreData: Implement |parseRawData|
8e5132674ca2fe8e94f62b3083376ca5739f8640 17-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigStoreData: Remove unwanted elements

Changes in the CL:
1. There is no need for us to persist the last network ID
allocated. This should be a simple counter which is
recreated on every startup.
2. Don't persist bssid blacklist. This is deprecated and will soon be
removed altogether from WifiConfigManager.

BUG: 29435647
BUG: 29449615
Change-Id: I5ac66f616d1d00ec5a2f9fa722ae23f6c8bed4aa
TEST: Unit tests
ndroid/server/wifi/WifiConfigStoreData.java
1a731d9b8078e156b99dd281b814d93ab025e363 16-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigStore: Remove class

Remove the existing WifiConfigStore class. Move all the existing
functionality to two separate classes:
1. WifiSupplicantControl: For any wpa_supplicant operations.
2. WifiKeyStore: For any key management operations.

This CL doesn't change any functionality, it's only a refactor.

BUG: 29394274
BUG: 29396499
Change-Id: Ic3d3f9eb3c241f34f2fddcfa67374c9a98277e0a
TEST: Unit tests
TEST: Successfully associated the device with GoogleGuest.
ndroid/server/wifi/WifiBackupRestore.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiKeyStore.java
ndroid/server/wifi/WifiSupplicantControl.java
87d6438de8ba995540fd29ca06a6a4f63b2eff22 22-Jun-2016 Glen Kuhne <kuh@google.com> Merge \"Wifi Metrics: Log RSSI polls\" into nyc-mr1-dev
am: af2c07c305

Change-Id: Ic588f9afbc912ddd073c8d5ae4cb7e982a90cb73
af2c07c305e33b759b3b0e707fdc264b193626c4 22-Jun-2016 Glen Kuhne <kuh@google.com> Merge "Wifi Metrics: Log RSSI polls" into nyc-mr1-dev
63c332be84b93f8e255a445ee9c95a6a1129788d 22-Jun-2016 Randy Pan <zpan@google.com> WCM: periodic single scan timer cancellation

Cancel the periodic single scan timer only if it is started.

Bug: 28881202
Change-Id: I4d4936916daf2869bfda46476c7254a2b38e9a9b
ndroid/server/wifi/WifiConnectivityManager.java
3b3013efaefa13147c8e3f5d38bc7cfada06469e 22-Jun-2016 Randy Pan <zpan@google.com> Merge \\"WCM: reset connectivity scan retry counter\\" into nyc-mr1-dev am: a780a159b7
am: 133804e905

Change-Id: I024e759fd1c720215ad9cd5443cc052498b15e6a
133804e9056b85bd6c07c86d7d5cc6f264a59b27 22-Jun-2016 Randy Pan <zpan@google.com> Merge \"WCM: reset connectivity scan retry counter\" into nyc-mr1-dev
am: a780a159b7

Change-Id: I52a810c8e7bfd0619ddb6679c5c97c6bab319619
a780a159b70cb9a72ea1adc47ab7dbb458914d5a 22-Jun-2016 Randy Pan <zpan@google.com> Merge "WCM: reset connectivity scan retry counter" into nyc-mr1-dev
7a0b9ffe794113c4a5ed528d8aadeb3303d1b089 10-Jun-2016 Glen Kuhne <kuh@google.com> Wifi Metrics: Log RSSI polls

Added logging of the periodic RSSI polls into wifi metrics, as a
key-value histogram (count per rssi level).

BUG=29247576

Change-Id: I9aa19dbf0891b87d1d12a375aeb3771ba7ef6308
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiStateMachine.java
f5837a2ccff3a9e3bf86c9f80bf2154e26ddfb9b 15-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Move blacklist to WifiConfigManager

Move the blacklist in memory to WifiConfigManager from the existing
WifiConfigStore class.

BUG: 29389936
Change-Id: I9ed59c80beae66e4220d51b30ae6f9f37a82158b
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStore.java
8b92cc22dfeb11898b105150efdc3dd5ec3a6773 14-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigStoreNew: Handle file not found

Since we might have genuine cases where the config store file is not
found (on a fresh install, user switch), handle the file not found
exception in |StoreFile.readRawData|.
|WifiConfigStoreData.parseRawData| can already handle null bytes passed
into it.

BUG: 29179579
TEST: Unit-tests

Change-Id: I0c6d79cd9752e6662d499b877879b8858e018dbd
ndroid/server/wifi/WifiConfigStoreNew.java
f918b154ddceb58c3d214d75ad02180d1907429a 13-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigStoreData: Add unit tests

Add unit tests for serialization/deserialization of config store data.

BUG: 29251019
Change-Id: I0fca803670f72f729c5003802ad196775dc3717e
TEST: Unit tests
ndroid/server/wifi/WifiConfigStoreData.java
e505d1b7b6b301a1bbbe0a6665467e758bcfd62e 13-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigStoreData: Implement |parseRawData|

Implement the method to deserialize the raw bytes in XML format to
WifiConfigStoreData instance. This uses the all helper classes in
XmlUtil to deserialize the data.

BUG: 29251019
TEST: Will add unit tests once the entire XML
serialization/deserialization is complete.

Change-Id: I5ea141c231847d5e8c2028ca2ddd86c1b1724359
ndroid/server/wifi/WifiConfigStoreData.java
ndroid/server/wifi/WifiConfigStoreNew.java
8da85f69a6a010a778ec2f90eda73bd134644d90 22-Jun-2016 Paul Stewart <pstew@google.com> Merge \\"Fix invitation request from persistent GC\\" into nyc-mr1-dev am: 0adb951552
am: e18b17be72

Change-Id: Iaba9444b455a88bbb6a87bad986c83c4a2110d75
e18b17be729cdd54fb0af01af07f7b240c7daa3f 22-Jun-2016 daisuke niwa <daisuke.x.niwa@sonymobile.com> Merge \"Fix invitation request from persistent GC\" into nyc-mr1-dev
am: 0adb951552

Change-Id: I2709b55605b66458ae5b26059c972309260be257
0adb951552650442bafea5689307b1c58de14c25 22-Jun-2016 Paul Stewart <pstew@google.com> Merge "Fix invitation request from persistent GC" into nyc-mr1-dev
fb90f0786d7b62df72069a52d055e9f5214ee7de 21-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix trivial warnings in WifiNative"
de5fadf2e5c7bb769705c830efb04133b1e0219d 21-Jun-2016 Randy Pan <zpan@google.com> WCM: reset connectivity scan retry counter

Move the scan retry count reset to where scan results are received.
This is to deal with the case that WifiScanner reports success when
a scan request is queued but later fails to be executed.

Add a unit test case to verify the retry behavior.

Bug: 29523369
Change-Id: Ibcd7c771a8efa78612a84021a4511db621f4451e
Tests: Wifi Framework Unit Tests & manual tests
ndroid/server/wifi/WifiConnectivityManager.java
cc180872c51908b15ce5cbf834634ff323e036bc 21-Jun-2016 Christopher Wiley <wiley@google.com> Fix trivial warnings in WifiNative

Change-Id: I8b022734990e5e47470b0f4590ef7b37802a6856
ndroid/server/wifi/WifiNative.java
10ae5ecff064f30afe75662ce67b01cfa15acdcc 21-Jun-2016 Paul Stewart <pstew@google.com> Merge "Remove CMD_OBTAINING_IP_ADDRESS_WATCHDOG_TIMER"
4cc5943fc9703277204d98934db686c3030fc1f2 21-Jun-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigStoreData: Implement |createRawData|"
c1a5efc53a277b68c72bc501f6ab68e266bb6cd1 20-Jun-2016 Randy Pan <zpan@google.com> Merge \\"Cut down Wifi local log buffers size\\" into nyc-mr1-dev am: 4301f4786e
am: 4a770e2e3f

Change-Id: Ibd4f5d9e77ddab7ea16ee4f9a8af736d601f9648
c25642d1a260510fe5d651f31fed40950c59d9b4 13-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigStoreData: Implement |createRawData|

Implement the method to serialize the WifiConfigStoreData instance to raw
bytes in XML format. This uses the all helper classes in XmlUtil to
serialize the data.

BUG: 29251019
TEST: Will add unit tests once the entire XML
serialization/deserialization is complete.

Change-Id: I8b846c2c52517ccab26a442c09c0def5abf46605
ndroid/server/wifi/WifiConfigStoreData.java
ndroid/server/wifi/WifiConfigStoreNew.java
4a770e2e3fa2613c9419e0844000148e21b1bf4c 20-Jun-2016 Randy Pan <zpan@google.com> Merge \"Cut down Wifi local log buffers size\" into nyc-mr1-dev
am: 4301f4786e

Change-Id: I91bdf37b5ee77db3269b6e45b7d4fcb4defdf92a
4301f4786e565d9555e5cbf81ef1055f81975385 20-Jun-2016 Randy Pan <zpan@google.com> Merge "Cut down Wifi local log buffers size" into nyc-mr1-dev
7cde468702a73a2eafdb2b3aa08340a1cfbc749b 20-Jun-2016 Etan Cohen <etancohen@google.com> [NAN] Propagate UID into client data.

Propagate UID into the core client data class. Originally was only stored
on the surface - at the ServiceImpl: used to check client/uid mapping on
incoming calls to validate that apps are not faking client numbers.

Other interfaces (e.g. ConnectivityManager) will access NAN state manager
directly (not through ServiceImpl). They will need to check credentials
(client/uid mappings) as well.

Bug: 26562610
Change-Id: Iacbe4f0df73d30138001242bedbc023287a1740a
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanStateManager.java
a90ff1f02fc6820fde13d2c76738c7ae75a503e1 27-Feb-2015 daisuke niwa <daisuke.x.niwa@sonymobile.com> Fix invitation request from persistent GC

When the device received the second invitation request
from GC of the same PersistentGroup, the wifi framework
processes "sa" as mOwner of WifiP2pGroup. At this point,
if an invited group is persistent group, WifiP2pGroup can't
know whether "sa" is GC or GO yet. So the framework shouldn't
process mOwner in the constructor.

BUG=28715251
Change-Id: Ie7065da0d6c978c3747ecbd6f728de87d9567009
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
f3136242fec0e5b8933a1a68c7994f20649bcb1c 20-Jun-2016 Etan Cohen <etancohen@google.com> [NAN] Fix/rename/clarify API: initiating data-path

When initiating a data-path specify the peer ID rather than the discovery
session ID (pub/sub ID).

Bug: 26562610
Change-Id: I0702888ab1728e1a4f02c0b34a01ab8e2525b9ca
ndroid/server/wifi/nan/WifiNanNative.java
dbf2f46598d5ce5848069436f3290f53b8958314 17-Jun-2016 Mitchell Wills <mwills@google.com> resolve merge conflicts of 22297bc to master

Change-Id: Iaf89b61602c366ee0f0be094369cd54bd51185fc
1e911c92133843fc0a50a1b1c6f654f62e7c98a8 17-Jun-2016 Randy Pan <zpan@google.com> Cut down Wifi local log buffers size

The new buffer size can hold up to around 3 hours of logs. This
can be further optimized later after we have more usage data.
The goal is to save the logs from the last one hour only.

Bug: 29179543
Change-Id: I99e15531328fdb03df28dcf5a014deb2f074b254
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
d49ef565e1840141ec5dca0e52642f7e9d90a5fc 17-Jun-2016 Paul Stewart <pstew@google.com> Remove CMD_OBTAINING_IP_ADDRESS_WATCHDOG_TIMER

This timer should never fire anymore, since the connectivity
service has its own timers and will notify WifiStateMachine
during all failure cases.

BUG: 29437262
Change-Id: I24f9fa75cb1bba754912177740a69ede418b5a46
ndroid/server/wifi/WifiStateMachine.java
22297bcd8d54bf64b7b1b0655020a1c358526c7f 17-Jun-2016 Bartosz Fabianowski <bartfab@google.com> Allow connecting to WiFi networks via Quick Settings am: a3e8570867
am: 77714a17f0

Change-Id: I860f4d57454be091c4cd79dcf0e8924f63b2d904
895b3e2186362770b46d318cc011a0e502e1c961 17-Jun-2016 Bartosz Fabianowski <bartfab@google.com> Allow connecting to WiFi networks via Quick Settings
am: a3e8570867

Change-Id: I46046d9292fa343d6fd7f01f41fd20b71337374e
77714a17f01578b36872655f7836aedbc6b150fe 17-Jun-2016 Bartosz Fabianowski <bartfab@google.com> Allow connecting to WiFi networks via Quick Settings
am: a3e8570867

Change-Id: Ia4a75add0da96bb1a3efaeb89ff197a09aed85db
a3132c7c2ef8d04d7360f83cee9b23f2b71cae36 16-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix minor typos in WifiStateMachine"
daff03208098ecb41a1672e14b00288865e11061 10-Jun-2016 Christopher Wiley <wiley@google.com> Fix minor typos in WifiStateMachine

Change-Id: I70b587877dcb8b06071131c2ffce61ce63931719
ndroid/server/wifi/WifiStateMachine.java
a2f9a80b25772edfa6a8b4cb679202fc8e9154cd 16-Jun-2016 Mitchell Wills <mwills@google.com> Merge \\"Better distinguish between WifiScanner clients in logs\\" into nyc-mr1-dev am: b271c249de
am: 8b35350228

Change-Id: I8f827d683a15c285194b7e4a773368dd02e9d85e
8b35350228804aefa92f28125af4d78b3df1ed0d 16-Jun-2016 Mitchell Wills <mwills@google.com> Merge \"Better distinguish between WifiScanner clients in logs\" into nyc-mr1-dev
am: b271c249de

Change-Id: I73368f5b04b082b039f3bea6bd51a43c4d497848
b271c249debc3e0327354638a84a8daff33427ee 16-Jun-2016 Mitchell Wills <mwills@google.com> Merge "Better distinguish between WifiScanner clients in logs" into nyc-mr1-dev
a3e8570867c26322499d306f118427f77a561ee5 30-May-2016 Bartosz Fabianowski <bartfab@google.com> Allow connecting to WiFi networks via Quick Settings

System UI acts on behalf of the current foreground user and should
thus be allowed to connect to WiFi networks, even if it actually runs
as user 0.

BUG=28799309

Change-Id: I50c3bdf30c9a1fd7780b47cac3f8ff3d0fb34f36
ndroid/server/wifi/WifiStateMachine.java
ef4729efa34f8f0435d9cd73ea32748f7d3d60ee 16-Jun-2016 Randy Pan <zpan@google.com> Merge "resolve merge conflicts of b95ca95 to master"
01b753309f7a77e35f8a5175ca509194f8146e2e 16-Jun-2016 mukesh agrawal <quiche@google.com> Merge \"WifiLoggerHal: fix TX fate constants\" into nyc-mr1-dev
am: 7fc5d7d6f5

Change-Id: I8b22e1a56219c8436bf583d107d530b40d463f4a
7fc5d7d6f5650e630fcf0eff87dce335810a9786 16-Jun-2016 Mukesh Agrawal <quiche@google.com> Merge "WifiLoggerHal: fix TX fate constants" into nyc-mr1-dev
b06d3a9bf298dd1a559405cbc377d752a5c84532 16-Jun-2016 Randy Pan <zpan@google.com> resolve merge conflicts of b95ca95 to master

Change-Id: Ic071d1b60916630779f2bdcf44a4b1fa954d1f59
9e7f5e0a47a9a4aa519a50d9a0959547c1c604f1 15-Jun-2016 Mitchell Wills <mwills@google.com> Better distinguish between WifiScanner clients in logs

Change-Id: I15327935f4b9ccdf3d3244087c508f19fd275c1f
Fixes: 29385784
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
f571fac6e8a29340b716be0dce40eb7f5bd96538 13-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigStoreData: Network list serialize/deserialize

Add helper methods for serializing/deserializing list of network
configurations. This will be used for both shared/user raw data
generation/parsing.

BUG: 29251019
TEST: Will add unit tests once the entire XML generation/serialization
is complete.

Change-Id: I3d9ac5435215b4b715371105552ec4242b1acd4f
ndroid/server/wifi/WifiConfigStoreData.java
b95ca95d8c47d49311c7f0ebdceb765dbb6986bf 15-Jun-2016 Paul Stewart <pstew@google.com> Merge \\"QNS: cut down BSSID blacklist time to 5 minutes\\" into nyc-dev am: 9ec065de4d
am: 6d1ead8bc7

Change-Id: Ic5abf513ab15394346a858bb28439cccea1eb8d6
4b420cc79303370df99603dcec1b8ec6abf14ab5 15-Jun-2016 Randy Pan <zpan@google.com> Merge \"QNS: cut down BSSID blacklist time to 5 minutes\" into nyc-dev
am: 9ec065de4d

Change-Id: I2c131ee8852d4428b876633014be890deb31e7b6
6d1ead8bc761086382d96209b68912894e3f0732 15-Jun-2016 Randy Pan <zpan@google.com> Merge \"QNS: cut down BSSID blacklist time to 5 minutes\" into nyc-dev
am: 9ec065de4d

Change-Id: I5a70af56b5f94100506e9db4d83c41c7dc5801c2
9ec065de4d3f323bbda2da034ff414d9d045b48c 15-Jun-2016 Paul Stewart <pstew@google.com> Merge "QNS: cut down BSSID blacklist time to 5 minutes" into nyc-dev
642b0bb43ed856bac0503d3169d67026de2c1b02 13-Jun-2016 Roshan Pius <rpius@google.com> XmlUtil: Add WifiEnterpriseConfigXmlUtil

Add a utility for |WifiEnterpriseConfig| class serialization/
deserialization.

While there,
Add missing java doc on the |writeToXml| methods.

BUG: 29318473
Change-Id: I83266631e17f42f55ce1b1a4fc263c975f414419
TEST: Unit tests
ndroid/server/wifi/util/XmlUtil.java
c00a9331ab2a51babc3c3acd69f44be3d341c4b9 13-Jun-2016 Roshan Pius <rpius@google.com> XmlUtil: Report all parsing errors

Detect all XML parsing errors in XmlUtil and raise exceptions for them.
Changes in the CL:
1. Add new |gotoNextSection|* methods to raise exception when it does
not find a section with the expected tag name.
2. Raise exceptions for all errors in |WifiConfigurationXmlUtil|, etc.
3. |IpConfiguration| can never be null in WifiConfiguratin object, so
remove the conditional check in WifiBackupRestore.

While there,
Shorten the method names in |WifiConfigurationXmlUtil|, etc to
parseFromXml/writeToXml.

BUG: 29312911
Change-Id: I5bb152e9757f039410dd81afebaad009644e1414
TEST: Unit tests
ndroid/server/wifi/WifiBackupRestore.java
ndroid/server/wifi/util/XmlUtil.java
f39d95892d1e0bf456f210ed496189bc07be3433 09-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigStoreNew: Implement file write/read

Implement the file write/read for config store files. The read/write
uses the |AtomicFile| API's to perform the necessary operations.

The write is split into 2 steps to help buffering non-critical writes:
1. Serialize the data into raw bytes first.
2. Write the raw bytes to file.
Any non-critical write (indicated by |forceWrite| flag set to false)
will set an alarm to buffer all writes within the interval into a single
file write. This will also help if we want to move the actual file
writing to a separate thread later.

BUG: 29179579
Change-Id: Ib793a3967c327e13ce88acfa912c21cfa5f25865
TEST: Unit-tests
ndroid/server/wifi/WifiConfigStoreNew.java
cbfc6a05c171b8a441abad28afdef54f54f9c2cd 09-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigStoreNew: Create skeletal class

Create the skeletal class for the new WifiConfigStore. The new
persistent store is composed from 2 separate files:
1. Shared store file to store all shared configurations/global data.
2. User specific store file to store all private configurations/user
data.
|StoreFile| sub class is a wrapper over the atomic files used to
write/read the raw data to/from the files.

|wifiConfigStoreData| class is used to pass the data to be written/read from
the config store files. This object is used to serialize/deserialize the
data to be stored in the store files.

Also, create a skeletal test class to redirect the read/write data from
the ConfigStore to an internal buffer for testing.

BUG: 29179278
Change-Id: I38dad84c0b2444e2f4ffe30658c8f3eea0127143
TEST: Unit tests
ndroid/server/wifi/WifiConfigStoreData.java
ndroid/server/wifi/WifiConfigStoreNew.java
4ca4f7f5662d19fb723973adaa36ea1d0e370794 13-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiServiceImpl: handle verbose logging setting"
88a7e00bcf26b28209e8bed39db9a95dd4a4ae50 13-Jun-2016 Glen Kuhne <kuh@google.com> Merge \\"DO NOT MERGE WifiMetrics: Record capture duration\\" into nyc-dev am: 622e9ff387
am: 7032717229

Change-Id: I7a7d07dbdc7bf44e0b5749ba64329e40e8290e98
e1b848bb11cc44060328bf53162cb776e3dd54dc 13-Jun-2016 Glen Kuhne <kuh@google.com> Merge \"DO NOT MERGE WifiMetrics: Record capture duration\" into nyc-dev
am: 622e9ff387

Change-Id: Ie7de4f9173a815abe88f91efc5a46893be5270d1
7032717229de0b41c70b9400067c260b53c23eb3 13-Jun-2016 Glen Kuhne <kuh@google.com> Merge \"DO NOT MERGE WifiMetrics: Record capture duration\" into nyc-dev
am: 622e9ff387

Change-Id: I7ee11714cbccfa587b42a0f991ab11abaec24cec
622e9ff3874251022ae3c27548bc5a2f77bdc8bc 13-Jun-2016 Glen Kuhne <kuh@google.com> Merge "DO NOT MERGE WifiMetrics: Record capture duration" into nyc-dev
59397a8d7f834a43506ef9855da04cf522f3ce24 13-Jun-2016 Roshan Pius <rpius@google.com> Merge changes from topic 'network_selection_status_xml'

* changes:
NetworkSelectionStatusXmlUtil: Add utility
WifiConfigurationXmlUtil: Serialize all data for store
8ada9efaa0de343b8ebafd3091a27b7d70d6ebef 13-Jun-2016 Roshan Pius <rpius@google.com> Merge "WifiBackupRestore: Handle network UIDs"
026d5858db721494c3f2e91582847a8096df97ff 13-Jun-2016 Etan Cohen <etancohen@google.com> resolve merge conflicts of b9f574e to master

Change-Id: I5a48d9f15e8d0b52d08a1e51a5a59f2172372135
301dbcf1b3229ec5c3d0e7dffbf9318268927539 13-Jun-2016 Etan Cohen <etancohen@google.com> resolve merge conflicts of f5a9cc0 to master

Change-Id: Ib30c045a31108d095635e7ff4c093ef0ccf9431c
5d3609b1931180c37d7292619146ad7d33df9a21 10-Jun-2016 Roshan Pius <rpius@google.com> NetworkSelectionStatusXmlUtil: Add utility

Add a utility for |NetworkSelectionStatus| class serialization/
deserialization.

While there,
Fix the doc strings in the existing utils to add links to the original
object they're trying to serialize deserialize.

PS: Will add a follow up CL to shorten the method names of all these
utils: NetworkSelectionStatusXmlUtil.parseFromXml/writeToXml. The
current names are unnecessarily long.

BUG: 29273147
Change-Id: I59f056a2b99e8583930b716707284d4ccf14392a
TEST: Added Unit tests
ndroid/server/wifi/util/XmlUtil.java
7684d94aa98d82c82e060ff48326181669184f35 11-Jun-2016 Mitchell Wills <mwills@google.com> Fix crash when cleaning up WifiScanner client before Wifi enabled am: 3040b86393 am: 82f4aada1c
am: cecab03d5d

Change-Id: I1378659fc87d0b419a8f96e4fec779e4251db158
cecab03d5d0ebeaf7876b2e93fd10006114fa21d 11-Jun-2016 Mitchell Wills <mwills@google.com> Fix crash when cleaning up WifiScanner client before Wifi enabled am: 3040b86393
am: 82f4aada1c

Change-Id: Ia9ac0c45307ba6c52ae7192b37c56bc9f68ac0b1
e8f7d4ab151251991982329f7274f866bb03b3da 11-Jun-2016 Mitchell Wills <mwills@google.com> Fix crash when cleaning up WifiScanner client before Wifi enabled
am: 3040b86393

Change-Id: Ied0c5e048cceba8f4935e8dd9bdc104db6b64366
82f4aada1cc044b45ff9b4eed11188c4a820611d 11-Jun-2016 Mitchell Wills <mwills@google.com> Fix crash when cleaning up WifiScanner client before Wifi enabled
am: 3040b86393

Change-Id: I7ddb3cdcd840f8f3ceff653b3e8bb29e724458ab
030c5debfefddf0512cd53fec48b269c08d9972e 10-Jun-2016 Roshan Pius <rpius@google.com> WifiConfigurationXmlUtil: Serialize all data for store

Add the remaining elements of WifiConfiguration that needs to be
persisted in config store and add unit-tests for verification.

PS: These elements are not serialized for backup/restore. Backup/Restore
only stores a selected subset of elements from WifiConfiguration.

While there,
Add the missing EAP configuration serialization unit tests.

BUG: 29251622
Change-Id: Ic1f22191ed1d7e654190fde5e70bfdf3545eb5d4
TEST: Unit-tests
ndroid/server/wifi/util/XmlUtil.java
3040b86393a04bc939a5a94cda4169b0293dfac7 10-Jun-2016 Mitchell Wills <mwills@google.com> Fix crash when cleaning up WifiScanner client before Wifi enabled

Change-Id: Ia212840fcf781740d5e185d3e3c2e30a477e25f0
Fixes: 29250616
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
49410c13ba2284fb7c836fd3527dc526ea5681a0 07-Jun-2016 Glen Kuhne <kuh@google.com> DO NOT MERGE WifiMetrics: Record capture duration

Adds a wifi metric that records the capture duration period represented
by the WifiLog proto. This is to improve the way wifiLogs are weighted when
aggregated.
Modified WifiMetrics to use the Clock wrapper of SystemClock to
facilitate unit tests.

BUG=29185886

Change-Id: I61dd2b481c26f0ea21bcb280ce1d40f3d73b7625
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiMetrics.java
2fafcc56fda54b1adf8b6743beaac59dbb84dfec 08-Jun-2016 Roshan Pius <rpius@google.com> WifiBackupRestore: Handle network UIDs

Don't save creatorUID element for backup/restore. All networks will be
restored with the System UID set as the creatorUID. The creator UID is
hard to preserve across backup/restore.

Also, since the creatorUID is not being backed, there are genuine cases
where the configKey mismatch might occur. So, move the |configKey|
mismatch check out of |XmlUtil| and let backup/restore & config store
handle it differently as needed.

PS: Need to also figure out if we should stop backing up all networks
not saved by settings agent (creatorUid != SYSTEM_UD). Will wait for
discussions in b/29201888 to decide on that.

BUG: 29201888
TEST: Unit-tests
Change-Id: I668281893de9260a803872c04646b5af28ee45e5
ndroid/server/wifi/WifiBackupRestore.java
ndroid/server/wifi/util/XmlUtil.java
83681ce58e32ab802ce46e8f1999a90e035a61d4 09-Jun-2016 Mitchell Wills <mwills@google.com> Fix crashes in significant change when wifi hasn\\\'t started am: 11bb0926a6 am: f1f88eebd8
am: 49872c10dc

Change-Id: I118db5b04233a512ba43349dfa1d9da3536fc37e
49872c10dc0a5ff54b47ca6af4a01a7d7d51724b 09-Jun-2016 Mitchell Wills <mwills@google.com> Fix crashes in significant change when wifi hasn\\'t started am: 11bb0926a6
am: f1f88eebd8

Change-Id: I9baa8a9a3bb9612df15289efbc5921dcd3a555a0
f1f88eebd802334339c00e12700b8e2bc8488b66 09-Jun-2016 Mitchell Wills <mwills@google.com> Fix crashes in significant change when wifi hasn\'t started
am: 11bb0926a6

Change-Id: I98a8b624fe6f0553aa5899617930cd311edff17f
d16695d8998b5fd50dc1d966e67122ed9ac0464d 09-Jun-2016 Mitchell Wills <mwills@google.com> Fix crashes in significant change when wifi hasn\'t started
am: 11bb0926a6

Change-Id: I8b0479a1931798fbc6a34504cdd56e64e41d97b6
11bb0926a6cc3380f2217532fefb9605a1fdc9e8 09-Jun-2016 Mitchell Wills <mwills@google.com> Fix crashes in significant change when wifi hasn't started

The SignificantChange state machine doesn't actually have a concept of
if Wifi is on or not. This will simply ensure that it is not possible to
cause a crash.

Change-Id: I8ff87364bf7d5c87f0519b6cdc32d164facf30eb
Fixes: 29237535
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
373093ae826a68f0dd902309678c230ab3e078cd 09-Jun-2016 Glen Kuhne <kuh@google.com> Merge "WifiMetrics: Record capture duration"
00ec8bf178ba4abee4ee8bbc6eb09c9fcd986a89 03-Jun-2016 Rebecca Silberstein <silberst@google.com> WifiServiceImpl: handle verbose logging setting

Allow WifiServiceImpl to check the context for the verbose wifi logging
setting at startup. This check is then used to set the verbose logging
variables in related objects. The check was previously done in
WifiStateMachine. When the wifi verbose logging is changed, this is
also now persisted with a call from WifiServiceImpl instead of
WifiStateMachine.

This CL additionally removes a method to get the verbose logging setting
from WifiConfigManager. WifiStateMachine instead uses the variable it
already maintains. All verbose logging statements in WifiStateMachine
are also now checked with mVerboseLoggingEnabled and the DBG variable is
removed.

Cleaned up unused imports in WifiStateMachine and WifiConfigManager.

BUG: 29009916
TEST: manually checked for verbose log messages after boot and after
changing verbose logging on and off
TEST: runtest frameworks-wifi

Change-Id: I0bb27bf1e4bf67f49a8976e357cb3f7d49d8ce66
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
9a133e027b91252da4d193571fc76cd2cf49e4b7 08-Jun-2016 mukesh agrawal <quiche@google.com> WifiLoggerHal: fix TX fate constants

A couple of the constants in WifiLoggerHal
do not match the values in wifi_logger.h

And that's despite the comment stating
the requirement right at the top of
WifiLoggerHal. Hrmph!

Anyway, let's fix that.

BUG=29213973
TEST=unit tests

Change-Id: I10edaf3c72f1a9112d2419fad4ca25ab1f405d3a
(cherry picked from commit 4144562f905b765744d4e937f0ce0449c7e96abb)
ndroid/server/wifi/WifiLoggerHal.java
d016a8ff4c4a35179496c430b20d3f3e048507e1 09-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiLoggerHal: fix TX fate constants"
39f4be8242202dba30d3c1e39d3563f90259bc4b 09-Jun-2016 Mukesh Agrawal <quiche@google.com> Merge "README: update source git hash"
1cc9dcf00e9131f168fa1929df1f5ff8253cd9ee 09-Jun-2016 mukesh agrawal <quiche@google.com> WifiLogger: revert large ringbuffers for userdebug/eng am: 9a865ec91c am: 518a427cd4
am: 67be829ac8

Change-Id: Ic884ee3a17f796952abbda2237cd39236357874b
67be829ac82ab10304bda5976a30e1b38db5ce9d 09-Jun-2016 mukesh agrawal <quiche@google.com> WifiLogger: revert large ringbuffers for userdebug/eng am: 9a865ec91c
am: 518a427cd4

Change-Id: I0a029abf683e041ac8e73c674a3baaa0292635d4
518a427cd4f2508003a5c054e021d8d655656ece 09-Jun-2016 mukesh agrawal <quiche@google.com> WifiLogger: revert large ringbuffers for userdebug/eng
am: 9a865ec91c

Change-Id: I07a9196aaf1dd37e6827a40d0a8b47b0fd276a8c
497b04c439e7dd2b61a796e6a4da04452c46e69a 09-Jun-2016 mukesh agrawal <quiche@google.com> WifiLogger: revert large ringbuffers for userdebug/eng
am: 9a865ec91c

Change-Id: I727e2175df055a2485dd7071e568f676afa0f40c
4144562f905b765744d4e937f0ce0449c7e96abb 08-Jun-2016 mukesh agrawal <quiche@google.com> WifiLoggerHal: fix TX fate constants

A couple of the constants in WifiLoggerHal
do not match the values in wifi_logger.h

And that's despite the comment stating
the requirement right at the top of
WifiLoggerHal. Hrmph!

Anyway, let's fix that.

BUG=29213973
TEST=unit tests

Change-Id: I10edaf3c72f1a9112d2419fad4ca25ab1f405d3a
ndroid/server/wifi/WifiLoggerHal.java
2622233bd264f9bfbde164b6c62bd9d785da935b 08-Jun-2016 Roshan Pius <rpius@google.com> WifiBackupRestore: Handle backups with no ipconfig data

Handle restore of old backups with no corresponding ipconfig data.
According to ctate@, this is a possibility on certain older devices.
Also, add unit-tests to validate the restore behavior.

BUG: 28967335
Change-Id: Id9d7be22132b3da560a7ec72aa5509392177bafe
TEST: Unit tests.
ndroid/server/wifi/WifiBackupRestore.java
06a2281303248446bacc87a00ab66ea1fdf0392d 08-Jun-2016 Roshan Pius <rpius@google.com> WifiBackupRestore: Handle single WEP key configs

Handle backup/restore of partial WEP key configs. |XmlUtils| cannot
handle arrays with different types (string & null). So, need to convert
all null keys to empty strings while backing up and restore it
accordingly.

BUG: 28967335
Change-Id: I6133e3e5744f64c7b55a45462efe092d597e2f8b
TEST: Unit tests
ndroid/server/wifi/util/XmlUtil.java
63c72bf1bc881fecd0f672c94f25d174bf1362b1 08-Jun-2016 Christopher Wiley <wiley@google.com> Merge \"Remove all knowledge of tethering from SoftApManager\" into nyc-mr1-dev
am: 76d591d5ab

Change-Id: Id851c2cdc279c663733f7b505f70945a71e0189c
76d591d5abba138d5104cbadd5c30c6e7c567194 08-Jun-2016 Christopher Wiley <wiley@google.com> Merge "Remove all knowledge of tethering from SoftApManager" into nyc-mr1-dev
9a865ec91cf32d41496a28d800279cd86832b027 18-May-2016 mukesh agrawal <quiche@google.com> WifiLogger: revert large ringbuffers for userdebug/eng

When the WiFi code is sufficiently mature, we'll use
this patch to return to using small ring buffers
on all builds.

Note that this patch is not a literal/full revert of
CL:1048267. The reason for the more focused change
is to minimize merge conflicts, in case other code
changes by the time this CL lands.

BUG=28822174
TEST=unit tests

Change-Id: I9facadf8aaf779e0627b15815a426b86bde692a1
ndroid/server/wifi/WifiLogger.java
9e3eb23ebd21b93625914e77ec86d4034d915160 08-Jun-2016 Randy Pan <zpan@google.com> Merge \\"WCM: No connectivity scan if auto roaming is off\\" into nyc-mr1-dev am: 0ef8048dbb
am: b80be3eb81

Change-Id: Ia9356ea492452c2c55b9076678e20ff1442ea476
2b4abd0316463c8ddd3b50f539101f6fd521ced7 08-Jun-2016 Roshan Pius <rpius@google.com> Merge "WifibackupRestore: Mask out wep keys"
b80be3eb8109b0af780d058e0fb160042754eefe 08-Jun-2016 Randy Pan <zpan@google.com> Merge \"WCM: No connectivity scan if auto roaming is off\" into nyc-mr1-dev
am: 0ef8048dbb

Change-Id: I4f1300bcb9e27f58c25979b5880f1b9006719a0d
0ef8048dbb79f3197efcc5d684cb452b6fa72338 08-Jun-2016 Randy Pan <zpan@google.com> Merge "WCM: No connectivity scan if auto roaming is off" into nyc-mr1-dev
46169fc46555ac7f19bc86b0a59e74263850c73c 08-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix checkstyle errors"
3dacca4b8d4d317501c9bf9ba5f2620ec62c1d2f 08-Jun-2016 Paul Stewart <pstew@google.com> resolve merge conflicts of 6da17ca to nyc-dev am: 073c371dbc am: c405929e28
am: 690f824fae

Change-Id: I3330e71e2dc74829b7bd4fb949a0431783d1336b
3d843d4ca5f7a44de78a2abf37559578ffb31905 08-Jun-2016 Paul Stewart <pstew@google.com> resolve merge conflicts of 6da17ca to nyc-dev
am: 073c371dbc

Change-Id: Idf4908f144eab78cf30afd185e7ab72a7cec4a3b
a68f3e359ac27285b10332ea2461469e5e03bfd4 08-Jun-2016 Randy Pan <zpan@google.com> WCM: No connectivity scan if auto roaming is off

When WiFi is already connected, WCM initiates connectivity scan
for roaming only if config 'EnableAutoJoinWhenAssociated" is
turned on. This config option is turned on by default. More
power sensitive devices can turn the config off to save battery.

Note, when this config option is turned off, only the WCM
initiated auto roaming is disabled. Wifi chipset firmware may
still perform a roaming on its own.

Bug: 29157340
Change-Id: I9a8f0df65d39412f242c064db5b3d6654d23634c
Test: Framework Unit Tests and manual tests
ndroid/server/wifi/WifiConnectivityManager.java
690f824faefd1c82375224589b142e943ede7332 08-Jun-2016 Paul Stewart <pstew@google.com> resolve merge conflicts of 6da17ca to nyc-dev am: 073c371dbc
am: c405929e28

Change-Id: I729e4c2af6efa0f39ae3b2d76dcb33aa62d696a5
c405929e28fad4ef2325a0f798b14536382f2b4d 08-Jun-2016 Paul Stewart <pstew@google.com> resolve merge conflicts of 6da17ca to nyc-dev
am: 073c371dbc

Change-Id: I9cab61eae43744280cbb6f2f299141a6a088e683
107f6ce4a5f6017ce336d9b60650ddbe28bee965 07-Jun-2016 Glen Kuhne <kuh@google.com> WifiMetrics: Record capture duration

Adds a wifi metric that records the capture duration period represented
by the WifiLog proto. This is to improve the way wifiLogs are weighted when
aggregated.
Modified WifiMetrics to use the Clock wrapper of SystemClock to
facilitate unit tests.

BUG=29185886

Change-Id: I61dd2b481c26f0ea21bcb280ce1d40f3d73b7625
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiMetrics.java
08015f5d7f37f731fe14711bb2667e998a667e28 08-Jun-2016 Roshan Pius <rpius@google.com> WifibackupRestore: Mask out wep keys

Mask out WEP keys in backup data dump and add unit tests to verify that
the WEP keys are never dumped out.

Since there are different patterns to match & replace, step through each
line in the dump string and perform a search & replace. This isn't
ideal, but there isn't any simple regex to mask both the 'psk' & 'wep
keys' info.

BUG: 29051876
Change-Id: I563bc8c9a0ace349851714f92aca817fb4f83717
TEST: Unit tests
ndroid/server/wifi/WifiBackupRestore.java
073c371dbc5b361bf5f6651ed5f6b471012bd673 08-Jun-2016 Paul Stewart <pstew@google.com> resolve merge conflicts of 6da17ca to nyc-dev

Change-Id: Ifb500e3f745b5e2493ffa016a06f23120e80910a
052b948a8b8a009486e35cb56dbd7bb9516e8626 08-Jun-2016 Roshan Pius <rpius@google.com> Fix checkstyle errors

Fixed all checkstyle errors in the new files added for
backup/restore.

BUG: 29201893
Change-Id: I48674d5a234a40e48f2f59f84555a4c6cce4bba4
ndroid/server/wifi/WifiBackupRestore.java
ndroid/server/wifi/util/XmlUtil.java
6da17ca8f26560a6718626ca58a0c5693ace3f67 08-Jun-2016 Paul Stewart <pstew@google.com> Merge \\\"Perform a null-check in getMatchingConfig\\\" into mnc-dev am: e3c37daf73 am: e180938097
am: 96cc486099

Change-Id: Iae9d523d364079407f500d00f96db951c3d7f994
96cc486099b6bc342db50e575d27d8eb9f4c09f1 08-Jun-2016 Paul Stewart <pstew@google.com> Merge \\"Perform a null-check in getMatchingConfig\\" into mnc-dev am: e3c37daf73
am: e180938097

Change-Id: I15921c5f5903d66052cb48d851913672077a190c
e1809380976b20aebfb362bc1ebe52216f4a17e4 08-Jun-2016 Paul Stewart <pstew@google.com> Merge \"Perform a null-check in getMatchingConfig\" into mnc-dev
am: e3c37daf73

Change-Id: Ic33a155d3f19e39279a7d8b47ee63da217539c47
6283ab99e0b417c2c200ade2ee874159483273d2 08-Jun-2016 Ningyuan Wang <nywang@google.com> Fix build by removing redundant parameter

BUG=29192574

Change-Id: Id641c1af47c77cf970bc3a4bdd141c6dfe920b7a
ndroid/server/wifi/WifiStateMachine.java
8bed42e64ddd0f7a11db123679538b989b08e46c 08-Jun-2016 Randy Pan <zpan@google.com> Merge "QNS optimization"
73b45f399ad7876179677e5cf32022a6b158ceb5 08-Jun-2016 Roshan Pius <rpius@google.com> Merge "resolve merge conflicts of a2a4abe to master"
d09a68e978eafe26ff100fd1c34c5051293d8373 08-Jun-2016 Roshan Pius <rpius@google.com> Merge "XmlUtil: Move Wifi/IP-Configuration serialization"
86bbd1bc009c87fa204c9ea68551d32a9ddafb7b 07-Jun-2016 Roshan Pius <rpius@google.com> resolve merge conflicts of a2a4abe to master

Change-Id: I8d34ef72d5e836efda7cd8e32db6835c8bdbbe6c
a2a4abe11cc3ee1d276f48111403b7d073fb707b 07-Jun-2016 Roshan Pius <rpius@google.com> Merge "WifiStateMachine: Return null link layer stats" into nyc-dev am: e3235277e0
am: 4ff87a5b7b

* commit '4ff87a5b7b35722319f734ff41f9b19596aa972e':
WifiStateMachine: Return null link layer stats

Change-Id: I74d87896e13065ca536132c489651453f42431c5
4ff87a5b7b35722319f734ff41f9b19596aa972e 07-Jun-2016 Roshan Pius <rpius@google.com> Merge "WifiStateMachine: Return null link layer stats" into nyc-dev
am: e3235277e0

* commit 'e3235277e0bef27f51c50a1ddb74acbd80c996d5':
WifiStateMachine: Return null link layer stats

Change-Id: I448e7b4e21db8446285eae6a576596c455cae39e
8cb1589234aa116c49bba15ca616c7beeae0cebe 07-Jun-2016 Roshan Pius <rpius@google.com> Merge "WifiStateMachine: Return null link layer stats" into nyc-dev
am: e3235277e0

* commit 'e3235277e0bef27f51c50a1ddb74acbd80c996d5':
WifiStateMachine: Return null link layer stats

Change-Id: I90d89c48f346c6473f63fd6c4f40b2d180049a0d
e3235277e0bef27f51c50a1ddb74acbd80c996d5 07-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiStateMachine: Return null link layer stats" into nyc-dev
1286b0044ec003ab4a765e124fb3dd985baa2d2c 07-Jun-2016 Roshan Pius <rpius@google.com> Merge "WifiBackupRestore: Some cosmetic cleanups"
37233d107bf402d4683e09d30e16e00c75eadcc6 07-Jun-2016 Roshan Pius <rpius@google.com> Merge changes I6b581360,I60c8acea

* changes:
WifiBackupRestore: Logging changes
WifiBackupRestore: Set hidden flag from old backup
0b476346f4bfa5879d7287d7b215e0c351d9a6ab 07-Jun-2016 Roshan Pius <rpius@google.com> Merge "WifiBackupRestore: Parse older backup data"
e33a4bb414892435c016486585c26022cafdab68 06-Jun-2016 Roshan Pius <rpius@google.com> XmlUtil: Move Wifi/IP-Configuration serialization

Move the serialization/deserialization of WifiConfiguration &
IpConfiguration objects to XmlUtil. This helps us to share this logic
between WifiBackupRestore & WifiConfigStore.

Changes in the CL:
1. Create |WifiConfigurationXmlUtil| for WifiConfiguration
serialization.
2. Create |IpConfigurationXmlUtil| for IpConfiguration
serialization.
3. Change the XML structure of backup data to remove nesting of objects.
Nesting of objects makes it difficult to deserialize especially when we
start adding elements in future revisions. So, move |IpConfiguration|
object outside the |WifiConfiguration| object.

BUG: 29071904
Change-Id: Id08040bf11e4914638ec9f8d9d27d7983e27e42a
TEST: Unit-tests
TEST: Manual verification of backup/restore using bmgr commands.
ndroid/server/wifi/WifiBackupRestore.java
ndroid/server/wifi/util/XmlUtil.java
d9c55738e1bb2ff3faee24c5434453352a9e6611 31-May-2016 Christopher Wiley <wiley@google.com> Remove all knowledge of tethering from SoftApManager

( dirty cherry-pick from f502d3e20409d81cfefd762b3b44f46dead09a92 )

This logic has moved into Tethering and TetherInterfaceStatemachine,
where it probably always belonged.

Bug: 29054780
Test: WiFi tethering continues to work on angler
`runtest frameworks-wifi` passes.

Change-Id: Ifff78ea540929fde4abea65716e1f659da2ecfec
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/SoftApManager.java
3031903d4a68659350994571525fc86a47c02dd0 04-Jun-2016 Roshan Pius <rpius@google.com> WifiBackupRestore: Some cosmetic cleanups

Changes in the CL:
1. Consolidate the logic in supplicant backup migration to skip
enterprise networks during restore.
2. Create a helper method to restore networks once they're parsed out
from the backup data.

BUG: 28967335
Change-Id: I94cd5530afa5dc953cb8914c03ae7d554e0f182b
TEST: Unit-tests
ndroid/server/wifi/WifiBackupRestore.java
ndroid/server/wifi/WifiServiceImpl.java
0eeeac78a462f1cc1eaf38bf275a52e259170b9f 07-Jun-2016 Jan Nordqvist <jannq@google.com> Merge "Optimization/fix of SupplicantBridge.notifyANQPResponse."
d4623e574071ece6fd20f7afa724e09c9f38218f 24-May-2016 Jan Nordqvist <jannq@google.com> Optimization/fix of SupplicantBridge.notifyANQPResponse.

This change optimizes away an unnecessary extra call to
notifyANQPResponse on successful responses in notifyANQPDone and also
cleans the code a little bit.

TEST: There is no unit test associated that independently verifies the
change, but it has been manually verified to work.

Bug=28914731

Change-Id: Ib47ec7bc7dfac88e61a2975e3735a8d2191987c2
ndroid/server/wifi/hotspot2/SupplicantBridge.java
4b15a0f9d5b92cd1ebd169ca74089b2acad541ce 07-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "resolve merge conflicts of da56856 to master"
73b62544391a0a15d9ca2dd7feb7797751026c0f 07-Jun-2016 Randy Pan <zpan@google.com> QNS: cut down BSSID blacklist time to 5 minutes

Today the association to an AP can be rejected because of either
the rejection from the AP or the STA host driver time-out. The
WiFi framework receives the same ASSOC_REJECT messages for both
scenarios. Cut down the blacklist time value to 5 mins for now.
When we can differentiate these two types of rejections,
the blacklist time for the real AP rejection can go back to
30 minutes.

Bug: 28899826
Change-Id: I785e13140bfdfbefbae17320c247ae1c8134fa92
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
42ab3717158a00b6a9c6d8b222a38544eea4feb9 07-Jun-2016 Jan Nordqvist <jannq@google.com> Merge "Fix issue in WifiStateMachine.matchProviderWithCurrentNetwork()."
b42a86825e82d806743af1441c073ab016cf18da 07-Jun-2016 Ningyuan Wang <nywang@google.com> resolve merge conflicts of da56856 to master

This fixes the merge conflict of CL: ag/1108739/

Change-Id: I6a26ab0b8d03519172b1ba852291254521aa6c2c
da56856fb95e79993d5645ff5383876ed8bf9fb9 07-Jun-2016 Ningyuan Wang <nywang@google.com> Merge "Continue supporting persisting country code" into nyc-dev am: ff6f114971
am: ed6795e9aa

* commit 'ed6795e9aad6473f47e40cee4d6c2beed22962c3':
Continue supporting persisting country code

Change-Id: I346eb291e1c1d76380a2c160ca7e68b38f4108ff
ed6795e9aad6473f47e40cee4d6c2beed22962c3 07-Jun-2016 Ningyuan Wang <nywang@google.com> Merge "Continue supporting persisting country code" into nyc-dev
am: ff6f114971

* commit 'ff6f1149718d709ce4799883af4d77251c2652dc':
Continue supporting persisting country code

Change-Id: Id00c1f589851c66896e6a1f54fcf8cf64a120707
c39b9a4dc4661baab1ed638cffdc985ccbd4afb6 07-Jun-2016 Ningyuan Wang <nywang@google.com> Merge "Continue supporting persisting country code" into nyc-dev
am: ff6f114971

* commit 'ff6f1149718d709ce4799883af4d77251c2652dc':
Continue supporting persisting country code

Change-Id: I7b5e7e7ce04a1518652ec5be3333fae4fc0c08d2
ff6f1149718d709ce4799883af4d77251c2652dc 07-Jun-2016 Ningyuan Wang <nywang@google.com> Merge "Continue supporting persisting country code" into nyc-dev
5967a15d36c76ba1aaeb89ce8bd66bb4bccfe998 07-Jun-2016 Paul Stewart <pstew@google.com> resolve merge conflicts of 9fd75a2 to master

Change-Id: I5ac96f6035e3412e0dedba3a4869e9568047752d
48e998da00df5da11209ed6d51f2f21364754158 07-Jun-2016 mukesh agrawal <quiche@google.com> README: update source git hash

The README file has an unresolved reference to the previous
location of this code. Resolve the reference.

BUG=28445619
TEST=None

Change-Id: I787855854c7048dd52e220817c1164bea3cae42b
ndroid/server/wifi/README.txt
2bb56aa74dcad6946b1201cab016fd3f1fa410d7 07-Jun-2016 Roshan Pius <rpius@google.com> WifiStateMachine: Return null link layer stats

Modify |CMD_GET_LINK_LAYER_STATS| handling to return a null object when
the stats cannot be retrieved from wifi HAL. We've added a
feature check in |WifiServiceImpl.reportActivityInfo| method to check if
the device supports link layer stats reporting or not. So, there is no
need to fake an empty object if the retrieval fails.

BUG:29117407
Change-Id: Iaf8e060912611773398210785ebfaae7371db77c
ndroid/server/wifi/WifiStateMachine.java
9fd75a2bc60145082c83664a4dbdd36a8f34c3e2 07-Jun-2016 Paul Stewart <pstew@google.com> Merge "WCM: Periodic scan interval policy adjustment" into nyc-dev am: 2d7797eae8
am: 4f088ed037

* commit '4f088ed037dc1ae22fb1a0dd5c88a25965167a90':
WCM: Periodic scan interval policy adjustment

Change-Id: Ifb46e190264b2916c297326fa0b9e58a79f76dd8
4f088ed037dc1ae22fb1a0dd5c88a25965167a90 06-Jun-2016 Randy Pan <zpan@google.com> Merge "WCM: Periodic scan interval policy adjustment" into nyc-dev
am: 2d7797eae8

* commit '2d7797eae8364c2c42d7368090b25adc74de3ff1':
WCM: Periodic scan interval policy adjustment

Change-Id: Iee1fec3a64f957746ee0026adc6733fad21401ab
d6df79231d519a843f30f794ea4585fc0bba310e 06-Jun-2016 Randy Pan <zpan@google.com> Merge "WCM: Periodic scan interval policy adjustment" into nyc-dev
am: 2d7797eae8

* commit '2d7797eae8364c2c42d7368090b25adc74de3ff1':
WCM: Periodic scan interval policy adjustment

Change-Id: I338ec740415e1554725393487ecc3f4928408109
2d7797eae8364c2c42d7368090b25adc74de3ff1 06-Jun-2016 Paul Stewart <pstew@google.com> Merge "WCM: Periodic scan interval policy adjustment" into nyc-dev
0091305175e8c6fe7fc6d01efb9d405961db4ac7 03-Jun-2016 Ningyuan Wang <nywang@google.com> Continue supporting persisting country code

Some devices rely on Setup Wizard to set a persistent country
code.
This CL honors the persistent option, fixing corresponding 5GHz AP
problem.
This also includes addtional unit tests for this change.

BUG=28127280
TEST=compile
TEST=runtest frameworks-wifi
Change-Id: I2f36216e143d0ac4959f26a9965def061a06aabf
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiCountryCode.java
ndroid/server/wifi/WifiServiceImpl.java
44fcb5acfb805ba334c96a4ac1a549195a0174e8 04-Jun-2016 Lorenzo Colitti <lorenzo@google.com> Merge "DO NOT MERGE: Repeatedly prompting when no internet connection" into nyc-dev am: 5f4074fa7f
am: 079cc557f2

* commit '079cc557f2ce4508a84ecbe0d0d38fdf390c4885':
DO NOT MERGE: Repeatedly prompting when no internet connection

Change-Id: Ia5712664204d4b7ca7bbfc1213b6b918ee87b6b2
58cbdef15c1c764435e1c6ae10dc4d19a780ea72 04-Jun-2016 Jack Tian <jack.tian@sonyericsson.com> Merge "DO NOT MERGE: Repeatedly prompting when no internet connection" into nyc-dev
am: 5f4074fa7f

* commit '5f4074fa7f8e61d27cd24c317a0a1b8a5ece4724':
DO NOT MERGE: Repeatedly prompting when no internet connection

Change-Id: I1360e20bc35bb91197bd8937c2296df3ae0912d8
079cc557f2ce4508a84ecbe0d0d38fdf390c4885 04-Jun-2016 Jack Tian <jack.tian@sonyericsson.com> Merge "DO NOT MERGE: Repeatedly prompting when no internet connection" into nyc-dev
am: 5f4074fa7f

* commit '5f4074fa7f8e61d27cd24c317a0a1b8a5ece4724':
DO NOT MERGE: Repeatedly prompting when no internet connection

Change-Id: Ia43e54244f1d2f6522af5d2cb5840b8323a24b04
5f4074fa7f8e61d27cd24c317a0a1b8a5ece4724 04-Jun-2016 Lorenzo Colitti <lorenzo@google.com> Merge "DO NOT MERGE: Repeatedly prompting when no internet connection" into nyc-dev
3204fb9682242a7b5a749489076c66d448c42577 03-Jun-2016 Roshan Pius <rpius@google.com> WifiBackupRestore: Logging changes

Changes in CL:
1. To reduce log spamming, dump out the raw backup data only in
bugreports if verbose logging is enabled.
2. Mask out the passwords from the backup data dump.
3. Move WifiBackupRestore module initialization to |WifiInjector| so
that |WifiStateMachine| can set the verbose loging level.
4. Cleanup some unused variables in |SupplicantNework| class.

BUG: 29051876
Change-Id: I6b58136057549ba1eb8a2845341be9fa072572b4
TEST: Manual tests
ndroid/server/wifi/WifiBackupRestore.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
f196106f971d9e91dfcd14132a0fc2ce3d2cfc6c 02-Jun-2016 Roshan Pius <rpius@google.com> WifiBackupRestore: Set hidden flag from old backup

Add the missing |hiddenSSID| element parsing from old backups and add
unit-tests to validate hidden network backup/restore.

While there,
Add input parameter validation in all the public methods.

BUG: 29075035
Change-Id: I60c8acea17a532e7d5810d1096fbefc647614027
TEST: Unit tests
ndroid/server/wifi/WifiBackupRestore.java
e93d46675d154a85b5aea7c04b925794816ad143 04-Jun-2016 John Eckerdal <john.eckerdal@sonymobile.com> Stop the recurring alarm if no scansettings are available am: 0d0a4c339b am: a08979a414
am: 6485025ee6

* commit '6485025ee6bdf01fb2add32ebd51e09da7405d75':
Stop the recurring alarm if no scansettings are available

Change-Id: I3e2b379a0632708bd0c4d314cac2a1bd1d8ea9a7
6485025ee6bdf01fb2add32ebd51e09da7405d75 04-Jun-2016 John Eckerdal <john.eckerdal@sonymobile.com> Stop the recurring alarm if no scansettings are available am: 0d0a4c339b
am: a08979a414

* commit 'a08979a41421d0412cf64c38ccb06da0c0d2135c':
Stop the recurring alarm if no scansettings are available

Change-Id: I646a3f38acb43298e373f821049aa259521dddda
b62ba2658915dacbd42b750cb073c5135efcddbc 04-Jun-2016 Wei Liu <luciferleo@google.com> Merge "Hold the wakelock for suspend optimaztion only when it matters." into nyc-mr1-dev am: 59d39b88c7
am: 983d0bcf77

* commit '983d0bcf772501eec301da56f873a5de999c3916':
Hold the wakelock for suspend optimaztion only when it matters.

Change-Id: Ia2da99d1fca7b306127903bd3a011ceca12980b6
d674b0c2bfc9aea5405d786423b309533746d7a9 04-Jun-2016 John Eckerdal <john.eckerdal@sonymobile.com> Stop the recurring alarm if no scansettings are available
am: 0d0a4c339b

* commit '0d0a4c339b3950ad6d882e89223dc21a89ef3953':
Stop the recurring alarm if no scansettings are available

Change-Id: Icca7d534c4036b4648172c8db50206414f964b63
a08979a41421d0412cf64c38ccb06da0c0d2135c 04-Jun-2016 John Eckerdal <john.eckerdal@sonymobile.com> Stop the recurring alarm if no scansettings are available
am: 0d0a4c339b

* commit '0d0a4c339b3950ad6d882e89223dc21a89ef3953':
Stop the recurring alarm if no scansettings are available

Change-Id: I6deb23f47a5b183430f2b3a28994b7f49a5fff6f
983d0bcf772501eec301da56f873a5de999c3916 04-Jun-2016 Wei Liu <luciferleo@google.com> Merge "Hold the wakelock for suspend optimaztion only when it matters." into nyc-mr1-dev
am: 59d39b88c7

* commit '59d39b88c7af97049210f4e296570d03f1a32d91':
Hold the wakelock for suspend optimaztion only when it matters.

Change-Id: I076e52d6a5072d9d3d39bb8ac54ffc68019bebae
59d39b88c7af97049210f4e296570d03f1a32d91 04-Jun-2016 Wei Liu <luciferleo@google.com> Merge "Hold the wakelock for suspend optimaztion only when it matters." into nyc-mr1-dev
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
ndroid/server/wifi/WifiBackupRestore.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiServiceImpl.java
b9f574e46be8c535525c35dff5b8f987df5d5ed6 19-May-2016 Etan Cohen <etancohen@google.com> [NAN] Create/delete all NAN data-path interfaces on Wi-Fi up/down

Creates (deletes) all NAN data-path interfaces when Wi-Fi comes up (down).
All NAN data-path is determined by the capabilities of the device. The
interfaces are created but are not up. They are only brought up when an
actual data-path is created.

Rationale for not creating on demand: latency will be too long - especially
for responder (which has an OTA response expectation).

Bug: 26562610
Change-Id: I090af999e0f251a062f216b6d39d29cda7635882
ndroid/server/wifi/nan/WifiNanDataPathStateManager.java
ndroid/server/wifi/nan/WifiNanStateManager.java
f5a9cc0ca383ea1763f9d3014fd68d5455fab8f6 31-May-2016 Etan Cohen <etancohen@google.com> [NAN] NAN data-path HAL wrapper

Add wrappers to the NAN data-path APIs. Covers:
- JNI
- WifiNanNative calls
- WifiNanStateManager commands, responses, notifications

Effectively all the code which pipes information through - none of
the code which actually does something with the information.

Includes unit tests for above code.

Bug: 26562610
Change-Id: I69a47ae84b92bd69ddc9f70bed69c0b06bacde7d
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanStateManager.java
07a83d343adb6a5a2d4fce734b1dbec717126b6d 03-Jun-2016 Wei Liu <luciferleo@google.com> Hold the wakelock for suspend optimaztion only when it matters.

b/23106128

Change-Id: I367ffd43f84bb46276d30c12ffcd54d641a9bc4a
ndroid/server/wifi/WifiStateMachine.java
297790d3b64914b6350d6bb4bbc01589c98be9f4 04-Jun-2016 Randy Pan <zpan@google.com> Merge "QNS: user band prefrence handling"
2434556fd83399af71ea9f6b2e9a1c89a81ba4df 03-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove all knowledge of tethering from SoftApManager"
d2ff70267d318eb9c7fb48baea0dddeb822197a1 22-Apr-2016 Randy Pan <zpan@google.com> QNS optimization

Optimized the implementation by moving the check against empty
scan results to an earlier location.

Also, now all calls into enableBssidForQualityNetworkSelection()
are via WifiConnectivityManager.trackBssid().

Bug: 27932378
Change-Id: I653d6a3dc508f556c4eb092559c1d17d60169724
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
ndroid/server/wifi/WifiStateMachine.java
c721aebba149108c6ce2b9f5fe39ca00d07bad5f 03-Jun-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Re-configure NAN HAL callbacks whenever Wi-Fi is disabled/enabled." into mm-wireless-dev
am: 0eed0dbdbe

* commit '0eed0dbdbe3efbaba6632a6c5368c4678505e299':
[NAN] Re-configure NAN HAL callbacks whenever Wi-Fi is disabled/enabled.

Change-Id: Iebca8c54de3643772286b252e92eb74b3490bb90
e3b2ca0b16dbee8c82429fb8ac0c82eefcbe0426 03-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiBackupRestore: Add IpConfiguration to backup data"
0eed0dbdbe3efbaba6632a6c5368c4678505e299 03-Jun-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Re-configure NAN HAL callbacks whenever Wi-Fi is disabled/enabled." into mm-wireless-dev
be83d5862958aab7db746c8c5b748f3dc1073b4b 03-Jun-2016 Etan Cohen <etancohen@google.com> [NAN] Re-configure NAN HAL callbacks whenever Wi-Fi is disabled/enabled.

The NAN callbacks need to be re-configured whenever Wi-Fi is shut down.

Test: run WifiNanManagerTest.py / test_nan_discovery_session multiple times
with Wi-Fi auto-disabled (by test script) between runs. Confirmed that
callbacks are called on subsequent runs.

Bug: 27880727
Change-Id: I34748e365b45ad0f92fa049f699b9c83e884b57b
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanStateManager.java
14f8e2bdd97ad7d44c00b6ef788b339023d41e7c 01-Jun-2016 Roshan Pius <rpius@google.com> WifiBackupRestore: Add IpConfiguration to backup data

Add the IpConfiguration object associated with each WifiConfiguration
object to the backup data. Currently, this ip configuration information
is being backed up separately via IpConfigStore class in the
ipconfig.txt file.

While there,
1. Rename write/parse-WepKeys methods.
2. Prefix the existing write/parse-Configuration methods with |Wifi| to
differentiate from the new IpConfiguration methods.
3. Prefix the existing depth variables with |tag|.

BUG: 28967335
BUG: 29063894
Change-Id: Ie8ebb119e2b22e78e825aee2aa2f1bb992f0c149
TEST: Compiles & unit-test passes
ndroid/server/wifi/WifiBackupRestore.java
1aabeb345f1c199bc2fca5cee582fc45b14d7e25 23-Apr-2016 Randy Pan <zpan@google.com> QNS: user band prefrence handling

Fixed the criteria on determining if the current network is
qualified for user band preference. Also added a check to
filter out ScanResults that don't match the user band preference.

Added a few unit tests. Fixed a unit test bug by setting the
appropriate user band preference value.

While there, addressed a couple of checkstyle issues.

Bug: 27932378
Bug: 27589146
Tests: Wifi Framework Unit Tests
Change-Id: Ibbf9ffa5a4d9b5a5596a91d14ddb247b9d9fab5b
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
016ca1ae5e33eb9529ae10c2510a56fa5c7fec4d 03-Jun-2016 Randy Pan <zpan@google.com> WCM: Periodic scan interval policy adjustment

Allow immediate single scan for scenarios such as user allows
untrusted networks, user forces a connectivity scan, and etc.
The minimum scan interval is enforced only for the screen state
change and connection state change cases.

Also removed the scan started by WCM for user selected network.
We connect to the user selected network by directly invoking
the wpa_supplicant select_network. Now WCM always sets the
'forceSelectNetwork' parameter to false when calling into
WifiQualifiedNetworkSelector.selectQualifiedNetwork(). So deleted
the unused variable mForceSelectNetwork.

Bug: 29103349
Change-Id: I1dd77af0cf7de85a96afac63de1344daab192968
ndroid/server/wifi/WifiConnectivityManager.java
0d0a4c339b3950ad6d882e89223dc21a89ef3953 02-Jun-2016 John Eckerdal <john.eckerdal@sonymobile.com> Stop the recurring alarm if no scansettings are available

This will fix an NPE whenever no scansettings are available.
The stop of the recurring alarm should not introduce a permanent
stop though since the whole processPendingScans function is dependant
on mPendingBackgroundScanSettings != null.

Anyway, as soon as mPendingBackgroundScanSettings is changed,
the processPendingScans function will be called, either directly
or indirectly through handleScanPeriod().

Crash call stack:
java.lang.NullPointerException: Attempt to read from field
'int com.android.server.wifi.WifiNative$ScanSettings.base_period_ms'
on a null object reference

at com.android.server.wifi.scanner.SupplicantWifiScannerImpl.processPendingScans
(SupplicantWifiScannerImpl.java:395)

Bug: 29113658
Author: Ola Olsson <ola.olsson@sonymobile.com>
Change-Id: Ibf08c9d6c5e476052449ef11d82ce005e50bd4fd
ndroid/server/wifi/scanner/SupplicantWifiScannerImpl.java
3ea09e080a9ab3ed594356d8f3e498ec61a4d0fb 02-Jun-2016 Jack Tian <jack.tian@sonyericsson.com> DO NOT MERGE: Repeatedly prompting when no internet connection

When internet connection is not avaiable there is always
a prompt even if user has checked "never ask again" on the
dialog prompt.
This is caused by noInternetAccessExpected reset while reloading
network configuration and this patch puts noInternetAccessExpected
into network history so that its value is not lost.

Bug: 29085788
Bug: 29111340

(cherry picked from commit 4854de88e57279bf930f0754b268093061e88544)

Change-Id: I407a5c60e89d7da4ac7fe30df08087fe24039f98
ndroid/server/wifi/WifiNetworkHistory.java
ndroid/server/wifi/WifiStateMachine.java
78efa43020447a32c22ab876ece4ef1acee533bb 03-Jun-2016 Etan Cohen <etancohen@google.com> [NAN] Set DBG and VDBG flags to false
am: f9280778f0

* commit 'f9280778f0a448e40b457a88c4f7830201fca104':
[NAN] Set DBG and VDBG flags to false

Change-Id: Ie561de8c65decacabcbe7baf583490a30a5959de
4854de88e57279bf930f0754b268093061e88544 02-Jun-2016 Jack Tian <jack.tian@sonyericsson.com> Repeatedly prompting when no internet connection

When internet connection is not avaiable there is always
a prompt even if user has checked "never ask again" on the
dialog prompt.
This is caused by noInternetAccessExpected reset while reloading
network configuration and this patch puts noInternetAccessExpected
into network history so that its value is not lost.

Bug: 29085788
Change-Id: I79e80047975e212623ef013a2add7e2b4c91d51d
ndroid/server/wifi/WifiNetworkHistory.java
ndroid/server/wifi/WifiStateMachine.java
abb6f1e8dac8234ce1acbeab980f260518cb652e 02-Jun-2016 Glen Kuhne <kuh@google.com> Remove chatty log from WiFiNative
am: d722d068b6

* commit 'd722d068b68772e52dd7621cfb915fce5ac08482':
Remove chatty log from WiFiNative

Change-Id: Ib8b1e47e274d9ae07ae8a9bb04aeecd050377666
f9280778f0a448e40b457a88c4f7830201fca104 02-Jun-2016 Etan Cohen <etancohen@google.com> [NAN] Set DBG and VDBG flags to false

Leaked through in previous CLs.

Change-Id: I61b4ed8d1ee23349addca47fb1456776246b7997
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanRttStateManager.java
ef9e66e6dfe56ecb2015538afa3b8a4d10fa546e 19-Apr-2016 Randy Pan <zpan@google.com> Wifi QNS clean up

Cleaned up QNS comments and log messages.

Bug: 27932378
Bug: 27297354
Tests: Wifi Framework Unit Tests
Change-Id: I4e40c9ddb6329bbadeea724286f94585ff1d5a5d
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.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
ndroid/server/wifi/WifiNative.java
5de29ec72c54cb73fdc1b59072f66a2627b8764c 25-May-2016 Ningyuan Wang <nywang@google.com> Migrating existing code to Clock abstraction part 1

This CL includes the following changes:
Refactor Clock.java for better readability
Use Clock abstraction for classes which already have
a reference of Clock obejct.

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

Change-Id: I49e896a91a63cf4519368a9de259046c21c94ddb
ndroid/server/wifi/Clock.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/ANQPData.java
ndroid/server/wifi/hotspot2/AnqpCache.java
ndroid/server/wifi/scanner/SupplicantWifiScannerImpl.java
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
00fba67346ab1f33463c86938895810bb3bb97c7 01-Jun-2016 Wei Liu <luciferleo@google.com> Merge "Add a null-check to wifi p2p service."
521622a22c19a1fa1d8f517d5466f841e8f3348b 01-Jun-2016 Glen Kuhne <kuh@google.com> Merge "Remove chatty log from WiFiNative"
44a31240adc22efa847d2cecec9de5b94a1b3920 01-Jun-2016 Roshan Pius <rpius@google.com> Merge "WifiBackupRestore: Add new module for backup/restore"
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
ndroid/server/wifi/WifiNative.java
671331feaa3e1287180b94901e75224c5e7101d9 24-May-2016 Wei Liu <luciferleo@google.com> Add a null-check to wifi p2p service.

b/26877020

Change-Id: Ibbb1047b0cd5fc3e919189ccc764a60a1c075ce8
ndroid/server/wifi/WifiStateMachine.java
4ab8ee5e3ecfdc107892396178efa9176a72438f 01-Jun-2016 Paul Stewart <pstew@google.com> Perform a null-check in getMatchingConfig

Ensure the scanResult parameter is non-null.

BUG: 29061312
Change-Id: I9b9d1c5d10b7a2776c3f5fed4b942fb7924bb5b3
ndroid/server/wifi/WifiConfigStore.java
22a57c78b11176892097abdf0a4340ecc7beec6b 01-Jun-2016 Roshan Pius <rpius@google.com> Merge "XmlUtil: Create a utility for XML formatting"
f27f4ae4cfa0e7ebfae54c9ffeacfebe52b8f043 01-Jun-2016 Etan Cohen <etancohen@google.com> [NAN] Code clean-up: IDE/link + safety
am: 60046ada8b

* commit '60046ada8b9c418db0133e966f4a9b12154948ee':
[NAN] Code clean-up: IDE/link + safety

Change-Id: If165b52c5b40ecc0af0e55758c05598fca034ab0
7d6cf72a1fe1f61efd87e94af7c5b6d36d17ee8f 01-Jun-2016 Etan Cohen <etancohen@google.com> [NAN] Treat GetCapabilities() as a regular command/response pair.
am: b5ff110bcd

* commit 'b5ff110bcdf4a178e712184c06ff7c8b200e125d':
[NAN] Treat GetCapabilities() as a regular command/response pair.

Change-Id: I5eecf2d52a37ee3976cc54c3b616d1ee32c709a2
ff9686aec5b6ee21e01556899fb13ab55915f3c0 31-May-2016 Roshan Pius <rpius@google.com> WifiBackupRestore: Add new module for backup/restore

The new module provides symmetric API's to format the provided
configurations into a XML byte stream.
WifiService retrieves the current list of saved configurations and
provides the list to the |WifiBackupRestore| module to generate the
backup data.
Similarly, WifiService provides the backup data to|WifiBackupRestore|
to generate the list of saved networks. It then adds/enables these
networks using the public API's.

The XML data is versioned to ease migration across future
revisions.

BUG: 28967335
TEST: Compiles & unit-test passes
TEST: Integrated these changes with SettingsBAckupAgent to verify that
saved networks are being backed up/restored correctly.

Change-Id: I0a8a7d722e627fc606019a4148fb2be998ce25c9
ndroid/server/wifi/WifiBackupRestore.java
ndroid/server/wifi/WifiServiceImpl.java
60046ada8b9c418db0133e966f4a9b12154948ee 01-Jun-2016 Etan Cohen <etancohen@google.com> [NAN] Code clean-up: IDE/link + safety

- Various code clean-ups recommended by IDE.
- Additional debug/warning on native failures
- Constants renumbering to different name-spaces (help prevent
errors due to same numbers - e.g. response mistaken for command)

Bug: 26562610
Change-Id: I227ebc734a425ebb4dac8ef09311fd5eb77dda90
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanStateManager.java
2b7e486db94455a4a4c0124b5ba5e57c837ef10e 31-May-2016 Roshan Pius <rpius@google.com> XmlUtil: Create a utility for XML formatting

This is a thin wrapper over the existing XmlUtils provided by Android
core. This will be used for persisting Wifi config store as well as for
Wifi backup/restore.

BUG: 29039447
Change-Id: Iac1f960c0f6f16379ab125882c2aced8857b005c
ndroid/server/wifi/util/XmlUtil.java
b5ff110bcdf4a178e712184c06ff7c8b200e125d 01-Jun-2016 Etan Cohen <etancohen@google.com> [NAN] Treat GetCapabilities() as a regular command/response pair.

Original design treated GetCapabilities() as a notification which was
triggered whenever the HAL was initialized (even though under the hood
it was still a command/response). This can result in a race condition
if an "early" command needs the capabilities information. Converting to
a standard command/response will queue all other commands until the
capabilities are returned.

Specifically needed for NAN data-path which creates all interfaces (based
on capabilities) when it is first enabled.

Triggered whenever NAN is enabled - e.g. when Wi-Fi is enabled.

Bug: 26562610
Change-Id: I86375b318720b46cc92291484b7aa1d83928617b
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanStateManager.java
f502d3e20409d81cfefd762b3b44f46dead09a92 31-May-2016 Christopher Wiley <wiley@google.com> Remove all knowledge of tethering from SoftApManager

This logic has moved into Tethering and TetherInterfaceStatemachine,
where it probably always belonged.

Bug: 29054780
Test: WiFi tethering continues to work on angler
`runtest frameworks-wifi` passes.

Change-Id: Ifff78ea540929fde4abea65716e1f659da2ecfec
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/SoftApManager.java
c73f2b45ae91a3c3a3e9dd9b2f0ab0ae498774ab 29-May-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiLastResortWatchdog: dynamic verbose logging"
8c7fbf11cc01098ec0e0b82a88d3837626f96d4c 28-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes Icb7c3a21,I778ccd6f

* changes:
WifiLastResortWatchdog: reset wifi on trigger
WifiController: Add CMD_RESET_WIFI command
75727af748e2b53baf365139ecfa7bf87a449d04 28-May-2016 Rebecca Silberstein <silberst@google.com> WifiLastResortWatchdog: dynamic verbose logging

Switch WifiLastResortWatchdog over to using the dynamic support for wifi
verbose logging.

This CL also cleans up some logging to remove misleading ages for
network summary information.

BUG: 29008073
Change-Id: Ieb2632ca0f114c2009e3f41801ff897c84a60ffd
ndroid/server/wifi/WifiLastResortWatchdog.java
ndroid/server/wifi/WifiServiceImpl.java
11ad3437e833ead2c7c235f173824db16ee4ea02 27-May-2016 Rebecca Silberstein <silberst@google.com> WifiLastResortWatchdog: reset wifi on trigger

Added wifi reset on WifiLastResortTrigger. The reset is implemented by
sending the CMD_RESTART_WIFI message to WifiController.

BUG: 27856267
Change-Id: Icb7c3a211afcd234cfcd25a42665aed03c33f5e1
ndroid/server/wifi/WifiLastResortWatchdog.java
ndroid/server/wifi/WifiServiceImpl.java
942c55c27bfd26836077add2c8314d18fea6b8a6 27-May-2016 Randy Pan <zpan@google.com> Merge "Reset single scan timestamp when disabling Wifi" into nyc-dev am: bcb882b117 am: f6df08ddc2
am: f55c93c8d4

* commit 'f55c93c8d4404736939d9a4f5e7978ef498e05f3':
Reset single scan timestamp when disabling Wifi

Change-Id: Ib26d20a0e948253ed41761cdef23edd1bf5ab2b2
ddd09bbe798f9fb257bb9c73649bee3bd77fb469 26-May-2016 Rebecca Silberstein <silberst@google.com> WifiController: Add CMD_RESET_WIFI command

Allow WifiController to safely restart the WiFi stack. This will
initially be used by the WifiLastResortWatchdog. The CMD_RESET_WIFI
message is only handled in the StaEnabledState where it would have been
attempting to connect. The process of bringing the wifi back up is
handled through the use of the new CMD_RESET_WIFI_CONTINUE command.
Tests are also added to verify that the new CMD_RESET_WIFI command
is ignored in other states (explicitly tests Emergency mode and
AP enabled).

BUG: 27856267
Change-Id: I778ccd6f7d555f6ee6abb195c1c16c106c2e66b7
ndroid/server/wifi/WifiController.java
f6df08ddc2053b2ac30b1cd8cd7913f2a94e6b47 27-May-2016 Randy Pan <zpan@google.com> Merge "Reset single scan timestamp when disabling Wifi" into nyc-dev
am: bcb882b117

* commit 'bcb882b11790c1f4d64a78a0e0cb07dd0c227c6c':
Reset single scan timestamp when disabling Wifi

Change-Id: I88ac8b4b03c5b45ea589e7aa86862b46c8ab4391
75423e87095b6c0353af053cb446dbc9a444fcfa 27-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiLockManager: create class to manage WifiLocks"
f5dba8eb5e660932367fc650a2e2ca724df3734e 27-May-2016 Randy Pan <zpan@google.com> Reset single scan timestamp when disabling Wifi

This timestamp needs to be reset when WiFi is disabled. When WiFi
is enabled again, a connectivity scan starts immediately.
Otherwise it can be delayed because of the minimum periodic single
scan interval rule.

Bug: 28986330
Change-Id: I5a01dc267a05791eba34c87e6d9301bd998bf377
Tests: Wifi unit tests, manual test
ndroid/server/wifi/WifiConnectivityManager.java
a04a40c3344346ac730c7e3df1bd18c80e1cc3ba 26-May-2016 Glen Kuhne <kuh@google.com> Merge "Fix wifi endConnectionEvent false posi&nega-tives"
2a7c2bec5d307a9e52de429c6303b7df9de900dc 20-May-2016 Rebecca Silberstein <silberst@google.com> WifiLockManager: create class to manage WifiLocks

Create new class to maintain WifiLocks requested by applications.

WifiLock management was closely tied to the WifiServiceImpl and made it
very difficult to write tests using different WifiLock modes in
DeviceIdle states. This CL moves the lock management to a new class,
WifiLockManager, and adds tests to check the behavior.

Bug: 28669096
Change-Id: Ib055078eb0a8555e9a7715d7ce10de1103e73130
Test: runtest frameworks-wifi
ndroid/server/wifi/WifiController.java
ndroid/server/wifi/WifiLockManager.java
ndroid/server/wifi/WifiServiceImpl.java
f038e61cf0064bd1081ece932fc268e21efe1faa 26-May-2016 Mitchell Wills <mwills@google.com> Merge "Update background scan bucket periods to align with minutes" into nyc-dev am: 528d0693bd am: 40adbd9d89
am: 9bbcd0683c

* commit '9bbcd0683c16bbb64efccc9ad599cc172162133f':
Update background scan bucket periods to align with minutes

Change-Id: I9d64c544bc41ada4fdfcc38ac1427cb54ab66a8e
20213b0ab3eab35bed08cae65beeffc4fa2aa7d3 26-May-2016 Samuel Tan <samueltan@google.com> Merge changes Icc3a2bf3,I3bc2fbde,I0b32f47e,I558e95f9,I9144578c, ...

* changes:
Replace sVDBG and VDBG with mVerboseLoggingEnabled
WifiTrafficPoller: switch VDBG and DBG
NetworkDetail: remove VDBG field
WifiMonitor: switch VDBG and DBG
WifiConfigManager: remove sVVDBG
WifiConfigManager: remove mEnableVerboseDebugging
WifiConfigManager: instantiate mLocalLog unconditionally
40adbd9d89350aa3c2c6a5e10097c8502784c363 26-May-2016 Mitchell Wills <mwills@google.com> Merge "Update background scan bucket periods to align with minutes" into nyc-dev
am: 528d0693bd

* commit '528d0693bde1e2b83fab717252cf0ea2c55b4e56':
Update background scan bucket periods to align with minutes

Change-Id: I26f3db6a37bc146d596d9ae9d94052d9da6623f4
528d0693bde1e2b83fab717252cf0ea2c55b4e56 26-May-2016 Mitchell Wills <mwills@google.com> Merge "Update background scan bucket periods to align with minutes" into nyc-dev
b6e889f0abeecc749b5b2426e13096e57381231f 26-May-2016 Glen Kuhne <kuh@google.com> Fix wifi endConnectionEvent false posi&nega-tives

Added calls to reportConnectionAttemptEnd() from within
ObtainingIpState. Not having these was resulting in some Connection
Events not being ended correctly, skewing metrics & causing packet fate
misses.
Also stopped packet-fate/wifiLogger from being called for the
FAILURE_CONNECT_NETWORK_FAILED error type.

BUG=28779670
BUG=28963887

Change-Id: I4d53031167273d6cf6fb6081d93090d981e9a61f
ndroid/server/wifi/WifiStateMachine.java
7002981cd8cf4ed73e9bbb2c1a877c3594e0ab39 22-Apr-2016 Samuel Tan <samueltan@google.com> Replace sVDBG and VDBG with mVerboseLoggingEnabled

Replace all instances of the private static fields sVDBG
and VDBG with the instance variable mVerboseLoggingEnabled.
This new name better reflects how this field is controlled
by the verbose debugging switch. This field is now an instance
variable (rather than a static variable) since it is set by the
enableVerboseDebugging() instance method of each class.

Also:
- Add a setter for mVerboseLoggingEnabled in WifiConfigStore, which
is called from the same setter in WifiConfigManager.

BUG: 28321397
Change-Id: Icc3a2bf31b8d4090b89d429e1a1329c703116160
TEST: 'runtest frameworks-wifi' passes.
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiTrafficPoller.java
1c0d1409f4f52d9b699777660054d8a8134e4459 22-Apr-2016 Samuel Tan <samueltan@google.com> WifiTrafficPoller: switch VDBG and DBG

Switch the VDBG and DBG fields to adhere with the current
convention in WifiConfigStore and WifiConfigManager, which
is that DBG is a compile-time flag, and VDBG is a a flag settable
at run-time. A forthcoming CL will give VDBG a more readable variable
name.

Also:
- Make DBG a constant (static final) field, since it is only set at
compile time.
- For log messages guarded by DBG or VDBG, use Log.d instead of Log.e,
since these are debug, not error, log messages.

BUG: 28321397
Change-Id: I3bc2fbded3723d3a00d0a357c7bdf8543ad707e8
TEST: 'runtest frameworks-wifi' passes.
ndroid/server/wifi/WifiTrafficPoller.java
8f14e9784bd8ca8e832fff86597a28755f7e668e 22-Apr-2016 Samuel Tan <samueltan@google.com> NetworkDetail: remove VDBG field

The VDBG is field us currently used as the DBG field is
in other files: as a static, compile-time flag that
determines whether certain messages are logged. The DBG
field, on the other hand, is currently defined but not used.

Replace the uses of VDBG with DBG, and remove the VDBG field,
so that NetworkDetail will only have a single compile-time
debug flag that is consistent with those used in other WiFi
framework classes.

BUG: 28321397
Change-Id: I0b32f47e50e8add7e889ac72e7c9c259802bf083
TEST: 'runtest frameworks-wifi' passes.
ndroid/server/wifi/hotspot2/NetworkDetail.java
3267ef6d60838a4f0b94470adb1725a6b8dc0117 22-Apr-2016 Samuel Tan <samueltan@google.com> WifiMonitor: switch VDBG and DBG

Switch the VDBG and DBG fields to adhere with the current
convention in WifiConfigStore and WifiConfigManager, which
is that DBG is a compile-time flag, and VDBG is a a flag settable
at run-time.

A forthcoming CL will give VDBG a more readable variable name.

BUG: 28321397
Change-Id: I558e95f9d9dd7057b4634d1355e8319a5d5829c3
TEST: 'runtest frameworks-wifi' passes.
ndroid/server/wifi/WifiMonitor.java
fe54925a27dac5ea82986d8143d6fa62861caf6c 22-Apr-2016 Samuel Tan <samueltan@google.com> WifiConfigManager: remove sVVDBG

The sVVDBG field is redundant, since we should never receive a
a verbose level >1 in enableVerboseDebugging(). Remove this field,
and use sVDBG in its place.

BUG: 28321397
Change-Id: I9144578c0d1102ef354365738a81cbf156698792
TEST: 'runtest frameworks-wifi' passes.
ndroid/server/wifi/WifiConfigManager.java
e0da35c848378b80206fe6bf6bd3cbf8cc01be2d 22-Apr-2016 Samuel Tan <samueltan@google.com> WifiConfigManager: remove mEnableVerboseDebugging

This field is redundant, since sVDBG already exists.

BUG: 28321397
Change-Id: Ibc69a6e1e0dff1275c92a1c39cb3cfdea1372394
TEST: 'runtest frameworks-wifi' passes.
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiScoreReport.java
ndroid/server/wifi/WifiStateMachine.java
fc3aa7fb6a0f2df8243eadaf4767591dbd988e9b 20-May-2016 Jan Nordqvist <jannq@google.com> Fix issue in WifiStateMachine.matchProviderWithCurrentNetwork().

This CL fixes a problem in matchProviderWithCurrentNetwork that prevented
the method from returning a deterministic value. This was caused by an
ordering issue related to setting the currently active Passpoint network
which is in turn used by matchProviderWithCurrentNetwork.

TEST: The functionality has been manually tested using the Hotspot 2.0 r2
app by adding instrumentation that forces a remediation (and a call to
matchProviderWithCurrentNetwork) right after association and correlating
log instrumentation with known values.

Bug=28600780

Change-Id: I798b87a61c335b87341e53e89f707ca9146fd0dd
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.java
dffbb118f75f727596ec2a347a28f7e5215c1b9f 25-May-2016 pkanwar <pkanwar@google.com> Hardcode the frequency band to \'AUTO\'. am: 7016241061 am: 83de4575f5
am: f89ffe9cf6

* commit 'f89ffe9cf6b52e0dbcc5ed15d33dc16b06397877':
Hardcode the frequency band to 'AUTO'.

Change-Id: I31c0f3dafaece3b5a28900e023cce837762106a7
83de4575f5860ddaeb897ae0f1b4443479b12139 25-May-2016 pkanwar <pkanwar@google.com> Hardcode the frequency band to \'AUTO\'.
am: 7016241061

* commit '70162410612cfbf6d398a7625d3b9924cff719b7':
Hardcode the frequency band to 'AUTO'.

Change-Id: Icc70c7bd5992af5c077254e53bd2c99ac761d32c
70162410612cfbf6d398a7625d3b9924cff719b7 25-May-2016 pkanwar <pkanwar@google.com> Hardcode the frequency band to 'AUTO'.

Users are unable to change their preference since we've taken out the UI

Changed the setFrequencyBand method to always set the band to 'AUTO'.

b/28906443

Change-Id: I7ebd8aa204f72ecee754e31662d8ebf509ae6063
ndroid/server/wifi/WifiStateMachine.java
15d82fb43a3352a560bff37b2391b785d048286e 22-Apr-2016 Samuel Tan <samueltan@google.com> WifiConfigManager: instantiate mLocalLog unconditionally

Previously, mLocalLog was instantiated only if the
field mShowNetworks was true. Since this field was
always set to true, so the local log was always
instantiated.

Now that mShowNetworks has been replaced by sVDBG, which
defaults to false, mLocalLog no longer defaults to a non-null value.

Since we want WifiConfigManager to always use a local log,
instantiate mLocalLog unconditionally instead.

BUG: 28276051
Change-Id: I1694357acdf044390cd10f7e1a4a35fb58973f0d
TEST: 'runtest frameworks-wifi' passes.
ndroid/server/wifi/WifiConfigManager.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
240fdc87ad51f0449c92f1c3981c93ea022729bb 25-May-2016 Randy Pan <zpan@google.com> WifiConnectivityManager: enforce minimum single scan interval am: c2963eb076 am: 28eb5a8fe0
am: b7c99688e3

* commit 'b7c99688e3f7e4049f8a3c079894c3a054e10254':
WifiConnectivityManager: enforce minimum single scan interval

Change-Id: I0fc5b77fba2bf7795b41c330f70f6ecad4efd0a9
1b266ec1524c516a7ebf25b76801db86427ba68b 25-May-2016 Mitchell Wills <mwills@google.com> Update background scan bucket periods to align with minutes

Bug: 28320003
Change-Id: Ic551cc6d7fcaa94945d2768d7aa2cf705dd510fd
ndroid/server/wifi/scanner/BackgroundScanScheduler.java
2e7aed495e8621559c9f99168f49851c4880fc4d 25-May-2016 Randy Pan <zpan@google.com> Merge "Wifi: local log size reduction" into nyc-dev am: 3126f8d539
am: d2fffaa41f

* commit 'd2fffaa41f74ba0aa9981f5f53bad27a3c5d7bc6':
Wifi: local log size reduction

Change-Id: I4ce648fddab39f77fcadf1c2cf763161631a150f
b7c99688e3f7e4049f8a3c079894c3a054e10254 25-May-2016 Randy Pan <zpan@google.com> WifiConnectivityManager: enforce minimum single scan interval am: c2963eb076
am: 28eb5a8fe0

* commit '28eb5a8fe0851fb468f302aa8684dc0d3ada739e':
WifiConnectivityManager: enforce minimum single scan interval

Change-Id: If13ae8c00df0945ac48346775a0c983cffb5943f
a2cb34fc29e83dd89ca156d43692e984cbee5078 25-May-2016 Randy Pan <zpan@google.com> Merge "Wifi: local log size reduction" into nyc-dev
am: 3126f8d539

* commit '3126f8d5394f8790e9c4ed4ab5c47fcc686e6803':
Wifi: local log size reduction

Change-Id: Ic0f9d0847dbe12b678ed1fd77771ed8307781625
03c74a2f3c4f4a68eb61371758228737df6a8412 25-May-2016 Randy Pan <zpan@google.com> WifiConnectivityManager: enforce minimum single scan interval
am: c2963eb076

* commit 'c2963eb07660a06592c60224279685166390217d':
WifiConnectivityManager: enforce minimum single scan interval

Change-Id: I4fdd69236c664a07375b01e0dfaa98c5b3a76a15
3126f8d5394f8790e9c4ed4ab5c47fcc686e6803 25-May-2016 Randy Pan <zpan@google.com> Merge "Wifi: local log size reduction" into nyc-dev
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
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
c2963eb07660a06592c60224279685166390217d 23-May-2016 Randy Pan <zpan@google.com> WifiConnectivityManager: enforce minimum single scan interval

Instead of always starting a single scan when the device enters
screen on state, we now keep track of how long it has been since
last periodic single scan and defer the new scan request.

Bug: 28887789
Tests: Wifi Unit Tests, manual tests
Change-Id: Iba5b5b7db897d3227d87f8d989246a1942525b9c
ndroid/server/wifi/WifiConnectivityManager.java
0335f0ea1200804fda18df512c7872af3df253f3 24-May-2016 Etan Cohen <etancohen@google.com> [NAN] Add retry count to send message
am: 1da4332949

* commit '1da4332949ad1053078053097bfc59a72653f477':
[NAN] Add retry count to send message

Change-Id: I09bc800c43a509249cc6ecfa047df5596217ef9e
33bb803038be043f8853159bf7381d3b4854b318 24-May-2016 Etan Cohen <etancohen@google.com> [NAN] Update send message flow to be (more) asynchronous
am: 1bf97ad103

* commit '1bf97ad103217a2e18370c382fe30abd88716d53':
[NAN] Update send message flow to be (more) asynchronous

Change-Id: I8babf1b70e2046a914235da06d470cf4a91e993c
1da4332949ad1053078053097bfc59a72653f477 10-May-2016 Etan Cohen <etancohen@google.com> [NAN] Add retry count to send message

Retransmit when no ACK received.

Bug: 28690414
Change-Id: I67f1a443319fb17d81ed55c2f071bdb480141844
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanStateManager.java
1bf97ad103217a2e18370c382fe30abd88716d53 04-May-2016 Etan Cohen <etancohen@google.com> [NAN] Update send message flow to be (more) asynchronous

Bug: 27916698
Change-Id: Ie9741b73190e733e42dae63386557e6feb01eb54
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanStateManager.java
442c439a955470344af3ad53bf16add8537088df 23-May-2016 Randy Pan <zpan@google.com> Merge "Inform WifiConnectivityManager screen state" into nyc-dev am: 5de778c460 am: 252a57a58d
am: 21dc64f5fc

* commit '21dc64f5fc20efd3a7e2679a4fbaa01e722f15c6':
Inform WifiConnectivityManager screen state

Change-Id: I8bcd8999b9ac2ce4b0557562e90e447bae9446f5
21dc64f5fc20efd3a7e2679a4fbaa01e722f15c6 23-May-2016 Randy Pan <zpan@google.com> Merge "Inform WifiConnectivityManager screen state" into nyc-dev am: 5de778c460
am: 252a57a58d

* commit '252a57a58d7173cc379ad18ea2942225c5a2cdbb':
Inform WifiConnectivityManager screen state

Change-Id: I400de3d5264b0a843a19360014e82f6b7dd77e26
ae294bc29d535b4b4978bec198c2b22f227a621b 23-May-2016 Randy Pan <zpan@google.com> Merge "Inform WifiConnectivityManager screen state" into nyc-dev
am: 5de778c460

* commit '5de778c46065cf6a72c2c0d124c0ac882e5b55fe':
Inform WifiConnectivityManager screen state

Change-Id: Ia6b7b9e79db068f85f8a17b421cbe5bdefbd782b
5de778c46065cf6a72c2c0d124c0ac882e5b55fe 23-May-2016 Randy Pan <zpan@google.com> Merge "Inform WifiConnectivityManager screen state" into nyc-dev
c08e5f08975e6a504b6f8e5b04d66e0a0c18416b 23-May-2016 Mitchell Wills <mwills@google.com> Merge "Make sure that all ways a scan can fail get logged" into nyc-dev am: 1f9f7c109c am: 7a56e2720d
am: 96a9d6f315

* commit '96a9d6f31570331a127aa1f5cf271f899bcf638a':
Make sure that all ways a scan can fail get logged

Change-Id: I6cdd08add801a472359cab21a77f31b03e9486be
7a56e2720d961225ad370c13809e71f5264e97d2 23-May-2016 Mitchell Wills <mwills@google.com> Merge "Make sure that all ways a scan can fail get logged" into nyc-dev
am: 1f9f7c109c

* commit '1f9f7c109ca952884fb7bff7271669d879ce9b97':
Make sure that all ways a scan can fail get logged

Change-Id: I8803a157b065fdd71a9b446b2e26e0fd74eb0df1
1f9f7c109ca952884fb7bff7271669d879ce9b97 23-May-2016 Mitchell Wills <mwills@google.com> Merge "Make sure that all ways a scan can fail get logged" into nyc-dev
256ee9e914f0e7470a4a0f804d2d5ce7f1a9697d 21-May-2016 Roshan Pius <rpius@google.com> resolve merge conflicts of cbb193c to master

Change-Id: I8ba39ea770cef1f5163452fd322631356de80d15
b818949cbad8858bf1ddf9a9895eb8dc97c6388d 21-May-2016 Roshan Pius <rpius@google.com> Merge changes Ie64c11f3,I91272aa5 into nyc-dev
am: 9d6a7a1b5f

* commit '9d6a7a1b5f9e9ea194fc6b15044c9d14d6aefabf':
WifiNetworHistory: Don't persist QNS blacklist
Change clock for time interval/elapsed measurments

Change-Id: I2d6853435c4851f8fe25b337ec9a46b902350117
9d6a7a1b5f9e9ea194fc6b15044c9d14d6aefabf 21-May-2016 Roshan Pius <rpius@google.com> Merge changes Ie64c11f3,I91272aa5 into nyc-dev

* changes:
WifiNetworHistory: Don't persist QNS blacklist
Change clock for time interval/elapsed measurments
8a7b2c7cdb729887535aba20d2663a4cf133f983 21-May-2016 Roshan Pius <rpius@google.com> Merge "WifiConnectivityManager: Fall back to full band scan" into nyc-dev am: a2cc709215 am: db2730060d
am: 395cf5eb40

* commit '395cf5eb4072edf27d8ef7e411ffcdde61076e57':
WifiConnectivityManager: Fall back to full band scan

Change-Id: I0326981f8e44f719584eb552efd93851e1146ec9
db2730060d8bd34e4e43ab5ffb2bffb9e190f5ca 21-May-2016 Roshan Pius <rpius@google.com> Merge "WifiConnectivityManager: Fall back to full band scan" into nyc-dev
am: a2cc709215

* commit 'a2cc7092156cb3280fa4b9c1d832e5d1ed2855a4':
WifiConnectivityManager: Fall back to full band scan

Change-Id: I449a3f8f821455dcc7218b0af7fe43c79910fef9
a2cc7092156cb3280fa4b9c1d832e5d1ed2855a4 21-May-2016 Roshan Pius <rpius@google.com> Merge "WifiConnectivityManager: Fall back to full band scan" into nyc-dev
65dcc4a7fe234a371df17068933090db38af3987 21-May-2016 Randy Pan <zpan@google.com> Inform WifiConnectivityManager screen state

Tell WifiConnectivityManager the screen state in case
WifiConnectivityManager missed the screen update event because
it was not started yet.

Bug: 28824622
Tests: Wifi Framework Unit Tests; reproduced the symptom and
verified it went away after this change.

Change-Id: I33cce9276982f6e77cf89a42ddd14ad00f2e4f46
ndroid/server/wifi/WifiStateMachine.java
56820e92fd4b1a0cee83f552905fc76fc8290146 20-May-2016 Mitchell Wills <mwills@google.com> Make sure that all ways a scan can fail get logged

Bug: 28682351
Change-Id: If9296d862adbd479e8600699f06f4684d377ae6a
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
0195dc3dabc52cfb1455308109625a23ee126880 20-May-2016 Roshan Pius <rpius@google.com> WifiNetworHistory: Don't persist QNS blacklist

QNS blacklists network temporarily by setting the network status. Reset
this value when we bootup so that this not persisted. This is especially
needed as we move away from using wall clock for blacklist time.

Also,
Remove the unused blacklist timestamp key from network history parsing.

BUG: 28824635
Change-Id: Ie64c11f358b2e3389ec419cfcfdde8bb04298dd4
TEST: Compliles & unit-test passes
ndroid/server/wifi/WifiNetworkHistory.java
19609b7418ab6457b879760f95df72b350d9d8f0 20-May-2016 Etan Cohen <etancohen@google.com> [NAN] Minor fix to check for invalid TIMEOUT for RTT start ranging command
am: 47b0d6d732

* commit '47b0d6d7324e29c7f6131cc21e679497b2e305d5':
[NAN] Minor fix to check for invalid TIMEOUT for RTT start ranging command

Change-Id: I1579bd32c03a160043ee12adf24351161f37934c
fb196453c07daad5e525520cecad84cec5d89fb7 20-May-2016 Roshan Pius <rpius@google.com> WifiConnectivityManager: Fall back to full band scan

Fall back to full band scan when the currently connected network is not
present in scan result cache. This could be a transient problem, but we
don't want to cause an error by sending an invalid scan request.

Changes needed for unit-testing this change:
1. Make WifiInfo a real instance so that we can set the values for the
public members directly accessed like tx/rx success rate.
2. Make |getCurrentWifiConfiguration| public so that it can be stubbed
out.

BUG: 28845855
TEST: Compiles & unit-test passes
Change-Id: I6cb2b7ad762b3f8f2ab36d66c4b1fcc39fafffed
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiStateMachine.java
47b0d6d7324e29c7f6131cc21e679497b2e305d5 20-May-2016 Etan Cohen <etancohen@google.com> [NAN] Minor fix to check for invalid TIMEOUT for RTT start ranging command

The command should never time-out (we're not waiting for it).

Bug: 26564277
Change-Id: I696933d7947d40a735f85fdd9ac2c959a8962ce6
ndroid/server/wifi/nan/WifiNanStateManager.java
ee0ab818341d44614ffe56ae73ecc08b974c2cbb 20-May-2016 Roshan Pius <rpius@google.com> Change clock for time interval/elapsed measurments

1. Use the clock retrieved from WifiInjector in more modules: QNS,
Scanner, WifiConfigManager.
2. Use |elapsedRealtime| for time interval/elapsed measurments. Things
like scan results, config elements still continue to use
|currentTimeMillis|

Also,
1. Had to make |tryEnableQualifiedNetwork| public to prevent mockito from
calling the real method in WifiConfigManager.
2. Move keystore also into WifiInjector.

BUG: 28299258
BUG: 28824635
Change-Id: I91272aa5665abb741da7530d8920d09c8c5ea41f
TEST: Compiles & unit-test passes
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/scanner/HalWifiScannerImpl.java
ndroid/server/wifi/scanner/SupplicantWifiScannerImpl.java
ndroid/server/wifi/scanner/WifiScannerImpl.java
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
79b831242b4022e7f81b88e995d793fd2cec8f8a 19-May-2016 mukesh agrawal <quiche@google.com> WifiLogger: fetch packet fate on dump() am: 1bf155710a am: d31bca6687
am: 109f71c878

* commit '109f71c87868a77aac6c20a2a7942342f7b0971e':
WifiLogger: fetch packet fate on dump()

Change-Id: Ic40fd34ef1aa363bed2bae32df914493ca7ff402
109f71c87868a77aac6c20a2a7942342f7b0971e 19-May-2016 mukesh agrawal <quiche@google.com> WifiLogger: fetch packet fate on dump() am: 1bf155710a
am: d31bca6687

* commit 'd31bca66873793f2ef47aabeee78a9529ff97dc0':
WifiLogger: fetch packet fate on dump()

Change-Id: Ibb13fcca036f0a76d2d91fa703c1c96a3a6db841
482e9e732da3ab47b309fdf67d1fce92d00230d3 19-May-2016 mukesh agrawal <quiche@google.com> WifiLogger: fetch packet fate on dump()
am: 1bf155710a

* commit '1bf155710ada7a6ee27453a120690d2c91a0fec5':
WifiLogger: fetch packet fate on dump()

Change-Id: I0f1c830ef226c277f0cd687faddf49725a078290
1bf155710ada7a6ee27453a120690d2c91a0fec5 19-May-2016 mukesh agrawal <quiche@google.com> WifiLogger: fetch packet fate on dump()

We've observed that it's tricky to detect when a connection
fails. Consequently, even if the user is careful to generate
a bugreport while the device is in the failed state, the
bugreport will not include packet fate data for the most
recent connection.

Improve the utility of packet fate, by fetching the most
recent fate on the call to dump(). With this change in place,
we'll get packet fates for the most recent connection
attempt (even if it's still in progress).

BUG=28849396
TEST=unit tests, manual

Manual test
- configure bullhead for open network
- configure bullhead for wpa-2 network, wrong password
- let bullhead fail connecting to wpa-2 network
- let bullhead succeed connecting to open network
$ adb dumpsys > /tmp/dumpsys
$ grep 'fates ---' /tmp/dumpsys
--------------------- Last failed connection fates ----------------------
--------------------- Latest fates ----------------------

Change-Id: Iaeb2584020f70ac5d2f3139bac72ea07a7ddce81
ndroid/server/wifi/WifiLogger.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
2f4a2da8639559e523c8e617f88db3ff4c830ee6 19-May-2016 Mukesh Agrawal <quiche@google.com> Merge "WifiNative: add wallclock timestamps for packet fate" into nyc-dev am: 30c88d6ec0
am: fb030b8ce7

* commit 'fb030b8ce7786720eb82ecea3bfee1919b4524e0':
WifiNative: add wallclock timestamps for packet fate

Change-Id: Iad6073601fee379218e2187b731f3bedc5b632fe
22eb0d2b5f5419c3ddda014f2af8c76390904d01 19-May-2016 mukesh agrawal <quiche@google.com> Merge "WifiNative: add wallclock timestamps for packet fate" into nyc-dev
am: 30c88d6ec0

* commit '30c88d6ec01c9f871ac62c6c7038bc99c2a6f7d8':
WifiNative: add wallclock timestamps for packet fate

Change-Id: I9a88b192c956b503042c18687bcbc78af1f3eb46
30c88d6ec01c9f871ac62c6c7038bc99c2a6f7d8 19-May-2016 Mukesh Agrawal <quiche@google.com> Merge "WifiNative: add wallclock timestamps for packet fate" into nyc-dev
9fbc1b5d1a8ac54cc6a5ba87eeca434521419ea0 19-May-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] NAN RTT service implementation" into mm-wireless-dev
am: 714584fb9b

* commit '714584fb9b7ccc1d1be199c3edce318cc9b347b1':
[NAN] NAN RTT service implementation

Change-Id: I9a63dcb0b41da462c4cd5c6989f4654658c429bb
714584fb9b7ccc1d1be199c3edce318cc9b347b1 19-May-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] NAN RTT service implementation" into mm-wireless-dev
b4cf1c90ec3a5940fb1bed391c1b2e3cad53e830 19-May-2016 Mitchell Wills <mwills@google.com> Merge "Fix crash when scanner gets results that don\'t match the request" into nyc-dev am: bf984686a3 am: a426c873a4
am: 5a09481c2e

* commit '5a09481c2e7c9519ad0dc882b4be0ea2e7e5fcda':
Fix crash when scanner gets results that don't match the request

Change-Id: Ic1d01560bc6f6cc4c385da9450ab709e91431d0a
a426c873a4441d9c852b7a4b871d93789d49d88c 19-May-2016 Mitchell Wills <mwills@google.com> Merge "Fix crash when scanner gets results that don\'t match the request" into nyc-dev
am: bf984686a3

* commit 'bf984686a38b0574c18f728a21dfadf620d5e427':
Fix crash when scanner gets results that don't match the request

Change-Id: Ifd87f3dadc5a4fbec74808e6e8c605d494c8cc08
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
ndroid/server/wifi/WifiNative.java
bf984686a38b0574c18f728a21dfadf620d5e427 19-May-2016 Mitchell Wills <mwills@google.com> Merge "Fix crash when scanner gets results that don't match the request" into nyc-dev
7335b7c3db2656c8379296593c7880ae56ccf9ea 10-May-2016 Etan Cohen <etancohen@google.com> [NAN] NAN RTT service implementation

Pipe NAN RTT through NAN service - filling in peer MAC address and RTT configuration
parameters.

Bug: 26564277
Change-Id: I9c69768a0d9c2ae399c272fd7ff962984c517065
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanRttStateManager.java
ndroid/server/wifi/nan/WifiNanService.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
e355ef89e7a7ba6c196253ea5674d05347214150 18-May-2016 Randy Pan <zpan@google.com> Merge "WifiConnectivityManager: partial scan only when connected" into nyc-dev am: 18eda1dc93 am: a6b117049d
am: 02ee16a943

* commit '02ee16a9435ca49edc34c2f826750f4df3ca92aa':
WifiConnectivityManager: partial scan only when connected

Change-Id: Ib9de6641cbfadd995bdabdc8532779ebbe4eaf87
02ee16a9435ca49edc34c2f826750f4df3ca92aa 18-May-2016 Randy Pan <zpan@google.com> Merge "WifiConnectivityManager: partial scan only when connected" into nyc-dev am: 18eda1dc93
am: a6b117049d

* commit 'a6b117049d93c7a8cb02a250f9f96f4a72ef5bc3':
WifiConnectivityManager: partial scan only when connected

Change-Id: Iae51ab6bb20ae365c1b9ef1034c553018acd29a4
7d5056d98fdf3576964cc139500fe62209e14fc1 18-May-2016 Randy Pan <zpan@google.com> Merge "WifiConnectivityManager: partial scan only when connected" into nyc-dev
am: 18eda1dc93

* commit '18eda1dc93cdb4fb79f8022c661b7464c2ac0397':
WifiConnectivityManager: partial scan only when connected

Change-Id: Icb88a487377c54c7d38a88181515bdc2e082c7dd
18eda1dc93cdb4fb79f8022c661b7464c2ac0397 18-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiConnectivityManager: partial scan only when connected" into nyc-dev
ee9329dc901d59b8ae1e39edac99bd9d91306d2f 18-May-2016 Randy Pan <zpan@google.com> WifiConnectivityManager: partial scan only when connected

Starts partial scan only when Wifi is connected and traffic
is heavy. This is to work around an issue that WifiInfo
tx/rx rate is not updated to reflect the Wifi state. Ideally
the tx/rx rate should have been reset to 0 when Wifi is
disconnected.

Bug: 28831562
Change-Id: Ifa415b14e2b216654ddd8a2a0c885754da489bef
Test: Wifi Framework Unit Tests, manual tests
ndroid/server/wifi/WifiConnectivityManager.java
7ecbed66dd268a915c0f6756d404d3918bfab88f 18-May-2016 mukesh agrawal <quiche@google.com> Merge changes I5884dee0,I6f4cb00c into nyc-dev am: 43d1480fe5 am: aaf84fee3b
am: 3d20066a1b

* commit '3d20066a1bf32ee86e6bfabb9ede6580ab088b35':
WifiLogger: use large ringbuffers on eng/userdebug
WifiService: add build properties abstraction

Change-Id: Ib43a3e30a5e85d1b28403024cc082dc604031d9a
26d622799dcb4e20f05c0f297c898eb24156070c 18-May-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Add send message queue depth to capabilities" into mm-wireless-dev
am: b46f7f1944

* commit 'b46f7f1944bd92404f3e874aafc08cd99d0d1dbe':
[NAN] Add send message queue depth to capabilities

Change-Id: Idae0ee20d23c8ec5ab1fecbaed988242699f8ec7
abd687159217c1d8b9e5914ad92696766113b02e 18-May-2016 Etan Cohen <etancohen@google.com> [NAN] Reset current command when a timeout is received
am: b17177efdf

* commit 'b17177efdf457515cd2d46892199d3a2e53bc5dd':
[NAN] Reset current command when a timeout is received

Change-Id: I2620b28c26f0a599d27d0faeaf816b422cd0dc62
b46f7f1944bd92404f3e874aafc08cd99d0d1dbe 18-May-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Add send message queue depth to capabilities" into mm-wireless-dev
aaf84fee3b1dcc6cd193963193e35a3ad63d11bb 18-May-2016 mukesh agrawal <quiche@google.com> Merge changes I5884dee0,I6f4cb00c into nyc-dev
am: 43d1480fe5

* commit '43d1480fe5ec04f3dec53cbe9d6c46186ddc8d44':
WifiLogger: use large ringbuffers on eng/userdebug
WifiService: add build properties abstraction

Change-Id: I30a0cc6aa821e0cf00ff1301267d5df1d4263fa7
43d1480fe5ec04f3dec53cbe9d6c46186ddc8d44 18-May-2016 Mukesh Agrawal <quiche@google.com> Merge changes I5884dee0,I6f4cb00c into nyc-dev

* changes:
WifiLogger: use large ringbuffers on eng/userdebug
WifiService: add build properties abstraction
8df302f5b9c647f69acee24e09fa20d8b5c54c4a 18-May-2016 mukesh agrawal <quiche@google.com> WifiLogger: use large ringbuffers on eng/userdebug

We're having trouble resolving some field reports, due
to insufficient time coverage in the HAL ring buffers.

Increase the ringbuffer size of eng/userdebug builds,
to make it easier to debug issues reported by
dogfooders.

This change will be reverted closer to launch.
(b/28822174 has been filed for the reversion.)

BUG=28729317
TEST=unit tests

Change-Id: I5884dee05db79245d211a457ff44b5e7b96ddbcb
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiStateMachine.java
b6d6e31dc6ed9a9a0178990a0cec8edb9ad36c77 18-May-2016 mukesh agrawal <quiche@google.com> WifiService: add build properties abstraction

As it turns out, WifiStateMachine isn't the only thing that
wants to change its logging behavior depending on
Build.TYPE.

1) Add an abstraction of Build.TYPE, so that we can
a) check build type in a common way, and
b) test the logging behavior across build types
2) Migrate WifiStateMachine to use this new abstraction.

BUG=28822027
TEST=unit tests

Change-Id: I6f4cb00ccb5f3a4b9a5b67e69f8365aab7fd429c
ndroid/server/wifi/BuildProperties.java
ndroid/server/wifi/SystemBuildProperties.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
f898b69c79a5e27481f42d734fea71d4b423f54e 18-May-2016 Randy Pan <zpan@google.com> resolve merge conflicts of 0fb2fe0 to master

Change-Id: I08b8ea3e3085cff81286b295f3bd4ee04b86e2b7
d03edbd1bf49f98b4cdae631203182be01224f49 18-May-2016 Randy Pan <zpan@google.com> Merge changes from topic \'exponential backoff periodic scan\' into nyc-dev
am: ac90f832cc

* commit 'ac90f832cc7efcbe0a7a2ec24d8d45192e3ecc66':
WifiConfigManager: clean up makeChannelList()
WifiStateMachine: clean up dead code
WifiConnectivityManagerTest: exponential backoff periodic scan
Restrict connectivty periodic scan

Change-Id: I580741f50ff92fdf151a2d6b4f40d65a05d8ef03
ac90f832cc7efcbe0a7a2ec24d8d45192e3ecc66 18-May-2016 Randy Pan <zpan@google.com> Merge changes from topic 'exponential backoff periodic scan' into nyc-dev

* changes:
WifiConfigManager: clean up makeChannelList()
WifiStateMachine: clean up dead code
WifiConnectivityManagerTest: exponential backoff periodic scan
Restrict connectivty periodic scan
f5cdd8e7a6b7d4c0b5f77134273c7e894d8c087b 16-May-2016 Mitchell Wills <mwills@google.com> Fix crash when scanner gets results that don't match the request

Before this, when WifiScanningService processed single scan results from
supplicant that only contained results that did not match a request the
filter code would return null indicating that the results should not be
delivered, causing a NPE later. This change updates the meaning of the
bucket index that the single scan code provides to the filtering code to
instead force it to always include scan results.

Change-Id: I65cd57b14abacec3f407991188c570601d05ac77
Fixes: 28794598
ndroid/server/wifi/scanner/ScanScheduleUtil.java
8efd7501ca714c051422355909986835bae6b31c 17-May-2016 Roshan Pius <rpius@google.com> Merge "SupplicantScannerImpl: Change PNO scan log location" into nyc-dev am: c03758554f am: 0db993da77
am: 0b70d2f21c

* commit '0b70d2f21c86071653bcd7969286862183ea214c':
SupplicantScannerImpl: Change PNO scan log location

Change-Id: I80e6f4d0174f71ae118fa77d6a7360aa2697b3ec
0b70d2f21c86071653bcd7969286862183ea214c 17-May-2016 Roshan Pius <rpius@google.com> Merge "SupplicantScannerImpl: Change PNO scan log location" into nyc-dev am: c03758554f
am: 0db993da77

* commit '0db993da77e1de487acdf1c7e4b16e9a419b69ff':
SupplicantScannerImpl: Change PNO scan log location

Change-Id: I957b7acf1fd7fa16712d0887981048ccd5faec6b
777a6945d469ef5ef0155223c411920449d92dac 17-May-2016 Roshan Pius <rpius@google.com> Merge "SupplicantScannerImpl: Change PNO scan log location" into nyc-dev
am: c03758554f

* commit 'c03758554f64e6afeaaf5068df0e691d0aa006a3':
SupplicantScannerImpl: Change PNO scan log location

Change-Id: I3c63600370c6e064d7b889f095bffb611c8cf0fa
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
c03758554f64e6afeaaf5068df0e691d0aa006a3 17-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "SupplicantScannerImpl: Change PNO scan log location" into nyc-dev
063a8fc03a5d65eab9a1141a9db6d9884b143e10 17-May-2016 mukesh agrawal <quiche@google.com> Merge "packet fate: include status code for auth+associate" into nyc-dev
am: c7d77be3ba

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

Change-Id: I907c6073014523e1144c6f3c251baf815da1c372
c0d1ff3cc99dc81a4a8683cf66ff9a952835c38e 17-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix trivial warnings in WifiServiceImpl"
c7d77be3baa194e67f676594ae8f958156e27cbb 17-May-2016 Mukesh Agrawal <quiche@google.com> Merge "packet fate: include status code for auth+associate" into nyc-dev
304d3451b9245f7c7bb5e81465561f0eb63b2473 16-May-2016 Randy Pan <zpan@google.com> WifiConfigManager: clean up makeChannelList()

Removed the unused input paramater 'restrict'. Updated its
callers.

Bug: 28786277
Change-Id: I44dc870ce3f353698187f76e8996cc77395b17d3
Tests: Wifi Framework Unit Tests, manual tests
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiStateMachine.java
46604d0d8d27c9dbdf986032de6e906e331f80ce 16-May-2016 Randy Pan <zpan@google.com> WifiStateMachine: clean up dead code

Cleaned up the dead code from the original exponential back off
scan implementation.

Bug: 28750989
Bug: 28070598

Change-Id: I8abf82cdaa3530fb514794b4004c5d3f15950672
Tests: Wifi Unit Tests, manual test
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiStateMachine.java
b32b649c815b0b50fd0127d9d4a4563c54a536fb 16-May-2016 Randy Pan <zpan@google.com> WifiConnectivityManagerTest: exponential backoff periodic scan

Add a couple of unit tests to cover the periodic scan exponential
backoff feature.

Extended MockAlarmManager class such that users can query a
pending alarm's trigger time.

Bug: 28750989
Change-Id: I9520477180786fce2937e5fa87f790f60f12a3da
ndroid/server/wifi/WifiConnectivityManager.java
ae9e0ef3efdd579fab8d89b5c653f4069e7ac883 13-May-2016 Randy Pan <zpan@google.com> Restrict connectivty periodic scan

When the phone screen is on, the periodic scan interval is setup
in an exponential backoff fashion. Also, if the traffic is higher
than certain threshold, perform scan on certain channels only
instead of full band.

Bug: 28627603
Change-Id: I95b686d7835265d843edac7c005f661393ae5383
ndroid/server/wifi/WifiConnectivityManager.java
ab3adbcced14ec2ae5cf8f8a75f2ef9c9224f2a3 17-May-2016 Roshan Pius <rpius@google.com> SupplicantScannerImpl: Change PNO scan log location

Since PNO scans are started by the PNO debouncer (which debounces PNO state
change for 5 seconds), the log message stating that we have started PNO
scan should be moved to the location where the scan is actually started.

This removes the confusion from the logs in the below case:
05-16 16:51:40.135 D/SupplicantWifiScannerImpl( 876): Change PNO state
from false to true
05-16 16:51:42.356 D/SupplicantWifiScannerImpl( 876): Change PNO state
from true to false
05-16 16:51:45.109 D/SupplicantWifiScannerImpl( 876): Start PNO timer
with delay 2247
05-16 16:51:45.116 D/SupplicantWifiScannerImpl( 876): Starting wifi PNO
scan
05-16 16:51:50.111 D/SupplicantWifiScannerImpl( 876): Change PNO state
from false to true
05-16 16:51:52.368 D/SupplicantWifiScannerImpl( 876): Change PNO state
from true to false
05-16 16:51:55.143 D/SupplicantWifiScannerImpl( 876): Start PNO timer
with delay 2225
05-16 16:51:55.148 D/SupplicantWifiScannerImpl( 876): Starting wifi PNO
scan

BUG: 28800979
Change-Id: Ib4cc7c59fde83a02a2b938fb334a85f0c046cd87
ndroid/server/wifi/scanner/SupplicantWifiScannerImpl.java
8fcd1fe86ddc3056e1a26e69bc68f148ae0e9ddc 17-May-2016 Christopher Wiley <wiley@google.com> Fix trivial warnings in WifiServiceImpl

Access static methods in a static way.
Add missing @Override and @Deprecated annotations.
Remove an unused local variable.
Fix a clearly incorrect javadoc.

Change-Id: I8f4335eaeb8c91a36b86a5313e63033bf32ecf40
Test: Compiles.
ndroid/server/wifi/WifiServiceImpl.java
b9654bd6667af02559c1820f2c1e588ac2a59f28 17-May-2016 Ningyuan Wang <nywang@google.com> Merge "Fix null intent handling" into nyc-dev am: 8adf99d607 am: e0d82f1a3d
am: dd9d95abfe

* commit 'dd9d95abfe8b55bc9f61f4a93c0a9b574bd6c2e9':
Fix null intent handling

Change-Id: I36a4bc05f771695ddbd0de5ecdfd59e106b2d3e9
e0d82f1a3d357f46a1e38c0718038c2b7c893dfc 17-May-2016 Ningyuan Wang <nywang@google.com> Merge "Fix null intent handling" into nyc-dev
am: 8adf99d607

* commit '8adf99d607e2ee41513fa63a4b8a7118b22ab928':
Fix null intent handling

Change-Id: I3cb587ba4eab35f562311127775d29fb66969829
8adf99d607e2ee41513fa63a4b8a7118b22ab928 17-May-2016 Ningyuan Wang <nywang@google.com> Merge "Fix null intent handling" into nyc-dev
cf731bc480e2e11474b5d820b7d7a04bd0eff176 16-May-2016 Ningyuan Wang <nywang@google.com> Fix null intent handling

This also fixes the potential crash when handling intent
with null action string.

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

Change-Id: I6ef3e07e38f33d8c5040dd358f161224095189d6
ndroid/server/wifi/WifiTrafficPoller.java
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/util/FrameParser.java
b17177efdf457515cd2d46892199d3a2e53bc5dd 17-May-2016 Etan Cohen <etancohen@google.com> [NAN] Reset current command when a timeout is received

The current command must be reset (to null) once a timeout is
received. Results in a WTF message being printed out (when a new
command is received) - though would not impact functionality since
any subsequent response would be received in the wrong state or
after a new command was being executed.

Change-Id: I1a62b3263b62647d67a1593c026b6bf5973c8486
ndroid/server/wifi/nan/WifiNanStateManager.java
d0cc1e9206ac2b6fca2051e873ecd1369c97c5c0 17-May-2016 Mitchell Wills <mwills@google.com> Add scan bucket for 80s period scans am: 6b838f693a am: f28d32d58f
am: 6d431f7467

* commit '6d431f7467747587b46bbdf47c5e63cb5fd68d1f':
Add scan bucket for 80s period scans

Change-Id: I76773a2aca77d5f6bad6a2a428a5e86b79e5d3ca
f28d32d58fc24f264acf24df4f035e44e9a227bf 16-May-2016 Mitchell Wills <mwills@google.com> Add scan bucket for 80s period scans
am: 6b838f693a

* commit '6b838f693ae0635b8f513d14725e54efadc29977':
Add scan bucket for 80s period scans

Change-Id: I95eedc24af357ba5bbb699d0ca39ae3f6d36386f
7c04e256944b1841502637d8f0b42b575a1a543b 16-May-2016 Etan Cohen <etancohen@google.com> [NAN] Add send message queue depth to capabilities

Bug: 27916698
Change-Id: I2b97bd81d861b1b4009d5f82e70d86a5dc861864
ndroid/server/wifi/nan/WifiNanNative.java
6b838f693ae0635b8f513d14725e54efadc29977 16-May-2016 Mitchell Wills <mwills@google.com> Add scan bucket for 80s period scans

Change-Id: I87779468d37971c53c1c9cfd615e5ca2e7a65108
Fixes: 28793104
ndroid/server/wifi/scanner/BackgroundScanScheduler.java
73ecdfb24183f395cf821fdd683df08b4db60802 16-May-2016 Erik Kline <ek@google.com> Move WifiP2pServiceImpl to IpManager am: 9ed1f7b1a8 am: 5ca57457d3
am: 2fbeb99fa1

* commit '2fbeb99fa12b1d4a16f5fa26f7af22a3442d7585':
Move WifiP2pServiceImpl to IpManager

Change-Id: I9ebf0ecf37e860b196f159d7eb7023e16b7e03fb
5ca57457d33a7312817254f0df8eedaf62524d0b 16-May-2016 Erik Kline <ek@google.com> Move WifiP2pServiceImpl to IpManager
am: 9ed1f7b1a8

* commit '9ed1f7b1a80aae513f3730869b614f66b6c79125':
Move WifiP2pServiceImpl to IpManager

Change-Id: Id87be54256143b69d05793eb6c9b6f265b73e687
45062fdcb47395946f6b2584238d4a798f972ead 14-May-2016 Christopher Wiley <wiley@google.com> Remove dead tethering code from WifiStateMachine

Bug: 28720756
Change-Id: Id56b669d70608f166d61cf61a0bda4c6548b0d12
Test: Compiles, unittests pass
ndroid/server/wifi/WifiStateMachine.java
f31cb697139fcf6d966e2acb198847bb16bdd122 14-May-2016 Christopher Wiley <wiley@google.com> Remove dead scanning code from WifiStateMachine

Scanning behavior was refactored out/removed some time ago.

Bug: 28720756
Change-Id: If194ced8f2809ba429cadb0d0b4a700fd487fe25
Test: Compiles, unittests pass
ndroid/server/wifi/WifiStateMachine.java
a4b3850d596e4c6db1661332a7c5a107119f2cc1 14-May-2016 Christopher Wiley <wiley@google.com> Use non-deprecated check for screen interactive

From the implementation, this is the recommended way to check that the
screen is interactive. The previous method call just delegated to this
one. If we're interested in screen power state, there is a separate
interface for that.

Bug: 28720756
Change-Id: I4fc24463c4cfc0bd11a01a7077db4685bb6fc10c
Test: compiles, unittests pass
ndroid/server/wifi/WifiStateMachine.java
06027c40c76364085beb53e0dd4cdde76557b347 14-May-2016 Christopher Wiley <wiley@google.com> Remove unused helper function from WifiStateMachine

Bug: 28720756
Change-Id: Idfe2e56ff8135f20acfa2a77eab9b98610196ed5
Test: Compiles, unittests pass
ndroid/server/wifi/WifiStateMachine.java
66b9b2ca317184ca901f0937b284ba82ddc073ef 14-May-2016 Christopher Wiley <wiley@google.com> Fix assorted warnings in WifiStateMachine

Fix a typo in a docblock.
Remove two unused variables.
Remove three unnecessary object typecasts.
Add templates to an arraylist instantiation.

Bug: 28720756
Change-Id: I3f27877fd8f1cdc9e641e855977a98a76e87580f
Test: Compiles, unittests pass
ndroid/server/wifi/WifiStateMachine.java
8d5924e337865a077d95ba187c97dbedc8524c2a 14-May-2016 Christopher Wiley <wiley@google.com> Add missing @Override annotations in WifiStateMachine

Bug: 28720756
Change-Id: I7b5ea64efb5c9058fd3e54b15bacf993088f7f94
Test: Compiles, unittests continue to pass
ndroid/server/wifi/WifiStateMachine.java
9ed1f7b1a80aae513f3730869b614f66b6c79125 09-May-2016 Erik Kline <ek@google.com> Move WifiP2pServiceImpl to IpManager

Bug: 28437662
Change-Id: I9d478d644cc5b52a031a3ee3e157d40f952dff50
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
28d26a4c7a55ba6b22d0e9f7791e097ca600bdc7 11-May-2016 Christopher Wiley <wiley@google.com> Remove unused soft AP logic from WifiStateMachine

Bug: 28720756
Test: Builds, runtest frameworks-wifi passes

Change-Id: Ieed540abf347e33affc145cd2242ce3efdbc0b6a
ndroid/server/wifi/WifiStateMachine.java
fe1226169a8cfd0191b59c12c43515ec681cf554 11-May-2016 Ningyuan Wang <nywang@google.com> Remove unused WifiStateMachine::mWhiteListedSsids

BUG=28698001
TEST=compile

Change-Id: I2bf412e80e22984aa55b7cd1576c905f5a29c4fd
ndroid/server/wifi/WifiStateMachine.java
075245926f727fffb8df7377b5a7013cfce1fbb6 10-May-2016 Rebecca Silberstein <silberst@google.com> Merge changes Ie19e66b9,Idfcc51e2,Ie2b6f031 into nyc-dev am: c2c27ff4aa am: abc76581bb
am: 290ce93151

* commit '290ce9315114dfcb8f36dddf6f4c525fe9b7cf68':
WifiController: set to proper state after SoftAP
WifiControllerTest: cleanup style issues
WifiSettingsStore: add methods for WifiSavedState

Change-Id: I29f19e7d50a8270736e352fc536aa715deecc9bb
290ce9315114dfcb8f36dddf6f4c525fe9b7cf68 10-May-2016 Rebecca Silberstein <silberst@google.com> Merge changes Ie19e66b9,Idfcc51e2,Ie2b6f031 into nyc-dev am: c2c27ff4aa
am: abc76581bb

* commit 'abc76581bb7f0edcf2fd6ee85d084c9c7dd2a018':
WifiController: set to proper state after SoftAP
WifiControllerTest: cleanup style issues
WifiSettingsStore: add methods for WifiSavedState

Change-Id: I39db900eb4d959fab410132e07b4540bf0456062
b8d5cefb59e0b7b367dbc0f97c9aae43fac58598 10-May-2016 Rebecca Silberstein <silberst@google.com> Merge changes Ie19e66b9,Idfcc51e2,Ie2b6f031 into nyc-dev
am: c2c27ff4aa

* commit 'c2c27ff4aa6dfd4449612d61afd62d89b9652618':
WifiController: set to proper state after SoftAP
WifiControllerTest: cleanup style issues
WifiSettingsStore: add methods for WifiSavedState

Change-Id: I4efbd9d1509f0261cfc57f3054d14b2ab868fdef
c2c27ff4aa6dfd4449612d61afd62d89b9652618 10-May-2016 Rebecca Silberstein <silberst@google.com> Merge changes Ie19e66b9,Idfcc51e2,Ie2b6f031 into nyc-dev

* changes:
WifiController: set to proper state after SoftAP
WifiControllerTest: cleanup style issues
WifiSettingsStore: add methods for WifiSavedState
437e4bc1b0d995f60e72a816c8f7d16cd2bb840b 10-May-2016 Ningyuan Wang <nywang@google.com> Merge "Fix string comparision and return value in try catch block" into nyc-dev am: 208c3c19ba am: 70860e60e5
am: b8f1fdc10e

* commit 'b8f1fdc10e87410bdad43a06d076852918b9b70f':
Fix string comparision and return value in try catch block

Change-Id: I6d9ad2bb4afe85d50859761a69726a7bbc6861f3
b8f1fdc10e87410bdad43a06d076852918b9b70f 10-May-2016 Ningyuan Wang <nywang@google.com> Merge "Fix string comparision and return value in try catch block" into nyc-dev am: 208c3c19ba
am: 70860e60e5

* commit '70860e60e51f2e85ea79249abd5eb5df202cb42a':
Fix string comparision and return value in try catch block

Change-Id: Iab5243e35f3d46490b07e4d2a117a85d6664bf78
8ad73a33167e7711ce4ac6807b954510290d00c2 10-May-2016 Ningyuan Wang <nywang@google.com> Merge "Fix string comparision and return value in try catch block" into nyc-dev
am: 208c3c19ba

* commit '208c3c19bae4801f7e18c44e1ce2b6e06dd19d05':
Fix string comparision and return value in try catch block

Change-Id: I360552ace1ae23f3b8ae9165e5afa74864a54cf7
208c3c19bae4801f7e18c44e1ce2b6e06dd19d05 10-May-2016 Ningyuan Wang <nywang@google.com> Merge "Fix string comparision and return value in try catch block" into nyc-dev
c82078b9c01842ff2d7b6b63958d9bcf13a2f8cb 10-May-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Do not reset state machine after OnNanDown" into mm-wireless-dev
am: 6f9a6eed4c

* commit '6f9a6eed4c2c786b645ab3fb80ff9283593eed36':
[NAN] Do not reset state machine after OnNanDown

Change-Id: I24f283a4281563a4330c7749d0a5727ed76b479b
e16e01943feedf26dc68849ebc5d38bbc066c249 10-May-2016 Etan Cohen <etancohen@google.com> [NAN] Fix naked array printing - print contents.
am: a2061f0b95

* commit 'a2061f0b953a0d6a6b97bc8765045716ab5aa741':
[NAN] Fix naked array printing - print contents.

Change-Id: I82880fae88c9072f4f2ad0e382c22db4a7ed619f
6f9a6eed4c2c786b645ab3fb80ff9283593eed36 10-May-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Do not reset state machine after OnNanDown" into mm-wireless-dev
191fa5b445e8cfd0fa2c4aa7458776ab7a3972f7 09-May-2016 Rebecca Silberstein <silberst@google.com> WifiController: set to proper state after SoftAP

After receiving a CMD_AP_STOPPED message, WifiController should return
to the DeviceActive state or the appropriate Idle state. This CL sets
the correct pending state and also adds a check for the idle state.
A test is also added to confirm the DeviceActive state is entered after
the SoftAp state is completed.

Note: An additional test for the DeviceIdle path will be added at a
later point after some code refactoring (bug 28669096)

BUG: 28434530
Change-Id: Ie19e66b9c84ff545a622119890bc7705ebd74c46
ndroid/server/wifi/WifiController.java
3f2620fbec3b556148211c429af5cbcd9ea174a2 07-May-2016 Rebecca Silberstein <silberst@google.com> WifiSettingsStore: add methods for WifiSavedState

Add methods to get and set WifiSavedState in WifiSettingsStore. This
change allows us to better test state transitions in WifiController
since we can now mock out the calls easily.

BUG: 28434530
Change-Id: Ie2b6f0311462da0179ecd28665f78f4bf14a02f9
ndroid/server/wifi/WifiController.java
ndroid/server/wifi/WifiSettingsStore.java
a2061f0b953a0d6a6b97bc8765045716ab5aa741 10-May-2016 Etan Cohen <etancohen@google.com> [NAN] Fix naked array printing - print contents.

Address ErrorProne issues.

Bug: 28606520
Change-Id: I5ccb4f973b347f7f42680c8927d7c22212d596e3
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanStateManager.java
78b9b40b7a14bdabd3fa4b4200b2d9bb40552794 10-May-2016 Roshan Pius <rpius@google.com> Merge "SupplicantScanner: Truncate hidden network list" into nyc-dev am: b53cd9aa26 am: c3664512a8
am: f2b409c76c

* commit 'f2b409c76caa03c27820157b8de92c6fc6bd41cb':
SupplicantScanner: Truncate hidden network list

Change-Id: I0f5bd8ccb51305f3eeed7649ea0c2e522e3edf57
c3664512a86b92464dfa311578bdbd5345caefba 10-May-2016 Roshan Pius <rpius@google.com> Merge "SupplicantScanner: Truncate hidden network list" into nyc-dev
am: b53cd9aa26

* commit 'b53cd9aa2625ec2a1c2e69c609d8a9dda3569a36':
SupplicantScanner: Truncate hidden network list

Change-Id: I1a372c00011d2b4fcc654ce30f4844887458166f
b53cd9aa2625ec2a1c2e69c609d8a9dda3569a36 10-May-2016 Mitchell Wills <mwills@google.com> Merge "SupplicantScanner: Truncate hidden network list" into nyc-dev
dc050cd99ba178a9a12b41361ad381d1a0b204c8 10-May-2016 Ningyuan Wang <nywang@google.com> Merge "Code should synchronize on a final field"
572e33a514b88950cf825632c60f8221e4884497 07-May-2016 Ningyuan Wang <nywang@google.com> Code should synchronize on a final field

BUG=28606520
TEST=compile
TEST=runtest frameworks-wifi
Change-Id: I69e4940acf37b410bbeb3be03c97f84d9fa39622
ndroid/server/wifi/scanner/SupplicantWifiScannerImpl.java
0383dbf0dbb48551d6b1ea861351924fc48f5243 09-May-2016 Jinhai Zhang <jinhai.x.zhang@sonymobile.com> Handle IMSI null case in getMatchingImsis am: 7da986a963 am: 3509adc61f am: 57384948a1
am: 9016704301

* commit '90167043013d14befab00be1e3bb240aab696d16':
Handle IMSI null case in getMatchingImsis

Change-Id: Ifc72c0ed9c0dbad32d71028d50fcbad7782eff72
57124da5d36cfb9c2964374dafe8bec8a1259139 09-May-2016 Kouhei Kuroda <kouhei.x.kuroda@sonymobile.com> Handle IMSI null case when building WiFi configuration am: 61c649d4b9 am: 0763e9942b am: 21cac7d235
am: 62f253b6db

* commit '62f253b6dbe1e885cbef295d144294e885ec6daf':
Handle IMSI null case when building WiFi configuration

Change-Id: I3984522be1e30249bba501e6da93b9b7930114a1
57384948a17b600c05a669ae58045f89d6f463c7 09-May-2016 Jinhai Zhang <jinhai.x.zhang@sonymobile.com> Handle IMSI null case in getMatchingImsis am: 7da986a963
am: 3509adc61f

* commit '3509adc61f6eb9985ba1bde88b285e06a4b6ed42':
Handle IMSI null case in getMatchingImsis

Change-Id: I5b7d221f12660e004f1a938de0c25e2f13a83d04
21cac7d235e8c96e2a77ae011e4b3da54a27cba8 09-May-2016 Kouhei Kuroda <kouhei.x.kuroda@sonymobile.com> Handle IMSI null case when building WiFi configuration am: 61c649d4b9
am: 0763e9942b

* commit '0763e9942bd1233386603ef3b4d07262080f664c':
Handle IMSI null case when building WiFi configuration

Change-Id: Ic6e91001aa5c2abb63d0908156d71f9b9ee13388
6dff8aeae12a93a71309a71f222c36d5354f9b85 09-May-2016 Randy Pan <zpan@google.com> Merge "Merge "WifiConfigManager: clean up log message level" into nyc-dev am: 027f5195dc am: c849c6f947" into nyc-mr1-dev-plus-aosp
am: 44aafba359

* commit '44aafba359ebddeac7f33afff7879c201bbedec9':
WifiConfigManager: clean up log message level

Change-Id: I9d6832002e3baab8bfdabdb904651669255ddb52
4016f76b73aa93d9b06d5b9ee518260e8246342b 09-May-2016 Randy Pan <zpan@google.com> Merge "WifiStateMachine: fix setTargetBssid()" into nyc-dev am: 48371a12a2 am: bb8c46507d
am: c6eedde133

* commit 'c6eedde1333d0626d61e11ee55c3c92eb52d8d08':
WifiStateMachine: fix setTargetBssid()

Change-Id: I6eddee7845866eb0559dbdebabff3d1e1fa4d64a
c849c6f947d29f98aad2d733383a2df41692848d 09-May-2016 Randy Pan <zpan@google.com> Merge "WifiConfigManager: clean up log message level" into nyc-dev
am: 027f5195dc

* commit '027f5195dced3e660c100c539e3d9dfaa668c215':
WifiConfigManager: clean up log message level

Change-Id: Id59c14c810a59464a545bfdf10cf67c25a77a315
bb8c46507d3b3792286adb2705f7b4983cc6e0c8 09-May-2016 Randy Pan <zpan@google.com> Merge "WifiStateMachine: fix setTargetBssid()" into nyc-dev
am: 48371a12a2

* commit '48371a12a251b17593a14f1af37935764599e615':
WifiStateMachine: fix setTargetBssid()

Change-Id: Ic8713456293016e89e26bf37279449ba44829f89
027f5195dced3e660c100c539e3d9dfaa668c215 09-May-2016 Randy Pan <zpan@google.com> Merge "WifiConfigManager: clean up log message level" into nyc-dev
48371a12a251b17593a14f1af37935764599e615 09-May-2016 Randy Pan <zpan@google.com> Merge "WifiStateMachine: fix setTargetBssid()" into nyc-dev
1d958424c33330903e3d21dbe5282fe582d70eec 07-May-2016 Ningyuan Wang <nywang@google.com> Merge "Replace createCSVStringFromIntegerSet() with TextUtils.join()"
32c6771e3f2ac70ea81a7cca4a16f2cea2bab8d4 07-May-2016 Randy Pan <zpan@google.com> Clear config BSSID after successful roaming am: a4e4bd02b4 am: 02b74bf40d
am: 0c64c73822

* commit '0c64c73822776264bce767c0f5cc6121ef3aa135':
Clear config BSSID after successful roaming

Change-Id: Id0423fc76a327e98d706f0c8788b8311bc2cc4df
0c64c73822776264bce767c0f5cc6121ef3aa135 07-May-2016 Randy Pan <zpan@google.com> Clear config BSSID after successful roaming am: a4e4bd02b4
am: 02b74bf40d

* commit '02b74bf40d2a920ecc2be4bc9a0ebb2ac07766d3':
Clear config BSSID after successful roaming

Change-Id: Ib600230cddcc3cadaf8c110a53338868af86d20f
42d8f23e5b1a8e87f16da700ce3ab9a50a38f858 07-May-2016 Randy Pan <zpan@google.com> Clear config BSSID after successful roaming
am: a4e4bd02b4

* commit 'a4e4bd02b4d77de2ad69fcdf79a32c6fbb395513':
Clear config BSSID after successful roaming

Change-Id: I6b1dc11fd8e54ffff63893c62bd95d2ba7e284ad
f1aa2b3fddc1b3e261ea54635f148fdc120ae7cb 04-May-2016 Etan Cohen <etancohen@google.com> [NAN] Do not reset state machine after OnNanDown

Refactor OnNanDown behavior to clean-up local state - manager
no longer needs to have state.

Bug: 28197388
Change-Id: Ib6618f9ab6c23677fd2efadf6d3c88ec083fb284
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanStateManager.java
646ee7704694ef70c0dd3c707170163361ed504a 07-May-2016 Randy Pan <zpan@google.com> WifiConfigManager: clean up log message level

Quite some logs should be debug message instead of error
message.

Bug: 28619076
Change-Id: Iee06f57bab58aeca881068f0b4f36a0d5bbb3230
Test: Wifi Unit Tests
ndroid/server/wifi/WifiConfigManager.java
fb4c13ea902b8e6f244f772c490845c8493db1a2 07-May-2016 Ningyuan Wang <nywang@google.com> Merge "Fix static variable and method access"
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
ndroid/server/wifi/WifiNative.java
b2c2f85c959cb0deba238b566f39b1b942eb70a8 05-May-2016 Ningyuan Wang <nywang@google.com> Fix string comparision and return value in try catch block

This CL uses value comparision instead of reference comparision
for strings.
This also removes returning value in finally block, otherwise
exception may be suppressed.

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

Change-Id: I6ace4d233d2b0af3627f75dfdb7dcec6a46b0092
ndroid/server/wifi/WifiApConfigStore.java
ndroid/server/wifi/WifiCertManager.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiCountryCode.java
ndroid/server/wifi/WifiStateMachine.java
68b71ea96facab2d5fadc89b12cc1198756f9e25 06-May-2016 Ningyuan Wang <nywang@google.com> Fix static variable and method access

Static variables and method should be access from class name
instead of a object instance.

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

Change-Id: I7c3990a3c11873a0b5e4ddefbdba88ee29f47199
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
ndroid/server/wifi/WifiStateMachine.java
362fad8eddd674d7cf19ffcc1fec38d2d2ee2f53 06-May-2016 Roshan Pius <rpius@google.com> SupplicantScanner: Truncate hidden network list

Truncate the hidden network id list if it goes beyond wpa_supplicant's
max value. wpa_supplicant has a hard coded value of 16 for the max
number of networks that can be specified for each scan.

There is currently no way to query this value from wpa_supplicant, so
hardcoding this value in SupplicantScanner.

BUG: 28632556
Change-Id: I31a338b91c221c1686437b738894e13abb897474
TEST: Compiles & unit-test passes
ndroid/server/wifi/scanner/SupplicantWifiScannerImpl.java
85c0f06d47e484e039e3ad1f584c7c9b8410c2b1 06-May-2016 Randy Pan <zpan@google.com> WifiStateMachine: fix setTargetBssid()

Always return when the current preferred BSSID is the same as
the target one. This was done previously only if the DBG flag
is set.

While there, fixed the log message wording a bit.

Bug: 28619076
Tests: Wifi unit tests, manual connection & roaming tests
Change-Id: I109b57d54b1bcaccb00a148b488244b7d9358907
ndroid/server/wifi/WifiStateMachine.java
a4e4bd02b4d77de2ad69fcdf79a32c6fbb395513 06-May-2016 Randy Pan <zpan@google.com> Clear config BSSID after successful roaming

Clear the config BSSID after roaming completed and before entering
ConnectedState. Wifi chipset may roam from this point on and
having the BSSID specified by QNS would cause the roam to fail
and the device to disconnect.

We used to rely on the fact that entering ObtainingIpState
clears the config BSSID. But this assumption was broken by
commit bcbc449d47124ec8f73a, which changed from transition
to ObtainingIpState to ConnectedState.

Bug: 28520770
Test: Wifi unit tests, manual tests
Change-Id: I09a2d5d1132ff597c63a324a24d13719be384603
ndroid/server/wifi/WifiStateMachine.java
d2921466f7c485fefc50da6d2501bc14778038bb 06-May-2016 Ningyuan Wang <nywang@google.com> Merge "Remove unused boolean parameter for getWifiLinkLayerStats()"
6f8487ee699b417eb4bb98ec2a97b6e46bb1f00d 06-May-2016 Roshan Pius <rpius@google.com> Merge changes I1424053c,I96e35e06 into nyc-dev am: a4da0a81a0 am: ca99af1cb4
am: 8a5f4cf37d

* commit '8a5f4cf37d963099658626ec1be6fc656c0d5965':
WifiConnectivityManager: Unit tests for metrics
WifiConnectivityManager: Increment metrics

Change-Id: Ie97c409946125dc57d2be0d9caf9ac22b8bb3f82
dd72bcaf73511d7e6179a119402fccb4b666689e 06-May-2016 Ningyuan Wang <nywang@google.com> Merge "Remove unused getRecentSavedNetworks()"
ca99af1cb4dc8569fe96315ab4358c8c38edb3ff 06-May-2016 Roshan Pius <rpius@google.com> Merge changes I1424053c,I96e35e06 into nyc-dev
am: a4da0a81a0

* commit 'a4da0a81a0a93faac3a8d9ef8d83b1a35c500073':
WifiConnectivityManager: Unit tests for metrics
WifiConnectivityManager: Increment metrics

Change-Id: Ibc26e462dd40c3ae3eaceb1798b83366c272d46e
a4da0a81a0a93faac3a8d9ef8d83b1a35c500073 06-May-2016 Roshan Pius <rpius@google.com> Merge changes I1424053c,I96e35e06 into nyc-dev

* changes:
WifiConnectivityManager: Unit tests for metrics
WifiConnectivityManager: Increment metrics
70dbdfce5f3caac654d4894c54d8300bc17271e7 05-May-2016 Ningyuan Wang <nywang@google.com> Remove unused getRecentSavedNetworks()

BUG=28303054
TEST=compile

Change-Id: I89cd3379e4392b11c162ebbbec2d56a4fd3df5c9
ndroid/server/wifi/WifiConfigManager.java
1999fb21c62fc2f6f99efcd866cd1ef84bcbb8f1 05-May-2016 Ningyuan Wang <nywang@google.com> Remove unused boolean parameter for getWifiLinkLayerStats()

BUG=28524466
TEST=compile

Change-Id: I5700b9322d9961c6e12985f1ad0fec067b15f3bf
ndroid/server/wifi/WifiStateMachine.java
e14b929b5e98d2a56f43c609a3f65f9bc0c58d97 05-May-2016 Ningyuan Wang <nywang@google.com> Remove unused ScanDetail.updateResults()

BUG=26908199
TEST=compile

Change-Id: Ia54c9fba2e3433eb3418f52913d650a7a0237b74
ndroid/server/wifi/ScanDetail.java
1d7d62393181cc36b6f87c3cf2151adc54275f9c 04-May-2016 Roshan Pius <rpius@google.com> WifiConnectivityManager: Unit tests for metrics

Add couple of unit-tests for metrics. Had to migrate the unit-tests to use
mock alarm manager.

BUG: 27479439
BUG: 27704599
BUG: 28480516
Change-Id: I1424053c35799905612b37edeb679e7556568ca5
TEST: Compiles & unit-test passes
ndroid/server/wifi/WifiConnectivityManager.java
bacd0dca59fbba9f650a421a3d3b0dc5fa2eb606 04-May-2016 Roshan Pius <rpius@google.com> WifiConnectivityManager: Increment metrics

Make changes to increment the watchdog related metrics in
WifiConnectivityManager.

PS: Will need to add mock alarm manager to add unit-tests here. This is
done in the next CL.

BUG: 27479439
BUG: 27704599
Change-Id: I96e35e06d222056ec29488666619486a65746b38
ndroid/server/wifi/WifiConnectivityManager.java
cfcad5269712e1ca84769df255af470235492ac0 04-May-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Add status codes for data-path & re-enable errors." into mm-wireless-dev
am: daf82b1db9

* commit 'daf82b1db9f25d4bba948e3255e6941816ed309f':
[NAN] Add status codes for data-path & re-enable errors.

Change-Id: I7ab9afeda8dfcaf306b574d4c414a8d4400882b9
7bf44345134e2cc269c3dafc0c036b26151d23f8 04-May-2016 mukesh agrawal <quiche@google.com> Merge changes Icaa91d9d,Ic930337a into nyc-dev am: 855b32875a am: 8614fa4c8e
am: fdccb5f8ed

* commit 'fdccb5f8edc6baea1c396ead0b2cf6bea7462f2e':
WifiStateMachine: dynamically configure WifiHAL log level
wifi service: abstract away access to SystemProperties

Change-Id: I2160192bad59a0298c862f0463aff51c2076a033
12791a74819130535a0fb8ae145e63f4bd99d1cc 04-May-2016 Etan Cohen <etancohen@google.com> [NAN] Add status codes for data-path & re-enable errors.

Bug: 27916896
Bug: 26562610
Change-Id: Icda45bdc897407ab9d99147be9ebdcae9cb5c5d0
ndroid/server/wifi/nan/WifiNanNative.java
8614fa4c8ecb9b05637125dcd4812447a06017b2 04-May-2016 mukesh agrawal <quiche@google.com> Merge changes Icaa91d9d,Ic930337a into nyc-dev
am: 855b32875a

* commit '855b32875a1ab89aa073f772790bdf71a42d08f9':
WifiStateMachine: dynamically configure WifiHAL log level
wifi service: abstract away access to SystemProperties

Change-Id: I14a68867afe63a2371ea45c22a2769f384acfb20
855b32875a1ab89aa073f772790bdf71a42d08f9 04-May-2016 Mukesh Agrawal <quiche@google.com> Merge changes Icaa91d9d,Ic930337a into nyc-dev

* changes:
WifiStateMachine: dynamically configure WifiHAL log level
wifi service: abstract away access to SystemProperties
18eef9431665983571a976e9178790d876a227d3 04-May-2016 Mitchell Wills <mwills@google.com> Merge "Suppress some Supplicant WifiScanner logs" into nyc-dev am: d06a43097e am: a8bae66888
am: 37128aacf2

* commit '37128aacf2d024043d04f3b27f3fff130d1393ab':
Suppress some Supplicant WifiScanner logs

Change-Id: Ice401aa8a3bb48635542e9c6eaafc790aa53a34a
90764c2d1c0002c723727a7d1c755bdbc00da41b 04-May-2016 Mitchell Wills <mwills@google.com> Merge "Add more details about what scan results were delivered to clients" into nyc-dev am: 576cda1bc1 am: b7dfac73be
am: e6a0f801af

* commit 'e6a0f801afb86c1df33c360356a7476f4c4a4194':
Add more details about what scan results were delivered to clients

Change-Id: Id5b539150e34ceea0acc75e3eecc90a1b328fd14
a8bae668889c6af62df0531563c20ca38ca23e0e 04-May-2016 Mitchell Wills <mwills@google.com> Merge "Suppress some Supplicant WifiScanner logs" into nyc-dev
am: d06a43097e

* commit 'd06a43097e21f90b9dca90a3767e8c7f610c67d8':
Suppress some Supplicant WifiScanner logs

Change-Id: I8ae4e107495e7b8bc957516b547679d86e327341
b7dfac73beaa0f027c79e0012a52b432f466f367 04-May-2016 Mitchell Wills <mwills@google.com> Merge "Add more details about what scan results were delivered to clients" into nyc-dev
am: 576cda1bc1

* commit '576cda1bc1660af54dc52d933c79d43014e466e9':
Add more details about what scan results were delivered to clients

Change-Id: Ife3ae6a8b16951ccfc39d5ee621e34f7b6b9b296
bf55139fd8853030fae0c49d82f8dafd554f5c48 04-May-2016 Glen Kuhne <kuh@google.com> Merge "Fix null configs passed to WifiLastResortWatchdog" into nyc-dev am: e49b29c8c3 am: 107ecfcb03
am: 3966e96361

* commit '3966e963619f99028a96288ad93e359d2f0eb865':
Fix null configs passed to WifiLastResortWatchdog

Change-Id: Ia9ba1cbafe0b779c3d469e96c1fe697001c06b77
68338d94274084c4e9bc8ca17be2ccf862b0b7d6 04-May-2016 Glen Kuhne <kuh@google.com> Merge "Fixed NetworkFactories being dumped twice" into nyc-dev am: 458bafa116 am: 01c158b3bd
am: 76bef32937

* commit '76bef32937d7e09a74b3a34e4f3afa8a6c31c440':
Fixed NetworkFactories being dumped twice

Change-Id: If9cc237d24693adfaf2230b7a4abac387cf4cbd2
d06a43097e21f90b9dca90a3767e8c7f610c67d8 04-May-2016 Mitchell Wills <mwills@google.com> Merge "Suppress some Supplicant WifiScanner logs" into nyc-dev
576cda1bc1660af54dc52d933c79d43014e466e9 04-May-2016 Mitchell Wills <mwills@google.com> Merge "Add more details about what scan results were delivered to clients" into nyc-dev
3966e963619f99028a96288ad93e359d2f0eb865 04-May-2016 Glen Kuhne <kuh@google.com> Merge "Fix null configs passed to WifiLastResortWatchdog" into nyc-dev am: e49b29c8c3
am: 107ecfcb03

* commit '107ecfcb032cff908e473c8ed79cf70fe4b1ad77':
Fix null configs passed to WifiLastResortWatchdog

Change-Id: I1a3f85c16405bad23f6b222f0978e46a55e1ebac
76bef32937d7e09a74b3a34e4f3afa8a6c31c440 04-May-2016 Glen Kuhne <kuh@google.com> Merge "Fixed NetworkFactories being dumped twice" into nyc-dev am: 458bafa116
am: 01c158b3bd

* commit '01c158b3bd69116be2933630ad72930b55c2219f':
Fixed NetworkFactories being dumped twice

Change-Id: Id7dabd95bb54dd3ce3f817ab54053af749e549cd
1f83e0c8deec52f4f0d72129c7313a05109cf5ae 04-May-2016 Glen Kuhne <kuh@google.com> Merge "Fix null configs passed to WifiLastResortWatchdog" into nyc-dev
am: e49b29c8c3

* commit 'e49b29c8c378fd93421359034117a4d5b7b7062a':
Fix null configs passed to WifiLastResortWatchdog

Change-Id: I579b8900e0eab5f48492e2fcbb5ab162a0766582
2d91c98c8655eef753f388c469b8802d61215029 04-May-2016 Glen Kuhne <kuh@google.com> Merge "Fixed NetworkFactories being dumped twice" into nyc-dev
am: 458bafa116

* commit '458bafa1167e59f5a9aa4e86b43f658f6c1d2fbf':
Fixed NetworkFactories being dumped twice

Change-Id: Ic76371e77cf5592bbcb4155c8b1e1856c3204d2e
e49b29c8c378fd93421359034117a4d5b7b7062a 04-May-2016 Glen Kuhne <kuh@google.com> Merge "Fix null configs passed to WifiLastResortWatchdog" into nyc-dev
59298c7cfffdf856e32879ec967fe27c7e977a49 04-May-2016 Mitchell Wills <mwills@google.com> Add more details about what scan results were delivered to clients

Fixes: 28563549
Change-Id: I445054af4b176c69a26af6fe340a6eb88cf06452
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
2617b7a7df6bcc9b12a89bc6e26662b3be997fcd 10-Apr-2016 mukesh agrawal <quiche@google.com> WifiStateMachine: dynamically configure WifiHAL log level

By default, VERBOSE level logging is disabled for native code.
However, when debugging Wifi issues, we'll sometimes want to
include VERBOSE level log messages from the HAL implementation.

Update WifiStateMachine's verbose-debugging logic, to support
this case.

Note that VERBOSE level messages will not be compiled in
on user builds. Nor will system server be permitted to change
the logging level on user builds. For these reasons, the
log level is only modified on non-user builds.

BUG=27857554
TEST=unit tests, manual

Manual test (bullhead):
- On userdebug build with 'Enable Wi-Fi Verbose Logging' set:
$ adb reboot && adb wait-for-device && adb logcat -d | grep 'V WifiHAL'
-> matching lines seen
$ adb shell getprop | grep WifiHAL
[log.tag.WifiHAL]: [V]
- On userdebug build with 'Enable Wi-Fi Verbose Logging' unset:
$ adb reboot && adb wait-for-device && adb logcat -d | grep 'V WifiHAL'
-> NO matching lines
$ adb shell getprop | grep WifiHAL
[log.tag.WifiHAL]: [D]
- On user build with 'Enable Wi-Fi Verbose Logging' set:
$ adb logcat -d | grep 'V WifiHAL'
-> NO matching lines
$ adb shell getprop | grep WifiHAL
-> NO matching lines

Change-Id: Icaa91d9d1261a6cf5851d5ad9b0a6a25fd329344
ndroid/server/wifi/WifiStateMachine.java
f74a1cfd50d7b44aa7e4b598eb229cd464983dfe 03-May-2016 mukesh agrawal <quiche@google.com> wifi service: abstract away access to SystemProperties

We want the ability to modify the value of a system property,
so that we can dynamically change the logging level for WifiHAL.

This ability depends on permissions that are not available to
the test runner. For example, the process that is running the
wifi service code needs the ability to connect to the
|property_service| socket.

To resolve the problem, we do the following:
- add a PropertyService interface, which abstracts away access
to SystemProperties
- add PropertyService to the dependencies managed by WifiInjector
- add SystemPropertyService, which routes property requests
to android.os.SystemProperties
- update WifiStateMachine, to access properties via PropertyService
- update WifiStateMachineTest, to use a mock implementation of
PropertyService

BUG=27857554
TEST=unit tests

Change-Id: Ic930337a6a8f6a600ae7b4da2ca2eaf5c9e6c2cb
ndroid/server/wifi/PropertyService.java
ndroid/server/wifi/SystemPropertyService.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
5cdc80d103ebd2935693a8d855162d55bed2821c 04-May-2016 Mitchell Wills <mwills@google.com> Suppress some Supplicant WifiScanner logs

Fixes: 28452172
Change-Id: I99a1c11f15adf615b13496aec63642bfc2e552de
ndroid/server/wifi/scanner/SupplicantWifiScannerImpl.java
e70ba4d25583efb1528f5e7bb32e0fea39a7ab41 22-Apr-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Modify meaning of config.status

Change |config.status| field to track the status of a network within the
android framework rather than the status of network within
wpa_supplicant. |config.status| is enabled/disabled from only within
updateNetworkSelectionStatus now and will only change when
|enableNetwork| & |disableNetwork| public API's are invoked.

config.status is set to ENABLED when:
We set the status as enabled whenever network selection is set to
enabled.
config.status is set to DISABLED when:
(a) We set the status as disabled whenever network selection permanently
disables it. This is usually done when the app/user explicitly disables
the network or the current logged-in user changes. Newly created
networks are also DISABLED by default.
(b) We also need to mark all networks disabled when we start WPS.
(c) enableNetwork() public API with |disableOthers| flag set to true
disables all other saved networks.

While there,
1. Refactor the |updateNetworkStatus| method.

BUG: 28219928
TEST: Compiles & unit-test passes
TEST: Ran CTS tests
Change-Id: Id3cac801fa92e28984e451300f21f6f5b76de87a
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStore.java
4623817eb6b784f160763a22b3e06891ab11cf20 03-May-2016 Glen Kuhne <kuh@google.com> Fix null configs passed to WifiLastResortWatchdog

This CL fixes a bug where scan results were being paired with null
configs instead of their associated WifiConfiguration, and passed to
WifiLastResortWatchdog. This lead to the watchdog trigger potentially
not activating.

BUG=28476482

Change-Id: I0a10fc2309cf2199001dc440ed93ceaa3c891dba
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
f55d6b141718183eba880a86714d45d8e9c503e1 03-May-2016 Glen Kuhne <kuh@google.com> Fixed NetworkFactories being dumped twice

mNetworkFactory and mUntrustedNetworkFactory are being dumped twice. The
second time, potentially causing null exceptions.
Removed the second calls (were left over from bad rebase).

BUG=28530520

Change-Id: I3312ac83a7ea2d4027036ea85702caa74985753d
ndroid/server/wifi/WifiStateMachine.java
52f0e60f5e55d85ed482cd64eed2816dd2c26470 02-May-2016 Randy Pan <zpan@google.com> Merge "WifiConnectivityManager: PNO retry for low RSSI network" into nyc-dev am: 00f5ad8baf am: d7229f3fdb
am: 332ba5e463

* commit '332ba5e463b7c78379805c790c28317783cd31c9':
WifiConnectivityManager: PNO retry for low RSSI network

Change-Id: Id86902b1b65d635e6c7a83f0cace9179e4276e1f
d7229f3fdb3aa502f3d3ad09d8637a0bb2dbabff 02-May-2016 Randy Pan <zpan@google.com> Merge "WifiConnectivityManager: PNO retry for low RSSI network" into nyc-dev
am: 00f5ad8baf

* commit '00f5ad8bafa58232b799e5195783a444fa9168fe':
WifiConnectivityManager: PNO retry for low RSSI network

Change-Id: I0f89265d035b41fd8d6dcf2569625c8155c56ba1
00f5ad8bafa58232b799e5195783a444fa9168fe 02-May-2016 Randy Pan <zpan@google.com> Merge "WifiConnectivityManager: PNO retry for low RSSI network" into nyc-dev
d8b2abb521ee92457d91a17c3b5c811b599e47bb 02-May-2016 Ningyuan Wang <nywang@google.com> Merge "Optimize logcat fetching by using logcat -t option" into nyc-dev am: 0d491e5bf1 am: 6c05866c75
am: 1913eb5742

* commit '1913eb5742c24032f67a6015c3d95f511f6f679c':
Optimize logcat fetching by using logcat -t option

Change-Id: I65073aa22c6f56cea3d9dfd3ab73de55efa99260
075216ed6e733193efa5046859759374bf63942b 02-May-2016 Randy Pan <zpan@google.com> Merge "Fix check on current connected/connecting network" into nyc-dev am: 12cf770141 am: 24912eb492
am: 62114d9b9a

* commit '62114d9b9a836ff00bb09c4961813182367ee834':
Fix check on current connected/connecting network

Change-Id: Ia5c3072bbd135c3b591d25a9975284f04747fa08
6c05866c7540afd27dfcad5b63b6910411854c8e 02-May-2016 Ningyuan Wang <nywang@google.com> Merge "Optimize logcat fetching by using logcat -t option" into nyc-dev
am: 0d491e5bf1

* commit '0d491e5bf120b31534e03c5ec7c187ae4cf00fff':
Optimize logcat fetching by using logcat -t option

Change-Id: I6fdbf359cec8a28c7cfedef09ded7f18525a563e
24912eb492e54b4f2de65e063ac12ead29cc7e0a 02-May-2016 Randy Pan <zpan@google.com> Merge "Fix check on current connected/connecting network" into nyc-dev
am: 12cf770141

* commit '12cf770141cd8223809fbb69223dafb631ca4352':
Fix check on current connected/connecting network

Change-Id: I632b8973ac28f305de11451d3fd005660008c98e
0d491e5bf120b31534e03c5ec7c187ae4cf00fff 02-May-2016 Ningyuan Wang <nywang@google.com> Merge "Optimize logcat fetching by using logcat -t option" into nyc-dev
12cf770141cd8223809fbb69223dafb631ca4352 02-May-2016 Randy Pan <zpan@google.com> Merge "Fix check on current connected/connecting network" into nyc-dev
3d09b9117df33608a43c1fbe0135123e2de9aea2 27-Apr-2016 Randy Pan <zpan@google.com> WifiConnectivityManager: PNO retry for low RSSI network

Added an exponential back off retry mechanism for networks
found by PNO scan but rejected by QNS due to their low RSSI
values.

Bug: 28402107
Change-Id: I8a69afb3d22fbd2f479073e6087893c24e5a5d39
ndroid/server/wifi/WifiConnectivityManager.java
2fc71b9d1958129e7694559edfe582662c5e794d 30-Apr-2016 Rebecca Silberstein <silberst@google.com> WifiLastResortWatchdog: update config if not null am: 91a8893f04 am: 89b847b4f7
am: ae42ed9f88

* commit 'ae42ed9f884acb7c20e4939f7084a619163c2d0d':
WifiLastResortWatchdog: update config if not null

Change-Id: I8a7405f1f3b436173c6a94c2c34781189104bf2d
ae42ed9f884acb7c20e4939f7084a619163c2d0d 30-Apr-2016 Rebecca Silberstein <silberst@google.com> WifiLastResortWatchdog: update config if not null am: 91a8893f04
am: 89b847b4f7

* commit '89b847b4f780aa5ce3fc7c660c2af715a183b635':
WifiLastResortWatchdog: update config if not null

Change-Id: I9bf39ab0178d5d9ec0fcbc68da06ebf5271d8915
b18c1ab0282af58f7c922ab2e423aeac97470103 30-Apr-2016 Rebecca Silberstein <silberst@google.com> WifiLastResortWatchdog: update config if not null
am: 91a8893f04

* commit '91a8893f047b8a193e4516ab772b6f43882777f5':
WifiLastResortWatchdog: update config if not null

Change-Id: I1a1cc306f5faa2c86d7f31037f23640fba7f82af
91a8893f047b8a193e4516ab772b6f43882777f5 30-Apr-2016 Rebecca Silberstein <silberst@google.com> WifiLastResortWatchdog: update config if not null

When new scan results are processed, networks already stored as the
available networks may have updated configs passed in, but they may also
have null configs. The null configs should not be used to update the
stored config. Added a check to determine if the passed in config is
not null before the update.

In addition, debugging output also reported the value of
HasEverConnected as false for networks with a null config. This was
updated to report null_config instead.

Added tests covering config updates.
Added tests for debugging output.

BUG: 28451079
Change-Id: Iff9888ab87c61619b2f865516eca22d87eb4f4b8
ndroid/server/wifi/WifiLastResortWatchdog.java
50abba06efa7834b5309df561375e4a2e2df630d 29-Apr-2016 Randy Pan <zpan@google.com> Fix check on current connected/connecting network

Keep track of the network BSSID of the last connection attempt.
This BSSID is checked in case the phone is still in the process of
connecting to that network. mWifiInfo is checked for the currently
connected network. This is for the case that firmware performed
roaming automatically.

While there, addressed a checkstyle issue.

Bug: 28462151
Change-Id: Ia9316048e0549036de1c20bf1f3099cfcda9a75e
Test: WiFi unit tests
ndroid/server/wifi/WifiConnectivityManager.java
633bd71417e07ec466fac6354c8dfa4f50054cda 28-Apr-2016 Glen Kuhne <kuh@google.com> Merge "WifiLastResortWatchdog metrics" into nyc-dev am: ddf3afe am: 30a230f
am: fb36ac0

* commit 'fb36ac06682b3771cba167f0e98e783d6f7032ad':
WifiLastResortWatchdog metrics

Change-Id: I9556fbb9602af6ab7288724ade68bd6d9433d91d
30a230ff1ff971b6a6d421e0217f1ca4248359cf 28-Apr-2016 Glen Kuhne <kuh@google.com> Merge "WifiLastResortWatchdog metrics" into nyc-dev
am: ddf3afe

* commit 'ddf3afe31f5e2174643e41943e9e9b881033981a':
WifiLastResortWatchdog metrics

Change-Id: I2aa45798d7f74fee09b5e3ccd3fdcebc1cce7f11
d9e3ab1bd8197d52d0cd8676a6ade5ffab160ff1 28-Apr-2016 Glen Kuhne <kuh@google.com> Merge changes I91ad6127,I416bfd0e into nyc-dev am: 7883cf5 am: 9b6ca25
am: 8c9e301

* commit '8c9e301965aa473a4dd54d2b3a29de059534cb7b':
WifiLastResortWatchdog trigger logic
WifiLastResortWatchdog failure counting

Change-Id: I486b0493535270f8dddf42110450a95d0a0b60ae
1e392a99a9ad9c16e8d5999bd233c38fc0e06e56 28-Apr-2016 Paul Stewart <pstew@google.com> resolve merge conflicts of b73cae1 to nyc-dev-plus-aosp am: 0ca72c2
am: a6b0762

* commit 'a6b0762b0ebbaad675fdf80a0dd2a1fcbde6256d':
Handle EAP-SIM/AKA config without IMSI

Change-Id: I90ec99cc1a19d277041c93c146b5246d92ac0e65
ddf3afe31f5e2174643e41943e9e9b881033981a 28-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiLastResortWatchdog metrics" into nyc-dev
9b6ca250d5ea1f0e8354614a51ea2b4c82f88988 27-Apr-2016 Glen Kuhne <kuh@google.com> Merge changes I91ad6127,I416bfd0e into nyc-dev
am: 7883cf5

* commit '7883cf595742b2c9b1ccba223b45a5fcb6978ec9':
WifiLastResortWatchdog trigger logic
WifiLastResortWatchdog failure counting

Change-Id: I9108a990654eee8e5b0663d266126e14d775ec15
7883cf595742b2c9b1ccba223b45a5fcb6978ec9 27-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes I91ad6127,I416bfd0e into nyc-dev

* changes:
WifiLastResortWatchdog trigger logic
WifiLastResortWatchdog failure counting
0ca72c25df5e02735aa3ccee3c11f6689f30ebb4 27-Apr-2016 Paul Stewart <pstew@google.com> resolve merge conflicts of b73cae1 to nyc-dev-plus-aosp

Change-Id: I039a0d07b921919d4d034902cdd2e028335f6ea6
5f001750a0ce82a8b3a47ac566117d4de27f3e23 22-Apr-2016 Glen Kuhne <kuh@google.com> WifiLastResortWatchdog metrics

Added logging of various metrics to the WifiLastResortWatchdog. These
metrics count the number of times the Watchdog triggers, and stats
counting the number of networks present at failure time for different
failure types.

BUG=27856474

Change-Id: If43836b1c33791fefb8000196b231c312161feef
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiLastResortWatchdog.java
ndroid/server/wifi/WifiMetrics.java
6742527c7547acbfa8f4607443d986f22b4a5c40 27-Apr-2016 Akihiro Onodera <akihiro.x.onodera@sonymobile.com> Stop ANQP parsing when content of element is empty am: 6d66a0f am: 295a48c am: dad64ed
am: 60b9b8e

* commit '60b9b8ed632525beeeee284ae4728d2d488d13ac':
Stop ANQP parsing when content of element is empty

Change-Id: I04f729b5844117483b5661260665578ce5d431ab
6640b6ad70cbda54d11c47ba56246e5a6f31e737 27-Apr-2016 Randy Pan <zpan@google.com> Fix setEnableAutoJoinWhenAssociated() handling am: 1f4fa94 am: 2172b6c
am: 2d3793e

* commit '2d3793e318a05673d710ef0ba5824aac36827114':
Fix setEnableAutoJoinWhenAssociated() handling

Change-Id: I2154490f402c4872994262a5fceb51959f850589
977bed8ae4ac3d69d190ead0470d58cd46f3a6a5 27-Apr-2016 Randy Pan <zpan@google.com> WifiConnectivityManager: Run AlarmManager on WifiStateMachine thread am: c8a21e4 am: fbd81b3
am: 72f0a16

* commit '72f0a165e03f4150577b658737bee5ead748c9c5':
WifiConnectivityManager: Run AlarmManager on WifiStateMachine thread

Change-Id: Ic2a0d85e96f17e722c54768caecd0ead7aafc145
83f2b8087178705445e4d1618eaac832f9c633f4 20-Apr-2016 Glen Kuhne <kuh@google.com> WifiLastResortWatchdog trigger logic

Implemented trigger condition logic that is checked after a failure is
counted. The condition takes into account: failure counts, wifi
connected state, past connections to saved networks and whether the
watchdog has fired since the wifi environment changed.

Please note: This change only implements the logic for deciding when to
trigger, not the trigger itself.

BUG=27856709

Change-Id: I91ad6127a72ca24c72a5520348c4fff83f16b559
ndroid/server/wifi/WifiLastResortWatchdog.java
ndroid/server/wifi/WifiStateMachine.java
dad64ed669a47d54bafc460bea7ea5a544540d39 27-Apr-2016 Akihiro Onodera <akihiro.x.onodera@sonymobile.com> Stop ANQP parsing when content of element is empty am: 6d66a0f
am: 295a48c

* commit '295a48c995851c0958934df4a2067a051952f3eb':
Stop ANQP parsing when content of element is empty

Change-Id: I65793e3e1f0624442398184c966f77edfd663023
27aff2f8526d787f12dd223f7a36054d3b438941 27-Apr-2016 Roshan Pius <rpius@google.com> Merge "WifiConnectivityManager: Add stats for rate limiting" into nyc-dev am: f6807b2 am: 74f414c
am: 6e04b80

* commit '6e04b80a2cc5f7f67f16ee52e2e80096b77a9192':
WifiConnectivityManager: Add stats for rate limiting

Change-Id: I77762a53916022dab181dd2af17c227dcd7fb185
8486457bd3193df5aa2269ecca3d319a0ac02f54 27-Apr-2016 Mukesh Agrawal <quiche@google.com> Merge "Revert "WifiStateMachine: dynamically configure WifiHAL log level"" into nyc-dev am: 5c9943e am: 8295240
am: d4ce2d7

* commit 'd4ce2d759f40df76eab6f5d980f9fb82e615e9a8':
Revert "WifiStateMachine: dynamically configure WifiHAL log level"

Change-Id: Ib14d8b968a6f161c37f4293af1e6d4cf4aa16151
1f4fa946d229906500f381fa5561821fba164ba8 27-Apr-2016 Randy Pan <zpan@google.com> Fix setEnableAutoJoinWhenAssociated() handling

Move the execution of this method to the thread of
WifiStateMachine to address a potential WifiConnectivityManager
concurrent access issue.

While there, remove a dead method.

Bug: 28369823
Change-Id: I49f424637ee6897495daedbf4b1cc06477e78798
ndroid/server/wifi/WifiStateMachine.java
c8a21e495dfaa5c44e87fda330621a1ed6c8aace 26-Apr-2016 Randy Pan <zpan@google.com> WifiConnectivityManager: Run AlarmManager on WifiStateMachine thread

With WifiScanner also running on the WifiStateMachine thread,
WifiConnectivityManager is now exectued on a single thread context.

While there, fixed a few checkstyle issues.

Bug: 28369823
Change-Id: Ibf2b65be42d243deb61a68380a9011f4acc663b4
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiStateMachine.java
f6807b2f28848838d60aef1c9563c79e15cd7519 27-Apr-2016 Roshan Pius <rpius@google.com> Merge "WifiConnectivityManager: Add stats for rate limiting" into nyc-dev
5c9943e8c89f5f857d0680f0c77f7fccdfabd9f4 26-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "WifiStateMachine: dynamically configure WifiHAL log level"" into nyc-dev
8fe3e3497daf08b71ffc8c33cb7b139df6667448 14-Apr-2016 Glen Kuhne <kuh@google.com> WifiLastResortWatchdog failure counting

Implemented watchdog methods and calls to them from WifiStateMachine to
count association rejection, authentication failure & dhcp failures.

This will allow the watchdog to determine when all available networks
are failing, and Wifi Framework has no other options, however this Cl
does not implement that logic.

BUG=27855690
BUG=27856523

Change-Id: I416bfd0e0340823de5ca04f2d040bff7a751b677
ndroid/server/wifi/WifiLastResortWatchdog.java
ndroid/server/wifi/WifiStateMachine.java
585b29d14b5cb9f9cf77b9896fc4261b928c1a48 26-Apr-2016 Ningyuan Wang <nywang@google.com> Merge "Do not use ANQP when Wifi is connecting or connected" into nyc-dev am: 9a65085 am: 363f869
am: 31a9e64

* commit '31a9e643eb89f6796564322c3aefeb42171244e2':
Do not use ANQP when Wifi is connecting or connected

Change-Id: I430215362b8e25a529d2bc89923af13b85a127dd
9a65085cf054575bdb7fbd6bce672bd902b633fc 26-Apr-2016 Ningyuan Wang <nywang@google.com> Merge "Do not use ANQP when Wifi is connecting or connected" into nyc-dev
3cd7bbde2e51c99f69904f0d6b6481334e70f55a 26-Apr-2016 Mukesh Agrawal <quiche@google.com> Revert "WifiStateMachine: dynamically configure WifiHAL log level"

This reverts commit ced2db17a5049bc84a58934ca91c25f7147ee012.

Reverting due to test failure.
BUG=28385150

Change-Id: I86ffd7f017727ee94508102cd7a2962dcf803ffc
ndroid/server/wifi/WifiStateMachine.java
175087aa3f55685c040b8a9a82e3d2ce5d8c4a98 26-Apr-2016 Mitchell Wills <mwills@google.com> Merge "Fix another potential crash when dumping WifiScanningService" into nyc-dev am: c7c241f am: 66dfb3b
am: db25bc1

* commit 'db25bc1d5e40885c842d81cf04e2af8bae819d41':
Fix another potential crash when dumping WifiScanningService

Change-Id: Id87db295a92454abb06ec1f88860f2c4ff79cb0d
d54ddacc42d9cd929d40b1df391895293bacafe2 22-Apr-2016 Roshan Pius <rpius@google.com> WifiConnectivityManager: Add stats for rate limiting

BUG: 28242396
Change-Id: I53c0e91d2b9ee2731c0f74ef6376f4fb4e67f2e9
ndroid/server/wifi/WifiConnectivityManager.java
c7c241f0e59329c7c50101926fb9bde7ef6cca6f 26-Apr-2016 Mitchell Wills <mwills@google.com> Merge "Fix another potential crash when dumping WifiScanningService" into nyc-dev
8d33b1ca84e357f7b0a9e9f5ed5568f3f7d9904e 26-Apr-2016 mukesh agrawal <quiche@google.com> Merge "WifiStateMachine: dynamically configure WifiHAL log level" into nyc-dev am: 2586455 am: 58e50fe
am: 473833b

* commit '473833b22fa14071991a9ba3839325e35c674e92':
WifiStateMachine: dynamically configure WifiHAL log level

Change-Id: I8cc099789865529c5ae5d13c5af36a7d5018dc3e
25864553f48e32671d86e256fe20136e7e05e695 26-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiStateMachine: dynamically configure WifiHAL log level" into nyc-dev
1e5f0667515826cdc9c85a63a82c4c48cad446c2 22-Apr-2016 Ningyuan Wang <nywang@google.com> Do not use ANQP when Wifi is connecting or connected

Sending ANQP request when wifi is connecting or connected
may fail the connection.
This CL fixes it by adding a parameter to WifiConfigManager
::updateSavedNetworkWithNewScanDetail(). This boolean value
can indicate that we are connecting or connected.
Link debouncing is also considered as connecting in this case.

BUG=26494190
TEST=runtest frameworks-wifi
Change-Id: Ic4dfd0c0ba0392da68b6705d18fb82d92f44e508
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
306a7ef5a85c4cce888ec33d261fc789e7f48c59 25-Apr-2016 Roshan Pius <rpius@google.com> Merge "WificonfigManager: Split out scandetail to network lookup" into nyc-dev am: b863513 am: b214ebb
am: 931c78a

* commit '931c78a3701b3074f25b80dda9aa1ab29e2a2efc':
WificonfigManager: Split out scandetail to network lookup

Change-Id: Ic7cd9ecbac22ffe848fd3950eb14a81fc8d794b3
b8635136f9a15f0d79a142f12d3b56fa727327f3 25-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WificonfigManager: Split out scandetail to network lookup" into nyc-dev
d36b93b07ee7a3f6116cc7ae7a1a1e6b687a9d3c 25-Apr-2016 Mitchell Wills <mwills@google.com> Fix another potential crash when dumping WifiScanningService

Also make logging in WifiScanningService not static and add some tests
to verify some logging behavior.

Fixes: 28274869
Change-Id: I879200778dcadb4e67d5a85d42442baf3ceef6c9
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
e87b8506792261f668a6e725fb7a9bbe29ba6264 25-Apr-2016 pkanwar <pkanwar@google.com> Merge "Fix the string equality check, to avoid a possible NPE." into nyc-dev am: 6181c4c am: 2e9944e
am: 0b351cf

* commit '0b351cfc9561593ee1255b07555bce82639f5d2b':
Fix the string equality check, to avoid a possible NPE.

Change-Id: I8a7f4e2dcb5fa2fb2d610a1bde1a6ed1f63925a8
6181c4c32d8bb792fa7f66e8859f6b1037980ac5 25-Apr-2016 Pankaj Kanwar <pkanwar@google.com> Merge "Fix the string equality check, to avoid a possible NPE." into nyc-dev
f799eff77d81ae0509b8b890a7c6068d5c6cda6e 22-Apr-2016 Roshan Pius <rpius@google.com> WificonfigManager: Split out scandetail to network lookup

Create a separate method to fetch the saved network from scan detail.
This can be used for caching dtim values in WifiStateMachine.

BUG: 26494190
TEST: Compiles & unit-test passes

Change-Id: Ib5819fd72afc3dcf691735deccb237874eac3f8d
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.java
ed7ffebbfd5475337ff99492d17b4786f2cc4d33 22-Apr-2016 Roshan Pius <rpius@google.com> Merge changes I2bfae3a9,I3e247667 into nyc-dev am: c733860 am: 3c1b440
am: 5a36eb5

* commit '5a36eb543f973d5940eff6822cf73b79892bf648':
WifiConnectivityManager: Unit tests for rate limit
WifiConnectivityManager: Connection rate limit

Change-Id: Ie4a167bac0d439a4c88989f218a36eef4697c96f
37e073350c5e3bdac08d4fa2a0cc9f37190d1173 22-Apr-2016 Ningyuan Wang <nywang@google.com> Optimize logcat fetching by using logcat -t option

WifiLogger::getOutput() sometimes takes more than a few
seconds because it fetchs the entire logcat buffer then takes
the most recent 127 lines.
Since it is a blocking call, it may increase the chance that
WifiService being killed by WatchDog.

This change uses logcat -t option, only fetching the
most recent 127 lines. It significantly reduces the time of the
blocking call.

BUG=28298654
TEST=unit tests, manual test
Manual test:
- boot device
$ adb logcat -d | wc -l
-> repeat until >127
$ adb bugreport > /tmp/bugreport
- check that ‘system log:’ section contains 127 lines.

Change-Id: Ifcfb9e53a7c8b731e76cab1f25cec1bc0c83f33e
ndroid/server/wifi/WifiLogger.java
a7bf9d90d68a4833cc3c64da98024167931c4b1e 22-Apr-2016 pkanwar <pkanwar@google.com> Fix the string equality check, to avoid a possible NPE.

b/27905553 This fixes CTS failures in testProtectedBroadcasts in
android.permission.cts.TelephonyManagerPermissionTest.

Currently the "state" variable can be null, so the equality condition
has been rearranged to avoid the NPE.

Change-Id: I0326df8680c6e37bc2151a38f8f74305b3f8de79
ndroid/server/wifi/WifiServiceImpl.java
c7338605251ff62f6e21737b1cfca865ce6f3dd9 22-Apr-2016 Roshan Pius <rpius@google.com> Merge changes I2bfae3a9,I3e247667 into nyc-dev

* changes:
WifiConnectivityManager: Unit tests for rate limit
WifiConnectivityManager: Connection rate limit
569d209ed658bc7ef8b118e7e2c02e1e4589b89b 22-Apr-2016 Samuel Tan <samueltan@google.com> Merge changes Ic5cff6cd,I11c3ab64,If8ebf879,I586edcbc

* changes:
WifiConfigStoreTest: fix comments
WifiConfigStore: instantiate mLocalLog and mFileObserver unconditionally
Remove mShowNetworks from WifiConfigManager and WifiConfigStore
WifiConfigStore: rename VDBG to sVDBG
7da986a9639952687bd0c3b8c83c9a1de3e19783 16-Feb-2016 Jinhai Zhang <jinhai.x.zhang@sonymobile.com> Handle IMSI null case in getMatchingImsis

In case of locked SIM or no SIM, IMSI acquired by Telephony becomes null
and NPE occurs. Add null check to fix.

Bug: 28336901
Change-Id: I33a39b41657e27ad7eea8af58cc43cbb12793ba0
ndroid/server/wifi/SIMAccessor.java
61c649d4b9ec90c765ec66edbfaea9ff777d1b75 03-Dec-2015 Kouhei Kuroda <kouhei.x.kuroda@sonymobile.com> Handle IMSI null case when building WiFi configuration

NPE happens when trying to add passpoint profile without IMSI through
WiFiInstaller. Add null check to avoid NPE.

Bug: 28334237
Change-Id: I1b247d10b51137414c97c6d53dd83501b78c171b
ndroid/server/wifi/configparse/ConfigBuilder.java
7934e22219ee2b8da861867266a3e21463d7882f 01-Dec-2015 Kouhei Kuroda <kouhei.x.kuroda@sonymobile.com> Handle EAP-SIM/AKA config without IMSI

Crash happens when adding EAP-SIM/AKA Passpoint config that
doesn't have IMSI parameter. This patch takes care of the case.

Bug: 28329844
Change-Id: I3d520233f5a55221ac34d3cb65af506790c83c19
ndroid/server/wifi/hotspot2/omadm/MOManager.java
6d66a0fbbcb3b3ffa32973c77dd895f7184be58a 14-Sep-2015 Akihiro Onodera <akihiro.x.onodera@sonymobile.com> Stop ANQP parsing when content of element is empty

If 802.11u/HS2.0 elements exist in ANQP response, framework tries to
parse content of element. When it's empty, Exception is sometimes
thrown and it results in that framework doesn't try to connect. This
issue happens at for instance IPAddressTypeAvailabilityElement when
the content of IP Address Type Availability ANQP-element is nothing.

This patch just skips parsing of the element if its content is empty.

Bug: 28336506
Change-Id: I9d5800b88965df1d736cababe4f82c674d7c65be
ndroid/server/wifi/hotspot2/SupplicantBridge.java
39c87eeed17a445595aa8f506dd19181414000cf 22-Apr-2016 Roshan Pius <rpius@google.com> Merge "WifiConnectivityManager: Turn off ePno/Gscans" into nyc-dev am: 05e91b1c9b am: 0448365cac
am: 02f298c4d6

* commit '02f298c4d6dc78a1b34362a3a0f043f567b8a99e':
WifiConnectivityManager: Turn off ePno/Gscans

Change-Id: Ic334c1076709e42349220359c6cb05e10777302d
05e91b1c9b1e261d8f72b32e5ab3a85e1c8e0bc3 22-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiConnectivityManager: Turn off ePno/Gscans" into nyc-dev
cb8b88e7e92128bf645320d30c2df6e01030a70b 22-Apr-2016 Samuel Tan <samueltan@google.com> WifiConfigStore: instantiate mLocalLog and mFileObserver unconditionally

We want WifiConfigManager to always use a local log, and for
the WpaConfigFileObserver to always be turned on. Instantiate
these fields when creating WifiConfigStore, no matter what the
value of vDBG is.

BUG: 27377614
Change-Id: I11c3ab64b3412d3d082dbc949eb1219039866a69
TEST: 'runtest frameworks-wifi' passes.
ndroid/server/wifi/WifiConfigStore.java
09b56b73458874ee0a3a9dad014f84ebf94bbfb5 22-Apr-2016 Samuel Tan <samueltan@google.com> Remove mShowNetworks from WifiConfigManager and WifiConfigStore

This static variable, which is set at compile-time for WifiConfigManager
and WifiConfigStore, essentially does the same thing as sVDBG,
which is to determine whether extra logging should be performed.
Remove this field, and use sVDBG in its place.

BUG: 28276051
Change-Id: If8ebf879453e278353aa4ecde7709e74a202ff5a
TEST: 'runtest frameworks-wifi' passes.
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStore.java
ced2db17a5049bc84a58934ca91c25f7147ee012 10-Apr-2016 mukesh agrawal <quiche@google.com> WifiStateMachine: dynamically configure WifiHAL log level

By default, VERBOSE level logging is disabled for native code.
However, when debugging Wifi issues, we'll sometimes want to
include VERBOSE level log messages from the HAL implementation.

Update WifiStateMachine's verbose-debugging logic, to support
this case.

Note that VERBOSE level messages will not be compiled in
on user builds. Nor will system server be permitted to change
the logging level on user builds. For these reasons, the
log level is only modified on non-user builds.

BUG=27857554
TEST=manual

Manual test (bullhead + forthcoming HAL patch)
- On userdebug build with 'Enable Wi-Fi Verbose Logging' set:
$ adb reboot && adb wait-for-device && adb logcat -d | grep 'V WifiHAL'
-> matching lines seen
$ adb shell getprop | grep WifiHAL
[log.tag.WifiHAL]: [V]
- On userdebug build with 'Enable Wi-Fi Verbose Logging' unset:
$ adb reboot && adb wait-for-device && adb logcat -d | grep 'V WifiHAL'
-> NO matching lines
$ adb shell getprop | grep WifiHAL
[log.tag.WifiHAL]: [D]
- On user build with 'Enable Wi-Fi Verbose Logging' set:
$ adb logcat -d | grep 'V WifiHAL'
-> NO matching lines
$ adb shell getprop | grep WifiHAL
-> NO matching lines

Change-Id: I43af6852cd445f9a7daee04981f253a6c0ebc499
ndroid/server/wifi/WifiStateMachine.java
90a06edca24b5585e5fb1ed25dd2740a09636e17 21-Apr-2016 Samuel Tan <samueltan@google.com> WifiConfigStore: rename VDBG to sVDBG

Rename WifiConfigMaanger's field VDBG to sVDBG, since it
is a non-constant static field.

BUG: 28321391
Change-Id: I586edcbcec65efb098dc7913f66a4f8cc09fcb09
TEST: Angler build compiles successfully.
ndroid/server/wifi/WifiConfigStore.java
fa2ac2743307559e8dcc5aaf54873536315fbe62 19-Apr-2016 Roshan Pius <rpius@google.com> WifiConnectivityManager: Unit tests for rate limit

Adding unit tests to verify the connection attempt rate limiting
functionality. Had to change the way system time is being fetched in
WifiConnectivityManager to achieve this.

BUG: 28242396
Change-Id: I2bfae3a9ea60cba1c3c1405dd5eb58208f12c2db
TEST: Compiles & unit-test passes
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiStateMachine.java
4f5054647a2f4cac54a78d6e3bf3efa0727b488a 18-Apr-2016 Roshan Pius <rpius@google.com> WifiConnectivityManager: Connection rate limit

Implement a rate limit for connection attempts to prevent us flapping
between networks.

While there,
Cleanup all the static time values to be more readable.

BUG: 28242396
Change-Id: I3e2476674e7239e000b93b95751acec3ea7bc8ce
ndroid/server/wifi/WifiConnectivityManager.java
4a6a2b1946d1f176f200ea6d9798f2cb0f71bf39 22-Apr-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Remove redundant code" into nyc-dev am: ca4e81e099 am: 3e4476eeb7
am: f2205f47dd

* commit 'f2205f47ddd1682dd59b5c823370224b1828b1d5':
WifiConfigManager: Remove redundant code

Change-Id: I2ac715af47aefa29fed7d88bc0ae29428fda25f8
ca4e81e099ff1608874a91afd9846100d4599f04 22-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiConfigManager: Remove redundant code" into nyc-dev
d52abfea4fe8a9d43d23a864d1151958ecfc98b4 21-Apr-2016 Jeremy Joslin <jjoslin@google.com> Set WifiNetworkScoreCache DBG to false. am: 0ab2b1ad5b am: 5d92eeaaa5
am: 42b07a448a

* commit '42b07a448a12f7bc224aec2eb12bd9275c5cdda5':
Set WifiNetworkScoreCache DBG to false.

Change-Id: Ia8c233a60ba387d7a86f66b8bb8d7ea7645bd21e
ad36265b6efc83414daf7e38283826482dfb5045 21-Apr-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Remove redundant code

Remove some redundant code in enableNetwork and move some the network
status updation from state machine to ConfigManager.

BUG: 28317135
Change-Id: I375af87bd971352d3066a150e046571f00de44fd
TEST: Compiles & unit-test passes
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.java
7ce0f144104c68da40c196c16f73e2d0bcc50cc7 21-Apr-2016 Roshan Pius <rpius@google.com> WifiConnectivityManager: Turn off ePno/Gscans

There is a lot of instability/unknowns for using ePno/Gscans for
connectivity purposes. Unless we've all of them hashed out, turn them
off.

BUG: 28300874
BUG: 28278197
Change-Id: Ifd650032237ac510687f0d374d31f7c9f13d18bd
TEST: Compiles & unit-test passes (Will send for ACTS testing).
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/scanner/HalWifiScannerImpl.java
0ab2b1ad5b0c902c3e8b3c9afd786e3b79e30c95 21-Apr-2016 Jeremy Joslin <jjoslin@google.com> Set WifiNetworkScoreCache DBG to false.

Also made the constants final.

BUG:28317300
Change-Id: I32ad6d1e4dbd3f5cc1cdbde8803b66e48b9928c6
ndroid/server/wifi/WifiNetworkScoreCache.java
bf8d6c656a46c1be69a8879753434325e1aea27c 21-Apr-2016 mukesh agrawal <quiche@google.com> Merge "WifiLogger: fix bug in HAL callback registration" into nyc-dev am: 0b775f0888 am: 03fcb9ea8c
am: 3dc96a71c1

* commit '3dc96a71c1d227c4b208d3e9851873b9bbfd87fd':
WifiLogger: fix bug in HAL callback registration

Change-Id: Iaa2346ed1b7be5bef5e3675e62f053511448b2a4
0b775f08887d4d52e57a06c6a8680aa10a1c7bb8 21-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiLogger: fix bug in HAL callback registration" into nyc-dev
d2604bdc56148b6d4c00ba59ce35b9afabdca48b 21-Apr-2016 Jeremy Joslin <jjoslin@google.com> Merge "Use external scores on saved networks if requested." into nyc-dev am: de68b30 am: 3f73c1c
am: 1dc33e22be

* commit '1dc33e22bea2ee4d3f7c6a013e7ec386c09219fa':
Use external scores on saved networks if requested.

Change-Id: I39e257728fc8bcb28344cf653567464178340bf5
03db1f27de6b3526d08d6aa64d459b5cf14e23ef 21-Apr-2016 Samuel Tan <samueltan@google.com> Merge changes Id4cc9c3c,Ice7dad5a into nyc-dev am: af8c59a am: 37eacf6
am: 7c63e8a009

* commit '7c63e8a009572f15cf05a012a0886459c7d37380':
Log summarized packet fate reports
Add FrameParser

Change-Id: I9ded3cb4a2593c4301d125d6689796a7995dad38
956fd40b6145c4aba9160e10bfc1ea609873ce8d 20-Apr-2016 mukesh agrawal <quiche@google.com> WifiLogger: fix bug in HAL callback registration

When we call WifiLogger.startLogging(), WifiLogger
may or may not register callbacks for ring-buffer
data delivery, and WiFi alerts.

Whether or not WifiLogger registers the callbacks
depends on whether or not the callbacks have already
been reigstered. If WifiLogger has already registered
callbacks, then a new call to startLogging() will
skip callback registration.

Now, it's not entirely clear if this already-registered
check is necessary. It is certainly conceivable that the
HAL implementations allow us to replace existing callbacks,
without explicitly removing the existing callbacks first.

But, the necessity of the check aside, the immediate
problem is that the already-registered check fails to
handle the case where an early registration failed.

This CL revises the code, to handle this case.

While there:
- Fix some whitespace issues.
- Remove unnecessary comment about the effects of
resetLogHandler(). (Even if the comment _were_ necessary,
it should be part of the Javadoc for resetLogHandler().)

BUG=28274991
TEST=(new) unit tests, manual

Manual test:
- boot device
$ adb shell dumpsys | grep -A1 'ring-buffer = driver_prints_rb'
ring-buffer = driver_prints_rb
<base64 encoded data...>

Change-Id: I04e9bc1863aaf5bda00ca9cf8dc35696ae1e5f24
ndroid/server/wifi/WifiLogger.java
de68b305e798943904671f1dd56413b51fc479cb 20-Apr-2016 Jeremy Joslin <jjoslin@google.com> Merge "Use external scores on saved networks if requested." into nyc-dev
af8c59a9cb6b9cd0151b3cfa5d4ea2c698fd7eda 20-Apr-2016 Samuel Tan <samueltan@google.com> Merge changes Id4cc9c3c,Ice7dad5a into nyc-dev

* changes:
Log summarized packet fate reports
Add FrameParser
ea2048738be95ae9d5367a42ba798503a7039a6b 15-Apr-2016 Jeremy Joslin <jjoslin@google.com> Use external scores on saved networks if requested.

When a saved network has the useExternalScores boolean set to true then
lump it in with the ephemeral networks when considering it as a
candidate.

Externally scored saved networks are only considered if a saved network
candidate cannot be found.

BUG: 25562019
Change-Id: Icdb7318103e14e518536c3179cd30c87cc2c3035
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiNetworkHistory.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
f0d5427c2105f5a042e863eb34ec51a675fb77c6 20-Apr-2016 Mitchell Wills <mwills@google.com> Fix NullPointerException when dumping WifiScanningService am: 985df17909 am: c7e91f1d07
am: 3b1c79a6b1

* commit '3b1c79a6b158cb5942ba550a569d14728250ca10':
Fix NullPointerException when dumping WifiScanningService

Change-Id: I4547c758ed2dfc145a17a569a858754751c79b32
985df17909a5703a86f3e665abc9dd964d9623d9 20-Apr-2016 Mitchell Wills <mwills@google.com> Fix NullPointerException when dumping WifiScanningService

If WiFi was not turned on prior to dumping WifiScanningService a
NullPointerException would be thrown.

Change-Id: I79d7a0d23db670f4fef3fb01072d3eb2155428b2
Fixes: 28274869
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
41e260258d53640c2cf3c1cb90998752a15f0db6 19-Apr-2016 Roshan Pius <rpius@google.com> Merge "Merge "WifiConnectivityManager: Clear scan details after results" into nyc-dev am: 14ef58b am: 4d95af9" into nyc-mr1-dev-plus-aosp
am: 142785a

* commit '142785a7fb308e54e5d40140141ecb3dd2095350':
WifiConnectivityManager: Clear scan details after results

Change-Id: I4fba2c9bd27b4f3312fc12a4ae4227c0f69be606
14ef58beaf5c3ca9d3909ff67bbbc109521e29bf 19-Apr-2016 Roshan Pius <rpius@google.com> Merge "WifiConnectivityManager: Clear scan details after results" into nyc-dev
fd16a92022cd216d5fd7d2559796ef0a52f942f5 19-Apr-2016 Adam Lesinski <adamlesinski@google.com> Merge "Implement new async response for controller activity info" into nyc-dev am: 9f04178 am: 720a8eb
am: 521aaa7

* commit '521aaa761141c7988b68538f3797555eef33ec2b':
Implement new async response for controller activity info

Change-Id: I635563fabbabc10ff3636ffc2ed457030b5a575b
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
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiNative.java
9f04178d32d9fd84ce99fe95401692077d69497a 19-Apr-2016 Adam Lesinski <adamlesinski@google.com> Merge "Implement new async response for controller activity info" into nyc-dev
ff96d4ec1eb3a885928ed96358d26acc1b11030a 19-Apr-2016 Roshan Pius <rpius@google.com> Merge "WifiConnectivityManger: Enable background/ePNO scan" into nyc-dev am: 1e5ceb7 am: 01f0430
am: 12ce8d7

* commit '12ce8d778c8836f955fa36012e630975e4386255':
WifiConnectivityManger: Enable background/ePNO scan

Change-Id: I050e59159dd220ac405e3a38821429359b01bfb1
1e5ceb7ad228e29bf0f6b4706df49c684880c6e0 19-Apr-2016 Roshan Pius <rpius@google.com> Merge "WifiConnectivityManger: Enable background/ePNO scan" into nyc-dev
49575227ad2068ae6a0667d4ea8359e6fed2b68d 19-Apr-2016 Roshan Pius <rpius@google.com> QNS: Skip ephemeral networks deleted by user am: a6b66a4 am: 1178ef8
am: 5834303

* commit '583430310ed2feaab023b0b8a62cd5292039ab1f':
QNS: Skip ephemeral networks deleted by user

Change-Id: Ibec4bcea34729f169581c2ed86147cd5a823b1f8
224198c8ba46f362a5df6d25f1b60e56f442b58b 18-Apr-2016 Roshan Pius <rpius@google.com> WifiConnectivityManager: Clear scan details after results

BUG: 28247321
Change-Id: I7913ae97ceb8566d7e0612455096362c661b6969
ndroid/server/wifi/WifiConnectivityManager.java
a6b66a48b231f5729b8015d3446feb4c2fa0a9d1 06-Apr-2016 Roshan Pius <rpius@google.com> QNS: Skip ephemeral networks deleted by user

Skip ephemeral networks which were explicitly deleted by the user. This
was missed in migration from autojoin to QNS.

BUG: 28026676
Change-Id: Ib663183b29774b851e492ddd170c4b4bef03ae61
TEST: Compiles & unit-test passes
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
5b0bf339ca3dce6df274fee0e8bd0b1ef7951193 18-Apr-2016 Sunil Dutt <usdutt@codeaurora.org> Check KEY_CONFIG_WIFI_DISABLE_IN_ECBM on ECBM notification am: 752bd0e am: 63ddb2c
am: 45260ce

* commit '45260ced8b2b5f22539b094b48342eb9142b5011':
Check KEY_CONFIG_WIFI_DISABLE_IN_ECBM on ECBM notification

Change-Id: I94da5200cd3b7c668b692e25cce17ff418227ed8
70b4f7f1b8f57c5ae449dedb48edc0d07b6b5c41 14-Apr-2016 Samuel Tan <samueltan@google.com> Add FrameParser

Add FrameParser, a utility class that parses the contents
of a network frame, and stores it in its public member fields.
This utility will be used to print out summarized versions of
the contents of packet fate report frames.

In this initial implementation of FrameParser, we only parse out
the information we are interested in printing (i.e. the most specific
networking protocol, and the type of packet within this protocol).

BUG: 28150622
Change-Id: Ice7dad5a7800736605043688955027893fadffc7
TEST: 'runtest frameworks-wifi -c \
com.android.server.wifi.util.FrameParserTest' passes.
ndroid/server/wifi/WifiLoggerHal.java
ndroid/server/wifi/util/FrameParser.java
752bd0ed137ccc42cdfd911611f2d5f8d33be53c 11-Apr-2016 Sunil Dutt <usdutt@codeaurora.org> Check KEY_CONFIG_WIFI_DISABLE_IN_ECBM on ECBM notification

Wi-Fi disable on ECBM notification is controlled by the
configuration parameter KEY_CONFIG_WIFI_DISABLE_IN_ECBM.
Hence check for the same while processing the notification.

Bug: 27854016
Change-Id: If1724f825f1c8b47ec2f29ecd8abda45ef9bc393
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiController.java
79e3bf8db6b566a5b3c7065cdd43f87f07e73747 08-Apr-2016 Roshan Pius <rpius@google.com> WifiConnectivityManger: Enable background/ePNO scan

Add a new flag to control both background scans & connected PNO scan in
WifiConnectivityManager (We may need to disable connected PNO even if we
enable gscan).
Also, change the disconnected PNO interval to 20 seconds.

BUG: 28020168
BUG: 27877781
Change-Id: I6e7224b02456573070a68dbe8f5a5b0d49f37fdc
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/scanner/HalWifiScannerImpl.java
e7671fbc6c2820b4a133baed75b481e68cfdeeca 15-Apr-2016 Mitchell Wills <mwills@google.com> Merge "Run WifiScanner on WifiStateMachine thread" into nyc-dev am: 6095c3e
am: 411cf82

* commit '411cf8234d32b7fecb30216038838d27a36899e9':
Run WifiScanner on WifiStateMachine thread

Change-Id: Ia625838bce229257229593f9ae7cfb8f0cc59951
e6370a5c4ce17a56763162a1d0e3fddbc3d2182f 15-Apr-2016 Glen Kuhne <kuh@google.com> Merge "Created LastResortWatchdog class" into nyc-dev am: 33e62df
am: 610cd91

* commit '610cd91e6b531742639d0f78dd55f22193d18007':
Created LastResortWatchdog class

Change-Id: Icb92f2023551b701cbc4279450f054b095bac14d
6095c3ef2eb6dbe7321a23b146997ad13875696d 15-Apr-2016 Mitchell Wills <mwills@google.com> Merge "Run WifiScanner on WifiStateMachine thread" into nyc-dev
33e62df1fd2d065f6d626d800350e2063978a0ab 15-Apr-2016 Glen Kuhne <kuh@google.com> Merge "Created LastResortWatchdog class" into nyc-dev
b32297a0366701f455e872e9beffcfe7a723a542 15-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiScanningService: Correct state machine names" into nyc-dev am: cae5f15
am: 466b53b

* commit '466b53b1807d8f7ea77faccd768a4069978b5ae1':
WifiScanningService: Correct state machine names

Change-Id: I09c33300b3b783a0dc2bb4431d6e5afbb7275fc4
cae5f15cb8d8cc925398b29c7bb16ade3eed7475 15-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiScanningService: Correct state machine names" into nyc-dev
799f1c026941c9183657ffb99f0fb34ff643a0dd 15-Apr-2016 Roshan Pius <rpius@google.com> WifiScanningService: Correct state machine names

This improves readability of the state machine dump command.
BUG: 27886011

Change-Id: I8676f3c3c638d8f32dde063adb5e79b0cf978ea5
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
5ccc0a429dfea8ef452f8f63454b013983eb87fe 07-Apr-2016 Mitchell Wills <mwills@google.com> Run WifiScanner on WifiStateMachine thread

Fixes: 27695292
Change-Id: I34f05fc532c48c7c3eaa735bc6ec95e7da2794aa
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiStateMachine.java
b657f92530816ac694078d92f3930dc9c25be2d1 14-Apr-2016 Randy Pan <zpan@google.com> Merge "Condition on if the phone is connected to an AP" into nyc-dev am: 493fa57
am: 20b2244

* commit '20b22445538ec6711706432997b4e370a3f56531':
Condition on if the phone is connected to an AP

Change-Id: I0686d158d75927e682d7408eff490a11c8c45e12
493fa573c471f1c5650bc35dda016c744808c363 14-Apr-2016 Randy Pan <zpan@google.com> Merge "Condition on if the phone is connected to an AP" into nyc-dev
70df4bb57ecae7795a4a9f57de7fce147512dbca 14-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add log when we don\'t update the channel list" into nyc-dev am: 00e9884
am: 60482c4

* commit '60482c4552e3654e1def8a2487bb8bd9480635fb':
Add log when we don't update the channel list

Change-Id: I9fe655b177f4d36f2bd886dc26fe86e5eb49c4e3
00e988440a0b1bf0c443142fa6a1a0369cb95799 14-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add log when we don't update the channel list" into nyc-dev
e3663f3c400cf9c2cb9410d46c80216efafcf2a8 14-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiScanningService: Remove ClienthandlerMap" into nyc-dev am: 0fa34e0
am: f03eced

* commit 'f03ecedc9e6b25ee83a250413b98d0ad316f1509':
WifiScanningService: Remove ClienthandlerMap

Change-Id: I3c37ec412eff70181049769824cbfa6819323bfe
f7659cd9b95332766a20f81cb0c9f06b2d1fba51 14-Apr-2016 Samuel Tan <samueltan@google.com> Merge changes Ia5efa8a0,I2ec700c3 into nyc-dev am: 4621683
am: 03ee3e6

* commit '03ee3e68ebc4fda2150e54dd90a38b73056ed52a':
WifiConfigStore: remove migrateCerts()
WifiConfigStore: remove migrateOldEapTlsNative()

Change-Id: I85f2cbc74caca0f0d5ff7606fb48b61c5087ba39
cf48112a065c98c1369de2520e446289b2fbaa31 14-Apr-2016 Rebecca Silberstein <silberst@google.com> Merge "Update hasEverConnected for wifi networks" into nyc-dev am: c38419b
am: e59a3c3

* commit 'e59a3c361616f466350e94f9e87a1cba17a7d003':
Update hasEverConnected for wifi networks

Change-Id: Ia2886709aac502e7037207b2aec78bb5248f5448
71f6b09378a762aefb4269d7e42698df6cb4b0ab 14-Apr-2016 Roshan Pius <rpius@google.com> Merge "BackgroundScanScheduler: Optimize buckets" into nyc-dev am: deaf58e
am: c28f692

* commit 'c28f69227556b73871f112f73c13a3d0ac20593d':
BackgroundScanScheduler: Optimize buckets

Change-Id: Ic81539699e8981943b8ddedeee0ab844fb87401c
2eab5684e91be89a6926325e241c688e29061d0f 14-Apr-2016 Jan Nordqvist <jannq@google.com> Merge "Fixed incomplete OSEN config code." into nyc-dev am: d347f07
am: 5aa7e7a

* commit '5aa7e7ae0acbcee86cba530a1167939f29f80b68':
Fixed incomplete OSEN config code.

Change-Id: Ie07bf45b063f6959a306dacafc31b03408b73ca2
5b129ec6509328c102f9b0802d90a43dd7cd2e4f 14-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "SupplicantWifiScanner: Increase single scan timeout" into nyc-dev am: a8e5447
am: 88ccfef

* commit '88ccfef0b6c0564a16fcbd3d2d7b7b68fedbddd2':
SupplicantWifiScanner: Increase single scan timeout

Change-Id: I2c50d0a967c75c2a0f24f2b94d5abb13fef71105
eeb1a3c3cb4c09f925496000392d63b2b28301f7 14-Apr-2016 Randy Pan <zpan@google.com> Condition on if the phone is connected to an AP

In addition to check if the BSSID of the candidate network
recommended by QNS matches the one tracked by WifiStateMachine's
WifiInfo, check if the phone is in one of the supplicant
connecting states. This is to take the fact that WifiInfo stores
a diconnected network's BSSID into count.

Bug: 28163444
Change-Id: I682bedc26e9f2ea34cb006b859384a8e414b047d
ndroid/server/wifi/WifiConnectivityManager.java
0fa34e0ff61d7aa41ef69da1ebaf24adf5aaca2f 14-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiScanningService: Remove ClienthandlerMap" into nyc-dev
09abbe29be6e552a2531b0367bd6d29647d33767 30-Mar-2016 Glen Kuhne <kuh@google.com> Created LastResortWatchdog class

Created the WifiLastResortWatchdog class, that will handle restarting
the wifi stack as a last resort when wifi is failing.
Implemented the logic that tracks failure counts for all available
networks, and the maintaining of that list of available networks.

BUG=27856523

Change-Id: I8c944d033955ad7e5cc9484cce8f20cd3755312e
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiLastResortWatchdog.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
ndroid/server/wifi/WifiStateMachine.java
f8f5cb07ca2ead74f7f8bb03621fe0157aeba373 14-Apr-2016 Roshan Pius <rpius@google.com> WifiScanningService: Remove ClienthandlerMap

Migrate all scans to use the new RequestList class to maintain the list
of active scans.

BUG: 28190728
Change-Id: Iad84fda9c50c0c1c493a399ce2adb2792ec75a2f
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
46216839c58e6aa6933eae304da750cd46148837 14-Apr-2016 Samuel Tan <samueltan@google.com> Merge changes Ia5efa8a0,I2ec700c3 into nyc-dev

* changes:
WifiConfigStore: remove migrateCerts()
WifiConfigStore: remove migrateOldEapTlsNative()
c38419bd95b0934cb1dfc6f1e1f29eca9929da8c 14-Apr-2016 Rebecca Silberstein <silberst@google.com> Merge "Update hasEverConnected for wifi networks" into nyc-dev
deaf58e6f2c5fb93543f3ead79c1f160cc2248a8 14-Apr-2016 Roshan Pius <rpius@google.com> Merge "BackgroundScanScheduler: Optimize buckets" into nyc-dev
ffd253e626fd6154dbd77320d08e2a42cc178aa6 14-Apr-2016 Mitchell Wills <mwills@google.com> Add log when we don't update the channel list

Change-Id: I4f95934636d63faced42954831f8be6389db1f8f
ndroid/server/wifi/scanner/HalChannelHelper.java
d347f07ab5908f1736a912e1305cdc653fb606fe 14-Apr-2016 Jan Nordqvist <jannq@google.com> Merge "Fixed incomplete OSEN config code." into nyc-dev
c48fd721a9a3273f0faa927d93caad4c9832af7d 11-Apr-2016 Adam Lesinski <adamlesinski@google.com> Implement new async response for controller activity info

Bug:26842468
Change-Id: Ic031dd6b5781c11aaec97f9c2b943dbd3f9317bf
ndroid/server/wifi/WifiServiceImpl.java
a8e54474f05cbd5ccb42c4b1dc7cf7411dde559a 14-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "SupplicantWifiScanner: Increase single scan timeout" into nyc-dev
a85fc1b07490d3ff194a98fe7389f6697ace5801 13-Apr-2016 Roshan Pius <rpius@google.com> SupplicantWifiScanner: Increase single scan timeout

Increase single scan timeout to 15 seconds to account for delays in scan
processing when there is a parallel gscan running.

BUG: 28005679
Change-Id: I5efd2c547f1ffb12ea026f2e289cb7e83e6f3021
ndroid/server/wifi/scanner/SupplicantWifiScannerImpl.java
e3cb83f0fe21e7ed6b412399a4f36090a2437e6a 14-Apr-2016 Mukesh Agrawal <quiche@google.com> Merge changes I8da6c1a4,I619b9c81,I22a753d7,If818bc37 into nyc-dev am: 2b7a4da
am: 0c754f9

* commit '0c754f9f825e84ca5f88721b3d09072b20b71084':
wifi service: nuke verbose logs on no-verbose
wifi service: add support for driver dump HAL API
WifiLogger: make firmware dump conditional on verbose
wifi service: add utility to check printability

Change-Id: I94a1e7ed243f4d1c7062d7326ca3682ff9ab81c7
2b7a4daa21df85f6a8ca2c4992ba53634071cac6 14-Apr-2016 Mukesh Agrawal <quiche@google.com> Merge changes I8da6c1a4,I619b9c81,I22a753d7,If818bc37 into nyc-dev

* changes:
wifi service: nuke verbose logs on no-verbose
wifi service: add support for driver dump HAL API
WifiLogger: make firmware dump conditional on verbose
wifi service: add utility to check printability
216eb45e7fb44a1ba8edc156d08b532a17219f66 08-Apr-2016 Roshan Pius <rpius@google.com> BackgroundScanScheduler: Optimize buckets

Optimize the buckets to ensure that the same channel is not scheduled
across multiple buckets. The settings are split if some of the channels
in the setting is already being scanned in lower time period bucket.
Also go thru each bucket and check if any of them don't fit into the
bucket specifications, if yes create split buckets with the same
time period. The split buckets will cumulatively contain all the channels
needed to be scanned in the original buckets.

BUG:28022609
Change-Id: Ie24bc3ec891965adad0ce6e855015be6ff5f0740
TEST: Compiles & unit-test passes
ndroid/server/wifi/scanner/BackgroundScanScheduler.java
ndroid/server/wifi/scanner/ChannelHelper.java
ndroid/server/wifi/scanner/KnownBandsChannelHelper.java
ndroid/server/wifi/scanner/NoBandChannelHelper.java
b571743f406cbe1c13cc0fdfcd9fc58093728f4c 12-Apr-2016 Samuel Tan <samueltan@google.com> WifiConfigStore: remove migrateCerts()

The abovementioned method was introduced 3 years ago,
and should not be needed anymore.

BUG: 28124406
Change-Id: Ia5efa8a068c1a68b875bcbe1b21424d7ab201e4a
TEST: 'runtest frameworks-wifi' passes.
ndroid/server/wifi/WifiConfigStore.java
41a43eccc1f100f15bc37755d9824494d1ea773a 12-Apr-2016 Samuel Tan <samueltan@google.com> WifiConfigStore: remove migrateOldEapTlsNative()

The abovementioned method was introduced 4 years ago,
and should not be needed anymore.

BUG: 28124210
Change-Id: I2ec700c3a96cc2c37831394f6bc7b4075270f3fb
TEST: 'runtest frameworks-wifi' passes.
ndroid/server/wifi/WifiConfigStore.java
9e075613145f2462a1ecaae3893005ab8deb0a90 13-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiConfigStore: set requirePMF when ieee80211w==2" into nyc-dev am: 42396f4
am: af581e4

* commit 'af581e4729ba8457a17a51c5a87b4a7e064d405c':
WifiConfigStore: set requirePMF when ieee80211w==2

Change-Id: I4cf0974c663a7063f997e4f53815956d5f35c573
42396f489e485671100353beb6102d315ff3a542 13-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiConfigStore: set requirePMF when ieee80211w==2" into nyc-dev
622235cc66d93860682ed0dc925d92bd4884e452 13-Apr-2016 Samuel Tan <samueltan@google.com> Merge "Remove WifiConfigManager.mDeletedSSIDs" into nyc-dev am: 30925b4
am: 8521c91

* commit '8521c91df77d6cb6ee930ae8a79ffac27d5efacd':
Remove WifiConfigManager.mDeletedSSIDs

Change-Id: I9435c3d5f3ef34a95cfcc786c90df418c9a62f1c
1a36e0c7c9893105cf23a918a33c5c63ff5fe722 13-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiConfigManager: Remove dead code" into nyc-dev am: a43ada8
am: d308ec2

* commit 'd308ec220922f3150aeb5b0a893ac2f0afa33b11':
WifiConfigManager: Remove dead code

Change-Id: Ifef6440a6bfba670c74767f343bc2e4ccd7bbb41
af3c71f28531c8d52ebc8e913f34b674f91b9fd8 13-Apr-2016 Rebecca Silberstein <silberst@google.com> WifiConfigStore: set requirePMF when ieee80211w==2

When reading back WifiConfigurations, the ieee80211w value is
incorrectly defaulting to 3, this is causing the requirePMF value to be
incorrectly set to true. Change this behavior to only set requirePMF
when the value read is 2.

BUG: 28159304
Change-Id: I0896b1feb10415c04b335ac1b91844ae0fe87f2d
ndroid/server/wifi/WifiConfigStore.java
30925b4fe118d954c671523b71ecd8820e70d962 13-Apr-2016 Samuel Tan <samueltan@google.com> Merge "Remove WifiConfigManager.mDeletedSSIDs" into nyc-dev
a43ada87b8111dc2c5c440d3b9b529ffba8384e7 13-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiConfigManager: Remove dead code" into nyc-dev
feaedc1a064de293bc18ab1e522a7953b7fa2719 31-Mar-2016 Jan Nordqvist <jannq@google.com> Fixed incomplete OSEN config code.

Changed the makeString method to comply with new Hotspot 2.0 release 2
group cipher name with underscores in the value.
The legacy code bluntly assumed that all wpa_supplicant values used
dashes only and no underscores.

BUG=27929688

Change-Id: I74f7549b7771402121570f725e9d2f95be8d19c4
ndroid/server/wifi/WifiConfigStore.java
19bec176a3e5e7402c4808f3bac135ab05a59ee6 13-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiConfigManager: remove OLD_PRIVATE_KEY_NAME" into nyc-dev am: 2e17da3
am: 8b46c89

* commit '8b46c89d79769fdb26dccf29571b51917eebb1ec':
WifiConfigManager: remove OLD_PRIVATE_KEY_NAME

Change-Id: I258ebe819842c715079d8db02c5e0cfc163ed92f
2e17da3b28b31b24aabd18367347c2a15f148cd1 13-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiConfigManager: remove OLD_PRIVATE_KEY_NAME" into nyc-dev
329b3a9a9bc32d14649e91c15876ea7f95f148d1 13-Apr-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Remove dead code

BUG: 28164778
Change-Id: I1e09b8039dbf7d220fd699b5be3b29330d02a305
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiConnectivityManager.java
b340de73ee6aed3644165299101ad8bd568614db 13-Apr-2016 Glen Kuhne <kuh@google.com> Merge "WifiMetrics Extension" into nyc-dev am: 6e1539d
am: fa5e753

* commit 'fa5e753854492126273cbfa62b5b71398b501ee9':
WifiMetrics Extension

Change-Id: I8d01268dc62bc04969bab8ce7a739b8fecd00aef
6e1539d01b5c05f790d803b98128f2a03b7e155f 13-Apr-2016 Glen Kuhne <kuh@google.com> Merge "WifiMetrics Extension" into nyc-dev
2809381eaa87749de0665490867260f807e5c446 13-Apr-2016 Paul Jensen <pauljensen@google.com> Merge "If Internet probe is redirected, pass redirect destination to NetworkAgent." into nyc-dev am: 15c889b
am: 95dd638

* commit '95dd638e95ee96a458f51ff726e75b83da0f0efa':
If Internet probe is redirected, pass redirect destination to NetworkAgent.

Change-Id: I2e9ba2d7749f3ce784ba208d5a309c338a4a3ef9
15c889b305b3086a93229258d4f3a083acadc8b5 13-Apr-2016 Paul Jensen <pauljensen@google.com> Merge "If Internet probe is redirected, pass redirect destination to NetworkAgent." into nyc-dev
387b0f7f6310bd7f3cb1ad93685ac0e4cc9a1afd 13-Apr-2016 Wei Wang <weiwa@google.com> Merge "Send failure reason from RttService." into nyc-dev am: 604285d
am: 7c86978

* commit '7c86978d49bddd0f51079b885565e013a5d684e7':
Send failure reason from RttService.

Change-Id: I8910f1a4d5df09c8342fa00f170f7be6ca4a6592
46fa5743c46b0543fbc7dd9280a18f8491975f06 13-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiConfigManager: set default value of mShowNetworks back to false" into nyc-dev am: ff90a6e
am: 4cc9576

* commit '4cc95760eba22ab3ebaa66552408372911452369':
WifiConfigManager: set default value of mShowNetworks back to false

Change-Id: Ibafdbbfcadf77425dc9406eeb6b52ee8f2d8f0ab
cb030b85dfef3608723e53402a194f28637e8b98 13-Apr-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiConfigStore: read requirePMF config variable" into nyc-dev am: 49db6a0
am: a0acad9

* commit 'a0acad9a7056b099708069a29f9d5c4662fed965':
WifiConfigStore: read requirePMF config variable

Change-Id: I3c82a16242880397b42b6edf79521c355d53c0fe
5672c82166fcf4673314c9e7b3e59599676c6a92 13-Apr-2016 Samuel Tan <samueltan@google.com> WifiConfigManager: remove obselete field description am: fdbf9d3
am: cfa3c95

* commit 'cfa3c957eb08ab613f22382521e5466a19fa0249':
WifiConfigManager: remove obselete field description

Change-Id: I9750e00456cc35d24c531f6924fe37eb6f031eec
ce003b812aead64dcb36647180991150021b24c1 12-Apr-2016 Glen Kuhne <kuh@google.com> WifiMetrics Extension

Extended the wifi metrics proto with the changes submitted
logs/proto/wireless/android/play/playlog/connectivity/wifi.proto in
CL/119321981.
Added interfaces to WifiMetrics for incrementing the Connectivity
Watchdog counts.

The new Connectivity Watchdog metrics can be viewed in the 'WifiMetrics'
section output by:
adb shell dumpsys wifi

BUG=27479439

Change-Id: I38f0a0ad7c7e0b4d3f0054c818d188ac1b171121
ndroid/server/wifi/WifiMetrics.java
2ecb62764d26c3f0d95a9dc5c0a616af1b2bf8de 12-Apr-2016 mukesh agrawal <quiche@google.com> wifi service: nuke verbose logs on no-verbose

When a user disables verbose Wi-Fi logging, they
probably don't want to retain firmware dumps or
driver dumps. Similarly for packet fate logs (at
least in raw form).

Nuke such data on entering non-verbose mode,
accordingly.

While there: update reportConnectionFailure(),
to use the recently added isVerboseLoggingEnabled()
method.

BUG=27554392
BUG=27528124
TEST=unit tests

Change-Id: I8da6c1a4ab11e5f43b9e660fb64efed62e7cb9e3
ndroid/server/wifi/WifiLogger.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
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiNative.java
913bb9047c0eab77653b47a0ed69dbe0bd3d479f 13-Apr-2016 Samuel Tan <samueltan@google.com> Remove WifiConfigManager.mDeletedSSIDs

mDeletedSSIDs are introduced in WifiConfigStore in
go/ag/585797, where it was used in
WifiConfigStore.associateWithConfiguration(). This method
was later removed in go/pag/215262, but mDeletedSSIDs
was not. Later, mDeletedSSIDs was moved to WifiConfigManager
in a WifiConfigStore refactor.

Since this variable is no longer used, delete it and all
references to it.

BUG: 28088479
Change-Id: I056ae6f6654269100fc96f25b299a9fece85be93
TEST: 'runtest frameworks-wifi' passes.
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNetworkHistory.java
f8c50b1e8239d843dd01e6dcf956629dad0771c1 12-Apr-2016 mukesh agrawal <quiche@google.com> WifiLogger: make firmware dump conditional on verbose

We want to make firmware memory dump conditional on
verbose logging for it's own sake. But this also
sets the stage for the driver dump feature to be
conditional on verbose. (Driver dump is still in
the works.)

BUG=21661292
BUG=27554392
TEST=compile (more tests to come)

Change-Id: I22a753d785d1023a94f5c2e753714bc918b41fdf
ndroid/server/wifi/WifiLogger.java
e31290e1c2eebf70c5ab22091a9520c7a001161e 12-Apr-2016 mukesh agrawal <quiche@google.com> wifi service: add utility to check printability

When logging data, it's useful to know whether or not
the data is plain ASCII. (If so, we can print the
data raw. Otherwise, we need to base64 encode the data.)

To meet this need: add a utility method to check if a byte
buffer contains (only) printable ASCII.

BUG=27554392
TEST=unit tests

Change-Id: If818bc378c6f146e7517f6ae4bb36b4b5bb8db48
ndroid/server/wifi/util/StringUtil.java
604285d676078e9d0d5c7944770bdba36144363e 13-Apr-2016 Wei Wang <weiwa@google.com> Merge "Send failure reason from RttService." into nyc-dev
ff90a6e25ba0e4388f14d87a0fbd8231d5f8a721 13-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "WifiConfigManager: set default value of mShowNetworks back to false" into nyc-dev
93332917bf29ddbe853a495816e486150f49da40 29-Mar-2016 Rebecca Silberstein <silberst@google.com> Update hasEverConnected for wifi networks

Set hasEverConnected to true for a network that completes a connection.

Set hasEverConnected to false when a network config changes.

Add tests to confirm hasEverConnected was added on a successful
connection and cleared when connection or credential related
configuration changes are made.

Also removed some unused imports to fix checkstyle issues in
WifiStateMachine and WifiConfigStore.

BUG: 27856374

Change-Id: Ica633166892b4673683f21ff98e3ded1607dedec
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
49db6a0f9104fea99013fa6cfe6fcf2bdc7aa661 12-Apr-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiConfigStore: read requirePMF config variable" into nyc-dev
bca895e7651c2929ff883568940892987c1a03d3 12-Apr-2016 Samuel Tan <samueltan@google.com> WifiConfigManager: set default value of mShowNetworks back to false

Since b/17516271 is marked as fixed, act on the TODO and set
the default value of this field back to false.

While there, re-order some fields in accordance to the style in
WifiConfigManager.java.

BUG: 28088219
Change-Id: Ib6a0985babdbebb35916278fe64bacdeb863ab8e
TEST: 'runtest frameworks-wifi' passes.
ndroid/server/wifi/WifiConfigManager.java
fdbf9d334419ff5aff35bf56f7cf46d01998861b 12-Apr-2016 Samuel Tan <samueltan@google.com> WifiConfigManager: remove obselete field description

Remove description for a field that was previously deleted
(mNetworkIds).

BUG: 28088467
Change-Id: I2f6ac921b9b73e91c4eed5b0481bc4a910e92f02
TEST: N/A
ndroid/server/wifi/WifiConfigManager.java
87a0e55e7d75e305e0fb50a0748d2002cd44c984 12-Apr-2016 Wei Wang <weiwa@google.com> Send failure reason from RttService.

Also use CMD_OP_ENALBE_RESPONDER_FAILED when wifi is not available.

Bug: 28143916

Change-Id: I8eb6139e3464989739783fd96637d549756aa2cf
ndroid/server/wifi/RttService.java
18a2a910a978a5b19bd5a8d91f551e07f5470952 12-Apr-2016 Randy Pan <zpan@google.com> Merge "Remove startDelayedScan() from WifiStateMachine" into nyc-dev am: 50f2c0b
am: 181cf64

* commit '181cf64ec562e0b44b034d147dc97f358285ee9c':
Remove startDelayedScan() from WifiStateMachine

Change-Id: Icd32f6edec36eae389328bdf638a618344b6458d
eaea4b75c2ecfd192d5dcefcf67bb851bf031f5e 12-Apr-2016 Rebecca Silberstein <silberst@google.com> WifiConfigStore: read requirePMF config variable

When saving a wifi configuration, we set the requirePMF variable from
the config, but it is never read back.

Add the getNetworkVariable call for pmfVarName and add a call to verify
the attempt to read it back in the WifiConfigManagerTest.

Additionally fixed a checkstyle issue for unused imports.

BUG: 28088226
Change-Id: Ib7b2ba796e31ae57273c34b6845c218419125b72
ndroid/server/wifi/WifiConfigStore.java
0fe550277a9db5a06d8d8265f50a87b4645094f8 12-Apr-2016 Samuel Tan <samueltan@google.com> WifiConfigManager: remove OLD_PRIVATE_KEY_NAME

Remove WifiConfigManager.OLD_PRIVATE_KEY_NAME, since it
is a duplicate of WifiConfigStore.OLD_PRIVATE_KEY_NAME, and
WifiConfigManager's copy of this variable is not used.

While there, re-order some fields in WifiConfigManager to
match the style in this file.

BUG: 28088377
Change-Id: I448c4368fd7e1d0a86606fec8187298c005734d5
TEST: 'runtest frameworks-wifi' passes.
ndroid/server/wifi/WifiConfigManager.java
294f19a8f103b017b13c93e1445d15a503e6d819 12-Apr-2016 Samuel Tan <samueltan@google.com> Merge "Rename WifiConfigManager.getConfiguredNetworks()" into nyc-dev am: 7429ca2
am: 9969618

* commit '9969618bd41acafb73aba19d7c97d61c1e11bc54':
Rename WifiConfigManager.getConfiguredNetworks()

Change-Id: I557ef3db27e729ea0104fa2ff8905f47eddb9647
203b0f14dc447726f4b4825e5f3c103b16e344aa 12-Apr-2016 Samuel Tan <samueltan@google.com> Merge "WifiConfigManager: remove mEnableSsidWhitelist and mEnableHalBasedPno" into nyc-dev am: 90aa70f
am: b7f5595

* commit 'b7f55951d4a2ed1adc6e8b58fabfbf19de31ccb6':
WifiConfigManager: remove mEnableSsidWhitelist and mEnableHalBasedPno

Change-Id: I8608901462ea1272ea8d46f6b35dc6665a30f5b7
50f2c0b31f4b8e8f523efa2d820a1517a31c6fb2 12-Apr-2016 Randy Pan <zpan@google.com> Merge "Remove startDelayedScan() from WifiStateMachine" into nyc-dev
7429ca2593265cc1b97fb0d616ef3c07364b2931 12-Apr-2016 Samuel Tan <samueltan@google.com> Merge "Rename WifiConfigManager.getConfiguredNetworks()" into nyc-dev
90aa70f8474e3f28587f152ee2abf2a3708f47b6 12-Apr-2016 Samuel Tan <samueltan@google.com> Merge "WifiConfigManager: remove mEnableSsidWhitelist and mEnableHalBasedPno" into nyc-dev
6daa28f68c1e7df412d8580c11c16a0926e4b542 12-Apr-2016 Randy Pan <zpan@google.com> Merge "Clean up scan from WifiStateMachine" into nyc-dev am: 286d5bc
am: 4087e58

* commit '4087e585d73a6961f7f9f3f385a061eb11184928':
Clean up scan from WifiStateMachine

Change-Id: I5640967798fe1c5e0fcf4eec42d5ebb5d266f26e
c519bd5f444bd68df895c61423bab4cd8a694572 12-Apr-2016 Randy Pan <zpan@google.com> Merge changes Iba4639b8,Ie07b4730 into nyc-dev am: 10ae325
am: 17ad78e

* commit '17ad78ecb9a48fd1474b9e8515330dc17eb9d195':
Remove check for roaming by supplicant from QNS
Keep QNS local log enabled

Change-Id: If14ac8795ca244a74750c4f6b26c21e7e486b35c
cf0a149d5e46692ba7ab2ceb84ff96a8dabf1b2c 12-Apr-2016 Mitchell Wills <mwills@google.com> Merge "Move WifiScanner related code to scanner package" into nyc-dev am: b0af0c3
am: 33f52d4

* commit '33f52d4de5e3be37ac4f5179e8b10b38569d7201':
Move WifiScanner related code to scanner package

Change-Id: Ifc97492627181df0a3a8445cce58cae4ff903e4c
286d5bc822626b2307fa89cfd6738da3ee91e21a 12-Apr-2016 Randy Pan <zpan@google.com> Merge "Clean up scan from WifiStateMachine" into nyc-dev
10ae325bdea24f342d7db71365c27e9c1e4082b4 12-Apr-2016 Randy Pan <zpan@google.com> Merge changes Iba4639b8,Ie07b4730 into nyc-dev

* changes:
Remove check for roaming by supplicant from QNS
Keep QNS local log enabled
74c56848625bdc3c358475e87d7b15a44bd5a985 12-Apr-2016 Randy Pan <zpan@google.com> Remove startDelayedScan() from WifiStateMachine

This logic is now replaced by WifiConnectivityManager.
While there, clean up some dead code.

Bug: 28070598
Change-Id: I122fee6630f74e30b7b9a36ff325f8d6baa1a8f0
ndroid/server/wifi/WifiStateMachine.java
c24bdfeb8386f892eca5b6513179fa08260c49e7 11-Apr-2016 Randy Pan <zpan@google.com> Clean up scan from WifiStateMachine

Removed a bunch of dead code.

Bug: 28070598
Change-Id: Iee11bbc79a5512e3116c6c38ec071c27a0609bb5
ndroid/server/wifi/WifiStateMachine.java
19628835ddf7b7557ff61dfdf00e916abc2c13d2 11-Apr-2016 Randy Pan <zpan@google.com> Remove check for roaming by supplicant from QNS

With network switching and roaming by wpa_supplicant disabled,
QNS does not have to check for that any more.

Bug: 27932378
Change-Id: Iba4639b88e9369148ce3d398203d69c9e9ef8d20
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
030b802722b896b2139e0771a2ceee48bd19699d 11-Apr-2016 Randy Pan <zpan@google.com> Keep QNS local log enabled

While there, changed the local log method name and tags for
log dumping to comply with the Wifi stack naming convention.

Bug: 27765462
Change-Id: Ie07b4730d58a2768c6f6a2d37fc0b20c6852a3ba
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
a8367288377cbaed6371256ca837b7aa22280706 11-Apr-2016 Mitchell Wills <mwills@google.com> Move WifiScanner related code to scanner package

Change-Id: I73d01fe4d0de99a4e9758353cacf1d7a790cf040
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiScannerImpl.java
ndroid/server/wifi/WifiScanningScheduler.java
ndroid/server/wifi/WifiScanningService.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/scanner/HalWifiScannerImpl.java
ndroid/server/wifi/scanner/SupplicantWifiScannerImpl.java
ndroid/server/wifi/scanner/WifiScannerImpl.java
ndroid/server/wifi/scanner/WifiScanningService.java
ndroid/server/wifi/scanner/WifiScanningServiceImpl.java
666a2e92468803a739394e6b53d9fe021a7b4afd 11-Apr-2016 Samuel Tan <samueltan@google.com> WifiConfigManager: remove mEnableSsidWhitelist and mEnableHalBasedPno

Remove both these members, since they are only set, but not used.

BUG: 28088382
Change-Id: I610b67b7cc84e66a2378c7422908ce80b3dae69a
TEST: 'runtest frameworks-wifi' passes.
ndroid/server/wifi/WifiConfigManager.java
aec985350d1e536bee841a8f30178edfedb0eba7 11-Apr-2016 Mukesh Agrawal <quiche@google.com> Merge "WifiStateMachine: reduce number of LogRecords" into nyc-dev am: 492900e
am: 42bc12b

* commit '42bc12bef4e6706d8aa30bb3638034a389db5dd8':
WifiStateMachine: reduce number of LogRecords

Change-Id: I84d520f0c50f8f1e7451320dc867d470f0810a12
1de244319af13f316233e2230e8d6ab719d484f6 11-Apr-2016 Samuel Tan <samueltan@google.com> Merge "Rename enableAutoJoinWhenAssociated()" into nyc-dev am: 4cd91e2
am: bd3f9dc

* commit 'bd3f9dcbc193093169da66372b1765d7a6121f54':
Rename enableAutoJoinWhenAssociated()

Change-Id: Iaaffcb0efaf93f65b2648ce1d9d6bd5701a80e51
60969bf2c849011fb585cf6dc914dbd779dfb8cf 11-Apr-2016 Samuel Tan <samueltan@google.com> Rename WifiConfigManager.getConfiguredNetworks()

Rename WifiConfigManager.getConfiguredNetworks() and related methods
to WifiConfigManager.getSavedNetworks, since it better reflects
what this method does (i.e. get all configured networks except
ephemeral networks). While there, add comments for some previously
undocumented helper methods.

BUG: 28088229
Change-Id: I30e144b46277605f5847371d9e65b70306013cf5
TEST: 'runtest frameworks-wifi' passes.
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
ndroid/server/wifi/WifiStateMachine.java
492900e5895d4480292d5f7518d109e6b3b9fb47 11-Apr-2016 Mukesh Agrawal <quiche@google.com> Merge "WifiStateMachine: reduce number of LogRecords" into nyc-dev
4cd91e207897c250c7fc0e6ed3176698dce29093 11-Apr-2016 Samuel Tan <samueltan@google.com> Merge "Rename enableAutoJoinWhenAssociated()" into nyc-dev
d83a8d70990c21583c73daf79335d1b060d4a77e 11-Apr-2016 Samuel Tan <samueltan@google.com> Merge "WifiConfigManager: remove unused fields" into nyc-dev am: c769e9f
am: 0124507

* commit '0124507a81eec5f67a17559363ff59f6e58305ad':
WifiConfigManager: remove unused fields

Change-Id: Ibc95a2d485688682c5b3b9bbfe58a53aeed81097
c769e9f8aa687a80d10c9442ce44d091f63f06b6 11-Apr-2016 Samuel Tan <samueltan@google.com> Merge "WifiConfigManager: remove unused fields" into nyc-dev
cf2c37cff48a96fe221121dfe6a0360a54ed9ebb 06-Apr-2016 mukesh agrawal <quiche@google.com> WifiStateMachine: reduce number of LogRecords

Allowing 3000 LogRecords uses too much memory (we've
seen >1 MB in some cases). Lower this limit to 100
records, as it was before.

To facilitate debugging issues that happen overnight,
allow the user to opt-in to a larger log record buffer.
To do so, the user should "enable wi-fi verbose logging"
under developer options.

BUG=27504679
TEST=unit tests

Change-Id: Iee983e3c815bef1a9e05f7085147bc73c79753f6
ndroid/server/wifi/WifiStateMachine.java
851bbb0f02caf04ff58f639e3bb257dfdbf437ec 11-Apr-2016 Samuel Tan <samueltan@google.com> Merge changes I468f7425,I649dca1b,Ic7f97157,I06a8be88 into nyc-dev am: a88d1b2
am: 0fbbc50

* commit '0fbbc50a2deaeb48787c422b21cdba9d09d0c465':
WifiConfigManager: remove WifiStateMachine field
Move wnmFrameReceived() from WifiConfigManager to WifiStateMachine
Move mActiveScanDetail from WifiStateMachine to WifiConfigManager
Remove getCurrentUserId() and getCurrentUserProfiles() from ...WifiStateMachine

Change-Id: I2f6f3d853a4d5858712510ea247a707aefe4d979
a88d1b207c401c4510e635156442973a8e30ac95 11-Apr-2016 Samuel Tan <samueltan@google.com> Merge changes I468f7425,I649dca1b,Ic7f97157,I06a8be88 into nyc-dev

* changes:
WifiConfigManager: remove WifiStateMachine field
Move wnmFrameReceived() from WifiConfigManager to WifiStateMachine
Move mActiveScanDetail from WifiStateMachine to WifiConfigManager
Remove getCurrentUserId() and getCurrentUserProfiles() from ...WifiStateMachine
623a3837b91d39a19a7e0ac82e54c7060a4bdc78 10-Apr-2016 Etan Cohen <etancohen@google.com> [NAN] Add TIMEOUT support to handle HAL non-response to commands.
am: 4375ab0

* commit '4375ab0647dd81529c5e247cfaa3c1ffdbd8d6cd':
[NAN] Add TIMEOUT support to handle HAL non-response to commands.

Change-Id: I46fa81c7bd71dd89d374cbfeab4a5325415f4b75
f9356a7d3d6f374727b3c2e34515eaa607983625 10-Apr-2016 Mitchell Wills <mwills@google.com> Merge "Move single scan blaming from WifiStateMachine to WifiScanningService" into nyc-dev am: 207985b
am: d729a91

* commit 'd729a9117a07727d5d4a4d119d6c93f8167b7112':
Move single scan blaming from WifiStateMachine to WifiScanningService

Change-Id: If9207667458f952ba1c28918a9893b733cb7b6b1
087a993973580d4ed1c98e6d4a74d70643d4bb39 10-Apr-2016 Glen Kuhne <kuh@google.com> Merge "Added buffering of filtered ScanDetails to QNS" into nyc-dev am: f1c2e8c
am: 499274c

* commit '499274cf55170303f018d9ee9770c708585775d9':
Added buffering of filtered ScanDetails to QNS

Change-Id: I595831c3b84f606b0ebee56aae427a28565a521f
f862b24f275fca39aa5ada577beec00f3fc49833 10-Apr-2016 Glen Kuhne <kuh@google.com> Merge "Track WifiState on single scan start" into nyc-dev am: 2e73824
am: e858831

* commit 'e85883130c2b1275eab41b69ce9561b6e5994886':
Track WifiState on single scan start

Change-Id: I3bad0cf27bbaaf1bf5d9063bc7ad6d40456baa93
a92878de9ead6fe3df4f3e8c84a1e9ab15dac4fc 10-Apr-2016 Randy Pan <zpan@google.com> Merge "Build ESS into the GScan result\'s Capabilities" into nyc-dev am: 1a572a2
am: 61122b8

* commit '61122b844a8b19d6e4ac71cf8a4376a00fa52211':
Build ESS into the GScan result's Capabilities

Change-Id: I8bce7439abe0c6fdc75baa8a208943806a6fe1f2
207985b8f6d960784948aa7dcc1af754ea57b449 09-Apr-2016 Mitchell Wills <mwills@google.com> Merge "Move single scan blaming from WifiStateMachine to WifiScanningService" into nyc-dev
f1c2e8cc3728f65aee24905ad5c44e84891f0693 08-Apr-2016 Glen Kuhne <kuh@google.com> Merge "Added buffering of filtered ScanDetails to QNS" into nyc-dev
43eba5ba17a9af5d9a050a4ba5e12e93c92f722d 08-Apr-2016 Samuel Tan <samueltan@google.com> Rename enableAutoJoinWhenAssociated()

Rename instances of the abovementioned method to
setEnableAutoJoinWhenAssociated(), to better reflect
that this method is a setter.

BUG: 28088867
Change-Id: I2ea170c8b3f1042356014f9ac57035d78302db76
TEST: 'runtest frameworks-wifi' passes.
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
4375ab0647dd81529c5e247cfaa3c1ffdbd8d6cd 08-Apr-2016 Etan Cohen <etancohen@google.com> [NAN] Add TIMEOUT support to handle HAL non-response to commands.

Bug: 28021222
Change-Id: Iaf4c5e48b166092515025bb62f7882c729c13b4e
ndroid/server/wifi/nan/WifiNanStateManager.java
2e738247c930892598473f3cbe593670ab23a02c 08-Apr-2016 Glen Kuhne <kuh@google.com> Merge "Track WifiState on single scan start" into nyc-dev
1a572a27cffc6ee853f9b6a40d83eef18963e2b0 08-Apr-2016 Randy Pan <zpan@google.com> Merge "Build ESS into the GScan result's Capabilities" into nyc-dev
0efd09fea566f4445807b6aff60b18e127e72d38 31-Mar-2016 Glen Kuhne <kuh@google.com> Added buffering of filtered ScanDetails to QNS

Added logic to buffer the scanDetails considered by
QualifiedNetworkSelection as potential candidates (has a saved config,
and signal strength over threshold). And a getter to access these.

BUG=27932650

Change-Id: I4e04194c944f7d8a18719d7dfc7b66cbf42eb5af
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
2494581a19c37677e5442423ea95b579ca225ac4 08-Apr-2016 Mukesh Agrawal <quiche@google.com> Merge changes from topic \'ring-buffer-size\' into nyc-dev am: 94e8f71
am: 42518ef

* commit '42518efc7e79c39dd09c614475bc3591e11e1192':
wifi service: use large ringbuffers in verbose mode
ByteArrayRingBuffer: add ability to resize buffer

Change-Id: I461940e39ab8b0ea8e1067baddf6e1240b8128c9
b57dcb26a4abd697be100d4765f63a7a78bd5371 08-Apr-2016 Etan Cohen <etancohen@google.com> Revert "Update mock AlarmManager to handle setExact method. [DO NOT MERGE]"

This reverts commit d6186e122589825b2d128595366f030744984d63.

Change-Id: I30451a145867d60e20c0f0a3a98e1f0a0556cd7c
ndroid/server/wifi/nan/WifiNanStateManager.java
48444cb4214a48a3a0bf4bbb93945c2aa68c9980 01-Apr-2016 Mitchell Wills <mwills@google.com> Move single scan blaming from WifiStateMachine to WifiScanningService

Bug: 27247460
Change-Id: Id855329450659b8b762fcb0bf9dba5a0b551604e
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
636554df55de123eea8d5951137cb477ccfd17a3 08-Apr-2016 Etan Cohen <etancohen@google.com> [NAN] Add master switch to enable/disable usage of NAN APIs.
am: 1b1f9b6

* commit '1b1f9b669d91b62c2b8c5572d4de87ef3fd79e42':
[NAN] Add master switch to enable/disable usage of NAN APIs.

Change-Id: I4639a8d69b3a3989f1af041194b24bb452ac1005
78bfa19f8eb5f8e05f72b831b6629d07ec6909e1 08-Apr-2016 Samuel Tan <samueltan@google.com> WifiConfigManager: remove unused fields

Remove unused fields from WifiConfigManager.

BUG: 28084272
Change-Id: If6e316693d42ddd6914ac9b1c4d7cdf044c66b5a
TEST: 'runtest frameworks-wifi' passes.
ndroid/server/wifi/WifiConfigManager.java
d6186e122589825b2d128595366f030744984d63 07-Apr-2016 Etan Cohen <etancohen@google.com> Update mock AlarmManager to handle setExact method. [DO NOT MERGE]

Required in order to correctly handle testing with WakeupMessage.

Change-Id: Ibe8ae3aa97485135d6102ea349c83f503144df77
ndroid/server/wifi/nan/WifiNanStateManager.java
1b1f9b669d91b62c2b8c5572d4de87ef3fd79e42 23-Mar-2016 Etan Cohen <etancohen@google.com> [NAN] Add master switch to enable/disable usage of NAN APIs.

Add master switch to enable/disable usage of NAN. Tie into Wi-Fi
state machine (to enable/disable based on Wi-Fi enable/disable).
Dispatch broadcasts when NAN status changes.

Bug: 27698011
Bug: 27692829
Change-Id: Ic4789ba7afd280ebcaa6d6bfdc5917ef0875983b
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
ac69b83c9cafb9a839b578c3b5b71eb3439244ad 08-Apr-2016 Samuel Tan <samueltan@google.com> WifiConfigManager: remove WifiStateMachine field

Remove the WifiStateMachine field from WifiConfigManager, since the
latter no longer calls methods of the former. Also, change calls
to the WifiConfigManager constructors to accomodate this change.

BUG: 27405059
Change-Id: I468f74259d45d9a1a61e00b987533eaa66846024
TEST: 'runtest frameworks-wifi' succeeds.
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.java
94e8f71b884e11abb8c46e69467af96f17d6423e 08-Apr-2016 Mukesh Agrawal <quiche@google.com> Merge changes from topic 'ring-buffer-size' into nyc-dev

* changes:
wifi service: use large ringbuffers in verbose mode
ByteArrayRingBuffer: add ability to resize buffer
930174d9abe89ddb275e03620f40b937b1f53dd5 06-Apr-2016 Samuel Tan <samueltan@google.com> Move wnmFrameReceived() from WifiConfigManager to WifiStateMachine

Move this method into WifiStateMachine, since it does not use
any state specific to WifiConfigManager, and removes the dependency
of WifiConfigManager on WifiStateMachine.

BUG: 27405059
Change-Id: I649dca1ba748f2ffdfa3ef6d0de014186a753d91
TEST: 'runtest frameworks-wifi' succeeds.
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.java
308a06a125932081304655cda8374ffcf0772b3c 05-Apr-2016 Samuel Tan <samueltan@google.com> Move mActiveScanDetail from WifiStateMachine to WifiConfigManager

Since |mActiveScanDetail| is only used in WifiConfigManager, move
it from WifiStateMachine to WifiConfigManager, and add a
sycnhronized setter for this variable that WifiStateMachine
can call to update it.

BUG: 27405059
Change-Id: Ic7f97157433bf0db9d5ec3d5ac93073e163c5355
TEST: 'runtest frameworks-wifi' succeeds.
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.java
06636d2de935ad5d2e8fb6483c406fe922c75ff2 05-Apr-2016 Samuel Tan <samueltan@google.com> Remove getCurrentUserId() and getCurrentUserProfiles() from
...WifiStateMachine

Move getCurrentUserId() from WifiStateMachine to WifiConfigManager,
and remove WifiStateMachine.getCurrentUserProfiles(), so that
WifiConfigManager no longer makes calls to WifiStateMachine to
perform these two tasks.

Achieve this by moving the bookkeeping for the current user ID
from WifiStateMachine to WifiConfigManager.

BUG: 27405059
Change-Id: I06a8be88f24fd81cbfe785c4304883ddc44658f8
TEST: 'runtest frameworks-wifi' succeeds.
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.java
3f2640db2e06e3de63a118315986f44c7902611c 08-Apr-2016 Samuel Tan <samueltan@google.com> WifiConfigManager: rename member and constant fields am: 73a52d3
am: 5469f10

* commit '5469f10052a89cc66c35aebfe56e492dad846b80':
WifiConfigManager: rename member and constant fields

Change-Id: I65eeff470db9c62d4af80a2c9094442dfdcaae05
8af9613d942cec54b516e47f600e9467bcd99d21 08-Apr-2016 Etan Cohen <etancohen@google.com> [NAN] Re-factor connect/config flow
am: 9864521

* commit '9864521b92325bad1d20510d99d4e967b6f3d4eb':
[NAN] Re-factor connect/config flow

Change-Id: I492fee202b76e033579be8805bf34fdbb0273c07
9864521b92325bad1d20510d99d4e967b6f3d4eb 18-Mar-2016 Etan Cohen <etancohen@google.com> [NAN] Re-factor connect/config flow

Simplify flow: configure and connect in a single call.
Prevent info leak: no longer provide configuration back to caller.

Bug: 27617910
Bug: 27553226
Bug: 27579450
Change-Id: I8ed378a28a0794940583b868c8d7ac05967c77d0
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
73a52d3336a40903965b946f6d3624a223ad5aac 07-Apr-2016 Samuel Tan <samueltan@google.com> WifiConfigManager: rename member and constant fields

Rename fields in WifiConfigManager to properly reflect that
they are members (m* prefix), and constants (all caps with
underscores). To accomodate this change, also modify uses
of these fields outside WifiConfigManager (e.g. in WifiStateMachine).

Also:
- Remove default values given to WifiConfigManager member fields
that are initialized in its constructor, since the initalization renders
the default values useless.
- Remove member fields and constants that are unused.
- Replace the "*Milli" suffix on fields with "Ms".
- Re-ordered fields in a logical manner (i.e. static, public, then
private).
- Fixed checkstyle issues.

BUG: 27300099
Change-Id: Ifaef76bc04960f12f09267a581b9a02da7c5ab5c
TEST: 'runtest frameworks-wifi' passes.
TEST: Checkstyle returns only missing javadoc errors.
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
ndroid/server/wifi/WifiScoreReport.java
ndroid/server/wifi/WifiStateMachine.java
d604bbd63d620244ef43408de10f65ead01d5026 06-Apr-2016 mukesh agrawal <quiche@google.com> wifi service: use large ringbuffers in verbose mode

When the user has chosen to enable wi-fi verbose
logging, we'd like to use larger ring buffers.

Make it so.

BUG=27578082
TEST=unit tests

Change-Id: I1e2447df2beda455cea37072e91fa0aac338bb3f
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiStateMachine.java
ca0bac5826ab430d1b765b201a609f7bc38401ee 06-Apr-2016 mukesh agrawal <quiche@google.com> ByteArrayRingBuffer: add ability to resize buffer

When verbose mode is enabled, we'd like to use
larger ring buffers. To support this, add the
ability to resize a ByteArrayRingBuffer.

BUG=27578082
TEST=unit tests

Change-Id: I976a2ec05ade3f5c2c0fe5dc50cbb391534ab241
ndroid/server/wifi/util/ByteArrayRingBuffer.java
70ce5a4cbaf5aaccd4e542e7bb87196fb4464a6e 06-Apr-2016 Glen Kuhne <kuh@google.com> Track WifiState on single scan start

Adding a call to WifiMetrics, populating the WifiSystemStateEntries when
oneshot scans are started.

BUG=27793184

Change-Id: I694c17e7b2cfde54204ec206072a1ae5f58b088b
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiScanningServiceImpl.java
9b5773d2805e8c6141ca75de272921a84941546b 07-Apr-2016 Randy Pan <zpan@google.com> Build ESS into the GScan result's Capabilities

Obtain this piece of information from the beacon and build it
into the Capabilities string.

Bug: 27810218
Change-Id: Iffa57f6e1c0997e5705da779a3693de9e3108e37
ndroid/server/wifi/util/InformationElementUtil.java
b372037df8bc39246c2c3f169bcde1d1ca200bb8 07-Apr-2016 Roshan Pius <rpius@google.com> WifiScanner: Remove pnosetting stopPno API (2/2) am: f37079e
am: d023667

* commit 'd023667327f3051b3adfe6cc2c18c882086b439f':
WifiScanner: Remove pnosetting stopPno API (2/2)

Change-Id: I6c178df11d991d3889129227a4520450e308603b
f37079e3d8f4aca3242a971cbaef732fe1b75bde 07-Apr-2016 Roshan Pius <rpius@google.com> WifiScanner: Remove pnosetting stopPno API (2/2)

BUG: 27532350
Change-Id: I291732cc693b6042ae995194094c4fec774dfbf1
ndroid/server/wifi/WifiConnectivityManager.java
70f32d0249be377aebb0c83c18204eddc2187295 07-Apr-2016 Roshan Pius <rpius@google.com> Merge "WifiNative: Remove PnoMonitor" into nyc-dev am: 1d540db
am: 3dd14e7

* commit '3dd14e7a9b4101101dd590823f36a8ea4c0a4c64':
WifiNative: Remove PnoMonitor

Change-Id: I8edeb0a4c623be57ce9dcbe8bbf11c2e3b1718e2
f97cf0ef89a77b599a6e82fa79324d47a15a45d9 07-Apr-2016 Randy Pan <zpan@google.com> Merge "Enable/disable WifiConnectivityManager at runtime" into nyc-dev am: ea7591c
am: 5e780ff

* commit '5e780ff85965cfb02707c8a30a085cae13108079':
Enable/disable WifiConnectivityManager at runtime

Change-Id: I3932d53177001835b0606949b7f6784a7d029a59
1d540dbd9ddeafc27dda51e26b0303df4a66914d 07-Apr-2016 Roshan Pius <rpius@google.com> Merge "WifiNative: Remove PnoMonitor" into nyc-dev
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
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiNative.java
466158a6669d51541ce6c5c4e04a71dad36cdb4e 01-Apr-2016 Randy Pan <zpan@google.com> Enable/disable WifiConnectivityManager at runtime

Add support to turn on and off WifiConnectivityManager at
runtime.

Bug: 27968625
Change-Id: I3583d1564a78a6db7227d2fa5a91e859cef83776
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
48833dfaec6eaddc68f8c04a7654c6d6fcc95ca2 07-Apr-2016 Randy Pan <zpan@google.com> Merge "Wifi Connectivity Manager" into nyc-dev am: 2a9dc4d
am: c2f5f1d

* commit 'c2f5f1df32a91363883eb3659a8f747623bacd04':
Wifi Connectivity Manager

Change-Id: I04dd595df394e65234e8fceb3f1c08165cd75139
2a9dc4d883484e006054433426be91c6e675754c 07-Apr-2016 Randy Pan <zpan@google.com> Merge "Wifi Connectivity Manager" into nyc-dev
84d962ec8f487f824214744498bba505a6db0c59 11-Feb-2016 Randy Pan <zpan@google.com> Wifi Connectivity Manager

Created a submodule which manages all the WiFi connectivity
related operations. It starts a scan when screen turns on/off,
WiFI gets connected/disconnected or on demand. The scan results
are passed to QNS for it to recommend a network to connect to.

Clean up the relevant logic from WifiStateMachine.

Bug: 26666366
Bug: 27227489
Bug: 27677391
Bug: 27364917
Change-Id: I65405506ff55940d0b23f1407e476bff6fce47fa
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConnectivityManager.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
cb8ab3d0a7ba84b54624cd37e59960c8e2f2990a 06-Apr-2016 Mukesh Agrawal <quiche@google.com> Merge changes from topic \'packet-fate\' into nyc-dev am: d1bd533
am: 1244678

* commit '124467850d7cd146f212f6c99e86f58bddd32f76':
WifiStateMachine: report failures to WifiLogger
WifiLogger: add support for packet fate
WifiNative: flesh out packet fate implementation
WifiNative C++: add support for packet fate
WifiNative: add infrastructure for packet fates
jni_helper: add createObjectWithArgs

Change-Id: Ic6a1d29001b5e832056fe71d3c80d59ecc5c2c81
d1bd53369b88d91968c19dd0cc288d1d2db8b3c6 06-Apr-2016 Mukesh Agrawal <quiche@google.com> Merge changes from topic 'packet-fate' into nyc-dev

* changes:
WifiStateMachine: report failures to WifiLogger
WifiLogger: add support for packet fate
WifiNative: flesh out packet fate implementation
WifiNative C++: add support for packet fate
WifiNative: add infrastructure for packet fates
jni_helper: add createObjectWithArgs
066cc9f845897357886081fbd972ab36e74ce345 01-Apr-2016 mukesh agrawal <quiche@google.com> WifiStateMachine: report failures to WifiLogger

When a connection ends in failure, report the failure
to WifiLogger. WifiLogger will then fetch packet
fates (if appropriate).

BUG=27528124
TEST=compile

Change-Id: I926902e0fbe9480920ad6d326bc61faf4f7ea33a
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/BaseWifiLogger.java
ndroid/server/wifi/WifiLogger.java
ndroid/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
ndroid/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
ndroid/server/wifi/WifiLoggerHal.java
ndroid/server/wifi/WifiNative.java
392b5e32039468c71499ab1aaccbb2b5264dad2a 06-Apr-2016 Samuel Tan <samueltan@google.com> Merge "WifiConfigStore: write configKey for legacy networks to WPA supplicant" into nyc-dev am: 1b36c74
am: a469b03

* commit 'a469b03ef80b8db8588bad2fab9e5c7171be1ab0':
WifiConfigStore: write configKey for legacy networks to WPA supplicant

Change-Id: I6125e51a287c2f15befcfc10fb125993e45f9526
1b36c74e3e037576522479ebb42b261020ccf76f 06-Apr-2016 Samuel Tan <samueltan@google.com> Merge "WifiConfigStore: write configKey for legacy networks to WPA supplicant" into nyc-dev
f60e674646fd4f62d1b54dd85fbaf07f6a4f1ac0 06-Apr-2016 Jeremy Joslin <jjoslin@google.com> Merge "Print the meteredHint in the dump." into nyc-dev am: 22ae26d
am: 9516378

* commit '9516378f5202c006c5adaa6b83d7316f0a6ffba7':
Print the meteredHint in the dump.

Change-Id: I993980a592b078037db4c8c2de378b4490f4fbf6
22ae26d04f0dd23f300a303bb316ee1e3608c23a 06-Apr-2016 Jeremy Joslin <jjoslin@google.com> Merge "Print the meteredHint in the dump." into nyc-dev
68d94988777f2484f97b087a4ffb5b4f460a0903 06-Apr-2016 Paul Jensen <pauljensen@google.com> If Internet probe is redirected, pass redirect destination to NetworkAgent.

Transport may use the redirect to make additional determination about network
state.

Bug: 25203607
Change-Id: I18e8dc074c7a3edcf589d3df2dda7fb0f8c7e5ee
ndroid/server/wifi/WifiStateMachine.java
8d629bd8bbbb2a0c055dbb2f93c556192771e921 05-Apr-2016 Jeremy Joslin <jjoslin@google.com> Print the meteredHint in the dump.

BUG: 27702356
Change-Id: I473236869a665945afb3625786c162fd09a0e8f9
ndroid/server/wifi/WifiNetworkScoreCache.java
ce518550c85765cf206479d367518b758dfdf85b 05-Apr-2016 Junda Liu <junda@google.com> Merge "Use new ICC authentication API for wifi statemachine." into nyc-dev am: 3c81a8c
am: c6e1231

* commit 'c6e12319049f3ddde9e3d594040d5a4cc9748c78':
Use new ICC authentication API for wifi statemachine.

Change-Id: I219f0843cacada59d30a5cdff7a8fa9dcda92ae4
3c81a8ca9afd89f19114e042b91fef594e68f412 05-Apr-2016 Junda Liu <junda@google.com> Merge "Use new ICC authentication API for wifi statemachine." into nyc-dev
54c51116af60689fe0457172b620be45cd9df4d2 05-Apr-2016 Erik Kline <ek@google.com> Move from on464XlatChange() to setNeighborDiscoveryOffload() am: b2040e4
am: a2b87fe

* commit 'a2b87fe46bf237c44fad84a6e644852311002b00':
Move from on464XlatChange() to setNeighborDiscoveryOffload()

Change-Id: I8c74dcaf1502068f36892dbbd1e8a41b05261e6f
b2040e483314ba96a9cbda4d1f24209006fce4d8 04-Apr-2016 Erik Kline <ek@google.com> Move from on464XlatChange() to setNeighborDiscoveryOffload()

Bug: 26238390
Change-Id: I3a343dae8143713574a95d8064f810ff87d2915a
ndroid/server/wifi/WifiStateMachine.java
c97adc03053b887a46b567ee9a35851dc54c199d 05-Apr-2016 Paul Jensen <pauljensen@google.com> Merge "Plumb WiFi multicast filter through to ApfFilter" into nyc-dev am: 78b8d2f
am: d7750dc

* commit 'd7750dcc7d3de11adca5cf3ba696dde1d5802da7':
Plumb WiFi multicast filter through to ApfFilter

Change-Id: I089a96962344357ffa31f7e877db2f22bb2b3614
78b8d2feb70093e8717e924ed41176d6d8417e60 05-Apr-2016 Paul Jensen <pauljensen@google.com> Merge "Plumb WiFi multicast filter through to ApfFilter" into nyc-dev
9b5ffdfd63416af3245a89058fde1c3ebbfb5645 01-Apr-2016 Samuel Tan <samueltan@google.com> WifiConfigStore: write configKey for legacy networks to WPA supplicant

Whenever WifiConfigStore encounters a legacy network that does not have a
configKey (i.e. its configuration was written by a pre-N version of
Android), force an update of this network by immediately writing the
computed configKey into wpa_supplicant.conf (via supplicant's SET_NETWORK
control interface method).

This will ensure that all network configurations stored in
wpa_supplicant.conf will have configKeys available for parsing.

BUG: 27962844
Change-Id: Icdcac80d1ce06a50f99556e3c451543abeb59f75
TEST: 'runtest frameworks/wifi' succeeds.
TEST: Created network config with WiFi UI, deleted its id_str in
wpa_supplicant.conf manually via adb, restarted device using
'adb reboot', read wpa_supplicant.conf again and verified
that the id_str field was restored for that network.
ndroid/server/wifi/WifiConfigStore.java
5c74fcc83b89adac0d94034726cb0aca97a74ad6 04-Apr-2016 Mitchell Wills <mwills@google.com> Defuse all bundles destined from WifiScanningService am: 720aba8
am: 3625a79

* commit '3625a79798a5284ea63827f891b1c5d519e734ba':
Defuse all bundles destined from WifiScanningService

Change-Id: I8cb30cdcf564ef238498e5cdf679c11a5a13471c
720aba804a5c7fa5e4cc92af60b129e3e0013666 01-Apr-2016 Mitchell Wills <mwills@google.com> Defuse all bundles destined from WifiScanningService

Also check for null bundles before attempting to access them

Change-Id: I2606954b0828c3bbd6d192607f112a96fae2ccf6
ndroid/server/wifi/WifiScanningServiceImpl.java
3e954f2804d376c9ca08e23c00b266c668f65e53 25-Mar-2016 Paul Jensen <pauljensen@google.com> Plumb WiFi multicast filter through to ApfFilter

Use APF to implement WifiManager.MulticastLock, if APF isn't available
fallback to the present behavior of using DRIVER RXFILTER. Since we
don't know whether APF is supported until we're connected, postpone
enabling/disabling the multicast filter until then; this should be
fine as there isn't much need to filter packets if there aren't any
packets going by since we're not connected.

Bug: 26238573
Change-Id: I96515cd99f8899aea70f99029c73816b1b172c80
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
56c6677ff45617750a6c59c82df7d7e3cabcbe70 01-Apr-2016 Ritesh Reddy <riteshr@google.com> Merge "Calling BackupManager.dataChanged for WifiNetwork Changes" into nyc-dev am: aa10749
am: fda86ca

* commit 'fda86ca08499e1b05920bce1a0aa65b8471af6c3':
Calling BackupManager.dataChanged for WifiNetwork Changes

Change-Id: I430e882a4a7222b48555078f59ea1c549a8358da
aa10749aa9063a03c6e66af336c85863949fdbb1 01-Apr-2016 Ritesh Reddy <riteshr@google.com> Merge "Calling BackupManager.dataChanged for WifiNetwork Changes" into nyc-dev
d59876c05613f3c8dbc4be31dcde41c60f757913 01-Apr-2016 Mitchell Wills <mwills@google.com> Merge "Associate work source with single scan settings" into nyc-dev am: 53be76f
am: f5db12a

* commit 'f5db12a1ef7f25b2aeffbdb2bcf37a32e954da88':
Associate work source with single scan settings

Change-Id: I9d2a69eb476efabdf66e3714accfa4c15b464536
53be76ffbda87f1e76f843332b95ad31f191341f 01-Apr-2016 Mitchell Wills <mwills@google.com> Merge "Associate work source with single scan settings" into nyc-dev
44f8fc30974fa61a5a64be81874f6002ca0368f3 31-Mar-2016 Mitchell Wills <mwills@google.com> Associate work source with single scan settings

Change-Id: I9358223b11bd80f889a6c9df9e7a1828c9cc7489
ndroid/server/wifi/WifiScanningServiceImpl.java
30bb327c76a24986949e228513b9f52f7726a44e 01-Apr-2016 Roshan Pius <rpius@google.com> WifiScanningServiceImpl: Reset HW PNO for all failure am: 0e4f6ab
am: 536c3a8

* commit '536c3a82ee8b119114fd26d1b53c1e86c90bd11d':
WifiScanningServiceImpl: Reset HW PNO for all failure

Change-Id: Idac972e365b319da963467a08c220f8d6405c49d
0e4f6ab00e1f2bd64f17302dae279c77c4cf7d8e 31-Mar-2016 Roshan Pius <rpius@google.com> WifiScanningServiceImpl: Reset HW PNO for all failure

Move the HW PNO reset functionality to the HwPnoScanState exit.
Also, move the internal client deletion there for both HwPnoScanState &
SwPnoScanState.

BUG: 27886011

Change-Id: I4e1d40ddb28862af8881bb0a9707d2ff986cbda5
ndroid/server/wifi/WifiScanningServiceImpl.java
7148d5eff20fcd61543583564acd93f23edc0706 31-Mar-2016 Samuel Tan <samueltan@google.com> WifiConfigStore: use configKey instead of SSID as unique ID in ...readNetworkVariablesFromSupplicantFile am: 2fc3d4d
am: 1c0c5c8

* commit '1c0c5c8edfdb792c8312eb71609896bdeabeee6d':
WifiConfigStore: use configKey instead of SSID as unique ID in ...readNetworkVariablesFromSupplicantFile

Change-Id: Ib16c777f56af14600cb4205ee3d3ca2b34aba81f
2fc3d4dcabb6ddcd72dc335d908aa192c38c5e5f 26-Mar-2016 Samuel Tan <samueltan@google.com> WifiConfigStore: use configKey instead of SSID as unique ID in
...readNetworkVariablesFromSupplicantFile

Use the configKey stored in the id_str field of wpa_supplicant.conf,
rather than SSID, to uniquely identify networks in
readNetworkVariablesFromSupplicantFile.

Also:
- Remove WifiConfigStore.readNetworkVariableFromSupplicantFile(),
and move the logic in that method into
WifiConfigManager.readNetworkVariableFromSupplicantFile().
- Add a helper method, WifiConfigStore.readNetworkVariablesFromReader(),
so that we can inject a test supplicant config file during testing.
- Add WifiConfigStoreTest.java, which currently only contains unit tests
for WifiConfigStore.readNetworkVariablesFromSupplicantFile().

BUG: 26733972
Change-Id: Ice2dcdae0c2e95b4df6459f75f3a98df30290256
TEST: 'runtest frameworks-wifi' succeeds.
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStore.java
4d95a93e4ccb297bac6362c572c742eed2357160 31-Mar-2016 Roshan Pius <rpius@google.com> Merge changes I18879cb1,Ic84bc39f,I8704da8f into nyc-dev am: 6874d75
am: 6082598

* commit '6082598f5f422242cb40895c2c24def8ee59ae3a':
WifiScanningServiceImpl: Create PNO state machine
WifiScanningService: Create internal clientInfo
WifiScanningService: Cleanup ClientInfo

Change-Id: I8c056819da86f2fb5f83bf76cabbf5d613cffce2
6874d75b9fa79e90e0ea75ba962a7759e702da64 31-Mar-2016 Roshan Pius <rpius@google.com> Merge changes I18879cb1,Ic84bc39f,I8704da8f into nyc-dev

* changes:
WifiScanningServiceImpl: Create PNO state machine
WifiScanningService: Create internal clientInfo
WifiScanningService: Cleanup ClientInfo
df02c34e90f0d8ed539aba65a0e90ac794ca8ae1 31-Mar-2016 Nathan Harold <nharold@google.com> Persist Wifi Verbose Logging Across Reboots am: e309b6e
am: e1616eb

* commit 'e1616eb5099769b4b92e0e192de2311b72a4c323':
Persist Wifi Verbose Logging Across Reboots

Change-Id: I77458e65bef16eafcac65b2046f3821015d496b8
5ee2476aa8320de89c47697c66e67b8c08864973 30-Mar-2016 Junda Liu <junda@google.com> Use new ICC authentication API for wifi statemachine.

The new API is cleaner and requires caller to specify authType explicitly.

Bug: b/27360179
Change-Id: I6cb732c60be8940423753415b7d3d8932db73ecc
ndroid/server/wifi/WifiStateMachine.java
e309b6ef69954273509957efb7d4de7556630600 31-Mar-2016 Nathan Harold <nharold@google.com> Persist Wifi Verbose Logging Across Reboots

-Adds Global Setting 'WIFI_VERBOSE_LOGGING_ENABLED'
-Synchronizes this property at WifiStateMachine creation and
persists the developer menu toggle across reboots

Bug: 27878903
Change-Id: I7626cc5524a786767d16d9a50b0555ded48f844f
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiStateMachine.java
c343aec32e1d3fe320eb97c527b0bcfb2d334e45 29-Mar-2016 Roshan Pius <rpius@google.com> WifiScanningServiceImpl: Create PNO state machine

Adding a PNO state machine to fetch full scan results for all types of
PNO when reporting events back to the client.

BUG: 27886011
TEST: Compiles & unit-test passes
TEST: Made changes in WifiConnectivityManager to use the scan results to
auto-connect.
Change-Id: I18879cb1bf82226e329c6076e8443e0986ddbe27
ndroid/server/wifi/WifiScanningServiceImpl.java
a91494208927643d011b4fa62db2064d9e8228c1 24-Mar-2016 Roshan Pius <rpius@google.com> WifiScanningService: Create internal clientInfo

Create a new class for keeping track of internal clients to the
WifiScanningService. This object is used to communicate between the
state machines using a valid clientInfo.
The external clients override the onReportEvent to send the events back
to the WifiScanner interface.
The internal clients override the onReportEvent to send the events to
the state machine which requested the event.

Internal Clients are going to be used by WifiChangeStateMachine and the
upcoming WifiPnoScanStateMachine to make background scan requests

BUG: 27727025
Change-Id: Ic84bc39f59890151c51ac14356e1a3183819e09d
TEST: Compiles & unit-test passes
ndroid/server/wifi/WifiScanningServiceImpl.java
19a7b07a44c1ce4cf2500d277ef31e3344868142 24-Mar-2016 Roshan Pius <rpius@google.com> WifiScanningService: Cleanup ClientInfo

Move Hotlist & WifiChange client handling away from ClientInfo
to ClientHandlerMap in their own respective state machines.
Had to refactor the WifiChange to plumb the related
message handling out of background state machine.

BUG: 27727025
BUG: 27738627
Change-Id: I8704da8fedf84dda7aface4061785d15e0086473
ndroid/server/wifi/WifiScanningServiceImpl.java
cf4940af56ade716cf845cc160cae8abd80c8027 31-Mar-2016 Jan Nordqvist <jannq@google.com> Merge "Fixed broken Hotspot 2.0 r1 provisioning." into nyc-dev am: 479d894
am: f8f63ba

* commit 'f8f63baf040ca493092e360718bb1492ec8a46dc':
Fixed broken Hotspot 2.0 r1 provisioning.

Change-Id: I6c2d636dd1d4306615727aa7b155224e253126ee
479d894ecc1087afc29529c87abbad8bf69ed172 31-Mar-2016 Jan Nordqvist <jannq@google.com> Merge "Fixed broken Hotspot 2.0 r1 provisioning." into nyc-dev
b4f344b9969857a32094c9eee97e9f5469225dca 31-Mar-2016 Roshan Pius <rpius@google.com> Merge "Fix null pointer exception in reportActivityInfo" into nyc-dev am: 84c2010
am: 0387465

* commit '038746586688825a9744df5e8e558d9fa5716c93':
Fix null pointer exception in reportActivityInfo

Change-Id: I0a8da3126fe6f15db318235b605e203f1434d4d8
dbe792f38f143d513730d4fd3412cd97f6971bcf 31-Mar-2016 Mitchell Wills <mwills@google.com> Merge "Add handling of incoming WorkSource for scans" into nyc-dev am: 0e776dd
am: e6f5201

* commit 'e6f520193c5653a61108fe6334d573df5a1ef7ad':
Add handling of incoming WorkSource for scans

Change-Id: Iaa1c82cf57ff99c3d37fe59c4e406a16e73126d2
84c201000b753297280bc12d4bd0b8221367c098 31-Mar-2016 Roshan Pius <rpius@google.com> Merge "Fix null pointer exception in reportActivityInfo" into nyc-dev
0e776ddb6de62e76c54ff32148d9d170172be308 30-Mar-2016 Mitchell Wills <mwills@google.com> Merge "Add handling of incoming WorkSource for scans" into nyc-dev
6b43f9ce53eac298459cab810812d1067d2b719a 30-Mar-2016 Mitchell Wills <mwills@google.com> Merge "Use buckets scanned field when delivering scan results" into nyc-dev am: c71fb29
am: 71ea88e

* commit '71ea88e0cb9fc80c6fa2cdda46c14bbbd8d6294a':
Use buckets scanned field when delivering scan results

Change-Id: Ia66fe98137ede3d61046f156ea15a51ad05a442c
c71fb2904e5588444ff2cbab6273661921675339 30-Mar-2016 Mitchell Wills <mwills@google.com> Merge "Use buckets scanned field when delivering scan results" into nyc-dev
9c8892ebd2ec5340785f6b787805fdc6088069d7 30-Mar-2016 Roshan Pius <rpius@google.com> Fix null pointer exception in reportActivityInfo

Fix null pointer exception when tx_timer_per_level is null.

BUG: 27924555
Change-Id: I83240a63e1163ab7888f3a0777408f3cb271bd86
ndroid/server/wifi/WifiServiceImpl.java
0ea5062316013cd4173faf16c2a0f3ecd1b9ed43 30-Mar-2016 Mitchell Wills <mwills@google.com> Add handling of incoming WorkSource for scans

Bug: 27903217
Change-Id: Ic3693e083c3ac7369465bfd6cbd4dadebe03f907
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
6b7d2b936fdaa62de093858fee8e9cd848f960d9 30-Mar-2016 Samuel Tan <samueltan@google.com> Merge "WifiNative: fix error log message typo in getNetworkExtra()" into nyc-dev am: 02a7827
am: 174a72d

* commit '174a72d2940a746b419739531b96547295f163b8':
WifiNative: fix error log message typo in getNetworkExtra()

Change-Id: Ib4bbcb10f139b39a3e07699409f397346bc3623e
02a782764421f0cccc6a9044df31f58b6558f980 30-Mar-2016 Samuel Tan <samueltan@google.com> Merge "WifiNative: fix error log message typo in getNetworkExtra()" into nyc-dev
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
ndroid/server/wifi/WifiNative.java
2972e63ea2bcddd5b17f3b784e5a855f4c15e5be 30-Mar-2016 Wei Wang <weiwa@google.com> Merge "Clean up for responder mode when client goes away." into nyc-dev am: d5d850a
am: 9304631

* commit '93046312b3e37bff177699e77c246e75b4cf6bbd':
Clean up for responder mode when client goes away.

Change-Id: I6646f76d244e578ad6e3a93110c9960c0197fac2
d5d850a6435d044f73f196715967f74ffd6f7ea3 30-Mar-2016 Wei Wang <weiwa@google.com> Merge "Clean up for responder mode when client goes away." into nyc-dev
b39039bb466eb4ab3e71da9daadeaed9d686d40f 28-Mar-2016 Wei Wang <weiwa@google.com> Clean up for responder mode when client goes away.

Bug:27878941
Change-Id: I5febde5ad3edd945b6d4b77e688581099c88bf7e
ndroid/server/wifi/RttService.java
c4f23cbd6de85cbffcd91b398e51eff106ef08d4 26-Mar-2016 Mitchell Wills <mwills@google.com> Use buckets scanned field when delivering scan results

Fixes: 27506257
Change-Id: I224b78a89dfde54ef4f3dae37f1bb10d2a12b78e
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/scanner/BackgroundScanScheduler.java
ndroid/server/wifi/scanner/ScanScheduleUtil.java
07cb876d807dd97a0dfba8f0d23c48a5cf1c51ad 29-Mar-2016 Roshan Pius <rpius@google.com> Merge changes from topic \'wifi_tx_power_levels\' into nyc-dev am: bf4982c
am: b62b1d5

* commit 'b62b1d5569e4d1e2fdd8221862810039c9c8075f':
Read new HAL tx_time_per_level structure element
Send wifi tx power levels to BatteryStats

Change-Id: I423b3baeb564ddbadfbb8e891c8a4943af35e67f
bf4982c6b1e230a3659e30eb47290e49c7034b14 29-Mar-2016 Roshan Pius <rpius@google.com> Merge changes from topic 'wifi_tx_power_levels' into nyc-dev

* changes:
Read new HAL tx_time_per_level structure element
Send wifi tx power levels to BatteryStats
08030e10fdd93b90d3433f25813e8f9cc4dbe8e5 29-Mar-2016 Rebecca Silberstein <silberst@google.com> Merge "Extend NetworkHistory to incorporate hasEverConnected" into nyc-dev am: e773752
am: 2604d39

* commit '2604d39fa38ea5491e55ec57e53e9fa23008757b':
Extend NetworkHistory to incorporate hasEverConnected

Change-Id: Ic5e862b3c9135eb70b40b9d71758c04badcf28c4
e7737522e50283ae92c5f48b3fdbd8594c6daa00 29-Mar-2016 Rebecca Silberstein <silberst@google.com> Merge "Extend NetworkHistory to incorporate hasEverConnected" into nyc-dev
7273ac356cd27be6552d67bb372507ef84fbdc92 29-Mar-2016 Lorenzo Colitti <lorenzo@google.com> Merge "Make wifi code pass through IpManager dump requests." into nyc-dev am: 0530d49
am: 3423ff1

* commit '3423ff11ba1cb1b66d9e7807d0969eee1eeec395':
Make wifi code pass through IpManager dump requests.

Change-Id: I53d16559ff2cb353c8b3f805d7151dd40652d832
0530d49a5b25e5133a175e47ba2c7a9ada1c105c 29-Mar-2016 Lorenzo Colitti <lorenzo@google.com> Merge "Make wifi code pass through IpManager dump requests." into nyc-dev
ee231ab154854e93fa4d29d4841cd81ffa632232 29-Mar-2016 Roshan Pius <rpius@google.com> WifiScanningService: Remove |pnoSettings| in stopPno am: 476172f
am: a284ee1

* commit 'a284ee1da262a1adf0442c8fbc09cf898a82c371':
WifiScanningService: Remove |pnoSettings| in stopPno

Change-Id: If6854d8757cf567bdaca9431a1730dafa7a747c3
173295d91c7e9596c1dc92a9f18671401ab97407 29-Mar-2016 Roshan Pius <rpius@google.com> SupplicantWifiScannerImpl: Add Pno Debouncer am: e7ba296
am: 271f987

* commit '271f987a1f9dd41446ab61fc4f497629604d5e0e':
SupplicantWifiScannerImpl: Add Pno Debouncer

Change-Id: I04f6d2e09d226d628d22fd852522ae3bfe82a2da
670a7b06ce91b436b4b4b8d90f4aba20abe577cb 29-Mar-2016 Roshan Pius <rpius@google.com> Merge "Turn off HAL ePNO" into nyc-dev am: 36bb654
am: a6e36d0

* commit 'a6e36d0403393e0339153cdc84617ae3a608e9ac':
Turn off HAL ePNO
78fe68a487f0d61c8acbdd2f66b05d1e54cf0af5 29-Mar-2016 Glen Kuhne <kuh@google.com> Track WifiState in WifiMetrics am: ea6fdf9
am: b50cd7a

* commit 'b50cd7a807df0cca47c692b1733d64ed3700d832':
Track WifiState in WifiMetrics
476172f2eef83ff367fae4344eda8129ea9d16f7 23-Mar-2016 Roshan Pius <rpius@google.com> WifiScanningService: Remove |pnoSettings| in stopPno

Remove the |pnoSettings| param for stopPno requests. We added this param
to revert network priorities in supplicant after PNO. But, because we
have disabled all auto-connect in wpa_supplicant having the wrong
priorities is irrelevant now.

Note: Will add a follow up CL to remove it from the WifiScanner
interface.

BUG: 27532350
Change-Id: I8bc4102b7e45699152a2ee0f816d65738b8531fa
TEST: Compiles & unit test passes
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiScannerImpl.java
ndroid/server/wifi/WifiScanningServiceImpl.java
e7ba2963bedf426a1d8ba09ab535260ef364512b 23-Mar-2016 Roshan Pius <rpius@google.com> SupplicantWifiScannerImpl: Add Pno Debouncer

Add the PNO debouncer class for PNO scan request debouncing. We debounce
all PNO scan/stop requests for 5 seconds. Pno pause bypasses this
debounce logic so that we can immediately schedule the
single/background scan after stopping the PNO scan.

BUG: 27677054
Change-Id: Ibafeb936e30c9c6c1b23a39d9ed08b23a5f72030
TEST: Compiles & unit test passes
ndroid/server/wifi/SupplicantWifiScannerImpl.java
36bb65444a73ee94fa20207549e451bcb85adfe5 28-Mar-2016 Roshan Pius <rpius@google.com> Merge "Turn off HAL ePNO" into nyc-dev
6552fb836f7ee130c53f15865bb4f666c7d8a01e 28-Mar-2016 Roshan Pius <rpius@google.com> Turn off HAL ePNO

BUG: 27877781
Change-Id: I72cfc491e25b7a163feaf722428a1ebeece32ce1
ndroid/server/wifi/HalWifiScannerImpl.java
11b4c4c3c813237826117270741c63faa0d312aa 26-Mar-2016 Rebecca Silberstein <silberst@google.com> Extend NetworkHistory to incorporate hasEverConnected

Add boolean to NetworkHistory (tracked in
WifiConfiguration.NetworkSelectionStatus) to track if we have ever
connected to the given network with the current configuration.

BUG: 27856504
Change-Id: I5f858afe3128fbc7293b15f8b95892da7cae171e
ndroid/server/wifi/WifiNetworkHistory.java
ea6fdf9a58f8ee83fba32c221331f10f9ec941e9 24-Mar-2016 Glen Kuhne <kuh@google.com> Track WifiState in WifiMetrics

Added a WifiState tracking member to WifiMetrics. It is now logged in
memory for each ConnectionEvent, and printed in the human readable
metrics dump.
The intention of this is to support WifiSystemScanEntry counts (will be
implemented in/after the Scanning Metrics CL)
Achieved this by tracking entering and exiting of the ConnectMode &
L2Connected states in WifiStateMachine.

BUG=27793184

Change-Id: Iba1ab974cc4e7b9d1a2d8d8185ee5c90da6da151
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiStateMachine.java
639c32e2bb3ef8ec4bb1f3dd0bfe6c2caaf639c9 28-Mar-2016 Erik Kline <ek@google.com> Change one instance of StringBuilder to TextUtils.join() am: ef7053e
am: 744263c

* commit '744263cb39e585353556fcff86d30742adb34750':
Change one instance of StringBuilder to TextUtils.join()
675de6070a3c1980fcc99bc6863b2689bfeb0271 28-Mar-2016 Lorenzo Colitti <lorenzo@google.com> Make wifi code pass through IpManager dump requests.

"adb shell dumpsys wifi ipmanager <args>" is now passed along
to IpManager.

Bug: 26991160
Change-Id: Ib84b2003719075416c71998477e8189072eb4480
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ef7053e8dc65c0a9d4f98a6e40f5061a9be3c139 28-Mar-2016 Erik Kline <ek@google.com> Change one instance of StringBuilder to TextUtils.join()

Change-Id: I15e608d2a36464b420af585687db5edaad0719a9
ndroid/server/wifi/WifiStateMachine.java
15d25eaf7b2088207b5a83c84369878fbd203515 28-Mar-2016 Paul Stewart <pstew@google.com> Merge "WifiStateMachine: Send NetworkStateChangedBroadcast on IPv4 config" into nyc-dev am: 94ec2aa
am: 1ddc3bd

* commit '1ddc3bd68c79dcb61acbcb64de915830c0017ecb':
WifiStateMachine: Send NetworkStateChangedBroadcast on IPv4 config
94ec2aa5ee673e03b270ffa9e7f86bf9e0d6d5b4 28-Mar-2016 Paul Stewart <pstew@google.com> Merge "WifiStateMachine: Send NetworkStateChangedBroadcast on IPv4 config" into nyc-dev
a3ab3849a6777c9cd932934747dc18a3c6adfa62 28-Mar-2016 Erik Kline <ek@google.com> Relay the metered hint to network capabilities am: 8139a14
am: e3c8fa7

* commit 'e3c8fa73a1fe67a21d82501885c390f931524b3d':
Relay the metered hint to network capabilities
8139a142bd2a30a85a093d7012d0ee84df077995 25-Mar-2016 Erik Kline <ek@google.com> Relay the metered hint to network capabilities

Also: mWifiInfo is effectively final. Make it so and remove
useless null checks.

Bug: 26241591
Change-Id: I224e0717a4a00466ae61317e20d09724ab10e684
ndroid/server/wifi/WifiStateMachine.java
57fea5a63673ba30558ae83dd09b42f4b573ced3 25-Mar-2016 Rebecca Silberstein <silberst@google.com> Merge "Fix checkstyle issues in ScanDetail and ScanDetailCache" into nyc-dev am: 96d42c4
am: eddf5f1

* commit 'eddf5f12c87b3564e1ae3383684588055e3e04d2':
Fix checkstyle issues in ScanDetail and ScanDetailCache
96d42c4198ca91a5a24af3ec6da41715dc08e4aa 25-Mar-2016 Rebecca Silberstein <silberst@google.com> Merge "Fix checkstyle issues in ScanDetail and ScanDetailCache" into nyc-dev
d9f185e759f0040686630958796fa6c41a8e51a8 25-Mar-2016 Mitchell Wills <mwills@google.com> Merge "Pass buckets scanned from HAL to framework" into nyc-dev am: aa575d8
am: cd112c7

* commit 'cd112c733f574ee94d6007f57614f928dc8bd811':
Pass buckets scanned from HAL to framework
918b16e8f269b2c69c241062d85c3641e958c3dd 25-Mar-2016 Glen Kuhne <kuh@google.com> Merge "Add scanning into WifiMetrics" into nyc-dev am: b9cc92f
am: 78c4410

* commit '78c4410c0d636e8f23fe512feae900bd7c55722b':
Add scanning into WifiMetrics
aa575d82dcc01cb213402923796c870ecdd45b28 25-Mar-2016 Mitchell Wills <mwills@google.com> Merge "Pass buckets scanned from HAL to framework" into nyc-dev
b9cc92f3325f8bb08bf7eb1e1fd25d40cfe43604 25-Mar-2016 Glen Kuhne <kuh@google.com> Merge "Add scanning into WifiMetrics" into nyc-dev
f9a1021e7176df86fa93d56acd64b0e4aa3c335b 25-Mar-2016 Paul Jensen <pauljensen@google.com> Merge "Move ApfFilter from ConnectivityService to IpManager" into nyc-dev am: 20047f1
am: 5762d63

* commit '5762d6364c64379172dc2bdaddd4f3f11e189965':
Move ApfFilter from ConnectivityService to IpManager
20047f18a7cccdc279d480916308f612c5cbb63e 25-Mar-2016 Paul Jensen <pauljensen@google.com> Merge "Move ApfFilter from ConnectivityService to IpManager" into nyc-dev
9cef0b96fd275dede1571b55feed636621717d3b 25-Mar-2016 Jan Nordqvist <jannq@google.com> Fixed broken Hotspot 2.0 r1 provisioning.

Bug=27698600

Change-Id: If398e2388ed8abac746833ea2ae5bef90c1fa2da
ndroid/server/wifi/configparse/ConfigBuilder.java
ff21cf2ed3aa7e71056ec68ce2c14eba22ef4b28 24-Mar-2016 Rebecca Silberstein <silberst@google.com> Fix checkstyle issues in ScanDetail and ScanDetailCache

Remove extra comments and fix unused import.

BUG: 27836797
Change-Id: I1b43dbafb94de2d5dea5b660e3ee9417300261c1
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/ScanDetailCache.java
c2c2648141e6190d85601ee8a6a1d0034e7ff927 11-Mar-2016 Glen Kuhne <kuh@google.com> Add scanning into WifiMetrics

Added calls to WifiMetrics to increment various scanning metrics, in the
Single & Background - ScanStateMachine's.
Added expected metrics value checks to existing unit tests.

BUG=25691077

Change-Id: I7c335d829876f6b31220571bb4330b7b30f4cc0e
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiScanningService.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
3aa6b1091f0405bd27545f6f58524993bce37ec8 24-Mar-2016 Samuel Tan <samueltan@google.com> Merge "WifiNative: improve documentation for getRawScanResults()" into nyc-dev am: 0e67c34
am: 2054470

* commit '205447077e5dae759105fb65de54d6b5cbe095dd':
WifiNative: improve documentation for getRawScanResults()
0e67c341974310405230e2fd761395296f15d5c1 24-Mar-2016 Samuel Tan <samueltan@google.com> Merge "WifiNative: improve documentation for getRawScanResults()" into nyc-dev
9fd1cc506f98eb606709ff82f502b1e151e0ecac 24-Mar-2016 Jeremy Joslin <jjoslin@google.com> Merge "Allow ephemeral WiFi conns to be marked as metered" into nyc-dev am: cba3f6e
am: fee9af2

* commit 'fee9af2bd939c7b42dcce055bfa24bf988665c3e':
Allow ephemeral WiFi conns to be marked as metered
cba3f6e3c7466c8cc76d5642c6f90970f42b314f 24-Mar-2016 Jeremy Joslin <jjoslin@google.com> Merge "Allow ephemeral WiFi conns to be marked as metered" into nyc-dev
c253e7238c63a7d7e6a065c84ca76ce5635d9323 24-Mar-2016 Glen Kuhne <kuh@google.com> Merge "Add more synchronization to WifiMetrics" into nyc-dev am: 6b6fc37
am: c8a3fdb

* commit 'c8a3fdbd5a7a8c03c7d31d087a401bf68b27adcd':
Add more synchronization to WifiMetrics
6b6fc371d3355f4e1eb44f7635d3b7187e3dce06 24-Mar-2016 Glen Kuhne <kuh@google.com> Merge "Add more synchronization to WifiMetrics" into nyc-dev
b0ffeb4fc94089a68dafcf2b0bdf43b6185531da 24-Mar-2016 Randy Pan <zpan@google.com> Merge "Fix ephemeral network Wifi configuration" into nyc-dev am: 544f4cf
am: 5b6c4c3

* commit '5b6c4c3bed71ca45135c8cabd3fe44de52fb577f':
Fix ephemeral network Wifi configuration
544f4cf36568caba965bf7b456f88b16c733c517 24-Mar-2016 Randy Pan <zpan@google.com> Merge "Fix ephemeral network Wifi configuration" 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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
3ab8ec5cfa986b07e1c948af0f45bd333edef24c 21-Mar-2016 Jeremy Joslin <jjoslin@google.com> Allow ephemeral WiFi conns to be marked as metered

Pass through the metered hint from the score cache to the
WifiStateMachine when making an ephemeral connection. The
NetworkPolicyManagerService already looks for the hint after
every NETWORK_STATE_CHANGED_ACTION and takes the correct action.

BUG: 27120794
Change-Id: I3d4a5030724e8e0fb1084c67d74fb768bd9ad2b5
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiNetworkHistory.java
ndroid/server/wifi/WifiNetworkScoreCache.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
ndroid/server/wifi/WifiStateMachine.java
edd5965fe720b148315744fc0694352fb0a2265d 24-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Revert "Remove hardcoded \'wlan0\' from native WiFi code"" into nyc-dev am: 8e66cfa
am: 2487845

* commit '248784527cdfd339e8ee1088a5be32e977b0cb6c':
Revert "Remove hardcoded 'wlan0' from native WiFi code"
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
ndroid/server/wifi/WifiNative.java
ebd663ff7027bbf19c4a5ed2bfb71b91bb925cd6 24-Mar-2016 Glen Kuhne <kuh@google.com> Add more synchronization to WifiMetrics

Added synchronization that was missing from some public methods.

BUG=27792729

Change-Id: I71f94a7005e2789df0eed14176329d2a3158d52f
ndroid/server/wifi/WifiMetrics.java
37cc4a769e6a2b81f3b99941187cdfd95fc6f713 23-Mar-2016 Randy Pan <zpan@google.com> Fix ephemeral network Wifi configuration

Build ephemeral network Wifi Configuration's key managment
protocol properly from the scan results.

Bug: 27577494
Change-Id: Iec142a4cad64546f4a95c3ab270affd355469ff9
ndroid/server/wifi/WifiConfigManager.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
ndroid/server/wifi/WifiNative.java
6aef164ec62a76ab952e7a29975793bb6254411d 23-Mar-2016 Paul Stewart <pstew@google.com> Merge "WifiNotificationController: Take a looper" into nyc-dev am: 3b47940
am: cb8438f

* commit 'cb8438fc62f455f6ad6b6011b1a715f862ba312a':
WifiNotificationController: Take a looper
3b479405c66fd65c2ac9d88dcdae936cf8477e3a 23-Mar-2016 Paul Stewart <pstew@google.com> Merge "WifiNotificationController: Take a looper" into nyc-dev
dc6f74652737522adde93849bdc3d28214fc0503 23-Mar-2016 Glen Kuhne <kuh@google.com> Merge "Fix Roaming between Dual-Band SSIDs on same router" into nyc-dev am: baef64d
am: caba932

* commit 'caba9322e81bdd2dc8264c73f3fd8c8a9c1526cc':
Fix Roaming between Dual-Band SSIDs on same router
baef64ddbe4660f95a51db4e1527d3ff3e0d9628 23-Mar-2016 Glen Kuhne <kuh@google.com> Merge "Fix Roaming between Dual-Band SSIDs on same router" into nyc-dev
00f9ea19bf4acfc185b3106b05b74e92334a0bd8 23-Mar-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Write ipconfig.txt for new configs" into nyc-dev am: 1651f1b
am: d69f094

* commit 'd69f09473b918341f48b906014fa891abece6161':
WifiConfigManager: Write ipconfig.txt for new configs
1651f1bcd0e843b1806e3f0f30983345a9fd6faf 23-Mar-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Write ipconfig.txt for new configs" into nyc-dev
3aa29358465d613a13b7edb2d5c5a55d058d2f4a 23-Mar-2016 Mitchell Wills <mwills@google.com> Move scan filtering to a common utility class am: 4e54617
am: 94b3a7d

* commit '94b3a7d53d72c0b38ed91d17cdbab226ce6a880f':
Move scan filtering to a common utility class
34264d1e6beb9c092a0490667eb9f0a7f6793ca2 23-Mar-2016 Roshan Pius <rpius@google.com> Merge changes Ia15900d4,I4e82007c into nyc-dev am: adad2ba
am: 76737b5

* commit '76737b547623189b168bfef71edf22e1c1ff269d':
WifiScanningServiceImpl: Sw PNO scans
WifiScanningServiceImpl: Refactor background scans
c9e6069eb941d282af213dc20b171877db6b567b 23-Mar-2016 Mitchell Wills <mwills@google.com> Pass buckets scanned from HAL to framework

Bug: 27506257
Change-Id: Ia57327e265317fd0d1ce09d238d9c1e9c55bf2b1
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/scanner/BackgroundScanScheduler.java
4e54617758f86acef751bc8588257a58ed985b0f 22-Mar-2016 Mitchell Wills <mwills@google.com> Move scan filtering to a common utility class

This way single scans don't depend on the background scan scheduler

Bug: 27506257
Change-Id: I7130302b364cc86e3a8f1cd0a168e0068c29953b
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/scanner/BackgroundScanScheduler.java
ndroid/server/wifi/scanner/ScanScheduleUtil.java
adad2ba52d44119ad20efffb04ec0a70459e7113 23-Mar-2016 Roshan Pius <rpius@google.com> Merge changes Ia15900d4,I4e82007c into nyc-dev

* changes:
WifiScanningServiceImpl: Sw PNO scans
WifiScanningServiceImpl: Refactor background scans
40abf54c81c5624641543d86e1d7ab21ebe30175 08-Mar-2016 Paul Stewart <pstew@google.com> WifiNotificationController: Take a looper

This CL adds a Looper argument to the WifiNotificationController
constructor, so its Handler can be initialized with a specific
looper instead of relying on the default.

Bug: 27545448
Test: runtest frameworks-wifi \
-c 'com.android.server.wifi.WifiNotificationControllerTest' \
-m 'verifyNotificationDisplayed'

Change-Id: I33fb221ddfead0b24d98bd23c92c0226ff3c6a1d
ndroid/server/wifi/WifiNotificationController.java
ndroid/server/wifi/WifiServiceImpl.java
ece2028c7c47d3bf1955615aae880b0962eea344 22-Mar-2016 Mitchell Wills <mwills@google.com> Merge "Make sure to cleanup when timing out from a single scan" into nyc-dev am: 24fd519
am: e5db370

* commit 'e5db37064ee246809ab3e381555b5b7a08b3d023':
Make sure to cleanup when timing out from a single scan
24fd5197092ef8a143edcb11dac3383483aa0650 22-Mar-2016 Mitchell Wills <mwills@google.com> Merge "Make sure to cleanup when timing out from a single scan" into nyc-dev
f7d10dc6142cb47f8bd448f8d96a465b09d3ee08 22-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Remove hardcoded \'p2p0\' from WifiNative" into nyc-dev am: 05762a3
am: 11f8bc7

* commit '11f8bc7abd33dd8b25361070013d5a1d42522834':
Remove hardcoded 'p2p0' from WifiNative
05762a3d4a5e88727cbf2818c67d84d0f9ca9a82 22-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Remove hardcoded 'p2p0' from WifiNative" into nyc-dev
75302157532714bd33de8e93c4d6bd47c7f4d57b 22-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Remove hardcoded \'wlan0\' from native WiFi code" into nyc-dev am: 1b14e76
am: 1ca27e4

* commit '1ca27e43318485659d68d6f6f267555354540ba2':
Remove hardcoded 'wlan0' from native WiFi code
1b14e7606da9c3a1a0636279875018ece7f4aa74 22-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Remove hardcoded 'wlan0' from native WiFi code" 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
ndroid/server/wifi/WifiNative.java
6c5018cef1eb7acbcfa7fc6c9b7c018bab7ba7ba 18-Mar-2016 Roshan Pius <rpius@google.com> WifiScanningServiceImpl: Sw PNO scans

Moving the implementation of SW PNO scans from SupplicantScanner to
WifiScanningServiceImpl.

WifiScanningServiceImpl checks is HW PNO is supported by the
scanner implementation:
a) if false it manually schedules a background scan and
converts all background scan results to PNO results.
b) if true, it lets the scanner implementation handle the PNO scans.

BUG: 27742823
Change-Id: Ia15900d402ba005d11251931b39bf30b8d21a02c
TEST: Compiles & unit-test passes
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiScannerImpl.java
ndroid/server/wifi/WifiScanningServiceImpl.java
80640ff4d13e252f0a5637ec16ca2d626070e751 18-Mar-2016 Roshan Pius <rpius@google.com> WifiScanningServiceImpl: Refactor background scans

Refactor the background scan handling to be similar to single scan state
machine and remove the nested layers of logic it uses now.

While there,
Remove the |reportPeriodChanged| functionality which doesn't seem to be
used anymore.

BUG: 27738627
TEST: Compiles & unit-test passes
Change-Id: I4e82007cb316b48e260ab6d80ceedd0c6120fd5b
ndroid/server/wifi/WifiScanningServiceImpl.java
cc018db319baff34c9d36928d04c2c420257498f 22-Mar-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Write ipconfig.txt for new configs

We need to write the ipconfig.txt file for all new config additions.
The |writeIpAndProxyConfigurationsOnChange| method is modified to force
update the ipconfig.txt for new networks.
While there,
1. Move the log indicating that we're updating ipconfig.txt to the place
where we actually update the file.
2. Remove the redundant config change update broadcast from
|writeIpAndProxyConfigurationsOnChange|. This is anyway being done in
saveNetwork & addOrUpdateNetwork.

BUG: 27697450
Change-Id: Ie2b8d51ed218ac8809a726ca169f2e61ef185593
TEST: Verified that the ipconfig.txt is written for new configs.
ndroid/server/wifi/WifiConfigManager.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
ndroid/server/wifi/WifiNative.java
0aa6a1db3be3619a6a134ece07d8476aa17c4bc6 22-Mar-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Update network metadata" into nyc-dev am: 1cba41b
am: 0c20296

* commit '0c20296d8094cb390148d4c4dfdf309af8ff8dcf':
WifiConfigManager: Update network metadata
1cba41b5c3a5d96f3f10596afef6159caaff97e4 22-Mar-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Update network metadata" into nyc-dev
0f179857cae968ee9a5bdae47a4ec914dea08f1d 21-Mar-2016 Glen Kuhne <kuh@google.com> Fix Roaming between Dual-Band SSIDs on same router

Fixed CMD_AUTO_ROAM so that it actually uses the network ID & associated
config of the target, rather than always assuming roams are to the same
networkID & config as the previous connection.

BUG=27358522

Change-Id: I3ec6fae9cb45cd62a7afc8d48ac5a0b29d93f87c
ndroid/server/wifi/WifiStateMachine.java
08c939fa7f1fcd666a3076b6921864b4bf70308f 21-Mar-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Update network metadata

The configkey saved for new networks may change after we save the
network. This is because some of the default values are not specified
when saving the network to supplicant, but these values are filled when
reading the config back from supplicant.
The configKey which depends on the |authAlgorithms| field needs to be
updated after all of these default values are read.

BUG: 27756946
TEST: Compiles & unit-test passes
TEST: Manually executed the failing test in the above bug and verified
that it passes now.

Change-Id: Ia568a2804f69697a8342e666d2ec3b269dbc9922
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStore.java
b7eeebf3eb085feadc135207c459a4c496298e46 22-Mar-2016 Lorenzo Colitti <lorenzo@google.com> Merge "Don\'t call NetworkUtils.resetConnections." into nyc-dev am: 3ad0bff
am: 6a2997c

* commit '6a2997c33e2280657df12c5ed214fa88907f6204':
Don't call NetworkUtils.resetConnections.
3ad0bffcb0b535dcba434ec83f0adab80ce524f0 22-Mar-2016 Lorenzo Colitti <lorenzo@google.com> Merge "Don't call NetworkUtils.resetConnections." into nyc-dev
443e7052b1b229d062424ec890beb24322223236 21-Mar-2016 Lorenzo Colitti <lorenzo@google.com> Don't call NetworkUtils.resetConnections.

Netd already closes all TCP connections when IP addresses are
removed, which happens two lines before this call.

Bug: 26976388
Change-Id: Ie1b8833142db5ab319b769283ff013ad3942cb94
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
9d0c558cab7c80a572a32ae70d501df15367fd5f 21-Mar-2016 Mitchell Wills <mwills@google.com> Make sure to cleanup when timing out from a single scan

Also fix general failure cases

Bug: 26095183
Change-Id: I88433ff77c0adb4073350ae7a4746b5ee4da5033
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiScanningServiceImpl.java
0ca00b5ea4c63011e97d127ced843dbbffc0ec71 21-Mar-2016 Paul Stewart <pstew@google.com> WifiStateMachine: Send NetworkStateChangedBroadcast on IPv4 config

Since handleIPv4Success modifies mWifiInfo and
sendNetworkStateChangeBroadcast reports mWifiInfo, it follows that
a new broadcast should be sent when CMD_IPV4_PROVISIONING_SUCCESS
is handled.

Bug: 27659510

Change-Id: Ib579ffc4809ce9a4b07bd45cdeaafe87167ecaae
ndroid/server/wifi/WifiStateMachine.java
900761547055cc5fc93947f85e4c4ac27a14c1e6 21-Mar-2016 Mitchell Wills <mwills@google.com> Report capabilities for background scans for supplicant impl am: 5ed4336
am: e2fee0e

* commit 'e2fee0e206621139866cd695c304b4a978766205':
Report capabilities for background scans for supplicant impl
5ed43368643dab64c83bfb15e14ab59d63645c6f 21-Mar-2016 Mitchell Wills <mwills@google.com> Report capabilities for background scans for supplicant impl

Bug: 25744874

Change-Id: I68645178f5f63e534c479d0712b40be0dcde5a1e
ndroid/server/wifi/SupplicantWifiScannerImpl.java
a01e1060ca977ab68d74ca41cfb192574f0c0f56 18-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Use boolean instead of int parameter for toggleInterface()" into nyc-dev am: 1b662db
am: a90ed4a

* commit 'a90ed4a9c4526656f5a8a772392144fde0105b79':
Use boolean instead of int parameter for toggleInterface()
1b662dbe559e74179ddcb86a02baa74a0a85b3ce 18-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Use boolean instead of int parameter for toggleInterface()" into nyc-dev
1407831b9aeb6740ce3cd1167c22f837609e4ce7 18-Mar-2016 Glen Kuhne <kuh@google.com> Merge "Remove SupplicantStateTracker dependency on WSM" into nyc-dev am: b96a269
am: 72e0073

* commit '72e0073c1ee57e6c0c25572de904bad35f34abc0':
Remove SupplicantStateTracker dependency on WSM
b96a2696678dedf52bdaf97f41c7d8b76dfa561e 18-Mar-2016 Glen Kuhne <kuh@google.com> Merge "Remove SupplicantStateTracker dependency on WSM" into nyc-dev
8aa102d4d4d5ad00f8ac0a2a680397a0c0e20487 18-Mar-2016 Sunil Dutt <usdutt@codeaurora.org> Merge "Reduce the link de-bounce time to 4 from earlier 7 seconds" into nyc-dev am: bb777ad
am: 322cc06

* commit '322cc06438074b69f2fdb920f517fa5ce1e5670c':
Reduce the link de-bounce time to 4 from earlier 7 seconds
bb777ad459f2bb638cddf9268cd1818763a4b39a 18-Mar-2016 Paul Stewart <pstew@google.com> Merge "Reduce the link de-bounce time to 4 from earlier 7 seconds" into nyc-dev
c351510d48d7cdf57dd6cabdd51a3627ae3d1d94 18-Mar-2016 Mitchell Wills <mwills@google.com> Merge "Fix WifiController handling of emergency call mode" into nyc-dev am: c69afb4
am: 89786c9

* commit '89786c91b461f3f846e9e8ef64a0806deabdbed8':
Fix WifiController handling of emergency call mode
c69afb4ac905dd77e1c707c27d0a0c15deb92d1a 18-Mar-2016 Mitchell Wills <mwills@google.com> Merge "Fix WifiController handling of emergency call mode" into nyc-dev
5cd239b0d3d11ccc814ddc4d74e07ca2254e0c37 18-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Fixed \'Remove ill-defined WifiNative::getInterfaces()\'" into nyc-dev am: e0f9895
am: bbe0cb1

* commit 'bbe0cb165ce81442a7eef4a0edc5c71bb8f633cb':
Fixed 'Remove ill-defined WifiNative::getInterfaces()'
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
e0f989563233faa6873a80f803d087f4d5f2af8c 18-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Fixed 'Remove ill-defined WifiNative::getInterfaces()'" into nyc-dev
b1b1211b3477e306a8626e7e6cf2d2aae7983396 18-Mar-2016 Mitchell Wills <mwills@google.com> Fix WifiController handling of emergency call mode

Fixes: 27724263
Change-Id: If6f6456cbe2419999cd3d26549a7904482b0af27
ndroid/server/wifi/WifiController.java
41b5d9f87804f27eb6822822fa634b2fefde954e 18-Mar-2016 Roshan Pius <rpius@google.com> SupplicantWifiScanner: Connected Pno bug fixes am: 2c9840a
am: 710871d

* commit '710871ddf3eaa3ef0fa7f4b5dd0a179bf69774aa':
SupplicantWifiScanner: Connected Pno bug fixes
2c9840a1063fd74eae131260fda2841566fc6d62 18-Mar-2016 Roshan Pius <rpius@google.com> SupplicantWifiScanner: Connected Pno bug fixes

Missed a |isHwPnoScanRequired| check in couple of places.

Found during manual testing on Shamu with WifiConnectivityManager and
setting the HAL ePNO flag to false in HalWifiScanner.

While there,
Log |isConnected| flag in PNO scan requests

BUG: 27525899
Change-Id: I0830db7e629e7463c0e5cd3e1a12c7e6df8e6927
TEST: Compiles & unit-test passes
TEST: Manual testing on shamu
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiScanningServiceImpl.java
cf9e3df60fbb4d77883c55b8054f9efb0869f834 18-Mar-2016 Roshan Pius <rpius@google.com> SupplicantScannerImpl: Support connected PNO scan am: dcd877d
am: 6747921

* commit '67479212b3536bd12f8e895f52c59653bd400832':
SupplicantScannerImpl: Support connected PNO scan
636a19a79ee98f3c4ee3d3c462c791aea8e75107 18-Mar-2016 Roshan Pius <rpius@google.com> WifiScanningServiceImpl: Log scan requests and callbacks am: 17ada7f
am: 2539cc2

* commit '2539cc2a22266914aec31e2da2092be2627e908f':
WifiScanningServiceImpl: Log scan requests and callbacks
54c9cf8d299b99f8b999bc2cf4adcda1eba81469 18-Mar-2016 Glen Kuhne <kuh@google.com> Remove SupplicantStateTracker dependency on WSM

Removed the SST's dependency on WifiStateMachine, since it doesn't use
it for anything.

BUG=27725788

Change-Id: I209056f8ecc9fe73d184718b86a0b8442e3950ea
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/SupplicantStateTracker.java
ndroid/server/wifi/WifiStateMachine.java
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
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScannerImpl.java
ndroid/server/wifi/WifiScanningServiceImpl.java
17ada7f5241dfbc44eecc6db43105709f2dbf04f 17-Mar-2016 Roshan Pius <rpius@google.com> WifiScanningServiceImpl: Log scan requests and callbacks

Add local logs for all scan requests and results callbacks
sent to clients. This help us keep track of start/end of
scan requests.

BUG: 27719172

Change-Id: Ie0c5573f4c1f3d44ad7d1f1e17add5b8a7063532
ndroid/server/wifi/WifiScanningServiceImpl.java
a90722a6bef2da2a9a43ddf2f408ec5511d0c949 18-Mar-2016 Mitchell Wills <mwills@google.com> Merge "Merge MultiClientScheduler and WifiScanningScheduler" into nyc-dev am: 71466f8
am: 3021ad5

* commit '3021ad52a7554234140d0cc46a02ef33bfa4ada5':
Merge MultiClientScheduler and WifiScanningScheduler
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
71466f8b3cccbc46abad4f5b2d710fb22ce886cb 18-Mar-2016 Mitchell Wills <mwills@google.com> Merge "Merge MultiClientScheduler and WifiScanningScheduler" into nyc-dev
53c434a9f5ebdcd169d1bf2cfccbb577ea79c6af 17-Mar-2016 Rebecca Silberstein <silberst@google.com> Merge "Revert "Remove ill-defined WifiNative::getInterfaces()"" into nyc-dev am: a24cf11
am: 9ad5178

* commit '9ad5178119792746825b620b05600ae20b148dc2':
Revert "Remove ill-defined WifiNative::getInterfaces()"
a807bac48d54542546dcab15d360ad7252f43174 17-Mar-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Refactor session lifecycle to clarify API & eliminate race conditions"
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
14426bd8da0d5f29db2a9582eebae31f6b5cb5ef 17-Mar-2016 Mitchell Wills <mwills@google.com> Fix crash when wifi monitor dispatches a message with no handler am: 18456db am: e43135b
am: 9d2d12c

* commit '9d2d12c225f788e88f90a2928e1ff6c830ed7062':
Fix crash when wifi monitor dispatches a message with no handler
829ac945c357c65a9441a0fe820000499b8f10a1 17-Mar-2016 Joe Onorato <joeo@google.com> Merge "Turn off excess logging" into nyc-dev am: 05af64c
am: ce93df4

* commit 'ce93df4693a611e710f50ae819414f9bf3556648':
Turn off excess logging
df78188f69ed96f7498f56ba81cd92fb0c39119e 17-Mar-2016 Sunil Dutt <usdutt@codeaurora.org> Merge "Wifi: Update WifiController state if Wifi turn On fails" into nyc-dev am: cc97542
am: 025aa53

* commit '025aa53c5514e8d8fa5b4bd1ca7fa043f520f9d5':
Wifi: Update WifiController state if Wifi turn On fails
f2f83f8fb54b91cc35a06b40b5c8b74a0db3f784 17-Mar-2016 Glen Kuhne <kuh@google.com> Merge "Various WifiMetrics fixes" into nyc-dev am: dc69106
am: 131e928

* commit '131e928a397d1b3da50cc94639169b994e31940f':
Various WifiMetrics fixes
0b080e94240687cb56ae372ca7fbb82d09608c8f 17-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Remove ill-defined WifiNative::getInterfaces()" into nyc-dev am: 917ecd6
am: ab5fa82

* commit 'ab5fa82ea76abf39535bfa9be0e60c056c4890fb':
Remove ill-defined WifiNative::getInterfaces()
1fc4fa7c94b8bb10332999b14720048338120e78 17-Mar-2016 Roshan Pius <rpius@google.com> Merge changes I05684ce1,Icb1037ed,I1acf704a into nyc-dev am: 2d211b1
am: 9de5d13

* commit '9de5d13c151c90675e9085ac3b9dcf457dd05707':
SupplicantWifiScannerImpl: Sw Pno scans
HalWifiScanner: Create SupplicantScanner delegate
SupplicantWifiScannerImpl: Report Pno events
09551f29fea16468de9d2291500199c88e0fe599 17-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Wifi country code refactoring" into nyc-dev am: 4668a26
am: f0270b4

* commit 'f0270b49fb39f1b10a4427fc2876c7706bdf616e':
Wifi country code refactoring
9ddbdfc5110ceb8269bc511284b35261097add47 15-Mar-2016 Etan Cohen <etancohen@google.com> [NAN] Refactor session lifecycle to clarify API & eliminate race conditions

(cherry-pick of 12a73dbc70d547ea87048209fd84d9dace01be17)

Bug: 27257965
Change-Id: I405de3d18187770d97171d636abddfe4e1be4510
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
95984d1af44a00183a4b0e0ed61417583096ff90 17-Mar-2016 Mitchell Wills <mwills@google.com> Merge MultiClientScheduler and WifiScanningScheduler

And move them to the com.android.server.wifi.scanner package

Change-Id: Iceac6823f118017f577e316d8eacc77c3445b2a7
ndroid/server/wifi/MultiClientScheduler.java
ndroid/server/wifi/WifiScanningScheduler.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/scanner/BackgroundScanScheduler.java
ndroid/server/wifi/scanner/ScanScheduleUtil.java
e43135bfd49a1a8d1821dffaea0d44ff36eb8b23 17-Mar-2016 Mitchell Wills <mwills@google.com> Fix crash when wifi monitor dispatches a message with no handler
am: 18456db

* commit '18456db02b67d04d9e601aca68538b64c7a374f8':
Fix crash when wifi monitor dispatches a message with no handler
05af64cf72e191310760172a557e3c3340b78075 17-Mar-2016 Joe Onorato <joeo@google.com> Merge "Turn off excess logging" into nyc-dev
cc97542f6bcd322d8f352b339cd3337be42c55a7 17-Mar-2016 Randy Pan <zpan@google.com> Merge "Wifi: Update WifiController state if Wifi turn On fails" into nyc-dev
dc69106e28e9a6755b1454467f65761f7cbb59c9 17-Mar-2016 Glen Kuhne <kuh@google.com> Merge "Various WifiMetrics fixes" into nyc-dev
96cdfc0acafef88832515ecc52c01638c1493211 11-Mar-2016 Glen Kuhne <kuh@google.com> Various WifiMetrics fixes

-WifiMetrics now determines if repeated 'startConnectionEvent' are for
the same attempt, and adds the failure code
FAILURE_REDUNDANT_CONNECTION_ATTEMPT to designate this.
-Added end condition for roaming timeouts
-Modifed the naming of all failures to be less cryptic
-level_2_failure_code will now be used to log all failure reasons
(making ConnectivityLevelFailure a redundant subset)
-Started using ScanResult frequency instead of WifiConfiguration for
'ChannelInfo'
-Added AuthType checking on 'startConnectionEvent' (Also doing it when
we receive scanResults after associating with the BSSID)
-Refactored all of the config stuff out of startConnectionEvent() into
updateFromWifiConfiguration

BUG=25691077

Change-Id: Id1de2d5dea88611f81e58fed71e6b4e0ee88159a
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiStateMachine.java
83903ec3df7c51307fd662d7f28544c2051dc471 15-Mar-2016 Sunil Dutt <usdutt@codeaurora.org> Reduce the link de-bounce time to 4 from earlier 7 seconds

The Link de-bounce time of 7 seconds affects the station's
handover time to a better AP,thus tearing down the VoWiFi call
(due to RTP timeout). Reduce this time to 4 seconds.

BUG=27527764
Change-Id: Icc68496c4364fb34139fb6e90a87377c56634383
ndroid/server/wifi/WifiStateMachine.java
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
2d211b1809081bce900a5cbb890aca7c93d252c3 17-Mar-2016 Roshan Pius <rpius@google.com> Merge changes I05684ce1,Icb1037ed,I1acf704a into nyc-dev

* changes:
SupplicantWifiScannerImpl: Sw Pno scans
HalWifiScanner: Create SupplicantScanner delegate
SupplicantWifiScannerImpl: Report Pno events
7bd4dd2206cf60b257651b9b887e90786afb8f70 17-Mar-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Removed NAN event registration - dispatch all callbacks."
18456db02b67d04d9e601aca68538b64c7a374f8 17-Mar-2016 Mitchell Wills <mwills@google.com> Fix crash when wifi monitor dispatches a message with no handler

Bug: 27705420
Change-Id: I68708215ccd0a0aa1b6f331122d3bcd54ce7669e
ndroid/server/wifi/WifiMonitor.java
047fc6a47ac22a70fc3a4b327b0d49d4d7c2551f 17-Mar-2016 Etan Cohen <etancohen@google.com> Merge "[NAN] Consolidate publish/subscribe callback sets into single set"
8c0d763d145707de8a4deace869cf6ac370773e8 17-Mar-2016 Etan Cohen <etancohen@google.com> Merge changes from topic 'callback_registration_reconfig'

* changes:
[NAN] Fix build error (with extra warning) - uninitialized variable
[NAN] Replace session callback configuration control
4668a26b24f37d6f10f3d94c3674efde0efacb72 17-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Wifi country code refactoring" into nyc-dev
a1514cb347fccf11566e5172ed71030c695d2abd 16-Mar-2016 Roshan Pius <rpius@google.com> Send wifi tx power levels to BatteryStats

This CL just plumbs in the values received from HAL to BatteryStats.

The actual power estimation due to these power levels will need to wait
for the new config.xml additions.

BUG: 27227497
Change-Id: Ic4ee5a286c765658b10a573e84296a8cf35d4d5b
ndroid/server/wifi/WifiServiceImpl.java
62bc101940ae1f5e60c4d8861a149b900dbf5e5c 16-Mar-2016 Roshan Pius <rpius@google.com> SupplicantWifiScannerImpl: Sw Pno scans

If the hardware does not support PNO scans via wpa_supplicant,
we need to perform a periodic background scan.
Add a new flag called swPnoScan to take care of this and use the flag
hwPnoScan for HW based PNO scans. All SW pno scans will be accompanied
by a background scan request.

BUG: 27525899
Change-Id: I05684ce1ec9081ee2c5935c4d5dae2c0175bb592
TEST: Compiles & unit-test passes
cherry-picked from:
https://partner-android-review.googlesource.com/#/c/540348/10
ndroid/server/wifi/SupplicantWifiScannerImpl.java
2332e9ea1b691fa0ea3a340feec159f2040aa6ca 14-Mar-2016 Roshan Pius <rpius@google.com> HalWifiScanner: Create SupplicantScanner delegate

We need to use supplicant scans for all single shot scans and
for PNO scans (on some devices like shamu) even when HAL based gscan is
supported. So, create a supplicant scanner delegate in HalScannerImpl to
use for single scans & Pno scans (if device does not support ePno).

This helps us get rid of all supplicant scan code currently present in
HalWifiScannerImpl.

While there,
Moved all the methods in both Hal & Supplicant ScannerImpl to be in the
same order.

BUG: 27600810
Change-Id: Icb1037ed3599db2a9770802dd78edfb885bde452
TEST: Compiles & unit-test passes
cherry-picked from:
https://partner-android-review.googlesource.com/#/c/542729/
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiScannerImpl.java
93482644beaf8424deaed42f3bca51c1e93031f1 16-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Ignore empty SSID when \'linkDeboucing\' is on" into nyc-dev am: da26eea
am: 36b9ace

* commit '36b9aceef8eced24a81eafdafecb7720008881ba':
Ignore empty SSID when 'linkDeboucing' is on
da26eea1bdb583ce02f1bc9107997d9370f02f1d 16-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Ignore empty SSID when 'linkDeboucing' is on" into nyc-dev
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
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
d7a1994f19f3bbec7df063488214a347fbcb5b92 16-Dec-2015 Sunil Dutt <usdutt@codeaurora.org> Wifi: Update WifiController state if Wifi turn On fails

If Wifi turn On fails due to failure in reloading firmware then
WifiStateMachine stays in InitialState, but WifiController is left
stuck in StaEnabledState, which in turn fails to turn on WLAN again.

Set Wifi state as failed to generate intent WIFI_STATE_CHANGED_ACTION so
that WifiController transitions to ApStaDisabledState.

Change-Id: I007d85179a0566e2f1b452ae8b564c4e8258987d
ndroid/server/wifi/WifiController.java
ndroid/server/wifi/WifiStateMachine.java
d02611ce4158fda6c2d14ee13ad7f9553f416d21 02-Mar-2016 Ningyuan Wang <nywang@google.com> Wifi country code refactoring

This CL pulls coutry code logic into one class.
This also refactors all the existing country code logic.
We do not set country code for P2p interface now because
this is redundant. wpa_supplicant will route all the request
to the real interface.
Some initial unittests are added.

Bug: 27477896
TEST: compile, runtest frameworks-wifi,
manually tested with an angler phone
Change-Id: I870c3ad615a1f9bfb3fb40b149b9ca71dc850cdd
ndroid/server/wifi/WifiCountryCode.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
5818c1320387ec7a14eb8b7e2710667800319fae 16-Mar-2016 Ningyuan Wang <nywang@google.com> Ignore empty SSID when 'linkDeboucing' is on

We pretend we are still connected when we are disconnected with
'linkDeboucing' on. In this case we should ignore the empty
SSID wpa_supplicant send to us.

Bug: 27403109
TEST: compiles & unittests & cts tests
Change-Id: I6bda8404734766936d2d1db41329ed2c2a17184a
ndroid/server/wifi/WifiStateMachine.java
38fc82e105158beace360a688caf26758947db1f 11-Mar-2016 Etan Cohen <etancohen@google.com> [NAN] Removed NAN event registration - dispatch all callbacks.

All events dispatched by default - there's no reason to ignore events.
The specific identity changed events for which there are use-cases to
get or ignore is controlled through a new configuration.

(cherry-pick of c9ac67224dcf7a41692256c338188206f4f29f5c)

Bug: 27607613
Change-Id: I877d4e31fa0633c073163e3a35d8a700c1eb2f36
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanStateManager.java
d4ee6c664a89759b6f72b6532cbd754760e3aaf0 11-Mar-2016 Etan Cohen <etancohen@google.com> [NAN] Consolidate publish/subscribe callback sets into single set

Merge onPublishFail & onSubscribeFail into onSessionConfigFail.
Merge onPublishTerminated & onSubscribeTerminated into onSessionTerminated.
A session is either publish or subscribe (never the two) so redundant.

(cherry-pick of 9cf66a4b8313520a6967eb5491459e7bebd3a718)

Bug: 27610709
Change-Id: If2e1533e203a7cd1697c2bfcfb0a141f87d9af29
ndroid/server/wifi/nan/WifiNanSessionState.java
12a73dbc70d547ea87048209fd84d9dace01be17 15-Mar-2016 Etan Cohen <etancohen@google.com> [NAN] Refactor session lifecycle to clarify API & eliminate race conditions [DO NOT MERGE]

Bug: 27257965
Change-Id: I405de3d18187770d97171d636abddfe4e1be4510
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
445d7d4361edb66a0bf065342b07f84605881bb9 11-Mar-2016 Etan Cohen <etancohen@google.com> [NAN] Replace session callback configuration control

Controlling session callback invocation:
- Remove event registration
- Add configurations to the subset (actually just termination) which
can be configured through the HAL

(cherry-pick of 951fbeb8c17867bcc748d7334d2f4f4c1a7fd97d)

Bug: 27607613
Change-Id: I040ab7902156605c3244515c81fa9435f1adaedc
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
5c8009222755072153214b39f0da82c814b56c04 15-Mar-2016 Wei Wang <weiwa@google.com> Merge "Fix native crash caused by null rtt params." into nyc-dev am: 7462584f8a
am: 45c2360aa1

* commit '45c2360aa1f1bee969160341d3447b4f0a95ee1a':
Fix native crash caused by null rtt params.
7462584f8a30f6dba5dc979b3dfbe3821b739d9c 15-Mar-2016 Wei Wang <weiwa@google.com> Merge "Fix native crash caused by null rtt params." into nyc-dev
93f11d999871e5b89554a70795a6ab3fc920a87d 15-Mar-2016 Paul Stewart <pstew@google.com> Merge "WifiStateMachine: Defer CMD_RESET_SIM_NETWORKS by default" into nyc-dev am: e6ee3780ba
am: 933cbb67ab

* commit '933cbb67ab9054b53172ab93e8d07631c35e9c80':
WifiStateMachine: Defer CMD_RESET_SIM_NETWORKS by default
e6ee3780bad3664ce5d2c61f9a4e76a5daae1a7d 15-Mar-2016 Paul Stewart <pstew@google.com> Merge "WifiStateMachine: Defer CMD_RESET_SIM_NETWORKS by default" into nyc-dev
0dcf2d3d0c04a6d5ae9ae268709d89be9fe31512 15-Mar-2016 Paul Stewart <pstew@google.com> Merge "Don\'t crash if no supported rates are given" into nyc-dev am: d8cb19d3c7
am: 4aaef70c01

* commit '4aaef70c01f71a2a1a061aff088b0b2efc6d5055':
Don't crash if no supported rates are given
d8cb19d3c7835afc76149ddeb91a74cf49e8f1ef 15-Mar-2016 Paul Stewart <pstew@google.com> Merge "Don't crash if no supported rates are given" into nyc-dev
e367514651d7f888dda870fb472eea6bcfd9ec5d 14-Mar-2016 Paul Stewart <pstew@google.com> Don't crash if no supported rates are given

The com.android.server.wifi.hotspot2.NetworkDetail class
crashed with an ArrayIndexOutOfBoundsException if a an empty
supported rates IE was encountered. This CL fixes this by
checking the array size in the validity check of the IE.

Bug: 27619848
Change-Id: I9569d063d7c64d3cc3f80ced9cf9d1425f97abbd
ndroid/server/wifi/util/InformationElementUtil.java
c9ac67224dcf7a41692256c338188206f4f29f5c 11-Mar-2016 Etan Cohen <etancohen@google.com> [NAN] Removed NAN event registration - dispatch all callbacks. [DO NOT MERGE]

All events dispatched by default - there's no reason to ignore events.
The specific identity changed events for which there are use-cases to
get or ignore is controlled through a new configuration.

Bug: 27607613
Change-Id: I877d4e31fa0633c073163e3a35d8a700c1eb2f36
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanStateManager.java
9cf66a4b8313520a6967eb5491459e7bebd3a718 11-Mar-2016 Etan Cohen <etancohen@google.com> [NAN] Consolidate publish/subscribe callback sets into single set [DO NOT MERGE]

Merge onPublishFail & onSubscribeFail into onSessionConfigFail.
Merge onPublishTerminated & onSubscribeTerminated into onSessionTerminated.
A session is either publish or subscribe (never the two) so redundant.

Bug: 27610709
Change-Id: If2e1533e203a7cd1697c2bfcfb0a141f87d9af29
ndroid/server/wifi/nan/WifiNanSessionState.java
951fbeb8c17867bcc748d7334d2f4f4c1a7fd97d 11-Mar-2016 Etan Cohen <etancohen@google.com> [NAN] Replace session callback configuration control [DO NOT MERGE]

Controlling session callback invocation:
- Remove event registration
- Add configurations to the subset (actually just termination) which
can be configured through the HAL

Bug: 27607613
Change-Id: I040ab7902156605c3244515c81fa9435f1adaedc
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
202fdf96e1e0191be37a916d97116df35fe3cbfc 22-Feb-2016 Wei Wang <weiwa@google.com> Fix native crash caused by null rtt params.

Bug:27227320

Change-Id: I822045f2dd35aeb824cea0d0c0791480e0d1b80a
ndroid/server/wifi/RttService.java
1cd87324ced809bd30cbbcf4c57a2bfb4cd43a78 14-Mar-2016 Mitchell Wills <mwills@google.com> Fix WifiScanner not recovering after Wifi is turned off am: 1e806a7aac am: 41bf84fbd3
am: 3aeb107046

* commit '3aeb1070461e30f9a80c6df172865a9bf4af1da1':
Fix WifiScanner not recovering after Wifi is turned off
41bf84fbd38c4a9b5ec1f49ea9057705673d0c3e 14-Mar-2016 Mitchell Wills <mwills@google.com> Fix WifiScanner not recovering after Wifi is turned off
am: 1e806a7aac

* commit '1e806a7aac77f6f65ba299329e1fc452e0148b8d':
Fix WifiScanner not recovering after Wifi is turned off
1e806a7aac77f6f65ba299329e1fc452e0148b8d 12-Mar-2016 Mitchell Wills <mwills@google.com> Fix WifiScanner not recovering after Wifi is turned off

WifiScanner implementations could previously get in an inconsistent
state where they had not cleaned up from a previous scan that was
interrupted by turning Wifi off.

Bug: 27620477
Change-Id: I042e35d1aa8ee65e6ebfeb6f62a54c071a7be4ef
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiScannerImpl.java
ndroid/server/wifi/WifiScanningServiceImpl.java
4bf1cc8cc917441bef9e53cda2c5ceb7f048a3e4 14-Mar-2016 Ritesh Reddy <riteshr@google.com> Calling BackupManager.dataChanged for WifiNetwork Changes

Using the BackupManager Proxy in the service package
to stage a backup of com.android.providers.settings when
Wifi Networks are added/removed.

Bug: 26087998
Change-Id: Ie91d40870fc843e67e99c6fbda26b14d281e96bb
ndroid/server/wifi/WifiConfigStore.java
b740903bec94d63f89904ec9561085f9ca6c453a 11-Mar-2016 Paul Stewart <pstew@google.com> WifiStateMachine: Defer CMD_RESET_SIM_NETWORKS by default

Defer the CMD_RESET_SIM_NETWORKS message in states that do
not handle it. This way, this message will remain pending
until it can be handled.

Bug: 27532197
Change-Id: I1b1b8c0b198cf46cff86b625afead045fd7aec36
Test: Compile + unit tests
ndroid/server/wifi/WifiStateMachine.java
213bc1bd553456a24b3a71c16c81bf54fa475934 12-Mar-2016 Roshan Pius <rpius@google.com> Merge "Update ScanCapabilities in WifiNative" into mm-wireless-dev am: 9b34eab696 am: 25211a6fab
am: fd60ed6e5b

* commit 'fd60ed6e5b8537eb84b6dc4eed9b1c9b69c0026b':
Update ScanCapabilities in WifiNative
4a90bc70520e800548fb42dae0fc72f8a1017015 12-Mar-2016 Glen Kuhne <kuh@google.com> resolve merge conflicts of ea91131081 to nyc-dev am: ef7480f78d
am: fb5487500b

* commit 'fb5487500b842fee1e61d815287090c39a70dbb9':
Created WifiInjector, dependency injector for wifi
22385021b3f363556c6201f5653457d316e50779 12-Mar-2016 Paul Stewart <pstew@google.com> Merge "WifiStateMachine: Return to InitialState if driver start fails" into mm-wireless-dev am: 03e6c26c18 am: 963a22849e
am: 8e32b7459e

* commit '8e32b7459ebe72260b70ec4165a70a539af4c101':
WifiStateMachine: Return to InitialState if driver start fails
25211a6fab0c8c623a0b9d39ac1bebac3d496176 12-Mar-2016 Roshan Pius <rpius@google.com> Merge "Update ScanCapabilities in WifiNative" into mm-wireless-dev
am: 9b34eab696

* commit '9b34eab6963479d468e6ab7859c3721b2d1e17f8':
Update ScanCapabilities in WifiNative
ef7480f78d994c786248a1ee8a601abf39aec696 11-Mar-2016 Glen Kuhne <kuh@google.com> resolve merge conflicts of ea91131081 to nyc-dev

Change-Id: I0662ccf4f80c3b0b48314aef3a5807ce27a13659
9b34eab6963479d468e6ab7859c3721b2d1e17f8 11-Mar-2016 Roshan Pius <rpius@google.com> Merge "Update ScanCapabilities in WifiNative" into mm-wireless-dev
d34e3a7b98d51f684100483151fceb233fd95215 11-Mar-2016 Roshan Pius <rpius@google.com> Update ScanCapabilities in WifiNative

BUG: 27607839
Change-Id: I8edb1b7637fa69b3ba1ee59e52d2e1c5a6e79c9e
TEST:Compiles & unit-test passes
ndroid/server/wifi/WifiNative.java
ea91131081772e97c65581b9a290dee21ee79a83 11-Mar-2016 Glen Kuhne <kuh@google.com> Merge "Created WifiInjector, dependency injector for wifi" into mm-wireless-dev
963a22849edcbebdfe3bf2ecf2329a20789dbd7a 11-Mar-2016 Paul Stewart <pstew@google.com> Merge "WifiStateMachine: Return to InitialState if driver start fails" into mm-wireless-dev
am: 03e6c26c18

* commit '03e6c26c18a2bc89471569a899bef913c2770b36':
WifiStateMachine: Return to InitialState if driver start fails
03e6c26c18a2bc89471569a899bef913c2770b36 11-Mar-2016 Paul Stewart <pstew@google.com> Merge "WifiStateMachine: Return to InitialState if driver start fails" into mm-wireless-dev
637a86ffb3a036a4f26a471378b57d8817f35c25 08-Mar-2016 Glen Kuhne <kuh@google.com> Created WifiInjector, dependency injector for wifi

Created a new class WifiInjector, a lazy singleton for dependency
injection. Initial use case was accessing WifiMetrics from within
WifiScanningService, will allow for easy mocking, and is a potential
candidate to replace the mess that is FrameworkFacade.

BUG=27550630
BUG=25691077

Change-Id: I0b1a99f718912fe6ee9a1453ff275b5dfedce6fd
ndroid/server/wifi/WifiInjector.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
82d3224f5866eb16a43656f92ae7ae6baf999088 11-Mar-2016 Mitchell Wills <mwills@google.com> Fix Crash when getScanCapabilities fails am: 017307e0d7 am: bb1378fdf0
am: 2fac9533ea

* commit '2fac9533ea62c5e87fbf6e876260d5eabfeb6323':
Fix Crash when getScanCapabilities fails
bb1378fdf0fba19ad35de8803f33cdc663cfbea7 11-Mar-2016 Mitchell Wills <mwills@google.com> Fix Crash when getScanCapabilities fails
am: 017307e0d7

* commit '017307e0d7133f3b2523090136b919c6f494098e':
Fix Crash when getScanCapabilities fails
017307e0d7133f3b2523090136b919c6f494098e 11-Mar-2016 Mitchell Wills <mwills@google.com> Fix Crash when getScanCapabilities fails

Bug: 27603305
Change-Id: I7f7c3e86364b0e53b05c6c07962d32e95efae851
ndroid/server/wifi/WifiScanningServiceImpl.java
26551d57c537f59047285fba0d92a8c093f1c30f 11-Mar-2016 Roshan Pius <rpius@google.com> Merge changes Ib8c98c06,I0731192d,I7d03b43b into mm-wireless-dev am: b92d0785aa am: 1c3442a6f4
am: c7b73b5961

* commit 'c7b73b5961a336895bead99353e0deeb05aa259a':
WifiScanningServiceImpl: Add PNO active scans map
Pause PNO scans for single scan
Refactor WifiScanner support for oneshot scans
1c3442a6f4f3966b25ab35b70e806e34b0674092 11-Mar-2016 Roshan Pius <rpius@google.com> Merge changes Ib8c98c06,I0731192d,I7d03b43b into mm-wireless-dev
am: b92d0785aa

* commit 'b92d0785aa1bb8ac828b067ce1c938f447c8ac7a':
WifiScanningServiceImpl: Add PNO active scans map
Pause PNO scans for single scan
Refactor WifiScanner support for oneshot scans
b92d0785aa1bb8ac828b067ce1c938f447c8ac7a 11-Mar-2016 Roshan Pius <rpius@google.com> Merge changes Ib8c98c06,I0731192d,I7d03b43b into mm-wireless-dev

* changes:
WifiScanningServiceImpl: Add PNO active scans map
Pause PNO scans for single scan
Refactor WifiScanner support for oneshot scans
ceb5919559ff90d2355a0b5db35b2de2803641cf 10-Mar-2016 Paul Stewart <pstew@google.com> Fix map reference in WifiMonitor.sendMessage() am: 7ce3d79fd3 am: afcee21ea2
am: 1d9a379d63

* commit '1d9a379d638baa5f5a9d556235724da086b39001':
Fix map reference in WifiMonitor.sendMessage()
afcee21ea26b08fd85bb3f878bec51e1e101bce7 10-Mar-2016 Paul Stewart <pstew@google.com> Fix map reference in WifiMonitor.sendMessage()
am: 7ce3d79fd3

* commit '7ce3d79fd3ed12a379d6abbe31c680d6fd8abf51':
Fix map reference in WifiMonitor.sendMessage()
7ce3d79fd3ed12a379d6abbe31c680d6fd8abf51 10-Mar-2016 Paul Stewart <pstew@google.com> Fix map reference in WifiMonitor.sendMessage()

In the case where no interface is available, we should iterate
over mHandlerMap and not depend on the possibly null variable
ifaceHandlers.

Bug: 27583666
Change-Id: I983972af593004262d939024f9e893f4867f2504
Test: Build and run unit tests
ndroid/server/wifi/WifiMonitor.java
31373e77d50e1fe143c6bf4c7e53bdb42eb0cfd9 10-Mar-2016 Mitchell Wills <mwills@google.com> Merge changes from topic \'wifi_scanner_hidden_network_ids\' into mm-wireless-dev am: 01fb5b27ba am: cc1d874560
am: 0bdf9a794d

* commit '0bdf9a794d9d2b9e7fec906a34ffcfaf13316a13':
Allow multiple Handlers to be registered for a WifiMonitor event
WifiScanner: Changes to support hidden Network Ids
cc1d874560e4c0ca157bfda5d12df33a4f50fc11 10-Mar-2016 Mitchell Wills <mwills@google.com> Merge changes from topic \'wifi_scanner_hidden_network_ids\' into mm-wireless-dev
am: 01fb5b27ba

* commit '01fb5b27ba32f180080f2b2b12adbc5c803611ce':
Allow multiple Handlers to be registered for a WifiMonitor event
WifiScanner: Changes to support hidden Network Ids
1fa40005d82db21b2cc1c7e06d249b09c674ab8b 09-Mar-2016 Roshan Pius <rpius@google.com> WifiScanningServiceImpl: Add PNO active scans map

Add a separate map for storing all PNO request to their corresponding
listeners.

BUG: 27167559
Change-Id: Ib8c98c06478687d3fde50f33f0843ae0f13f2431
ndroid/server/wifi/WifiScanningServiceImpl.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
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiNative.java
8adb4e72f58e3e25918f33e0b2687e6acc14c47d 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
Bug: 26895774
Change-Id: I7d03b43bbd2be396b3c772bc4bae681acce8eb7b
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiScanningScheduler.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/hotspot2/AnqpCache.java
fc0f43edd0def7d760e42d6e800d862007cf9fd5 09-Mar-2016 Paul Stewart <pstew@google.com> WifiStateMachine: Return to InitialState if driver start fails

If WiFi is set to shut off on idle, WifiController calls
mWifiStateMachine.setDriverStart(false), and WifiStateMachine
eventually enters the DriverStopped state. On return from
idle the reverse happens and WifiStateMachine attempts to
restore the driver. If this fails, WifiStateMachine simply
returns to the DriverStopped state.

This CL changes this behavior. If restarting the driver
fails we now restart supplicant, which causes the state
machine to traverse the InitialState. This provides a fail
safe mechanism for restarting drivers that may not have
suspended correctly.

Bug: 26735919
Change-Id: Ide9bc5339a9be1ea4ac67fc99fe6065529ee67e2
Test: Reproduce b/26735919 on bullhead, which is currently suffering from b/27576943
ndroid/server/wifi/WifiStateMachine.java
31b4caf84b71eefd25b00934ab6c14c66fb2fdda 09-Mar-2016 Sunil Dutt <usdutt@qti.qualcomm.com> Merge "Wifi: send an explicit ENABLE_NETWORK with "no-connect"" into mm-wireless-dev am: e5da466fd5 am: 143d50d011
am: 817b45c3d4

* commit '817b45c3d48edb099e0904a096eb746834bd57c4':
Wifi: send an explicit ENABLE_NETWORK with "no-connect"
143d50d011d4a26ff5402fc6b3ff19f945ff7153 09-Mar-2016 Sunil Dutt <usdutt@qti.qualcomm.com> Merge "Wifi: send an explicit ENABLE_NETWORK with "no-connect"" into mm-wireless-dev
am: e5da466fd5

* commit 'e5da466fd5d9d8024780590ee8b1c335889443a7':
Wifi: send an explicit ENABLE_NETWORK with "no-connect"
e5da466fd5d9d8024780590ee8b1c335889443a7 09-Mar-2016 Roshan Pius <rpius@google.com> Merge "Wifi: send an explicit ENABLE_NETWORK with "no-connect"" into mm-wireless-dev
3c83d4783673c1e2fa64c56dc586c5f7c3ab73e0 09-Mar-2016 Mitchell Wills <mwills@google.com> Allow multiple Handlers to be registered for a WifiMonitor event

Bug: 26966049
Bug: 27569474
Change-Id: I07012b0e4ad2e3510e0a84368949b65d7b99507d
ndroid/server/wifi/WifiMonitor.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
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/MultiClientScheduler.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiNative.java
a71449865f1c32614e67490c3430130c915d345d 08-Mar-2016 Glen Kuhne <kuh@google.com> Merge "Fix WifiMetrics connection auth type" into mm-wireless-dev am: a7aef0a457 am: b409fc8e16
am: 14a9aa58b4

* commit '14a9aa58b482d83bdf12ce68f6fd96c9a3029a18':
Fix WifiMetrics connection auth type
fdee6b2d5aa98d80df5ef8c003e621b9a515c434 08-Mar-2016 Glen Kuhne <kuh@google.com> Merge "Add Supported Rates and 802.11 Mode detection" into mm-wireless-dev am: 9947ed6dfd am: 838e8915ad
am: 71a41d9d8e

* commit '71a41d9d8eab6b09c34573e194821716f6e648cd':
Add Supported Rates and 802.11 Mode detection
b409fc8e164c522275e1df302a37e05662163004 08-Mar-2016 Glen Kuhne <kuh@google.com> Merge "Fix WifiMetrics connection auth type" into mm-wireless-dev
am: a7aef0a457

* commit 'a7aef0a45759880487863fd81bfbfbc748baa73b':
Fix WifiMetrics connection auth type
a7aef0a45759880487863fd81bfbfbc748baa73b 08-Mar-2016 Glen Kuhne <kuh@google.com> Merge "Fix WifiMetrics connection auth type" into mm-wireless-dev
838e8915ad29a380254f4bb77293badb949b4b1b 08-Mar-2016 Glen Kuhne <kuh@google.com> Merge "Add Supported Rates and 802.11 Mode detection" into mm-wireless-dev
am: 9947ed6dfd

* commit '9947ed6dfddffe1746d98bf01499a81d7c3de123':
Add Supported Rates and 802.11 Mode detection
9947ed6dfddffe1746d98bf01499a81d7c3de123 08-Mar-2016 Glen Kuhne <kuh@google.com> Merge "Add Supported Rates and 802.11 Mode detection" into mm-wireless-dev
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
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
140ac080785fe7e058386ad0a9085a5786ecc9f1 07-Mar-2016 Mitchell Wills <mwills@google.com> Correctly filter results by time from supplicant in Hal scan impl am: 2e0b845b65 am: 699238e909
am: cdeb741a31

* commit 'cdeb741a31499a77e3e9041d4f4c3d80f1ce4bc7':
Correctly filter results by time from supplicant in Hal scan impl
699238e909ebaee0b7f759c4d04efabe75813789 07-Mar-2016 Mitchell Wills <mwills@google.com> Correctly filter results by time from supplicant in Hal scan impl
am: 2e0b845b65

* commit '2e0b845b65b2e2151cddbdafb90bd0f744b10654':
Correctly filter results by time from supplicant in Hal scan impl
2e0b845b65b2e2151cddbdafb90bd0f744b10654 05-Mar-2016 Mitchell Wills <mwills@google.com> Correctly filter results by time from supplicant in Hal scan impl

Bug: 27358828
Change-Id: Ic9ddfa02a0e3c282871ddfa3347312a5917dbec0
ndroid/server/wifi/HalWifiScannerImpl.java
db98a534417f818ab2019115658d4c58d6c46659 07-Mar-2016 Roshan Pius <rpius@google.com> Capture Wlan host wake reasons in bugreport am: 15ed48d023 am: 244eddf3f5
am: 444b69e84a

* commit '444b69e84a745669aac311c516b58f0f041ddd5b':
Capture Wlan host wake reasons in bugreport
244eddf3f51abce29914bdc1c1582b4a13e7733c 07-Mar-2016 Roshan Pius <rpius@google.com> Capture Wlan host wake reasons in bugreport
am: 15ed48d023

* commit '15ed48d023d623a4eeb8fd3a54b9c275874362f5':
Capture Wlan host wake reasons in bugreport
e6778405d285bbce70c3be739f747a977b3e6fc3 07-Mar-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Change PNO network list type" into mm-wireless-dev am: 3a2b55ba28 am: 0a21d6c371
am: 87ea419c12

* commit '87ea419c12108fd472f4e0c75dfc365271cf7a09':
WifiConfigManager: Change PNO network list type
83d323b44e11b8517ac9ce12a63fff659480ba59 07-Mar-2016 Roshan Pius <rpius@google.com> Merge "PNO: Bugfixes in WifiNative" into mm-wireless-dev am: 9a7223a7a5 am: df14c4522d
am: 0ee8319123

* commit '0ee8319123cb753c5f225482cfe3b7553b02415d':
PNO: Bugfixes in WifiNative
c433ff02d0906d95b64be31f832a5f403dc86bf6 07-Mar-2016 Roshan Pius <rpius@google.com> Merge "WifiScannerImpl: PNO implementation (Part 1)" into mm-wireless-dev am: d17c24a96d am: da535126fc
am: 9a7c943f8c

* commit '9a7c943f8cea8d89745f3e846552e5ba6446a92d':
WifiScannerImpl: PNO implementation (Part 1)
15ed48d023d623a4eeb8fd3a54b9c275874362f5 07-Mar-2016 Roshan Pius <rpius@google.com> Capture Wlan host wake reasons in bugreport

Dump out the wlan host wake reasons data retrieved from
WifiNative into bugreport.

BUG: 27461093
Change-Id: Ibec4676fb68b8fa95858bea39398395b204ca1f4
ndroid/server/wifi/WifiStateMachine.java
2b152feb1c574f30557581770d4f8c06c770ba34 07-Mar-2016 Glen Kuhne <kuh@google.com> Fix WifiMetrics connection auth type

Use ScanResult instead of WifiConfiguration to get the Auth type, as
WifiConfiguration's allowedAuthAlgorithms is not valid at the beginning
of a connection attempt.
Also refactored metric getting from ScanResults and NetworkDetails into
their own helper functions.

BUG=25691077

Change-Id: I528a1c76204b5197815ad3836d743513f89bc9ca
ndroid/server/wifi/WifiMetrics.java
0a21d6c371532509c566ddf1cc485f99f1abdb57 07-Mar-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Change PNO network list type" into mm-wireless-dev
am: 3a2b55ba28

* commit '3a2b55ba283dec0d3e3421bdd27568ad0644bd7e':
WifiConfigManager: Change PNO network list type
df14c4522d4e948a2ae21a27de2ee926c32b9b5e 07-Mar-2016 Roshan Pius <rpius@google.com> Merge "PNO: Bugfixes in WifiNative" into mm-wireless-dev
am: 9a7223a7a5

* commit '9a7223a7a51be6e8f700b9240493859e667f2017':
PNO: Bugfixes in WifiNative
da535126fc49867ce88faba99cc854ef59192dc7 07-Mar-2016 Roshan Pius <rpius@google.com> Merge "WifiScannerImpl: PNO implementation (Part 1)" into mm-wireless-dev
am: d17c24a96d

* commit 'd17c24a96de6fdeec1d6d41ad5c986712d9acf18':
WifiScannerImpl: PNO implementation (Part 1)
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
f5cc6a0c7ede374b33de1cf5156bf149e2e76c13 01-Mar-2016 Glen Kuhne <kuh@google.com> Add Supported Rates and 802.11 Mode detection

Added an Information Element parser for Supported and Extended Supported
Rates.
Uses this information and other IEs to determine the 802.11 Mode
(a/b/g/n/ac) being used by APs, stores it in their scan results.
Modified WifiMetrics to receive and store this metric from a ScanDetail
Added calls to WifiMetrics from WifiStateMachine to give it a ScanDetail
Minor fix to WifiStateMachine's tracking of TargetNetworkId, which it
was clearing incorrectly on NETWORK_DISCONNECTION_EVENT

BUG=25691077
BUG=27446779
Change-Id: I63af5911916bfec87628aeb4e1ed4f9138acfafa
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/util/InformationElementUtil.java
568c786954cd395f5d413edb7beeec5c5128897d 07-Mar-2016 Roshan Pius <rpius@google.com> Merge "PNO: Changes in Native for new interface" into mm-wireless-dev am: ffe70f78d0 am: f38ce9684d
am: 20c355e0df

* commit '20c355e0df441475f7d932312758a01bd51a6ca5':
PNO: Changes in Native for new interface
f38ce9684dc1e5eeae48ef45a75d10c6d738046f 07-Mar-2016 Roshan Pius <rpius@google.com> Merge "PNO: Changes in Native for new interface" into mm-wireless-dev
am: ffe70f78d0

* commit 'ffe70f78d0aca71e9c5af82f11472d422f14b301':
PNO: Changes in Native for new interface
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
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScannerImpl.java
ndroid/server/wifi/WifiScanningServiceImpl.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
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
3c96cecaaad336a6fe5c9cd9bcede2d1ea5eb458 05-Mar-2016 Roshan Pius <rpius@google.com> Merge "Send list of hidden networkID for supplicant scan" into mm-wireless-dev am: 6b0c636d0a am: b51e54f903
am: d6fe1a1c07

* commit 'd6fe1a1c07f1a533aa09e75e6dd60ae3a5978245':
Send list of hidden networkID for supplicant scan
b51e54f90373ec8cfcf57cc67f495dc831d8f5b4 05-Mar-2016 Roshan Pius <rpius@google.com> Merge "Send list of hidden networkID for supplicant scan" into mm-wireless-dev
am: 6b0c636d0a

* commit '6b0c636d0a97e6163a99a8fbf5c199998c1be770':
Send list of hidden networkID for supplicant scan
6b0c636d0a97e6163a99a8fbf5c199998c1be770 05-Mar-2016 Roshan Pius <rpius@google.com> Merge "Send list of hidden networkID for supplicant scan" into mm-wireless-dev
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
ndroid/server/wifi/ConfigurationMap.java
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
5637c6a4593a086b63bdaabded3c9e6993529b4a 04-Mar-2016 Randy Pan <zpan@google.com> Propogate user band preference to QNS am: 2d35cbcae4 am: aba75f2f27
am: a74c947010

* commit 'a74c947010943ee9cbca162cc71f2c7a7eb07f4d':
Propogate user band preference to QNS
aba75f2f27c381db3048e1edc075dd2dd293c41a 04-Mar-2016 Randy Pan <zpan@google.com> Propogate user band preference to QNS
am: 2d35cbcae4

* commit '2d35cbcae4d281b6fd242402b87ed5668ec0400c':
Propogate user band preference to QNS
7856233fcedbfe92b2e782f2a3bab5c53158cbaa 04-Mar-2016 Paul Stewart <pstew@google.com> Merge "Resolve merge conflict with mmwd" into nyc-dev am: f4f32b8912
am: 85d79c9823

* commit '85d79c982397d29cc5e8c36a6eb87e32b143c96a':
Resolve merge conflict with mmwd
f4f32b8912e79b8e144ed640ffda8da8edc0513d 04-Mar-2016 Paul Stewart <pstew@google.com> Merge "Resolve merge conflict with mmwd" into nyc-dev
2d35cbcae4d281b6fd242402b87ed5668ec0400c 04-Mar-2016 Randy Pan <zpan@google.com> Propogate user band preference to QNS

The path was disabled unless a debugging flag's turned on.

Bug: 27481486
Change-Id: Ia137897e3e617a936c9adb54956c2ef121762708
ndroid/server/wifi/WifiStateMachine.java
76d50cfef72eb8f7ca11749cae7ac5e829f4a18c 04-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Remove lazy roam code" into mm-wireless-dev am: f8cd000f75 am: 3a06049bbb
am: 4efade5c36

* commit '4efade5c3634c8c51c4077001993e25b97792c13':
Remove lazy roam code
3a06049bbb03018afb5f883b3ea402201711ba0e 04-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Remove lazy roam code" into mm-wireless-dev
am: f8cd000f75

* commit 'f8cd000f751b6e886cdcfd254fee34ed2dc4109b':
Remove lazy roam code
f8cd000f751b6e886cdcfd254fee34ed2dc4109b 04-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Remove lazy roam code" into mm-wireless-dev
90bcd3310f82b3e766f736701868077299ea3d9b 04-Mar-2016 Paul Stewart <pstew@google.com> Resolve merge conflict with mmwd

Due to its sordid history, this handleGsmAuthRequest method in
WifiStateMachine got out of sync between nyc-dev and mmwd.

Bug: 27487428
Change-Id: I762989fe1fb7a3e0dbf2e943fc564e1540bb33a1
ndroid/server/wifi/WifiStateMachine.java
2d354463adc44b174c3a37ef7329cde8ad015e82 04-Mar-2016 Rakesh Iyer <rni@google.com> Re-add guard removed to fix build. am: f1b21eb3b2
am: d9de930e27

* commit 'd9de930e275107db512980a073c2a5a1191e5ace':
Re-add guard removed to fix build.
f1b21eb3b25dd2b7c605bce86c57ce4abc799371 04-Mar-2016 Rakesh Iyer <rni@google.com> Re-add guard removed to fix build.

if (VDBG) was removed to fix build, re-add if (DBG).

Change-Id: I04931a91e2ead5d647ac33eef0fcf519298f7f3f
ndroid/server/wifi/WifiStateMachine.java
8ce34d2aad2f8ef80f8d9347010de03bcf944ff2 04-Mar-2016 Rakesh Iyer <rni@google.com> Fix build. am: 86e6f8023b
am: 277b4da48e

* commit '277b4da48eab55a55c072758e8f84103a0b92eea':
Fix build.
86e6f8023b7b0f1da86ed3584523d7c701027f39 04-Mar-2016 Rakesh Iyer <rni@google.com> Fix build.

Change-Id: I4dd26a81a6924ed6dbe3a874931d9c393d8d4289
ndroid/server/wifi/WifiStateMachine.java
6c411b38007c8e2a1f01391bdafcf5aee49d730d 04-Mar-2016 Ningyuan Wang <nywang@google.com> Clean the WifiStateMachine logging tags am: 55dd2dd2cc am: cc4f303ff2
am: 787be3a8dc

* commit '787be3a8dcecd9c881bd6c4df314609284afc7b6':
Clean the WifiStateMachine logging tags
cc4f303ff2b0c2406528d4d4fbdf24e0c20df74f 04-Mar-2016 Ningyuan Wang <nywang@google.com> Clean the WifiStateMachine logging tags
am: 55dd2dd2cc

* commit '55dd2dd2ccabb3a18d6b3166b9d8a68246f8dc23':
Clean the WifiStateMachine logging tags
5f4c88bcfc87b595d83c734e0649d74028da0b70 04-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Remove redundant class TetherStateChange" into mm-wireless-dev am: 39970b6abd am: 35aa32e809
am: fdc2fcb156

* commit 'fdc2fcb1560a7b652324ea49e0ffe38ca657cf28':
Remove redundant class TetherStateChange
39126c1cdaae21e8875267ccc9c9cce68d3b4d93 04-Mar-2016 Ningyuan Wang <nywang@google.com> Remove unused function configureSsidWhiteList() am: d63e34a4e6 am: 81c730b75b
am: cfc8a90308

* commit 'cfc8a903082eb30349186da8130b23b059f70b27':
Remove unused function configureSsidWhiteList()
55dd2dd2ccabb3a18d6b3166b9d8a68246f8dc23 01-Mar-2016 Ningyuan Wang <nywang@google.com> Clean the WifiStateMachine logging tags

There are several logging tags (DBG, VDBG, PDBG, VVDBG, etc)
in WifiStateMachine. Theses tags are not well defined therefore
bringing difficulties to debugging.
It would be better if we only use one DBG tag instead of these
tags.

BUG=27433414

Change-Id: I2108d9b9b61aa5e697e746eb9d12b492361844b8
ndroid/server/wifi/WifiStateMachine.java
35aa32e8098002796059589c6084349d15d029c9 04-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Remove redundant class TetherStateChange" into mm-wireless-dev
am: 39970b6abd

* commit '39970b6abd278e87e7a1cf2083158c07e03003ee':
Remove redundant class TetherStateChange
81c730b75b8772ee0192ef8391e3fedfc7405274 04-Mar-2016 Ningyuan Wang <nywang@google.com> Remove unused function configureSsidWhiteList()
am: d63e34a4e6

* commit 'd63e34a4e68bcd320d01fe930662cc2ad3426656':
Remove unused function configureSsidWhiteList()
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
39970b6abd278e87e7a1cf2083158c07e03003ee 04-Mar-2016 Ningyuan Wang <nywang@google.com> Merge "Remove redundant class TetherStateChange" into mm-wireless-dev
ccf7d0e9f57fc8052a15120327e04a4411165342 04-Mar-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigStore: Cleanup logging in the module" into mm-wireless-dev am: 4f45b3dd4a am: 324a8f59d5
am: 95479f505a

* commit '95479f505a6080485d1d04d41ecae63a72d7488a':
WifiConfigStore: Cleanup logging in the module
e54e9f4e92717c515fa94c67ccc58410c388ca27 04-Mar-2016 Boxiang Pan <bopan@codeaurora.org> Wifi: Update Frequency before broadcasting intent am: b68baa2dcc am: cf8925fa96
am: 13338d47c5

* commit '13338d47c5dc19300fe5a4dc8c98a8eec20c36c8':
Wifi: Update Frequency before broadcasting intent
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
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
5a9de3b00d2a3b7c361eb89355f0afaec22d71e7 03-Mar-2016 Ningyuan Wang <nywang@google.com> Remove redundant class TetherStateChange

The SoftApManager was moved out of WifiStateMachine.
Class TetherStateChange is not used any more.
This CL removes it.

Bug: 27475281

Change-Id: I237b6d7b55f4d1da314b9ae06a391bb2d50542f3
ndroid/server/wifi/WifiStateMachine.java
324a8f59d5d2e36fb9a20a175bc857f3408a12e5 03-Mar-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigStore: Cleanup logging in the module" into mm-wireless-dev
am: 4f45b3dd4a

* commit '4f45b3dd4ab6c6cfa07e2b696272ce6ad61b92a5':
WifiConfigStore: Cleanup logging in the module
cf8925fa96505b5ea704b7eef697f97c94f6c186 03-Mar-2016 Boxiang Pan <bopan@codeaurora.org> Wifi: Update Frequency before broadcasting intent
am: b68baa2dcc

* commit 'b68baa2dccdf781d3f8dd5af52f38e7e4986be72':
Wifi: Update Frequency before broadcasting intent
4f45b3dd4ab6c6cfa07e2b696272ce6ad61b92a5 03-Mar-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigStore: Cleanup logging in the module" into mm-wireless-dev
b68baa2dccdf781d3f8dd5af52f38e7e4986be72 26-Feb-2016 Boxiang Pan <bopan@codeaurora.org> Wifi: Update Frequency before broadcasting intent

Update the frequency information before broadcasting
NETWORK_STATE_CHANGED_ACTION so that it contains the
up-to-date frequency info.

Bug:27367137
Change-Id: I9fe53a5f25b7c4a718b4e7b4c66459482f4f084e
ndroid/server/wifi/WifiStateMachine.java
307ffdb5b85843a50b78ab5ecf48a9f913307da6 03-Mar-2016 Paul Jensen <pauljensen@google.com> Merge "Plumb WiFi packet filtering HAL APIs to Network Agent." into mm-wireless-dev am: c121fe3f27 am: 547c7b692e
am: 1b9e6b8418

* commit '1b9e6b8418c4e00e29f7b1689a76c4d13b89871f':
Plumb WiFi packet filtering HAL APIs to Network Agent.
547c7b692ebd03dc108ef1397be5c15a19f0dab0 03-Mar-2016 Paul Jensen <pauljensen@google.com> Merge "Plumb WiFi packet filtering HAL APIs to Network Agent." into mm-wireless-dev
am: c121fe3f27

* commit 'c121fe3f2733b3d1d091f2f87fb53b2e3581ca82':
Plumb WiFi packet filtering HAL APIs to Network Agent.
c121fe3f2733b3d1d091f2f87fb53b2e3581ca82 03-Mar-2016 Lorenzo Colitti <lorenzo@google.com> Merge "Plumb WiFi packet filtering HAL APIs to Network Agent." into mm-wireless-dev
c82b17af9c2e931b5f37bfa0bc0513f3cbc43f68 03-Mar-2016 Sharvil Nanavati <sharvil@google.com> Merge "Make sure WiFi country code gets set properly." into mm-wireless-dev am: 799d849a80 am: 2791875608
am: ab1929216c

* commit 'ab1929216cdd5ca5bb1015605de07f5cb28db0cd':
Make sure WiFi country code gets set properly.
6609df5a9c14e4440c085567a27437a8cfc50f88 14-Jan-2016 Paul Jensen <pauljensen@google.com> Plumb WiFi packet filtering HAL APIs to Network Agent.

Bug: 26238573
Change-Id: I67e08f4771007a2ea2cbc7a93eaaa55cddd017a2
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
2791875608a19bde5bf431294502a9b138125278 03-Mar-2016 Sharvil Nanavati <sharvil@google.com> Merge "Make sure WiFi country code gets set properly." into mm-wireless-dev
am: 799d849a80

* commit '799d849a809a8f98bf13ac5cbbb441882d35509f':
Make sure WiFi country code gets set properly.
799d849a809a8f98bf13ac5cbbb441882d35509f 03-Mar-2016 Paul Stewart <pstew@google.com> Merge "Make sure WiFi country code gets set properly." into mm-wireless-dev
7bd38da9974af5fea81aab4bf4438299d6158aaa 03-Mar-2016 mukesh agrawal <quiche@google.com> Merge "make ringbuffer size configurable" into mm-wireless-dev am: 3e3ad8dfb0 am: 90ee0a6ad4
am: 148fedcb2c

* commit '148fedcb2c75f2ca1cc2b48faf6d849b27b3cfb6':
make ringbuffer size configurable
047e255bad31d118d029c1f68d6907f5c45c7bcb 03-Mar-2016 mukesh agrawal <quiche@google.com> Merge "WifiLogger: manage ring buffers by bytes" into mm-wireless-dev am: 84f4423601 am: 762e4ccc42
am: aa5f8521a1

* commit 'aa5f8521a1343b94dbcb32a3e364d46b4e44425a':
WifiLogger: manage ring buffers by bytes
90ee0a6ad4ce8ac3280fd07a0b148d82678fc6a0 03-Mar-2016 mukesh agrawal <quiche@google.com> Merge "make ringbuffer size configurable" into mm-wireless-dev
am: 3e3ad8dfb0

* commit '3e3ad8dfb0eddfc98ed21ce51a96a28924fe8c14':
make ringbuffer size configurable
762e4ccc42148315dbd4c4c6aae14e0c45d78588 03-Mar-2016 mukesh agrawal <quiche@google.com> Merge "WifiLogger: manage ring buffers by bytes" into mm-wireless-dev
am: 84f4423601

* commit '84f44236019a1ae41739984c12eccdd14ca97e3f':
WifiLogger: manage ring buffers by bytes
3c0fe5c2b6e79ae1e8c9b4112c861f5260baa579 03-Mar-2016 mukesh agrawal <quiche@google.com> Merge "add ByteArrayRingBuffer" into mm-wireless-dev am: 00ed767aee am: f19b893245
am: 0bdb1b2754

* commit '0bdb1b27548885e2ed92c576a813daa05e0f893e':
add ByteArrayRingBuffer
f19b89324583cf23eb5cea9b5f94810a5a5825c5 03-Mar-2016 mukesh agrawal <quiche@google.com> Merge "add ByteArrayRingBuffer" into mm-wireless-dev
am: 00ed767aee

* commit '00ed767aee2b1eaef10b849a27f1ce6bda43f83f':
add ByteArrayRingBuffer
3e3ad8dfb0eddfc98ed21ce51a96a28924fe8c14 03-Mar-2016 Mukesh Agrawal <quiche@google.com> Merge "make ringbuffer size configurable" into mm-wireless-dev
84f44236019a1ae41739984c12eccdd14ca97e3f 03-Mar-2016 Mukesh Agrawal <quiche@google.com> Merge "WifiLogger: manage ring buffers by bytes" into mm-wireless-dev
00ed767aee2b1eaef10b849a27f1ce6bda43f83f 03-Mar-2016 Mukesh Agrawal <quiche@google.com> Merge "add ByteArrayRingBuffer" into mm-wireless-dev
38929c9501f3e7a327f925736f211a8267d37813 03-Mar-2016 Mitchell Wills <mwills@google.com> Merge "Update scan band channels when needed" into mm-wireless-dev am: 25d25de358 am: c42e29a329
am: 0e24f5eb5c

* commit '0e24f5eb5cdc4d09d1a3a0cc2c9f2fccd88831ad':
Update scan band channels when needed
c42e29a329fabcbcb9868f4966c106f865a199e8 03-Mar-2016 Mitchell Wills <mwills@google.com> Merge "Update scan band channels when needed" into mm-wireless-dev
am: 25d25de358

* commit '25d25de358ece952e16420a89dd899ebed46f77a':
Update scan band channels when needed
25d25de358ece952e16420a89dd899ebed46f77a 03-Mar-2016 Mitchell Wills <mwills@google.com> Merge "Update scan band channels when needed" into mm-wireless-dev
6ae6e48a6d3c4e76b05f510a6aa423dc4beb5df0 02-Mar-2016 Randy Pan <zpan@google.com> Merge "Fix ScanDetailCache thread safety issue" into mm-wireless-dev am: 3006ab39ff am: 900f0bce69
am: 9410a9ab57

* commit '9410a9ab57c965c37d11e44716fd6ba11283476f':
Fix ScanDetailCache thread safety issue
900f0bce69543e60b5546b9722f845e970540eb4 02-Mar-2016 Randy Pan <zpan@google.com> Merge "Fix ScanDetailCache thread safety issue" into mm-wireless-dev
am: 3006ab39ff

* commit '3006ab39ff7cf73197c097418a2b510349925b25':
Fix ScanDetailCache thread safety issue
3006ab39ff7cf73197c097418a2b510349925b25 02-Mar-2016 Randy Pan <zpan@google.com> Merge "Fix ScanDetailCache thread safety issue" into mm-wireless-dev
6c8745470e4819996b3797dbec324b1cb88e892b 26-Feb-2016 Sharvil Nanavati <sharvil@google.com> Make sure WiFi country code gets set properly.

The current logic forces the country code to be set if it has never
been *attempted* to be set before or if a new country code is being set.
However, it doesn't handle the case where setting the country code with
the driver fails.

This change always forces the country code to be set if it has never
been set for, taking into account potential failures coming back
from the native layer.

Cherry picked from 96cbf09d2430d0f1dc4a06bb62263c56469d63f2

Bug: 25208308
Change-Id: Ie0f03e9a16a0f681b2977f4ee19af9339281a9c0
ndroid/server/wifi/WifiStateMachine.java
7713c37038f24f06039e5c4c3c191e10a1b9e159 02-Mar-2016 Randy Pan <zpan@google.com> Fix ScanDetailCache thread safety issue

Changed the type of ScanDetailCache HashMap to ConcurrentHashMap.
Tuned ScanDetailCaches and ScanDetailCache ConcurrentHashMap
concurrency level parameter to save memory.

Bug: 27064997
Change-Id: Icc0a36970fc58142968bccfe2d94a7d5a039344d
ndroid/server/wifi/ScanDetailCache.java
ndroid/server/wifi/WifiConfigManager.java
3fabf249174763184b6974207ebd78ca355dd31c 02-Mar-2016 Erik Kline <ek@google.com> Merge changes from topic \'ndoe\' into mm-wireless-dev am: 4123d08364 am: 9506574387
am: 293595951f

* commit '293595951f03578a9e14c5fee13e8206d793c1bb':
Disable/enable ND offload whenever 464xlat is enabled/disabled
Add NDOE calls to WifiNative
9506574387c00033ad7b0e95a4c43d0753e42b56 02-Mar-2016 Erik Kline <ek@google.com> Merge changes from topic \'ndoe\' into mm-wireless-dev
am: 4123d08364

* commit '4123d0836446e8979a4e012a0de51f73bdfcafb8':
Disable/enable ND offload whenever 464xlat is enabled/disabled
Add NDOE calls to WifiNative
4123d0836446e8979a4e012a0de51f73bdfcafb8 02-Mar-2016 Erik Kline <ek@google.com> Merge changes from topic 'ndoe' into mm-wireless-dev

* changes:
Disable/enable ND offload whenever 464xlat is enabled/disabled
Add NDOE calls to WifiNative
820df816845a823d54ebf429e5244e53e2a8a323 02-Mar-2016 Roshan Pius <rpius@google.com> Merge "WifiStateMachine: Remove ScanDetailCache" into mm-wireless-dev am: 2bcef4b02f am: 7daffc2adc
am: c68dc4a80b

* commit 'c68dc4a80bc83310c9b765981429308c13829703':
WifiStateMachine: Remove ScanDetailCache
fef1495477206d4cabfc95325d71de41790cf9cc 02-Mar-2016 mukesh agrawal <quiche@google.com> make ringbuffer size configurable

Different builds of the WiFi service may want to have different
ring buffer sizes. To allow for this, have the WiFi service
consult Resources for the size to use.

BUG=27264418
TEST=unit tests
TEST=add Log call in WSM ctor, verify size from values.xml was used

Change-Id: Ie6adc9efe107dfeaf4894aaff35c0beb6f7f9819
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiStateMachine.java
b46c550a7305e6c42af4ca92a964b801c33f1f72 02-Mar-2016 mukesh agrawal <quiche@google.com> WifiLogger: manage ring buffers by bytes

At present, we manage the ring buffers by the number of
entries, rather than the number of bytes. Since the size
of an entry is variable, managing by the number of entries
doesn't give us solid control over the amount of memory
used.

To solve this, switch from LimitedCircularArray<byte[]>, to
ByteArrayRingBuffer. ByteArrayRingBuffer limits the number of
bytes, rather than the number of entries.

To facilitate testing, make two of WifiLogger's inner classes
(BugReport and LimitedCircularArray) package-private, instead
of strictly private.

BUG=27264379
TEST=(new) unit tests

Change-Id: I2ed6557bd0b40db3227e1e22ea7ff9f8a27ab2ba
ndroid/server/wifi/WifiLogger.java
cc84bc6179db408b1e45168d43e10ba0ab089fca 01-Mar-2016 mukesh agrawal <quiche@google.com> add ByteArrayRingBuffer

We want to manage the debug ring buffers by total spaced used,
rather than by the number of entries in the ring. Add a new
class, ByteArrayRingBuffer, to provide the needed functionality.

BUG=27264379
TEST=(new) unit tests

Change-Id: I6e1ce82e028fc621f3fc9c96a5cb0cbd71c2d4e3
ndroid/server/wifi/util/ByteArrayRingBuffer.java
7daffc2adcbdb907d3689dadac0f62be857dac18 02-Mar-2016 Roshan Pius <rpius@google.com> Merge "WifiStateMachine: Remove ScanDetailCache" into mm-wireless-dev
am: 2bcef4b02f

* commit '2bcef4b02f2ee2bc2219f672a7d2483f34bc68fb':
WifiStateMachine: Remove ScanDetailCache
2bcef4b02f2ee2bc2219f672a7d2483f34bc68fb 02-Mar-2016 Roshan Pius <rpius@google.com> Merge "WifiStateMachine: Remove ScanDetailCache" into mm-wireless-dev
15f415fd558fc9fc2e62899cb6abe9fecff4ad45 01-Mar-2016 Randy Pan <zpan@google.com> Merge "Fix WifiConfigManager thread safety issue" into mm-wireless-dev am: 6f5af9b7f6 am: ab51f239fd
am: d73a59a5d5

* commit 'd73a59a5d594baee7cd71d7007d01573cdd5c872':
Fix WifiConfigManager thread safety issue
3f61834661c93903ef1275c683a04864d5fe0800 01-Mar-2016 Randy Pan <zpan@google.com> Merge "Request score from NetworkScoreManager" into mm-wireless-dev am: 476a705b3b am: 6226db5c00
am: 3d4a3f9ee0

* commit '3d4a3f9ee0c62a20244d8da934f3bf2c73a605f5':
Request score from NetworkScoreManager
ab51f239fdcbdb0ef6e6f4205c1d0e2b307731ce 01-Mar-2016 Randy Pan <zpan@google.com> Merge "Fix WifiConfigManager thread safety issue" into mm-wireless-dev
am: 6f5af9b7f6

* commit '6f5af9b7f69b15369238bd2642c46638ba1f0255':
Fix WifiConfigManager thread safety issue
6f5af9b7f69b15369238bd2642c46638ba1f0255 01-Mar-2016 Randy Pan <zpan@google.com> Merge "Fix WifiConfigManager thread safety issue" into mm-wireless-dev
6226db5c008e38b536d4679db43878ec75d12337 01-Mar-2016 Randy Pan <zpan@google.com> Merge "Request score from NetworkScoreManager" into mm-wireless-dev
am: 476a705b3b

* commit '476a705b3b97a7232773c005d228ec331f2a292a':
Request score from NetworkScoreManager
476a705b3b97a7232773c005d228ec331f2a292a 01-Mar-2016 Randy Pan <zpan@google.com> Merge "Request score from NetworkScoreManager" into mm-wireless-dev
e6d8fa5fb50afdfc04922f7f87c2cac08db5bbec 29-Feb-2016 Mitchell Wills <mwills@google.com> Update scan band channels when needed

The involves adding an ability to channel helper to trigger a channel
list update.

Bug: 27381346
Change-Id: I7908018ff8136b9ce7880d5090bbe9e6fb63405d
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/scanner/ChannelHelper.java
ndroid/server/wifi/scanner/HalChannelHelper.java
ndroid/server/wifi/scanner/KnownBandsChannelHelper.java
ndroid/server/wifi/scanner/NoBandChannelHelper.java
ndroid/server/wifi/scanner/PresetKnownBandsChannelHelper.java
429cfce25c56c4c041c428711888a72bf10b118d 01-Mar-2016 Roshan Pius <rpius@google.com> WifiStateMachine: Remove ScanDetailCache

Remove all ScanDetailCache references from WifiStateMachine since it's
not being used. Add a new synchronization object to lock all scan result
updation.

BUG: 27412278
Change-Id: Ie56c632103d3551dbe5c10803041eb290f516951
TEST: `runtest frameworks-wifi`
ndroid/server/wifi/WifiStateMachine.java
6bb2f7103134f742100c5f71ec9f85a0ef58581e 29-Feb-2016 Erik Kline <ek@google.com> Disable/enable ND offload whenever 464xlat is enabled/disabled

Bug: 26238390
Change-Id: I40d55f51b2ccf3e5da8eaecbf0f1127a7eea92b5
ndroid/server/wifi/WifiStateMachine.java
3dd6f75ff2ab823bd0c14581f2e047c74916f16f 29-Feb-2016 Erik Kline <ek@google.com> Add NDOE calls to WifiNative

Bug: 26238390
Change-Id: I23109a6c3692dc49c4c931151c3c5ed735aa23a7
ndroid/server/wifi/WifiNative.java
1e186202fdf6f59dc3ffc749c757072edb538ad6 01-Mar-2016 Paul Stewart <pstew@google.com> Revert inadvertent EAP-SIM merges from mnc-dr1.5-dev am: dec9f72b98
am: a336b401b1

* commit 'a336b401b1ce1a629d130283d3e54f74af0d5557':
Revert inadvertent EAP-SIM merges from mnc-dr1.5-dev
dec9f72b9872bcdea2c6b7ef9eae5470d6141291 01-Mar-2016 Paul Stewart <pstew@google.com> Revert inadvertent EAP-SIM merges from mnc-dr1.5-dev

This reverts the following errant merges from
mnc-dr1.5-dev, which should have been marked with
"DO NOT MERGE":

12a3cb2980e200dd7869e9d1ee4659a6c7e44c02
b732b11b2f24d57859bf0f301cf22e2ddc5dedc3

BUG=27420454

Change-Id: I7ba112cf4fdd127e16972769c678c5ca125489c3
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
b4a7a050244599421d4b08c2374237426a7f7f04 01-Mar-2016 Paul Stewart <pstew@google.com> Revert "Appropriately fail EAP-SIM/AKA when SIM doesn\'t generate good response" am: f9aabd71e9 am: 12a3cb2980
am: 49c7ec2043

* commit '49c7ec204360a86b5b4ef1ab56345e84ebd79a6d':
Revert "Appropriately fail EAP-SIM/AKA when SIM doesn't generate good response"
760277c8d151f803cf42ef6e3c1b563a96a20680 01-Mar-2016 Paul Stewart <pstew@google.com> Revert "WifiStateMachine: Only respond once to multiple EAP-SIM challenges" am: 550a2c8d88 am: b732b11b2f
am: 08bbd909c6

* commit '08bbd909c6dfbd9d4d4a19a92f47e5ff285254f4':
Revert "WifiStateMachine: Only respond once to multiple EAP-SIM challenges"
12a3cb2980e200dd7869e9d1ee4659a6c7e44c02 01-Mar-2016 Paul Stewart <pstew@google.com> Revert "Appropriately fail EAP-SIM/AKA when SIM doesn\'t generate good response"
am: f9aabd71e9

* commit 'f9aabd71e9e60b80ea08bf92a3d3ebb28c7031df':
Revert "Appropriately fail EAP-SIM/AKA when SIM doesn't generate good response"
b732b11b2f24d57859bf0f301cf22e2ddc5dedc3 01-Mar-2016 Paul Stewart <pstew@google.com> Revert "WifiStateMachine: Only respond once to multiple EAP-SIM challenges"
am: 550a2c8d88

* commit '550a2c8d8885c56b049dcf5369cf6bc9234543b7':
Revert "WifiStateMachine: Only respond once to multiple EAP-SIM challenges"
adf70a7b3856bed24be4ddaf3a7d69da37c1f952 01-Mar-2016 Randy Pan <zpan@google.com> Fix WifiConfigManager thread safety issue

Change ScanDetailCaches type from HashMap to ConcurrentHashMap,
which is thread safe.

Bug: 27064997
Change-Id: I7d7228e8ad479af2b4d14e6a544c1bfc94bd5f2c
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiNetworkHistory.java
e5f74b10e5011ffb33739b2ae3d7840db7a5155b 29-Feb-2016 Randy Pan <zpan@google.com> Request score from NetworkScoreManager

Fixed a regression from QNS that scores were never requested
from the NetworkScoreManger.

Bug: 27246174
Change-Id: Ie0795d45264d4d18a9f73669bf28a7475a6cf427
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
ca2d492d444c9e69e54d3de98ad2a996774a2b6c 29-Feb-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Refactor remove network" into mm-wireless-dev am: 60c716a0ed am: e27341c71a
am: 19853df10d

* commit '19853df10d4ad33fbaee50d4168d71d766f1ce4e':
WifiConfigManager: Refactor remove network
e739ea159f8c80723f98bb26c813bde40bb0a151 29-Feb-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Cleanup instance names" into mm-wireless-dev am: dfd0b02138 am: 4b7cac8c07
am: 4e878b9df8

* commit '4e878b9df84786cdaf5494e24a7c4f088f69cd12':
WifiConfigManager: Cleanup instance names
e27341c71aa34f49dfc90d1ebee1e5eadb6a4605 29-Feb-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Refactor remove network" into mm-wireless-dev
am: 60c716a0ed

* commit '60c716a0ed1549fe9e3e9e8528abc284f32a8aba':
WifiConfigManager: Refactor remove network
4b7cac8c07150195ff5e27f05f3f2e9927a74804 29-Feb-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Cleanup instance names" into mm-wireless-dev
am: dfd0b02138

* commit 'dfd0b0213860f726e25a8c17ab648e4e56a8abcc':
WifiConfigManager: Cleanup instance names
60c716a0ed1549fe9e3e9e8528abc284f32a8aba 29-Feb-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Refactor remove network" into mm-wireless-dev
dfd0b0213860f726e25a8c17ab648e4e56a8abcc 29-Feb-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Cleanup instance names" into mm-wireless-dev
e7564757de3efe845c23eb67eef6cd28d11300ce 29-Feb-2016 Rebecca Silberstein <silberst@google.com> Merge "Fix checkstyle issues with ScanDetailCache" into mm-wireless-dev am: 5ca7933b04 am: 34d1b0a6bb
am: cf91ad7b02

* commit 'cf91ad7b02faa3c5571edb2576bb375d0825604d':
Fix checkstyle issues with ScanDetailCache
34d1b0a6bb748eb3e87eeab8e5f17bdcde35669e 29-Feb-2016 Rebecca Silberstein <silberst@google.com> Merge "Fix checkstyle issues with ScanDetailCache" into mm-wireless-dev
am: 5ca7933b04

* commit '5ca7933b040e22b741cc75b894823cc02cbc5816':
Fix checkstyle issues with ScanDetailCache
5ca7933b040e22b741cc75b894823cc02cbc5816 29-Feb-2016 Rebecca Silberstein <silberst@google.com> Merge "Fix checkstyle issues with ScanDetailCache" into mm-wireless-dev
b9601e3985540a776eff1d63355a721bea56aa4c 29-Feb-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Cleanup instance names

Change some remaining configStore variables to configManager.

BUG: 27296463
Change-Id: Ib8c435edb056e5c11d9bc960b127b29f9aa8956d
ndroid/server/wifi/FrameworkFacade.java
4edab180ce62271efc1909c6a70089dfe3a8e20c 29-Feb-2016 zhangshuxiao <zhangshuxiao@xiaomi.com> Merge "When wificonfiguration is null, return a failure message to the caller."
am: 7389b9bbe9

* commit '7389b9bbe985a8c68d31a0b60df6f176c5e7e56a':
When wificonfiguration is null, return a failure message to the caller.
f9aabd71e9e60b80ea08bf92a3d3ebb28c7031df 29-Feb-2016 Paul Stewart <pstew@google.com> Revert "Appropriately fail EAP-SIM/AKA when SIM doesn't generate good response"

This reverts commit 5ebc35f19feab2755a13cf7d5acaeff4bbc78994.
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
550a2c8d8885c56b049dcf5369cf6bc9234543b7 29-Feb-2016 Paul Stewart <pstew@google.com> Revert "WifiStateMachine: Only respond once to multiple EAP-SIM challenges"

This reverts commit 71e35742798ca292d2fb727dd3a73e11b0f9b09d.

Change-Id: I4dcc9fadb14b50870e08b94f0fc45703e0ea7582
ndroid/server/wifi/WifiStateMachine.java
df145a022ee274f197f403542504fd79bd0d0159 29-Feb-2016 Erik Kline <ek@google.com> Use IpManager for HTTP proxy and TCP buffer sizes am: a9b34f1390 am: 33a835ab00
am: e7f933b779

* commit 'e7f933b779e1e405cbf9583e2dfdea1acb1d6e5e':
Use IpManager for HTTP proxy and TCP buffer sizes
33a835ab0060d25faa6852c84cda7bbbf2fa244a 29-Feb-2016 Erik Kline <ek@google.com> Use IpManager for HTTP proxy and TCP buffer sizes
am: a9b34f1390

* commit 'a9b34f1390c21af703606669b6548ef4d02d8231':
Use IpManager for HTTP proxy and TCP buffer sizes
a9b34f1390c21af703606669b6548ef4d02d8231 22-Feb-2016 Erik Kline <ek@google.com> Use IpManager for HTTP proxy and TCP buffer sizes

Bug: 26991160
Change-Id: I8ab4d5b4d6a1c05c094cf09dba81e99a972cd5ef
ndroid/server/wifi/WifiStateMachine.java
7b36f5bbab32dd1f0980603687aa6087fd958643 27-Feb-2016 Roshan Pius <rpius@google.com> resolve merge conflicts of 2d65b9aaaa to nyc-dev am: 6a229f7908
am: c086a61d9b

* commit 'c086a61d9b84421c00ef1dabdd4a499456f03458':
WifiConfigStore: New WifiConfigStore (Part 2)
6a229f790826761b79d5b71e01d7238299c81eff 27-Feb-2016 Roshan Pius <rpius@google.com> resolve merge conflicts of 2d65b9aaaa to nyc-dev

Change-Id: I52c055a8b26d01745d3378ef062faab9952ee393
c14fe5d3f6a84d8a0788956e15f9102a3aa354a6 25-Feb-2016 Rebecca Silberstein <silberst@google.com> Fix checkstyle issues with ScanDetailCache

ScanDetailCache was missing the header and documentation. Fix these
along with other style issues.

BUG=27361133

Change-Id: I0e289b1df02774cdfe7d787124dd5630156995bd
ndroid/server/wifi/ScanDetailCache.java
39a30fab5b078c61421f30c7940f17b9fbc7d29f 27-Feb-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigStore: New WifiConfigStore (Part 1)" into mm-wireless-dev am: f68805457e am: 54052854a7
am: 36de9c0d53

* commit '36de9c0d539c7eecec867d7fcc383f37b7360868':
WifiConfigStore: New WifiConfigStore (Part 1)
cf608a89599ccd38b1471af2e2546638fc4d3142 26-Feb-2016 Roshan Pius <rpius@google.com> WifiConfigStore: Cleanup logging in the module

Adding some localLog debug messages in every method in the class.

BUG: 27375886
Change-Id: Iaf54c642b767c5052613fa8951e97ea1b0e98dfe
TEST: `runtest frameworks-wifi`
ndroid/server/wifi/WifiConfigStore.java
dc61ad4fe8a84909a288af50a8b187c98e2194b6 26-Feb-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Refactor remove network

Move the actual removal of network from database into a common utility
method which can be invoked in handleUserSwitch & removeNetwork.

This CL is part 1 of refactoring some repeating patterns in
WifiConfigManager.

BUG: 27364882
Change-Id: I374a31f4d5cf4d7ec480b9b40f26af33e1deb8b1
TEST: `runtest frameworks-wifi`
ndroid/server/wifi/WifiConfigManager.java
2d65b9aaaa740ecf66bf4734c12aea3df88e352a 24-Feb-2016 Roshan Pius <rpius@google.com> WifiConfigStore: New WifiConfigStore (Part 2)

Integrate the new WifiConfigStore into WifiConfigManager class.
Most of the public methods that have been moved to ConfigStore have been
stubbed out in WifiConfigManager. Some of the methods have been changed
to make it consistent with the other methods.

The end goal of this CL to remove all WifiNative usages in
WifiConfigManager class.

Other related changes:
1. Changes in unit-tests to use mock wifiNative everywhere.
2. Change WifiConfigManager to accept an instance of KeyStore so that it
can be mocked out in unit-tests.

BUG=27299172
TEST:`mmma -j32 frameworks/opt/net/wifi/service/ && runtest
frameworks-wif`

Change-Id: I1656d81aec0ae3337bd794541b5a0bde9cddd48e
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiStateMachine.java
54052854a7f1a9089bcd0877bf995d69b2e602ae 27-Feb-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigStore: New WifiConfigStore (Part 1)" into mm-wireless-dev
am: f68805457e

* commit 'f68805457e24e9729629c0622f0b2763a4dbec1b':
WifiConfigStore: New WifiConfigStore (Part 1)
f68805457e24e9729629c0622f0b2763a4dbec1b 27-Feb-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigStore: New WifiConfigStore (Part 1)" into mm-wireless-dev
4bc67755145c56efea477818ab5b09b54d5d24ba 26-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Remove a bunch of dead wifi code" into mm-wireless-dev am: 2691cf8a53 am: 7bbcebafd6
am: a591983d84

* commit 'a591983d84a3926413c2beee6766176682d6b881':
Remove a bunch of dead wifi code
e812d55a5329a42726f2e257c0f16a29c2a451dd 24-Feb-2016 Roshan Pius <rpius@google.com> WifiConfigStore: New WifiConfigStore (Part 1)

This is part 1 of creating the new WifiConfigStore class.

Trying to move parts of WifiConfigManager that deal with only
saving/loading wifi configurations from wpa_supplicant into a separate
class. Some of the methods are direct copies of the methods in
WifiConfigManager, but there are others which needed some modifications.
Tried to keep the new class to only contain direct interactions with
supplicant, but there are a some dependencies which needed to pulled
in along with those like:
1. Keystore interactions for enterprise networks.
2. Certificate migration

Will put up a follow-up CL for integrating this class into
WifiConfigManager.

BUG=27299172
Change-Id: I3e4527a310e0d39202c9ae9433e9a5a891443eef
TEST:`mmma -j32 frameworks/opt/net/wifi/service/`
ndroid/server/wifi/WifiConfigStore.java
7bbcebafd698aee1b18062f9b2120c70c1fc6c47 26-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Remove a bunch of dead wifi code" into mm-wireless-dev
am: 2691cf8a53

* commit '2691cf8a53d13c47eccf71e9c16c3cb9ef35af27':
Remove a bunch of dead wifi code
2691cf8a53d13c47eccf71e9c16c3cb9ef35af27 26-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Remove a bunch of dead wifi code" into mm-wireless-dev
8448037f4028b493a7fd55ac75435a253be2bedc 26-Feb-2016 Glen Kuhne <kuh@google.com> Merge "Add makeWifiConfigManager() to FacadeFramework" into mm-wireless-dev am: 2bdcccb7ba am: 52da3dd634
am: 233727ef47

* commit '233727ef474f9b3f93b9882173b908347d216580':
Add makeWifiConfigManager() to FacadeFramework
52da3dd6345bb068b0f0ec8fd6a749b2ee977d89 26-Feb-2016 Glen Kuhne <kuh@google.com> Merge "Add makeWifiConfigManager() to FacadeFramework" into mm-wireless-dev
am: 2bdcccb7ba

* commit '2bdcccb7badf35e9e00ea0b3b8e315f3f77af86a':
Add makeWifiConfigManager() to FacadeFramework
2bdcccb7badf35e9e00ea0b3b8e315f3f77af86a 26-Feb-2016 Glen Kuhne <kuh@google.com> Merge "Add makeWifiConfigManager() to FacadeFramework" into mm-wireless-dev
8a41ef9c8154b382ecfd2041286ec31554ac0776 26-Feb-2016 Rebecca Silberstein <silberst@google.com> Merge "checkstyle fixes for ScanDetail" into mm-wireless-dev am: 1fe5d7fc41 am: 590b0d9b78
am: dbd187487b

* commit 'dbd187487bd1770689536a3b2da5b33c3b6d1c99':
checkstyle fixes for ScanDetail
04d4b0e9587d8c01ab4182f5b7234ec8b7d653ea 26-Feb-2016 Randy Pan <zpan@google.com> Correct WifiQualifiedNetworkSelection file name am: 2177731ae0 am: d8801e6ae4
am: 1f9eaadd3b

* commit '1f9eaadd3bea127b0b9422034c13bc3147be9b85':
Correct WifiQualifiedNetworkSelection file name
590b0d9b7879a4d7f24a057603ac82f30aff80f4 26-Feb-2016 Rebecca Silberstein <silberst@google.com> Merge "checkstyle fixes for ScanDetail" into mm-wireless-dev
am: 1fe5d7fc41

* commit '1fe5d7fc417c0861572e09644ddd4437dbc02069':
checkstyle fixes for ScanDetail
1fe5d7fc417c0861572e09644ddd4437dbc02069 26-Feb-2016 Rebecca Silberstein <silberst@google.com> Merge "checkstyle fixes for ScanDetail" into mm-wireless-dev
d8801e6ae46f95b2adb6e374c96b6b5d7ca64879 26-Feb-2016 Randy Pan <zpan@google.com> Correct WifiQualifiedNetworkSelection file name
am: 2177731ae0

* commit '2177731ae0a49be7dd66fd05dfb0ca73831b062c':
Correct WifiQualifiedNetworkSelection file name
8f852de7a8f081aff36bc9896781b270ca88d0e8 25-Feb-2016 Glen Kuhne <kuh@google.com> Add makeWifiConfigManager() to FacadeFramework

Added a function to FacadeFramework to make WifiConfigManager, replaced
the constructor in WifiConfigManager unit tests with this function.

BUG=27359698

Change-Id: Id9c0e6757244527e7f5fe7143687a32dd8d96c58
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiStateMachine.java
0c216e7a8bf7bdbd84da2b6a0289e6b4e5082b4a 26-Feb-2016 zhangshuxiao <zhangshuxiao@xiaomi.com> When wificonfiguration is null, return a failure message to the caller.

When call syncEnableNetwork, the netId may be incorrect, so
the config of this netid is null. In this case, we need to
return a failue message to the caller.

Change-Id: I5a5a9e856142f09447aa52aa6603fa79acb3e0d1
Signed-off-by: zhangshuxiao <zhangshuxiao@xiaomi.com>
ndroid/server/wifi/WifiStateMachine.java
96cbf09d2430d0f1dc4a06bb62263c56469d63f2 26-Feb-2016 Sharvil Nanavati <sharvil@google.com> DO NOT MERGE ANYWHERE Make sure WiFi country code gets set properly.

The current logic forces the country code to be set if it has never
been *attempted* to be set before or if a new country code is being set.
However, it doesn't handle the case where setting the country code with
the driver fails.

This change always forces the country code to be set if it has never
been set for, taking into account potential failures coming back
from the native layer.

Bug: 25208308
Change-Id: Ie0f03e9a16a0f681b2977f4ee19af9339281a9c0
ndroid/server/wifi/WifiStateMachine.java
01ba59ce1373842f96c3d5e4adc88fe455f72f0a 26-Feb-2016 Glen Kuhne <kuh@google.com> Merge "WifiNetworkHistory log level lowering" into mm-wireless-dev am: 01dd88cf30 am: 44b562e47e
am: fa0f395a13

* commit 'fa0f395a139615b9f049e3c1620d1df698973147':
WifiNetworkHistory log level lowering
611faad8e1962648172a8971400620a892bf4816 26-Feb-2016 Glen Kuhne <kuh@google.com> WifiMetric ConnectionEvent logging refactor am: 4dead162c5 am: 62681bff4b
am: 32a03a534e

* commit '32a03a534e14411f3b27aca9fa13d05899857fb1':
WifiMetric ConnectionEvent logging refactor
44b562e47ee1cb4b5ce8b64b2cb7c0adc9b71d98 26-Feb-2016 Glen Kuhne <kuh@google.com> Merge "WifiNetworkHistory log level lowering" into mm-wireless-dev
am: 01dd88cf30

* commit '01dd88cf3004bbb9e3b6fd2257814e11d617a06d':
WifiNetworkHistory log level lowering
62681bff4b0c7eadf35546f6e6f35a19268e87a3 26-Feb-2016 Glen Kuhne <kuh@google.com> WifiMetric ConnectionEvent logging refactor
am: 4dead162c5

* commit '4dead162c5336443e9d7b3deae5eb26b07d39254':
WifiMetric ConnectionEvent logging refactor
2af03130d7f85823223b8591dc52858d851b301d 24-Feb-2016 Mitchell Wills <mwills@google.com> Remove a bunch of dead wifi code

Bug: 26907933

Change-Id: I3398b9bc9a2c915319ac4533b402ba400588f6e8
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/SupplicantStateTracker.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiTrafficPoller.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
b3c9b82f86637a6bc0a9e442ee759bd4eb5d8ad0 26-Feb-2016 Rebecca Silberstein <silberst@google.com> checkstyle fixes for ScanDetail

Fix issues flagged by checkstyle.

BUG=27363592

Change-Id: Iddd584cb780b806f1bef1d56b58b97e8e8dfbd8c
ndroid/server/wifi/ScanDetail.java
2177731ae0a49be7dd66fd05dfb0ca73831b062c 26-Feb-2016 Randy Pan <zpan@google.com> Correct WifiQualifiedNetworkSelection file name

Rename WifiQualifiedNetworkSelection to
WifiQualifiedNetworkSelector to be consistent with the class
name.

Bug: 27296738
Change-Id: I48d21b1361cc2331b09cab84282eb47017be7f23
ndroid/server/wifi/WifiQualifiedNetworkSelection.java
ndroid/server/wifi/WifiQualifiedNetworkSelector.java
01dd88cf3004bbb9e3b6fd2257814e11d617a06d 25-Feb-2016 Glen Kuhne <kuh@google.com> Merge "WifiNetworkHistory log level lowering" into mm-wireless-dev
4dead162c5336443e9d7b3deae5eb26b07d39254 19-Feb-2016 Glen Kuhne <kuh@google.com> WifiMetric ConnectionEvent logging refactor

Modified the placement of start & end-ConnectionEvent() calls in
WifiStateMachine and the Roam Types they use, to more accurately describe
the types of connection events that are occuring.
Improved the human readability of metrics when as part of 'dumpsys
wifi'.

BUG=25691077
Change-Id: Ia8bd8415cab0feec476e012fd1b0bfa358e35e52
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiStateMachine.java
66be910994057c5c5f1e2c0c25e11ab34796be9a 25-Feb-2016 Randy Pan <zpan@google.com> Merge "Retire ScanResult.autoJoinStatus" into mm-wireless-dev am: 7925cfb0de am: 0e38762759
am: a8a5ae46d6

* commit 'a8a5ae46d6212d59885c3df1cc1d51ef536c7e62':
Retire ScanResult.autoJoinStatus
4c6db2d950d8d6d204122c493e734d7244c2f89a 25-Feb-2016 Randy Pan <zpan@google.com> Merge "Delete auto join config" into mm-wireless-dev am: acdde5816c am: f3ceffe27f
am: bd0f762fd6

* commit 'bd0f762fd6a669b3c8d61a4459aac07c4a6755d6':
Delete auto join config
0e38762759db5c27d7dcf4ebbd72775542606db2 25-Feb-2016 Randy Pan <zpan@google.com> Merge "Retire ScanResult.autoJoinStatus" into mm-wireless-dev
am: 7925cfb0de

* commit '7925cfb0de40a8e7aba97bf1cff1f5da75fab987':
Retire ScanResult.autoJoinStatus
7925cfb0de40a8e7aba97bf1cff1f5da75fab987 25-Feb-2016 Randy Pan <zpan@google.com> Merge "Retire ScanResult.autoJoinStatus" into mm-wireless-dev
f3ceffe27f1f8c37e85746bf5166d2e881cada8d 25-Feb-2016 Randy Pan <zpan@google.com> Merge "Delete auto join config" into mm-wireless-dev
am: acdde5816c

* commit 'acdde5816c1a4d76cfc49c2eb5bfa8410d377558':
Delete auto join config
acdde5816c1a4d76cfc49c2eb5bfa8410d377558 25-Feb-2016 Randy Pan <zpan@google.com> Merge "Delete auto join config" into mm-wireless-dev
71e35742798ca292d2fb727dd3a73e11b0f9b09d 18-Feb-2016 Paul Stewart <pstew@google.com> WifiStateMachine: Only respond once to multiple EAP-SIM challenges

The commit in 5ebc35f19feab2755a13cf7d5acaeff4bbc78994 made an
attempt to fail the EAPOL process due to intermediate failures
with TelephonyManager. It's not clear how well that worked,
but it's clear from inspection that when multiple challenges
are supplied that the code then sent multiple simAuthResponse
messages -- one per challenge. This is clearly wrong.

This CL refactors the code to clearly separate the function
that generates the complete response string so it can be tested,
and leaves the handleGsmAuthRequest() method to interact with
mWifiNative in a hopefully more readable manner.

BUG: 26758602
Change-Id: Ibf8f85893e4c18195eb08114b5169dcff05dc045
TEST: New unit test for the getGsmSimAuthResponse method
ndroid/server/wifi/WifiStateMachine.java
313e93136c6ee79c1abe279c28a4373f4d68505a 25-Feb-2016 Etan Cohen <etancohen@google.com> Merge changes from topic 'merge_from_mmwd_022416-B'

* changes:
[NAN] Increase coverage
[NAN] Enable testing of apps faking client IDs
[NAN] Add code to clean-up after all (even No-Op) transactions
[NAN] Replace crashing on illegal state to failure response/ignore
9727977000b9239205a9221a7b8618d9051d57c1 25-Feb-2016 Rebecca Silberstein <silberst@google.com> Merge "Move calculateWifiScore out of WSM and create new WifiScoreReport class" into mm-wireless-dev am: 29fc49efc5 am: 21a0eaca95
am: acfb547fb6

* commit 'acfb547fb6c8d9ec155aa34b971e7b452565b081':
Move calculateWifiScore out of WSM and create new WifiScoreReport class
21a0eaca95a54bcd5878a7e36b2e25b64f4825f8 25-Feb-2016 Rebecca Silberstein <silberst@google.com> Merge "Move calculateWifiScore out of WSM and create new WifiScoreReport class" into mm-wireless-dev
am: 29fc49efc5

* commit '29fc49efc59d5ff061439f4c119931ba6deb55e6':
Move calculateWifiScore out of WSM and create new WifiScoreReport class
29fc49efc59d5ff061439f4c119931ba6deb55e6 25-Feb-2016 Rebecca Silberstein <silberst@google.com> Merge "Move calculateWifiScore out of WSM and create new WifiScoreReport class" into mm-wireless-dev
37aa802d07813e8d3940d6f79596b7b505982073 25-Feb-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Add SupplicantBridge callbacks" into mm-wireless-dev am: 1f8a9c2152 am: 7f18bae3a6
am: 4f3d8429ea

* commit '4f3d8429ea885cf6a23dc432b7a427c7d2c0e182':
WifiConfigManager: Add SupplicantBridge callbacks
23e948182ed54b7607d8b932accb3883a8e53fb7 24-Feb-2016 Etan Cohen <etancohen@google.com> [NAN] Enable testing of apps faking client IDs

Enable mocking of UIDs. Enables testing of multiple apps (each with
its own UID) trying to access 'invalid' client IDs - i.e. client IDs
which were created by different UIDs.

(cherry-pick of 5c0a79c305877c8c96df69035eed38c3650dfa5b,
Change-Id: Ib9d4282378d144a51d83229ed4d924a49375fd11)

Bug: 27335234
Change-Id: I38aa62d870d93fbf61996f63c9f97e5170862900
ndroid/server/wifi/nan/WifiNanServiceImpl.java
f86b06d732df2f892863a7c46ef96decadf451f6 24-Feb-2016 Etan Cohen <etancohen@google.com> [NAN] Add code to clean-up after all (even No-Op) transactions

Some transactions have no app-facing callbacks - e.g. cancelling a publish
or subscribe (app assumes it succeeds). In such cases still need to clean
up the internal transaction tracking state. Add No-Op callback in state
manager to perform that clean-up.

Add tests for above as well as for unknown transaction callback: i.e.
response codes from HAL which aren't "known" (not handled, possibly
yet).

(cherry-pick of 4f1887493430b6b61126f233f3de54201b363145,
Change-Id: Ia0be220310689c0e06030b71236d955a557b7a27)

Bug: 27334871
Change-Id: Ifbe51918a625b6e29024e4941925449e42be0bc6
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanStateManager.java
e704fdcd85489237de5fe90a43abb0d5b8af31fb 24-Feb-2016 Etan Cohen <etancohen@google.com> [NAN] Replace crashing on illegal state to failure response/ignore

Do not crash NAN service (i.e. system service) when illegal state or illegal
inputs are detected (especially inputs - since can be created by bad/malicious
app). Instead either ignore or respond with failure callbacks.

(cherry-pick of e903e3cb1e7a41fa20306dc3bd1f3518c51a8a86,
Change-Id: I09b28da3bea396633dbe76f729c276f9e5620c5d)

Bug: 27334919
Change-Id: Id1fcc6576dab83194cf2d0b78694ccbd9009f3d7
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
f99504e885ef365adb0c54263dcf7fecfedf9f1c 25-Feb-2016 Glen Kuhne <kuh@google.com> WifiNetworkHistory log level lowering

Lowered the log level of a few chatty log commands spamming Error
messages.

BUG=27294533

Change-Id: I668f0e96dcd59e2a61a5028f0402e511478d94ef
ndroid/server/wifi/WifiNetworkHistory.java
7f18bae3a6e6a6d83fb060995cbdd2ed62df275a 25-Feb-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Add SupplicantBridge callbacks" into mm-wireless-dev
am: 1f8a9c2152

* commit '1f8a9c21526f7cfd518fdcfa1e9ff42a1253f38d':
WifiConfigManager: Add SupplicantBridge callbacks
1f8a9c21526f7cfd518fdcfa1e9ff42a1253f38d 25-Feb-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigManager: Add SupplicantBridge callbacks" into mm-wireless-dev
23fe1c9201d6e734f3b4f727144a91c3a20a2627 24-Feb-2016 Randy Pan <zpan@google.com> Retire ScanResult.autoJoinStatus

This attribute is no longer in use.

Bug: 27340037
Change-Id: Id65230daf2c1b7085568f65fe3018cef54869fd0
ndroid/server/wifi/ScanDetailCache.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiNetworkHistory.java
ndroid/server/wifi/WifiStateMachine.java
b7224f0075035f1d5957e156f5666ac78d597e2c 24-Feb-2016 Randy Pan <zpan@google.com> Delete auto join config

Remove obsoleted auto join configuration. The configuration file
is no longer in use.

Bug: 27312337
Change-Id: I3b1945f56cd09809e84a7fe5c0b7e4a976fb35d5
ndroid/server/wifi/WifiConfigManager.java
25fccb255c269bf0c59fa776623a0002cc24a211 23-Feb-2016 Rebecca Silberstein <silberst@google.com> Move calculateWifiScore out of WSM and create new WifiScoreReport class

Pulled the calculation for a Wifi Score out of WSM and created a class to
hold score related objects. This new class holds the score report
string along with the badLinkspeedcount int. The calculateWifiScore
function is now a static method in the new WifiScoreReport class. Added
the ScoreReport to a couple of places where related counters are also
cleaned up.

This CL also cleans up some style issues and converts hardcoded values
to static variables for the class. No functionality changes were
introduced into the score calculation.

BUG=27312068

Change-Id: I167ecbef6e365923a687928235beecf3ac1b66f1
ndroid/server/wifi/WifiScoreReport.java
ndroid/server/wifi/WifiStateMachine.java
c8964161cf703ffa4b96962c87cbb712f256a850 25-Feb-2016 Paul Stewart <pstew@google.com> Merge "WifiNotificationController: Ignore "SCANNING" network state" into mm-wireless-dev am: e08c8038a4 am: 9456d35ba3
am: 07898ec830

* commit '07898ec83047934fa1acae407ebf60bcee62d9b3':
WifiNotificationController: Ignore "SCANNING" network state
8773f1b9016bd4587481f3b5074061aa37b31616 25-Feb-2016 Peter Qiu <zqiu@google.com> Merge "Use a wrapper for BackupManager" into mm-wireless-dev am: ac90154934 am: a73697c129
am: ed28118ebf

* commit 'ed28118ebf12fc034afb8bb2db20000f87d954b6':
Use a wrapper for BackupManager
9456d35ba321fa5e9cd629e416bb8bb78e8166e4 25-Feb-2016 Paul Stewart <pstew@google.com> Merge "WifiNotificationController: Ignore "SCANNING" network state" into mm-wireless-dev
am: e08c8038a4

* commit 'e08c8038a432eb68a3493abdfa7e69d92bad3b80':
WifiNotificationController: Ignore "SCANNING" network state
707a25b742207ccd870bb35ee54b0e47742b8ede 25-Feb-2016 Peter Qiu <zqiu@google.com> Merge "WifiController: handle WiFi toggle events in ApEnabledState" into mm-wireless-dev am: 303373e71a am: a09a7fd512
am: f644692408

* commit 'f644692408f955f92bf2a3cd77f91663fdf90a7d':
WifiController: handle WiFi toggle events in ApEnabledState
e08c8038a432eb68a3493abdfa7e69d92bad3b80 25-Feb-2016 Paul Stewart <pstew@google.com> Merge "WifiNotificationController: Ignore "SCANNING" network state" into mm-wireless-dev
a73697c129a759ab403dfc6929aadfa71ea52141 25-Feb-2016 Peter Qiu <zqiu@google.com> Merge "Use a wrapper for BackupManager" into mm-wireless-dev
am: ac90154934

* commit 'ac90154934c0daf4e69a6d38344b82eea8dee91b':
Use a wrapper for BackupManager
ac90154934c0daf4e69a6d38344b82eea8dee91b 25-Feb-2016 Peter Qiu <zqiu@google.com> Merge "Use a wrapper for BackupManager" into mm-wireless-dev
a09a7fd5125abc1df067201bcb604d95e9265644 24-Feb-2016 Peter Qiu <zqiu@google.com> Merge "WifiController: handle WiFi toggle events in ApEnabledState" into mm-wireless-dev
am: 303373e71a

* commit '303373e71a6f4474b22cc21a3e4282b563cf2a93':
WifiController: handle WiFi toggle events in ApEnabledState
750c6962838af6ab7ba034c80f2d325df7e74cbe 23-Feb-2016 Peter Qiu <zqiu@google.com> Use a wrapper for BackupManager

This avoids invoking calls to BackupManager/BackupManagerService during
unit test.

Bug:27296824
TEST=runtest frameworks-wifi

Change-Id: I3d4fe1b4d2fdabe079e65242099f4dd4ed4ab7f4
ndroid/server/wifi/BackupManagerProxy.java
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiApConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
303373e71a6f4474b22cc21a3e4282b563cf2a93 24-Feb-2016 Peter Qiu <zqiu@google.com> Merge "WifiController: handle WiFi toggle events in ApEnabledState" into mm-wireless-dev
fbeef71cf8251d4537f1ba65484f39d78c14b81b 24-Feb-2016 Etan Cohen <etancohen@google.com> Merge changes I9921d663,Ib9d42823,Ia0be2203,I09b28da3 into mm-wireless-dev

* changes:
[NAN] Increase coverage [DO NOT MERGE]
[NAN] Enable testing of apps faking client IDs [DO NOT MERGE]
[NAN] Add code to clean-up after all (even No-Op) transactions [DO NOT MERGE]
[NAN] Replace crashing on illegal state to failure response/ignore [DO NOT MERGE]
5c0a79c305877c8c96df69035eed38c3650dfa5b 24-Feb-2016 Etan Cohen <etancohen@google.com> [NAN] Enable testing of apps faking client IDs [DO NOT MERGE]

Enable mocking of UIDs. Enables testing of multiple apps (each with
its own UID) trying to access 'invalid' client IDs - i.e. client IDs
which were created by different UIDs.

Bug: 27335234
Change-Id: Ib9d4282378d144a51d83229ed4d924a49375fd11
ndroid/server/wifi/nan/WifiNanServiceImpl.java
4f1887493430b6b61126f233f3de54201b363145 24-Feb-2016 Etan Cohen <etancohen@google.com> [NAN] Add code to clean-up after all (even No-Op) transactions [DO NOT MERGE]

Some transactions have no app-facing callbacks - e.g. cancelling a publish
or subscribe (app assumes it succeeds). In such cases still need to clean
up the internal transaction tracking state. Add No-Op callback in state
manager to perform that clean-up.

Add tests for above as well as for unknown transaction callback: i.e.
response codes from HAL which aren't "known" (not handled, possibly
yet).

Bug: 27334871
Change-Id: Ia0be220310689c0e06030b71236d955a557b7a27
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanStateManager.java
e903e3cb1e7a41fa20306dc3bd1f3518c51a8a86 24-Feb-2016 Etan Cohen <etancohen@google.com> [NAN] Replace crashing on illegal state to failure response/ignore [DO NOT MERGE]

Do not crash NAN service (i.e. system service) when illegal state or illegal
inputs are detected (especially inputs - since can be created by bad/malicious
app). Instead either ignore or respond with failure callbacks.

Bug: 27334919
Change-Id: I09b28da3bea396633dbe76f729c276f9e5620c5d
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
3d1baff308fd209648a4d3cf5c02a8bfd1a98a52 24-Feb-2016 Roshan Pius <rpius@google.com> WifiConfigManager: Add SupplicantBridge callbacks

Create a new SupplicantBridge callbacks instead of passing
WifiConfigManager instance to SupplicantBridge.

BUG: 27325803
Change-Id: Id6d61af6e2758492f6779da4487a8238857bd124
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
9b791efc4f999221950c8a99e8527cfa431d0c7c 24-Feb-2016 Glen Kuhne <kuh@google.com> Merge "WifiConfigStore Refactor read&write NetworkHistory" into mm-wireless-dev am: 5eb49f6169 am: 2ef14db559
am: 914b04557f

* commit '914b04557fce22e86f89c52740c7d1f882caf275':
WifiConfigStore Refactor read&write NetworkHistory
f68a4a32ed245a33120a71f04166aad3b5b90603 24-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Replace WifiChannelHelper with ChannelHelper implementations" into mm-wireless-dev am: b1a4d1c1bb am: c1996c9f93
am: d2fbfca2eb

* commit 'd2fbfca2eb1cd09b9619b24cc2a483c6fa6dfbef':
Replace WifiChannelHelper with ChannelHelper implementations
2ef14db559ceee38b4e9d86eab8196cea4749d76 24-Feb-2016 Glen Kuhne <kuh@google.com> Merge "WifiConfigStore Refactor read&write NetworkHistory" into mm-wireless-dev
am: 5eb49f6169

* commit '5eb49f61695e122d5c9c3a1b89a0ce1a6474f195':
WifiConfigStore Refactor read&write NetworkHistory
5eb49f61695e122d5c9c3a1b89a0ce1a6474f195 24-Feb-2016 Glen Kuhne <kuh@google.com> Merge "WifiConfigStore Refactor read&write NetworkHistory" into mm-wireless-dev
c1996c9f9334d0da0e931acf92eaf7e936de6e40 24-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Replace WifiChannelHelper with ChannelHelper implementations" into mm-wireless-dev
am: b1a4d1c1bb

* commit 'b1a4d1c1bb210c702d20006517b74b6375480313':
Replace WifiChannelHelper with ChannelHelper implementations
df21baf692e4906c26ce5ab38fa24904787807b5 24-Feb-2016 Peter Qiu <zqiu@google.com> WifiController: handle WiFi toggle events in ApEnabledState

This allows the WiFi toggle event to be handled when Soft AP
is enabled, which will stop the soft AP and transition to
StaEnabledState when soft AP is stopped.

Bug: 27325949
TEST=runtest frameworks-wifi
TEST=Manual Test
Manual Tests
1. Enable WiFi (connected to "GoogleGuest"), enable WiFi hotspot,
disable WiFi hotspot (toggle Hotspot), verify WiFi is enabled
and reconnected to "GoogleGuest".
2. Enable WiFi (connected to "GoogleGuest"), disable WiFi, enable
WiFi hotspot, toggle WiFi (which will enable WiFi), verify WiFi
is enabled and reconnected to "GoogleGuest".
3. Enable WiFi (connected to "GoogleGuest"), enable WiFi hotspot,
toggle WiFi (which will enable WiFi), verify WiFi is enabled
and reconnected to "GoogleGuest".

Change-Id: I3561431f41612e2a015082b2b80b72bf737b879d
ndroid/server/wifi/WifiController.java
b1a4d1c1bb210c702d20006517b74b6375480313 24-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Replace WifiChannelHelper with ChannelHelper implementations" into mm-wireless-dev
c485ebf64d1049d17db8108b85653f53fcdc8949 23-Feb-2016 Glen Kuhne <kuh@google.com> WifiConfigStore Refactor read&write NetworkHistory

Created a new helper class: WifiNetworkHistory
Moved readNetworkHistory() and writeKnownNetworkHistory() from
WifiConfigStore into this class, replacing them with calls to the
helper.

BUG=27294533
Change-Id: I10d43e3fd37e251d1845ef726fea0faf136d9626
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiNetworkHistory.java
0201526e6e013038bc74d47b9af22dae288e2790 24-Feb-2016 Etan Cohen <etancohen@google.com> Merge changes from topic 'api_clean'

* changes:
[NAN] API cleanup - rename FLAGS.
[NAN] Renamed listeners to callback per API guidelines
[NAN]: API update - consolidate Puslish|Subscribe Data+Subscribe -> Config
NAN: Add client ID to support multiple NAN clients per UID.
250e70cb113e75ac9b24b09bbf176804d37755d8 09-Feb-2016 Paul Stewart <pstew@google.com> WifiNotificationController: Ignore "SCANNING" network state

While the system is disconnected and does screen-on scanning,
it is legitimate to see temporary state changes to the "SCANNING"
state then back to "DISCONNECTED". The current implementation
of WifiNotificationController resets its scan counter during
these transitions, and therefore never displays the "WiFi
Networks Avaialable" notification. This CL fixes this problem
by separately tracking NetworkInfo.DetailedState and ignoring both
"SCANNING" and the no-op state changes that will happen as a
result.

BUG=26076402
TEST=New unit test included in CL
TEST=Repeat bug reproduction steps

Change-Id: I5e6049edb767e4f67be1ddb31023a28043db53d5
ndroid/server/wifi/WifiNotificationController.java
ndroid/server/wifi/WifiServiceImpl.java
1abd49f3445df5d221319a1571c1a0dda3ecab79 24-Feb-2016 Paul Stewart <pstew@google.com> Merge "WifiStateMachine: Only respond once to multiple EAP-SIM challenges" into mm-wireless-dev
am: af8f9541d2

* commit 'af8f9541d248f7e1ca8232774de1310838ef4b0a':
WifiStateMachine: Only respond once to multiple EAP-SIM challenges
af8f9541d248f7e1ca8232774de1310838ef4b0a 24-Feb-2016 Paul Stewart <pstew@google.com> Merge "WifiStateMachine: Only respond once to multiple EAP-SIM challenges" into mm-wireless-dev
a462153f4e7edc4de7769b1caa9c8b0fee912c90 24-Feb-2016 Erik Kline <ek@google.com> Merge "Unbreak framework roaming" into mm-wireless-dev
am: 30dda83595

* commit '30dda8359520657589f880a71b745a522c5024bb':
Unbreak framework roaming
30dda8359520657589f880a71b745a522c5024bb 24-Feb-2016 Erik Kline <ek@google.com> Merge "Unbreak framework roaming" into mm-wireless-dev
87af62a5bfe014ff3e62a14d90e168741636da0c 24-Feb-2016 Roshan Pius <rpius@google.com> Merge "Disable all networks in supplicant" into mm-wireless-dev
am: e2dc63bb99

* commit 'e2dc63bb990eed0f1909f8f38cbfb0d2f4bc2a92':
Disable all networks in supplicant
e2dc63bb990eed0f1909f8f38cbfb0d2f4bc2a92 24-Feb-2016 Roshan Pius <rpius@google.com> Merge "Disable all networks in supplicant" into mm-wireless-dev
bcbc449d47124ec8f73a38ffe228b97bd9b493bf 23-Feb-2016 Erik Kline <ek@google.com> Unbreak framework roaming

Framework roams could transition to ObtainingIpState in which we
no longer send DHCPv4 RENEWs. Owing to a bug we still started the
watchdog timer which would just fire 40 seconds later.

Instead, don't transition to ObtainingIpState except when actually
wanting to obtain IP configuration (gasp!). We transition instead
back to ConnectedState and let IpReachabilityMonitor signal us if
we need to transition further.

Bug: 26991160
Change-Id: I535611aee542cf3dcebf57e618fcc73806797aac
ndroid/server/wifi/WifiStateMachine.java
7e3e85327ca82a83de84b4750e793f2e3d1b3bfc 06-Feb-2016 Mitchell Wills <mwills@google.com> Replace WifiChannelHelper with ChannelHelper implementations

Change-Id: I20c266825e3b0b0566d6d2939ca2d0c67d213d78
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/MultiClientScheduler.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiChannelHelper.java
ndroid/server/wifi/WifiScannerImpl.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/scanner/KnownBandsChannelHelper.java
02e62bfb297d14643e71f65ded7d08fab3ccbfb5 23-Feb-2016 Roshan Pius <rpius@google.com> resolve merge conflicts of f3e16ca77e to nyc-dev

Change-Id: I083eec242286cb631e0655621ad4fa7abcc239ba
9bb11baf377737e7f2001e078c0857996dfc507e 18-Feb-2016 Etan Cohen <etancohen@google.com> [NAN] API cleanup - rename FLAGS.

Per API guidelines - non-overlapping constants can be (should be)
named with "FLAG".

(cherry-pick of 3cb977400be8d10f06f44dd9b46da70baf2a037a,
Change-Id: I090c5c6090494240843bf91ab69b6c75072ee2b9)

Bug: 27122760
Change-Id: I1b5bca31f27e4313139035c0c0b48155d1e772e3
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanSessionState.java
a2e468eacb2ded79ed29f53eba7d483d84eb4cbf 18-Feb-2016 Etan Cohen <etancohen@google.com> [NAN] Renamed listeners to callback per API guidelines

The interfaces had multiple functions and are hence callback
and not a listener.

Note: purely a rename operation.

(cherry-pick of 676d8394860aa8fb0ed856f41bbd0bbe2c4727fc,
Change-Id: I6dcfe1f623ee730217b52b362819abf656583003)

Bug: 27122760
Change-Id: Ib4f36c1350a17c5406bdb2771370ce91ebced338
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
f3b4c9fa3ca6bec23790f8419cd36383a62a78c5 17-Feb-2016 Etan Cohen <etancohen@google.com> [NAN]: API update - consolidate Puslish|Subscribe Data+Subscribe -> Config

Simplify configuration and consolidate structures whose difference
wasn't very clear.

(cherry-pick of 8f06198cafd0e52aebe2f050af0c1a3533270888,
Change-Id: Ib24f6217e2124c2184506f2ce1407575f5d9baaa)

Bug: 27122760
Change-Id: I1748ff77b9ddc556767b6081122d58033773e89a
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
491da5d5c6752bcda0d79554fc8742f9d61d4513 17-Feb-2016 Etan Cohen <etancohen@google.com> NAN: Add client ID to support multiple NAN clients per UID.

Allow multiple clients per UID - each with its own session namespace.
Effectively replace UID by client ID in the main state machine. The
mapping of new client IDs and their validation (as belonging to the
correct UID) is handled by the service front-end implementation.

Fix missing documentation to enable passing style checker.

(cherry-pick of c9783c72ce84ea8cc42f2c407824113019e59b11,
Change-Id: I963cc5940957953008035b846626dd1e8d6c82fa)

Bug: 26962024
Change-Id: Ie05cdecccc7b5742e5ccb5142e234ee431646b6b
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanService.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.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
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
3cb977400be8d10f06f44dd9b46da70baf2a037a 18-Feb-2016 Etan Cohen <etancohen@google.com> [NAN] API cleanup - rename FLAGS. [DO NOT MERGE]

Per API guidelines - non-overlapping constants can be (should be)
named with "FLAG".

Bug: 27122760
Change-Id: I090c5c6090494240843bf91ab69b6c75072ee2b9
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanSessionState.java
f3e16ca77eb3fce92ef9040de577d64103cb8b7d 23-Feb-2016 Roshan Pius <rpius@google.com> Merge "Modify the wake reasons data structure(1/2)" into mm-wireless-dev
434a2a9c1147f8ebdebe434e04e3374d107d80b8 23-Feb-2016 Wei Wang <weiwa@google.com> Merge "Add test case for duplicate listeners in WifiScanner." into mm-wireless-dev
am: 384dc1ae37

* commit '384dc1ae37b7087ed2f15442715ca9f50dd3567c':
Add test case for duplicate listeners in WifiScanner.
384dc1ae37b7087ed2f15442715ca9f50dd3567c 23-Feb-2016 Wei Wang <weiwa@google.com> Merge "Add test case for duplicate listeners in WifiScanner." into mm-wireless-dev
767b3b51641ea9bb5b1b54c0757a3a54824b7f3c 23-Feb-2016 Roshan Pius <rpius@google.com> Rename WifiConfigStore to WifiConfigManager
am: c2a0ff06d5

* commit 'c2a0ff06d58e1cfb9b69fa5b6a8fef5929812f27':
Rename WifiConfigStore to WifiConfigManager
d0be2d83c247d461b3bcee7343b035f1fc92396e 23-Feb-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigStore: Remove IpConfigStore inheritance" into mm-wireless-dev
am: ba035ceba4

* commit 'ba035ceba49da6c3fa4e9407900655ab5cb5e006':
WifiConfigStore: Remove IpConfigStore inheritance
c2a0ff06d58e1cfb9b69fa5b6a8fef5929812f27 22-Feb-2016 Roshan Pius <rpius@google.com> Rename WifiConfigStore to WifiConfigManager

Rename WifiConfigStore class to WifiConfigManager and replace all
existing occurences of WifiConfigStore.
This is in preparation of refactoring WifiConfigStore into a
separate class which will only deal with storing/reading configurations
from a perisistent database.

BUG: 27296463
Change-Id: Ib4c4bd3bdf3fa28771a646e1f3d244f73b690d5e
TEST: Ran unit-tests
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/SupplicantStateTracker.java
ndroid/server/wifi/WifiConfigManager.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiQualifiedNetworkSelection.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
ba035ceba49da6c3fa4e9407900655ab5cb5e006 23-Feb-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigStore: Remove IpConfigStore inheritance" into mm-wireless-dev
e893eef97a7bf3efcfba3a0dbc10832ad7f6add1 23-Feb-2016 Jan Nordqvist <jannq@google.com> Merge "Downloaded configuration fails to delete after framework changes." into mm-wireless-dev
am: 3037741c91

* commit '3037741c919b3979a4faf0f8504b7b347f6199d9':
Downloaded configuration fails to delete after framework changes.
3037741c919b3979a4faf0f8504b7b347f6199d9 23-Feb-2016 Jan Nordqvist <jannq@google.com> Merge "Downloaded configuration fails to delete after framework changes." into mm-wireless-dev
eb47908e92e36c4ea24fe25b004f71476c19f4d2 23-Feb-2016 Jan Nordqvist <jannq@google.com> Merge "Exclude implicit MO creation when creating Hotspot 2.0 release 2 networks." into mm-wireless-dev
am: bbefecdee0

* commit 'bbefecdee0f49fd99407d64d1d0558a075c612c5':
Exclude implicit MO creation when creating Hotspot 2.0 release 2 networks.
bbefecdee0f49fd99407d64d1d0558a075c612c5 23-Feb-2016 Jan Nordqvist <jannq@google.com> Merge "Exclude implicit MO creation when creating Hotspot 2.0 release 2 networks." into mm-wireless-dev
de509a74735519a9efaa5e5d8d86728c084b804d 23-Feb-2016 Jan Nordqvist <jannq@google.com> Downloaded configuration fails to delete after framework changes.

Bug=27243862

Change-Id: Ic7fa19657ea31ff8d8398862307ff978c1db5dfb
ndroid/server/wifi/configparse/ConfigBuilder.java
c1bc5a14b94276421f741eaebb54daa8e63e4a05 22-Feb-2016 Roshan Pius <rpius@google.com> WifiConfigStore: Remove IpConfigStore inheritance

Move IpconfigStore instance to be a member of the WifiConfigStore and
create a new DelayedDiskWriter for writing the other configurations.

BUG: 27293150
Change-Id: I76654d49848c417599996b0a8b510ff2b04a3d4a
TEST: `runtest frameworks-wifi`
ndroid/server/wifi/WifiConfigStore.java
549d7a1dbbee16585af667d3efe1a6fdc6c7b9c6 22-Feb-2016 Peter Qiu <zqiu@google.com> Merge "Integrate SoftApManager to WifiStateMachine" into mm-wireless-dev
am: bc4548f2f5

* commit 'bc4548f2f5bc9cb5f72c405454a480ccb470b86e':
Integrate SoftApManager to WifiStateMachine
bc4548f2f5bc9cb5f72c405454a480ccb470b86e 22-Feb-2016 Peter Qiu <zqiu@google.com> Merge "Integrate SoftApManager to WifiStateMachine" into mm-wireless-dev
cb3aa74733cef68dd30d5e6aa8f252cd749b4143 22-Feb-2016 Jan Nordqvist <jannq@google.com> Exclude implicit MO creation when creating Hotspot 2.0 release 2 networks.

Bug=27294473

Change-Id: I8f13cd49e8b2d17e9451625ab1b01dd16c057f2e
ndroid/server/wifi/WifiConfigStore.java
ec1690a8364f678ba8ca4472c8e031d482895533 20-Feb-2016 Rebecca Silberstein <silberst@google.com> Merge "Add Looper param to WifiStateMachine constructor and AutoDispatch" into mm-wireless-dev
am: 75a3fd9a4d

* commit '75a3fd9a4d37dd6ba1a0ac3e174673e3b80795d1':
Add Looper param to WifiStateMachine constructor and AutoDispatch
75a3fd9a4d37dd6ba1a0ac3e174673e3b80795d1 20-Feb-2016 Rebecca Silberstein <silberst@google.com> Merge "Add Looper param to WifiStateMachine constructor and AutoDispatch" into mm-wireless-dev
d0846fa841b604ccb969c54b45367fa2bececf83 16-Feb-2016 Rebecca Silberstein <silberst@google.com> Add Looper param to WifiStateMachine constructor and AutoDispatch

Add Looper to the WifiStateMachine constructor. This allows unittests to
pass a MockLooper and control how messages are dispatched. This change
allows the wait() calls to be removed from the WifiStateMachineTest
tests and will bring stability to test runs. This change will also
reduce test run time.

Due to the blocking calls in WifiStateMachine that are expecting a
response, also implement AutoDispatch functionality for MockLooper.
This functionality is implemented by creating a thread that calls
MockLooper.dispatchAll when messages are available. Once at least one
message is dispatched, the thread will exit. The thread will attempt a
limited number of times and log an error if no messages are dispatched.

BUG=26943243

Change-Id: Ia892303e04d18c56d7f1d896db6098e7c3bd9607
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
9aa6d49161f0be66fc89b9b14f7f478e9af407e1 19-Feb-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigStore: API for fetching PNO network list" into mm-wireless-dev
am: d9f96a5827

* commit 'd9f96a58271313deefb135b0606429953157a5f9':
WifiConfigStore: API for fetching PNO network list
d9f96a58271313deefb135b0606429953157a5f9 19-Feb-2016 Roshan Pius <rpius@google.com> Merge "WifiConfigStore: API for fetching PNO network list" into mm-wireless-dev
9a2eb2015d22ee0901c6bce616963643ab3e9e08 19-Feb-2016 Glen Kuhne <kuh@google.com> Merge "InformationElementUtil TIM element parser" into mm-wireless-dev
am: 55b5d3d0e8

* commit '55b5d3d0e887313ece26bad8ebf8f8c25ac66e3f':
InformationElementUtil TIM element parser
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
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/util/InformationElementUtil.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
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
d4f347f7de30834317dd1561dc806eccb1c4f277 17-Feb-2016 Peter Qiu <zqiu@google.com> Integrate SoftApManager to WifiStateMachine

Refactor WifiStateMachine to use SoftApManager for managing soft AP
instance. This consolidate all soft AP related states in WifiStateMachine
to a single SoftApState.

While there, fix number of existing issues in WifiController:
- fix a possible race condition in WifiController where it will
transition to a new state before AP is completely stopped. Currently it is
being worked around in WifiStateMachine by having the soft AP states defer
the commands that might be issued during this race window. This doesn't
really scale and not really clear to the reader. Fix it by only transition
out of ApEnabledState when AP is completely stopped.
- fix a bug in WifiController where it doesn't transition out of
ApEnabledState when AP is stopped internally (either tether notification
timed out or WiFi becomes untethered), results in WifiController and
WifiStateMachine being out of sync.
- fix couple unintentional fall through case statements.

Bug: 26876260
TEST=run frameworks-wifi test
TEST=run autotests

Change-Id: I1d12690b51265dacd087f22f601b7b0ea0a1082e
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiController.java
ndroid/server/wifi/WifiStateMachine.java
047aee0ba277cb512db1c22605e9b73ccfc20374 19-Feb-2016 Peter Qiu <zqiu@google.com> Merge "Add SoftApManager class" into mm-wireless-dev
am: 5aecec3422

* commit '5aecec3422a573e09b5792edd587153c00748da1':
Add SoftApManager class
5aecec3422a573e09b5792edd587153c00748da1 19-Feb-2016 Peter Qiu <zqiu@google.com> Merge "Add SoftApManager class" into mm-wireless-dev
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
ndroid/server/wifi/WifiNative.java
be6cb1df0c221f72d09fc0ab6f5c45b0949c9a88 18-Feb-2016 Paul Stewart <pstew@google.com> WifiStateMachine: Only respond once to multiple EAP-SIM challenges

The commit in 5ebc35f19feab2755a13cf7d5acaeff4bbc78994 made an
attempt to fail the EAPOL process due to intermediate failures
with TelephonyManager. It's not clear how well that worked,
but it's clear from inspection that when multiple challenges
are supplied that the code then sent multiple simAuthResponse
messages -- one per challenge. This is clearly wrong.

This CL refactors the code to clearly separate the function
that generates the complete response string so it can be tested,
and leaves the handleGsmAuthRequest() method to interact with
mWifiNative in a hopefully more readable manner.

BUG: 26758602
Change-Id: Ibf8f85893e4c18195eb08114b5169dcff05dc045
TEST: New unit test for the getGsmSimAuthResponse method
ndroid/server/wifi/WifiStateMachine.java
0633c7b5996582ac2c10c5084cb11090080b07b0 19-Feb-2016 Paul Stewart <pstew@google.com> Refactor for accessor changes to WifiEnterpriseConfig [Re-Land]
am: 0fa719c770

* commit '0fa719c7706dc6e447d16543518d4ecb269b91d0':
Refactor for accessor changes to WifiEnterpriseConfig [Re-Land]
0fa719c7706dc6e447d16543518d4ecb269b91d0 16-Jan-2016 Paul Stewart <pstew@google.com> Refactor for accessor changes to WifiEnterpriseConfig [Re-Land]

WifiEnterpriseConfig has changed to provide more sane accessors.
Now, callers are not given blanket access to the internal fields
and need to pass an accessor object to either save or restore
wpa_supplicant configuration.

This CL also adds unit tests to validate the new behavior of EAP
and Phase 2 parameters to ensure that recent changes do not cause
any regressions.

Bug:26400915
Change-Id: I294d804b431e216071905b96c51e023ea424aaf5
ndroid/server/wifi/WifiConfigStore.java
c3b22ef2e6bbccd048e1012160b75d14353ab894 17-Feb-2016 Wei Wang <weiwa@google.com> Add test case for duplicate listeners in WifiScanner.

Bug:26663377

Change-Id: I89c7936b215251c2afb20a49de1d03184e9b4b21
ndroid/server/wifi/HalWifiScannerImpl.java
8f129e6c43893cddfcfb18804a543ace7fb983b3 19-Feb-2016 Lorenzo Colitti <lorenzo@google.com> Simplify smToString using MessageUtils.
am: eed7ed0f23

* commit 'eed7ed0f235d1124564d567178e485f0a5cda616':
Simplify smToString using MessageUtils.
eed7ed0f235d1124564d567178e485f0a5cda616 17-Feb-2016 Lorenzo Colitti <lorenzo@google.com> Simplify smToString using MessageUtils.

Change-Id: If7355bbf5295c55e97882dce55a07b607309e0f2
ndroid/server/wifi/WifiStateMachine.java
7debc76f64763f2ff91236ca0f26b2257ea29cf8 19-Feb-2016 xin He <xinhe@google.com> Merge "Fix QNS bssid blacklist update" into mm-wireless-dev
am: 9f362510e1

* commit '9f362510e1070007c54b60ebfd9fbbe312017a9a':
Fix QNS bssid blacklist update
9f362510e1070007c54b60ebfd9fbbe312017a9a 19-Feb-2016 xin He <xinhe@google.com> Merge "Fix QNS bssid blacklist update" into mm-wireless-dev
676d8394860aa8fb0ed856f41bbd0bbe2c4727fc 18-Feb-2016 Etan Cohen <etancohen@google.com> [NAN] Renamed listeners to callback per API guidelines [DO NOT MERGE]

The interfaces had multiple functions and are hence callback
and not a listener.

Note: purely a rename operation.

Bug: 27122760
Change-Id: I6dcfe1f623ee730217b52b362819abf656583003
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
8f06198cafd0e52aebe2f050af0c1a3533270888 17-Feb-2016 Etan Cohen <etancohen@google.com> [NAN]: API update - consolidate Puslish|Subscribe Data+Subscribe -> Config [DO NOT MERGE]

Simplify configuration and consolidate structures whose difference
wasn't very clear.

Bug: 27122760
Change-Id: Ib24f6217e2124c2184506f2ce1407575f5d9baaa
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
4c618adccba43334df62ad7d2949138344c11f58 18-Feb-2016 xin He <xinhe@google.com> Fix QNS bssid blacklist update

The crash is due to delete map entries not through the
iterator's remove method when transverse the map. Removing
item will change the size of iterator and
java.util.ConcurrentModificationException will be thrown at
next iterator.next(). The correct way is to remove item through
the iterator's remove method.

BUG=27243032

Change-Id: Iede6efeafacaf8a33cce44f56e0c2b58e598e07e
ndroid/server/wifi/WifiQualifiedNetworkSelection.java
e5b93fbfe451bc57c07b3f72191b52b6bd237d5b 09-Feb-2016 Peter Qiu <zqiu@google.com> Add SoftApManager class

The newly created class is responsible for managing soft AP
instance and tethering state transitions.

This class will be integrated to WifiStateMachine in an upcoming
CL, which will remove the existing soft AP and tethering related
code from WifiStateMachine.

Bug: 26876260
TEST=runtest frameworks-wifi

Change-Id: I25568649b8c9d18ce78019dac614bafb9c5a3448
ndroid/server/wifi/SoftApManager.java
ndroid/server/wifi/util/ApConfigUtil.java
c9783c72ce84ea8cc42f2c407824113019e59b11 17-Feb-2016 Etan Cohen <etancohen@google.com> NAN: Add client ID to support multiple NAN clients per UID. [DO NOT MERGE]

Allow multiple clients per UID - each with its own session namespace.
Effectively replace UID by client ID in the main state machine. The
mapping of new client IDs and their validation (as belonging to the
correct UID) is handled by the service front-end implementation.

Fix missing documentation to enable passing style checker.

Bug: 26962024
Change-Id: I963cc5940957953008035b846626dd1e8d6c82fa
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanService.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
621e9252d62be622e369ba43bd5c65ed63eb2f4a 18-Feb-2016 mukesh agrawal <quiche@google.com> WifiLogger: fix startLogging()
am: 28a073ae46

* commit '28a073ae465df4e92b11bc8c9b3a1890de375d30':
WifiLogger: fix startLogging()
28a073ae465df4e92b11bc8c9b3a1890de375d30 16-Feb-2016 mukesh agrawal <quiche@google.com> WifiLogger: fix startLogging()

startLogging() asks the native layer for meta-data about the ring
buffers, and then, if meta-data was _not_ available, starts logging the
ring buffers.

That's pretty much the opposite of what we want. Perhaps even exactly
the opposite of what we want.

Invert the condition, to actually start the ring buffers.

BUG=26981286
TEST=unit tests

Change-Id: I3acf227a9b8d4a8970d9bdc7a52fefa101a32852
ndroid/server/wifi/WifiLogger.java
a2375bdc9f97ef50ad26ddc1e95ce9bbfbec1210 18-Feb-2016 Roshan Pius <rpius@google.com> resolve merge conflicts of 4bee869e0d to mnc-dr1.5-dev

Change-Id: Iffc3434864cc198fe2bd9e8b95162aa775624e36
29f9fde8aaa4da3495a8bc2153dbb06dd32c2dd9 18-Feb-2016 Adam Lesinski <adamlesinski@google.com> Merge "DO NOT MERGE ANYWHERE: Fix issue with WiFi scan reporting" into mnc-dr-dev
4bee869e0d5f85c43aca900db93004f7259ccbf9 18-Feb-2016 Roshan Pius <rpius@google.com> DO NOT MERGE Update network priorities before PNO is triggered
am: 27e7123ef9

* commit '27e7123ef9e83fe8bc6f3f881e425358e7f5e62b':
DO NOT MERGE Update network priorities before PNO is triggered
df9e5758803508633b1615f9df7759893f41ddd1 18-Feb-2016 Erik Kline <ek@google.com> Remove references to BaseDhcpStateMachine and DhcpStateMachine
am: ea8ea9e7c8

* commit 'ea8ea9e7c8b4ab27aa2e25c1ee99323478ee9f2d':
Remove references to BaseDhcpStateMachine and DhcpStateMachine
ea8ea9e7c8b4ab27aa2e25c1ee99323478ee9f2d 17-Feb-2016 Erik Kline <ek@google.com> Remove references to BaseDhcpStateMachine and DhcpStateMachine

Everything is android.net.dhcp.DhcpClient for now.

Bug: 26991160
Change-Id: I7140ec8295fcfb53da509c18b65fb38d702cf13a
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
27e7123ef9e83fe8bc6f3f881e425358e7f5e62b 28-Jan-2016 Roshan Pius <rpius@google.com> DO NOT MERGE 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.

BUG: 26763375
Change-Id: I2c82254b2cb83aef0dd4da9e7d9b2eb5b376bead
Cherry-picked from:
https://partner-android-review.googlesource.com/#/c/529355
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
14b99c4fc8b765a34131ccba06d00c37115e25fa 12-Nov-2015 Adam Lesinski <adamlesinski@google.com> DO NOT MERGE ANYWHERE: Fix issue with WiFi scan reporting

Need to assign the overridden WorkSource to the member
mScanWorkSource in order to properly finish the scan.

Bug:23868900
Change-Id: I7c8ca5ce40ce1238e702bcc65dcef2b94b4b64e9
ndroid/server/wifi/WifiStateMachine.java
009149d90a2ba968ca23122b635f93e05517daef 18-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Add final bits of required functionality for ChannelHelper" into mm-wireless-dev
am: b6e44a4ad8

* commit 'b6e44a4ad89793a9a33ed9f82f51808d62de3ad8':
Add final bits of required functionality for ChannelHelper
b6e44a4ad89793a9a33ed9f82f51808d62de3ad8 18-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Add final bits of required functionality for ChannelHelper" into mm-wireless-dev
63b2b657b63bc435907638c92511417c8f21a109 17-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Remove WifiScanner scheduler context hub references" into mm-wireless-dev
am: 46817c38d8

* commit '46817c38d8e693046a7a7fbbe63e95b23ce41f01':
Remove WifiScanner scheduler context hub references
46817c38d8e693046a7a7fbbe63e95b23ce41f01 17-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Remove WifiScanner scheduler context hub references" into mm-wireless-dev
5d1a27b0c7e7d9314519371966dec54b29a7def3 17-Feb-2016 Randy Pan <zpan@google.com> Merge "Fix PNO ScanResult creation" into mm-wireless-dev
am: 2fc7240522

* commit '2fc7240522039f542e4870baea7553613a3b8f39':
Fix PNO ScanResult creation
2fc7240522039f542e4870baea7553613a3b8f39 17-Feb-2016 Randy Pan <zpan@google.com> Merge "Fix PNO ScanResult creation" into mm-wireless-dev
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
ndroid/server/wifi/WifiNative.java
d50c443ebd668317163648ea08e9834a5a7e5277 17-Feb-2016 Roshan Pius <rpius@google.com> WifiService: Store UIDs for WifiLock/Multicaster
am: 1fb0a78b06

* commit '1fb0a78b06041b918fdf55173d026efc315ee574':
WifiService: Store UIDs for WifiLock/Multicaster
1fb0a78b06041b918fdf55173d026efc315ee574 12-Feb-2016 Roshan Pius <rpius@google.com> WifiService: Store UIDs for WifiLock/Multicaster

Store the UID of the calling user in the WifiLock/Multicaster object and
print it in the toString method of both.

Restructure the DeathRecipient class to only hold the information that
is common to WifiLock/Multicaster.

BUG: 27149817
Change-Id: I14031f9badaffc7ba9d952719f61ff0a7d80c5a1
ndroid/server/wifi/WifiServiceImpl.java
eed6bcbbe112bd907ceddf6bfe35d99d5e51934e 17-Feb-2016 xin He <xinhe@google.com> Merge "Modify BSSID blacklist behavior" into mm-wireless-dev
am: a2a3c5080b

* commit 'a2a3c5080bb6ccf6afbb8599d00b948963bfb23a':
Modify BSSID blacklist behavior
a2a3c5080bb6ccf6afbb8599d00b948963bfb23a 17-Feb-2016 xin He <xinhe@google.com> Merge "Modify BSSID blacklist behavior" into mm-wireless-dev
6ed97affc9bbce6497b6155285ba4a71196d69e1 16-Feb-2016 xinhe <xinhe@google.com> Modify BSSID blacklist behavior

The new behaviors are:
(1) If a BSSID get association rejection three times, blacklist it
(2) After 30 min of blacklist, we re-enable it again.
(3) If any connect successfully to the BSSID, re-enable it

BUG=27166673

Change-Id: I70f439b524ffc304d6c61744f90389f47006341b
ndroid/server/wifi/WifiQualifiedNetworkSelection.java
ndroid/server/wifi/WifiStateMachine.java
4240c0a27d1e3a49df078e807e1ede47d737495a 16-Feb-2016 Ningyuan Wang <nywang@google.com> Merge "Mark status DISABLED when disabling a network" into mm-wireless-dev
am: f41a9021a7

* commit 'f41a9021a7374c2ce6c1c658bc721ce4eef3e2ae':
Mark status DISABLED when disabling a network
f41a9021a7374c2ce6c1c658bc721ce4eef3e2ae 16-Feb-2016 Ningyuan Wang <nywang@google.com> Merge "Mark status DISABLED when disabling a network" into mm-wireless-dev
0a8904265fc81ec1051030e66815aa191d4c347c 16-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Migrate channel/band toString to ChannelHelper" into mm-wireless-dev
am: f2d417a69e

* commit 'f2d417a69e52898d976ea01334794357ecdcfcd8':
Migrate channel/band toString to ChannelHelper
798a997d2e5bf8b3278bfeaa7ca841394e2db4b9 12-Feb-2016 Mitchell Wills <mwills@google.com> Add final bits of required functionality for ChannelHelper

Add support for getting the list of available channels for a band if
available.
Add support for estimating the duration of a scan.

Change-Id: I8abe6d857400775f72969abd4b15e8763ec772c5
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/scanner/ChannelHelper.java
ndroid/server/wifi/scanner/KnownBandsChannelHelper.java
ndroid/server/wifi/scanner/NoBandChannelHelper.java
303b05a42b953f325fa3cea3e0021684741554c5 09-Feb-2016 Ningyuan Wang <nywang@google.com> Mark status DISABLED when disabling a network

This marks the status as DISABLED in WifiConfiguration when
the WifiConfigStore disables a network.
This also fixes a comment typo.

Bug: 26985338
TEST=cts WifiManagerTest
Change-Id: Idb10a4e53cf07b8e56f260bd7f846b3967862140
ndroid/server/wifi/WifiConfigStore.java
f2d417a69e52898d976ea01334794357ecdcfcd8 16-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Migrate channel/band toString to ChannelHelper" into mm-wireless-dev
ed70643c5c1dc368b1390eed0d3c8f24b19e342f 16-Feb-2016 xin He <xinhe@google.com> Merge "add more unit test case to Quality Network Selection" into mm-wireless-dev
am: d2995af00d

* commit 'd2995af00d433ea6f952e8ff1c82c0ed2c71a274':
add more unit test case to Quality Network Selection
d2995af00d433ea6f952e8ff1c82c0ed2c71a274 16-Feb-2016 xin He <xinhe@google.com> Merge "add more unit test case to Quality Network Selection" into mm-wireless-dev
154f6abe46bab660f5a61dedc8c25157fa5b37be 16-Feb-2016 Erik Kline <ek@google.com> Use IpManager.ProvisioningRequest for IpManager#startProvisioning.
am: 00cd284ff0

* commit '00cd284ff0b4bbfd4bb39683cd2d37ef402bbc45':
Use IpManager.ProvisioningRequest for IpManager#startProvisioning.
00cd284ff0b4bbfd4bb39683cd2d37ef402bbc45 11-Feb-2016 Erik Kline <ek@google.com> Use IpManager.ProvisioningRequest for IpManager#startProvisioning.

Bug: 26991160
Change-Id: I929744e9faa3c71170a3e8e1e1bedc3c6cd16d22
ndroid/server/wifi/WifiStateMachine.java
4f945c572fd7e26cf4eecc740a2c672883b71e49 13-Feb-2016 Vinit Deshpande <vinitd@google.com> UnitTests for MOManager and AnqpCache
am: ae815bc712

* commit 'ae815bc71287f8a85727034c40bb07247a3d9415':
UnitTests for MOManager and AnqpCache
ae815bc71287f8a85727034c40bb07247a3d9415 26-Jan-2016 Vinit Deshpande <vinitd@google.com> UnitTests for MOManager and AnqpCache

MOManager is the repository that holds management
objects for Passpoint networks. This change adds tests
to add/remove and modify management objects.

AnqpCache holds results to save power; this test
verifies basic adding/querying and expiry of entries.

Change-Id: I9b12a6661f689227f7564cc6a7e0fd7e338e1e8a
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/ANQPData.java
ndroid/server/wifi/hotspot2/AnqpCache.java
9cd5bee6fcbaa9cf2b3f553d0115d26340d02dea 13-Feb-2016 Jan Nordqvist <jannq@google.com> Merge "Fixed incorrect XML serialization of MO Tree." into mm-wireless-dev
am: 1a12bb7614

* commit '1a12bb76143efa4c86e17bf1a14e6c19a21e747b':
Fixed incorrect XML serialization of MO Tree.
1a12bb76143efa4c86e17bf1a14e6c19a21e747b 13-Feb-2016 Jan Nordqvist <jannq@google.com> Merge "Fixed incorrect XML serialization of MO Tree." into mm-wireless-dev
167250a118f9fb93f88a867cc7679414da4dc8b4 12-Feb-2016 xinhe <xinhe@google.com> add more unit test case to Quality Network Selection

Add more QNS unit test cases (most are for connected state)

BUG=26941880

Change-Id: I436cce2154a0cefdb9e19486b122ebe931412dee
ndroid/server/wifi/WifiQualifiedNetworkSelection.java
c9b88562541a0c2acd60d0a01ac1e182e73c79f9 11-Feb-2016 Jan Nordqvist <jannq@google.com> Fixed incorrect XML serialization of MO Tree.

Bug=27145137

Change-Id: Id2016b3ca2cf8091f254b35d8e6ff9cf4a14907a
ndroid/server/wifi/hotspot2/omadm/MOTree.java
ndroid/server/wifi/hotspot2/omadm/ManagementTreeRoot.java
ndroid/server/wifi/hotspot2/omadm/NodeAttribute.java
ndroid/server/wifi/hotspot2/omadm/OMAConstructed.java
ndroid/server/wifi/hotspot2/omadm/OMANode.java
ndroid/server/wifi/hotspot2/omadm/OMAParser.java
ndroid/server/wifi/hotspot2/omadm/OMAScalar.java
ndroid/server/wifi/hotspot2/omadm/PasspointManagementObjectManager.java
ndroid/server/wifi/hotspot2/omadm/XMLNode.java
18fa274d5835b6aa853cced404316157293e8fd5 12-Feb-2016 xinhe <xinhe@google.com> add Clock class for Wifi
am: ed514c84aa

* commit 'ed514c84aae008d245679f05c9dbcd7e71f126f8':
add Clock class for Wifi
ed514c84aae008d245679f05c9dbcd7e71f126f8 12-Feb-2016 xinhe <xinhe@google.com> add Clock class for Wifi

Add clock interface to wrapper the System and SystemClock
APIs. In this way we can mock it in mockito test. Integrated
with Quality Network Selection first

BUG=27166726

Change-Id: I952944ccbad32e07ba316197d1785e551e03ea21
ndroid/server/wifi/Clock.java
ndroid/server/wifi/WifiQualifiedNetworkSelection.java
ndroid/server/wifi/WifiStateMachine.java
17445b7996487f059114a1ab6a0efa5f95fb86be 12-Feb-2016 Bartosz Fabianowski <bartfab@google.com> resolve merge conflicts of b2f519476e to nyc-dev

Change-Id: I28da4aee94bf4f80347481da396ca40bb7d107d9
23dc88716b6fc4c15e576dacbdd5235b0f5e6552 12-Feb-2016 Paul Stewart <pstew@google.com> Merge "Revert "Refactor for accessor changes to WifiEnterpriseConfig"" into mm-wireless-dev
am: 50919ff875

* commit '50919ff8752d2b2a4617adb869047bf64e6cb34b':
Revert "Refactor for accessor changes to WifiEnterpriseConfig"
50919ff8752d2b2a4617adb869047bf64e6cb34b 12-Feb-2016 Paul Stewart <pstew@google.com> Merge "Revert "Refactor for accessor changes to WifiEnterpriseConfig"" into mm-wireless-dev
25704f0019d27c7939499721d779a1cb66537ebb 12-Feb-2016 Paul Stewart <pstew@google.com> Revert "Refactor for accessor changes to WifiEnterpriseConfig"

This reverts commit 1b0da700f6d88ab64c51cf66f2cf31cff8663fca.

Reverting until test team does their thing later today. Whoops.

Change-Id: I47716b6135fbaf1843b0f062c9374e908dc8a62e
ndroid/server/wifi/WifiConfigStore.java
7cc7c2dd4452e5097c83d1ff96cc31a6816e509e 12-Feb-2016 Paul Stewart <pstew@google.com> Merge "Refactor for accessor changes to WifiEnterpriseConfig" into mm-wireless-dev
am: 525af45a81

* commit '525af45a817d3e548bfbdba2af38e182bc6ec8b5':
Refactor for accessor changes to WifiEnterpriseConfig
525af45a817d3e548bfbdba2af38e182bc6ec8b5 12-Feb-2016 Paul Stewart <pstew@google.com> Merge "Refactor for accessor changes to WifiEnterpriseConfig" into mm-wireless-dev
0fb9cf43830d67894b519c9a6271320c4842a5c0 12-Feb-2016 Bartosz Fabianowski <bartfab@google.com> Allow managed profile to modify networks

If the current foreground user has a managed profile, apps running in that
profile should have the same permissions to add/remove/modify networks as
apps running as the foreground user itself.

This is a re-submit of
https://partner-android-review.googlesource.com/#/c/529950/
with updated unit tests that will also work after merging to N/master.

BUG=26867426

Change-Id: If97734abad801ae1264919c91c3ef4236469cfde
ndroid/server/wifi/ConfigurationMap.java
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiConfigurationUtil.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
54e2c84547e22622ba4a08bddd1c632d1d937be3 11-Feb-2016 Mitchell Wills <mwills@google.com> Migrate channel/band toString to ChannelHelper

Change-Id: Ia4ea1d29b74cd08593f13b9e74cb6f6257adf78b
ndroid/server/wifi/WifiChannelHelper.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/scanner/ChannelHelper.java
ffd939c5b9a68b9df7242c546b666d961ffefb03 12-Feb-2016 Etan Cohen <etancohen@google.com> Merge "NAN: Disable all DBG flags." into mm-wireless-dev
am: 75ad7fa297

* commit '75ad7fa297007a0cfe1b5a02f45c78441d819d42':
NAN: Disable all DBG flags.
75ad7fa297007a0cfe1b5a02f45c78441d819d42 12-Feb-2016 Etan Cohen <etancohen@google.com> Merge "NAN: Disable all DBG flags." into mm-wireless-dev
2cb727022e130f0c0b3c549b01c7d88cd57904e3 11-Feb-2016 Etan Cohen <etancohen@google.com> NAN: Disable all DBG flags.

Change-Id: I98873ef3419282dde855987a1f4f8b6c29a30b89
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
06c07f7548feb9a4c7b53b170340447ca473ff3f 11-Feb-2016 Mitchell Wills <mwills@google.com> Update scanner onScanStatus callback to include event
am: 63539f1283

* commit '63539f1283899fbbf83ab90757961b4be51d5034':
Update scanner onScanStatus callback to include event
1b0da700f6d88ab64c51cf66f2cf31cff8663fca 16-Jan-2016 Paul Stewart <pstew@google.com> Refactor for accessor changes to WifiEnterpriseConfig

WifiEnterpriseConfig has changed to provide more sane accessors.
Now, callers are not given blanket access to the internal fields
and need to pass an accessor object to either save or restore
wpa_supplicant configuration.

This CL also adds unit tests to validate the new behavior of EAP
and Phase 2 parameters to ensure that recent changes do not cause
any regressions.

Bug:26400915
Change-Id: I575dc1688ff4b6055708e135b2692c982bc89d7a
ndroid/server/wifi/WifiConfigStore.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
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
10df92e35f8b7d2abb5b311dc09bf2b8ff30d206 11-Feb-2016 Mitchell Wills <mwills@google.com> Merge changes I86b5194b,Ic4150120 into mm-wireless-dev
am: 3459602371

* commit '345960237132c18a817d3aed93ab6df5906fcc97':
Add more functionality to ChannelHelper
Add scan channel helper abstraction
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
8a8f89708a14547b79df1774b254f7252c64ad4d 11-Feb-2016 Mitchell Wills <mwills@google.com> resolve merge conflicts of 4086badffe to nyc-dev.

Change-Id: Idcabbfc19669aff2a99d6a39fd12a2be25dca058
4086badffeb97f4c87b2bed3fcaa49b731a6670e 11-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Revert "Allow managed profile to modify networks"" into mm-wireless-dev
9f8586ea6d640e86560efd9a2d9c1909b08a3ef4 11-Feb-2016 Mitchell Wills <mwills@google.com> Revert "Allow managed profile to modify networks"

This reverts commit bbb3149f3bc301e81c202438b77c45574a90a851.

Bug: 27145628
Change-Id: I05ac9c714373b98fa73e0dba21ec4d815200af75
ndroid/server/wifi/ConfigurationMap.java
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiConfigurationUtil.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
f5b4bcf6af1dd024e7219ca69fd54f20948c0be9 11-Feb-2016 Glen Kuhne <kuh@google.com> Merge "WifiMetrics ConnectionEvent logging" into mm-wireless-dev
am: 6eb121431c

* commit '6eb121431c67b98d8b14242a34c28b205a42b119':
WifiMetrics ConnectionEvent logging
6eb121431c67b98d8b14242a34c28b205a42b119 11-Feb-2016 Glen Kuhne <kuh@google.com> Merge "WifiMetrics ConnectionEvent logging" into mm-wireless-dev
3e024d7ca0520bd167eac44c1745183919748c83 11-Feb-2016 Bartosz Fabianowski <bartfab@google.com> resolve merge conflicts of bbb3149f3b to nyc-dev

Change-Id: I29effba14b5e3bcff4c996e1e12b07f1d7143850
bbb3149f3bc301e81c202438b77c45574a90a851 11-Feb-2016 Bartosz Fabianowski <bartfab@google.com> Allow managed profile to modify networks

If the current foreground user has a managed profile, apps running in that
profile should have the same permissions to add/remove/modify networks as
apps running as the foreground user itself.

BUG:26867426

Change-Id: I6ab891625b673e617e1c38863b9c6e71e4938a0b
ndroid/server/wifi/ConfigurationMap.java
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiConfigurationUtil.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
4326ff75bfc8dbe3081402df4f568584ab61b9d7 11-Feb-2016 Roshan Pius <rpius@google.com> Merge "Update network priorities before PNO is triggered" into mm-wireless-dev
am: bfcea7de75

* commit 'bfcea7de75875c900de19a8504416492ed96ae21':
Update network priorities before PNO is triggered
bfcea7de75875c900de19a8504416492ed96ae21 11-Feb-2016 Roshan Pius <rpius@google.com> Merge "Update network priorities before PNO is triggered" into mm-wireless-dev
2532a24b254d724a9b6771d327dc410b32b18602 05-Feb-2016 Glen Kuhne <kuh@google.com> WifiMetrics ConnectionEvent logging

Reworked ConnectionEvent start and end calls within StateMachine to
produce a more correct log of ConnectionEvents (previously these calls
produced an incorrect placeholder log).
Some ConnectionEvents being triggered by CMD_AUTO_CONNECT are still not
being ended due to double CMD_AUTO_CONNECT calls.
Modified the behaviour of endConnectionEvent(), this will not create or
modify ConnectionEvents if there is no currentConnectionEvent.

BUG=25691077

Change-Id: I932b50cef5d6d66a7dc22f8c118fe9c140a5f4ba
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiStateMachine.java
39175cc807488dd849e2c530f8be30dd674fbd9f 09-Feb-2016 Mitchell Wills <mwills@google.com> Add more functionality to ChannelHelper

Check if a channel is in a ScanSettings
Add channels to accumulator from native settings
Add unit tests for non-abstract ChannelHelper methods

Change-Id: I86b5194b2a5c852fd25041a363f42caa202dfa7a
ndroid/server/wifi/scanner/ChannelHelper.java
ndroid/server/wifi/scanner/KnownBandsChannelHelper.java
ndroid/server/wifi/scanner/NoBandChannelHelper.java
0e03fa9a1ac57d1eca2b5f5d6880b655d67e2508 11-Feb-2016 Erik Kline <ek@google.com> Merge "Split updateLinkProperties() and provisioning change handling" into mm-wireless-dev
am: d150184a5b

* commit 'd150184a5b28f862b39ad383ab87ee0ac4ca6be8':
Split updateLinkProperties() and provisioning change handling
f6290e740290bd2d404cba0815dd5be9d54761f7 11-Feb-2016 Mitchell Wills <mwills@google.com> Remove WifiScanner scheduler context hub references

Since all scan results will now be reported to the context hub the
scheduler no longer needs to worry about handling requests specially.

Change-Id: Ie27f735a361175865c874f671236812477d1e090
ndroid/server/wifi/MultiClientScheduler.java
d150184a5b28f862b39ad383ab87ee0ac4ca6be8 10-Feb-2016 Erik Kline <ek@google.com> Merge "Split updateLinkProperties() and provisioning change handling" into mm-wireless-dev
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'`
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
b30f36a05e8867c209a3d6fd1de84af69a627053 10-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Remove unused supplicant scan with connection setup option" into mm-wireless-dev
am: 28d387c8fa

* commit '28d387c8fa63967072dc7c1be46b8aa00f754a17':
Remove unused supplicant scan with connection setup option
b1bbed13ea8ed71e8aab45327921b4df669686f8 10-Feb-2016 Ritesh Reddy <riteshr@google.com> Merge "Staging WifiAP Configuration for backup" into mm-wireless-dev
am: 209f44caf9

* commit '209f44caf9436467ee8efcc173cbefdf44540e31':
Staging WifiAP Configuration for backup
28d387c8fa63967072dc7c1be46b8aa00f754a17 10-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Remove unused supplicant scan with connection setup option" into mm-wireless-dev
8cf2b5c507918a30629b9dc24944422fc0920665 03-Feb-2016 Erik Kline <ek@google.com> Split updateLinkProperties() and provisioning change handling

Bug: 26991160
Change-Id: I20a41e5f1426befc474e923d2763b508f26f1ce4
ndroid/server/wifi/WifiStateMachine.java
209f44caf9436467ee8efcc173cbefdf44540e31 10-Feb-2016 Ritesh Reddy <riteshr@google.com> Merge "Staging WifiAP Configuration for backup" into mm-wireless-dev
06cee75cad97451d3dcb5ea2fc9344a87c5bb319 10-Feb-2016 Erik Kline <ek@google.com> Upgrade from legacy dhcpcd to DhcpClient
am: dde96dcb17

* commit 'dde96dcb1758669a7840ca88cff767ffec218936':
Upgrade from legacy dhcpcd to DhcpClient
dde96dcb1758669a7840ca88cff767ffec218936 05-Feb-2016 Erik Kline <ek@google.com> Upgrade from legacy dhcpcd to DhcpClient

Change-Id: I06b2642864fc067be4e92d563aab7183edc1bb47
ndroid/server/wifi/p2p/WifiP2pServiceImpl.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
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
729b7f72d116a4b757484fa70c9549419775b5fa 09-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Rename WIFI_SCAN_DISABLED event to WIFI_SCAN_FAILED" into mm-wireless-dev
am: 3acfa01007

* commit '3acfa01007faf85d6c3bd1efa01b0b6bd85bafe5':
Rename WIFI_SCAN_DISABLED event to WIFI_SCAN_FAILED
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
ndroid/server/wifi/WifiNative.java
7538f4c7a132a5015dee8b4563bb5ea5cd3f0a13 09-Feb-2016 Randy Pan <zpan@google.com> Merge "Build \'capabilities\' string for gscan results" into mm-wireless-dev
am: aab5468666

* commit 'aab54686664ce47f2c41614a8460f454743d157d':
Build 'capabilities' string for gscan results
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiParser.java
ndroid/server/wifi/util/InformationElementUtil.java
a079e33387387a0edc978a4d48c0a3d4c9905311 09-Feb-2016 Samuel Tan <samueltan@google.com> Merge "WifiConfigStore: Add CA_PATH_KEY to ENTERPRISE_CONFIG_SUPPLICANT_KEYS" into mm-wireless-dev
am: 422167cade

* commit '422167cade62a533efe680cea1e32446fa103e1b':
WifiConfigStore: Add CA_PATH_KEY to ENTERPRISE_CONFIG_SUPPLICANT_KEYS
422167cade62a533efe680cea1e32446fa103e1b 09-Feb-2016 Samuel Tan <samueltan@google.com> Merge "WifiConfigStore: Add CA_PATH_KEY to ENTERPRISE_CONFIG_SUPPLICANT_KEYS" into mm-wireless-dev
9e06c302626204c7b46e0025a6f91888be5607ef 09-Feb-2016 xin He <xinhe@google.com> Merge "add more unit test case to Quality Network Selection" into mm-wireless-dev
am: 84c11d63f2

* commit '84c11d63f274ec136a94e0f17982eba1e07f1d9e':
add more unit test case to Quality Network Selection
84c11d63f274ec136a94e0f17982eba1e07f1d9e 09-Feb-2016 xin He <xinhe@google.com> Merge "add more unit test case to Quality Network Selection" into mm-wireless-dev
2bc580c67c614c2b7eeaf88a7795620fc53a8099 09-Feb-2016 Jan Nordqvist <jannq@google.com> Merge "Removing Hotspot 2.0 OSU client code from framework." into mm-wireless-dev
am: 676d664bf4

* commit '676d664bf4b5f59279a53a986ce94363e2bc4fd2':
Removing Hotspot 2.0 OSU client code from framework.
676d664bf4b5f59279a53a986ce94363e2bc4fd2 09-Feb-2016 Jan Nordqvist <jannq@google.com> Merge "Removing Hotspot 2.0 OSU client code from framework." into mm-wireless-dev
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/scanner/ChannelHelper.java
ndroid/server/wifi/scanner/KnownBandsChannelHelper.java
ndroid/server/wifi/scanner/NoBandChannelHelper.java
a08566d83c94ad608dd25f86fa7cc82d78734508 09-Feb-2016 Wei Wang <weiwa@google.com> Enable Rtt Responder Role(2/4).
am: 68cb8c02b4

* commit '68cb8c02b4ad079c54a2ffd4407da921d18c7af9':
Enable Rtt Responder Role(2/4).
68cb8c02b4ad079c54a2ffd4407da921d18c7af9 25-Jan-2016 Wei Wang <weiwa@google.com> Enable Rtt Responder Role(2/4).

Change-Id: Ib18af94fbba21c833c47336f7a92afe918dc9a89
ndroid/server/wifi/RttService.java
ndroid/server/wifi/WifiNative.java
21524058ffc735089b1777526df6c9f9dd37ff0e 09-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Add ScanDetailUtil to convert ScanResult to ScanDetail" into mm-wireless-dev
am: 5f38b29b5f

* commit '5f38b29b5f4b891e59e8c20b210fa9e0e0a28440':
Add ScanDetailUtil to convert ScanResult to ScanDetail
c83c0526b1c209ca9d831154a13c4ef9131b17f8 05-Feb-2016 xinhe <xinhe@google.com> add more unit test case to Quality Network Selection

Add more QNS test cases when deivice is under disconnected
state. Add a clear method in QNS for test purpose

BUG=26941880

Change-Id: Icf03dc71b1fab5b65b528e6fed4eb5f918f06e36
ndroid/server/wifi/WifiQualifiedNetworkSelection.java
c11476cd6b68ba6c5b34c99ea312c45e18a17658 08-Feb-2016 Ritesh Reddy <riteshr@google.com> Staging WifiAP Configuration for backup

Staging WifiAp Config for backup when the config
is changed.

Change-Id: Ie2d586f37e81c184fc6b7ca99f24c82e3dcc12dc
ndroid/server/wifi/WifiApConfigStore.java
e4e3b8cb884dd9e754a437ea6feac502191f1767 07-Feb-2016 Mitchell Wills <mwills@google.com> Add ScanDetailUtil to convert ScanResult to ScanDetail

Also move InformationElementUtilTest to util package

Change-Id: I4a2c6a561ce6106d7c8c671cec225cf5ae6532f0
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/util/ScanDetailUtil.java
435d037ed4e5da4cd2e73a6f089382deb79c1fc0 05-Feb-2016 Samuel Tan <samueltan@google.com> WifiConfigStore: Add CA_PATH_KEY to ENTERPRISE_CONFIG_SUPPLICANT_KEYS

Add CA_PATH_KEY to ENTERPRISE_CONFIG_SUPPLICANT_KEYS, so that the
|ca_path| WPA supplicant directive will be saved and loaded.

BUG: 25180141
Change-Id: Id425270644c64d89f7094ebd756093e57e848ee4
ndroid/server/wifi/WifiConfigStore.java
1b9c2436f0a03d8b5725cf521b0cf8248e85d228 05-Feb-2016 Etan Cohen <etancohen@google.com> NAN: Add NAN HAL capability
am: e36f5903f5

* commit 'e36f5903f5d236a29dc94c8bdb215807ae75f5a1':
NAN: Add NAN HAL capability
72401daf8411fb8e56ee0dd4ecb27cd3bba29e33 05-Feb-2016 Etan Cohen <etancohen@google.com> Merge "NAN: Adding tests for internal state of WifiNanStateManager" into mm-wireless-dev
am: a40a871604

* commit 'a40a871604177637c12f190cbbfbf71752c490bd':
NAN: Adding tests for internal state of WifiNanStateManager
e36f5903f5d236a29dc94c8bdb215807ae75f5a1 03-Feb-2016 Etan Cohen <etancohen@google.com> NAN: Add NAN HAL capability

Query NAN HAL for its capabilities and propagate to WifiNanStateManager for
storage (usage is TBD).

BUG=26564631
Change-Id: Icb4223c5a03cb65fba1781d0ebe78d70110d3a86
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanStateManager.java
a40a871604177637c12f190cbbfbf71752c490bd 05-Feb-2016 Etan Cohen <etancohen@google.com> Merge "NAN: Adding tests for internal state of WifiNanStateManager" into mm-wireless-dev
da2a851df92114887f885ae8ea1973f0548f38d8 05-Feb-2016 xinhe <xinhe@google.com> fix NullPointerException occurred during WifiManagerForgetNetworkOnSuccess
am: d852b3a37c

* commit 'd852b3a37c17c4d4595fbe0389c90fec06ed9382':
fix NullPointerException occurred during WifiManagerForgetNetworkOnSuccess
22b4156d2948e3108ae8439dc72f76fb97526ace 26-Jan-2016 Etan Cohen <etancohen@google.com> NAN: Adding tests for internal state of WifiNanStateManager

Add tests for internal state of WifiNanStateManager: validate that
cleanup of client (UID) and session registrations (pending transactions)
done when client disconnected or when a session is destroyed.

While usually not a good idea to test internal state (all other tests
are focused on external contract of class) in this case the results would
be memory leak and information leak.

Fixed several errors discovered with new unit tests.

Bug: 26878060
Bug: 26880665
Change-Id: I89f20353c296edb562de3cb0dfdc208e91624acf
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
d852b3a37c17c4d4595fbe0389c90fec06ed9382 05-Feb-2016 xinhe <xinhe@google.com> fix NullPointerException occurred during
WifiManagerForgetNetworkOnSuccess

It is a risk condition. At this time, WifiStateMachine still
in mConnectedState, but WifiInfo has been updated since it
is updated in handleSupplicantStateChange which is earlier.
Add condition check protection to solve this issue

BUG=26989672

Change-Id: I465628dc0f8c74f2693aecf746229818a31f9d74
ndroid/server/wifi/WifiQualifiedNetworkSelection.java
3fff4c9bd5db730141e75706a7229814d403b363 05-Feb-2016 Jan Nordqvist <jannq@google.com> Removing Hotspot 2.0 OSU client code from framework.

Change-Id: I1be652aeb60cc3c49b606e4e2f467951cf2d68b5
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/hotspot2/AlarmHandler.java
ndroid/server/wifi/hotspot2/Chronograph.java
ndroid/server/wifi/hotspot2/OMADMAdapter.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
ndroid/server/wifi/hotspot2/WifiNetworkAdapter.java
ndroid/server/wifi/hotspot2/asn1/Asn1Boolean.java
ndroid/server/wifi/hotspot2/asn1/Asn1Class.java
ndroid/server/wifi/hotspot2/asn1/Asn1Constructed.java
ndroid/server/wifi/hotspot2/asn1/Asn1Decoder.java
ndroid/server/wifi/hotspot2/asn1/Asn1ID.java
ndroid/server/wifi/hotspot2/asn1/Asn1Integer.java
ndroid/server/wifi/hotspot2/asn1/Asn1Object.java
ndroid/server/wifi/hotspot2/asn1/Asn1Octets.java
ndroid/server/wifi/hotspot2/asn1/Asn1Oid.java
ndroid/server/wifi/hotspot2/asn1/Asn1String.java
ndroid/server/wifi/hotspot2/asn1/Asn1Tag.java
ndroid/server/wifi/hotspot2/asn1/DecodeException.java
ndroid/server/wifi/hotspot2/asn1/OidMappings.java
ndroid/server/wifi/hotspot2/est/ESTHandler.java
ndroid/server/wifi/hotspot2/omadm/OMAConstants.java
ndroid/server/wifi/hotspot2/omadm/PasspointManagementObjectManager.java
ndroid/server/wifi/hotspot2/osu/ClientKeyManager.java
ndroid/server/wifi/hotspot2/osu/ExchangeCompleteResponse.java
ndroid/server/wifi/hotspot2/osu/ExecCommand.java
ndroid/server/wifi/hotspot2/osu/HTTPHandler.java
ndroid/server/wifi/hotspot2/osu/IconCache.java
ndroid/server/wifi/hotspot2/osu/OSUCertType.java
ndroid/server/wifi/hotspot2/osu/OSUClient.java
ndroid/server/wifi/hotspot2/osu/OSUCommand.java
ndroid/server/wifi/hotspot2/osu/OSUCommandID.java
ndroid/server/wifi/hotspot2/osu/OSUError.java
ndroid/server/wifi/hotspot2/osu/OSUInfo.java
ndroid/server/wifi/hotspot2/osu/OSUListener.java
ndroid/server/wifi/hotspot2/osu/OSUManager.java
ndroid/server/wifi/hotspot2/osu/OSUMessageType.java
ndroid/server/wifi/hotspot2/osu/OSUOperationStatus.java
ndroid/server/wifi/hotspot2/osu/OSUResponse.java
ndroid/server/wifi/hotspot2/osu/OSUSocketFactory.java
ndroid/server/wifi/hotspot2/osu/OSUStatus.java
ndroid/server/wifi/hotspot2/osu/PostDevDataResponse.java
ndroid/server/wifi/hotspot2/osu/RequestReason.java
ndroid/server/wifi/hotspot2/osu/ResponseFactory.java
ndroid/server/wifi/hotspot2/osu/SOAPBuilder.java
ndroid/server/wifi/hotspot2/osu/SOAPParser.java
ndroid/server/wifi/hotspot2/osu/SPVerifier.java
ndroid/server/wifi/hotspot2/osu/UserInputListener.java
ndroid/server/wifi/hotspot2/osu/WiFiKeyManager.java
ndroid/server/wifi/hotspot2/osu/XMLParser.java
ndroid/server/wifi/hotspot2/osu/commands/BrowserURI.java
ndroid/server/wifi/hotspot2/osu/commands/ClientCertInfo.java
ndroid/server/wifi/hotspot2/osu/commands/GetCertData.java
ndroid/server/wifi/hotspot2/osu/commands/MOURN.java
ndroid/server/wifi/hotspot2/osu/commands/OSUCommandData.java
ndroid/server/wifi/hotspot2/osu/commands/PasspointManagementObjectData.java
ndroid/server/wifi/hotspot2/osu/service/RedirectListener.java
ndroid/server/wifi/hotspot2/osu/service/SubscriptionTimer.java
ndroid/server/wifi/hotspot2/utils/HTTPMessage.java
ndroid/server/wifi/hotspot2/utils/HTTPRequest.java
ndroid/server/wifi/hotspot2/utils/HTTPResponse.java
136bd86c2653e31b2a26d93a3c4a0e2df76b41bc 04-Feb-2016 xin He <xinhe@google.com> Merge "fix the broken network selection BSSID disable / enable" into mm-wireless-dev
am: ddc9e6bd99

* commit 'ddc9e6bd99cf28b4b7304672b7ecc1ead9cdd0b4':
fix the broken network selection BSSID disable / enable
ddc9e6bd99cf28b4b7304672b7ecc1ead9cdd0b4 04-Feb-2016 xin He <xinhe@google.com> Merge "fix the broken network selection BSSID disable / enable" into mm-wireless-dev
76e9e2a18840cc17747103c86b5b9323d059ef18 03-Feb-2016 Jan Nordqvist <jannq@google.com> Merge "New System APIs for Passpoint r2 app." into mm-wireless-dev
am: 92ce793e9a

* commit '92ce793e9af3faf5d996dd1e592fbc728785058a':
New System APIs for Passpoint r2 app.
92ce793e9af3faf5d996dd1e592fbc728785058a 03-Feb-2016 Jan Nordqvist <jannq@google.com> Merge "New System APIs for Passpoint r2 app." into mm-wireless-dev
2e814680f4dd27a5f825afab189843582235cedc 24-Jan-2016 Jan Nordqvist <jannq@google.com> New System APIs for Passpoint r2 app.

Change-Id: If23e6ab432e871a407cbff94292673524c6d72bd
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WnmData.java
ndroid/server/wifi/anqp/ANQPFactory.java
ndroid/server/wifi/anqp/I18Name.java
ndroid/server/wifi/anqp/RawByteElement.java
ndroid/server/wifi/anqp/TestDriver.java
ndroid/server/wifi/configparse/ConfigBuilder.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
ndroid/server/wifi/hotspot2/omadm/MOTree.java
ndroid/server/wifi/hotspot2/omadm/OMAParser.java
ndroid/server/wifi/hotspot2/omadm/PasspointManagementObjectManager.java
ndroid/server/wifi/hotspot2/osu/OSUClient.java
ndroid/server/wifi/hotspot2/osu/OSUCommand.java
ndroid/server/wifi/hotspot2/osu/OSUManager.java
ndroid/server/wifi/hotspot2/osu/commands/MOData.java
ndroid/server/wifi/hotspot2/osu/commands/PasspointManagementObjectData.java
ndroid/server/wifi/hotspot2/osu/service/SubscriptionTimer.java
ndroid/server/wifi/hotspot2/pps/HomeSP.java
ndroid/server/wifi/hotspot2/pps/Policy.java
ndroid/server/wifi/hotspot2/pps/SubscriptionParameters.java
ndroid/server/wifi/hotspot2/pps/UpdateInfo.java
7b6cd1fce7850fc2aa0e510b170e6fd509308d21 02-Feb-2016 xinhe <xinhe@google.com> fix the broken network selection BSSID disable / enable

In this bug, AP try to steer the STA from 2.4GHz to 5GHz
band. Thus, the 2.4GHz BSSID reject the association request.
In theory, framework should disable this bssid for future
connection. However, this is broken. This CL fix the broken
network selection BSSID disable/enable

BUG=26916700

Change-Id: Ib358dd5a8481c4785391345df33b08459f781b81
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiQualifiedNetworkSelection.java
ndroid/server/wifi/WifiStateMachine.java
6094859a6bb7a6e24e7d0eea78975c52eb071e41 03-Feb-2016 Erik Kline <ek@google.com> resolve merge conflicts of 8013a9b653 to master.

Change-Id: I327bc86b770c516a4357633d1b5929f89e097738
8013a9b65375608d80606780e9e1b313576a0f80 02-Feb-2016 Erik Kline <ek@google.com> Move DHCPv4 mechanics out to IpManager

Bug: 17345682
Change-Id: Iafe64e924b15c60e27e71c625439f3ab3d251c69
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiStateMachine.java
3350cbe20cc4f04f96d87a93376ba44cc00bfba7 02-Feb-2016 Peter Qiu <zqiu@google.com> Merge "WifiApConfigStore refactoring" into mm-wireless-dev
am: a51955bb18

* commit 'a51955bb18c047b2d7e4160f75b7e2dc876eb227':
WifiApConfigStore refactoring
a51955bb18c047b2d7e4160f75b7e2dc876eb227 02-Feb-2016 Peter Qiu <zqiu@google.com> Merge "WifiApConfigStore refactoring" into mm-wireless-dev
99501298a44a63049b47908c153290ead28709df 02-Feb-2016 xin He <xinhe@google.com> Merge "decouple Quality Network Selection with WifiStateMachine" into mm-wireless-dev
am: 2e484f49a0

* commit '2e484f49a044c3d25da845e544c81b2bacfce714':
decouple Quality Network Selection with WifiStateMachine
2e484f49a044c3d25da845e544c81b2bacfce714 02-Feb-2016 xin He <xinhe@google.com> Merge "decouple Quality Network Selection with WifiStateMachine" into mm-wireless-dev
00350909989434fe20c2cf8f4fefbce60f4ed61a 02-Feb-2016 Erik Kline <ek@google.com> Move static IP configuration into IpManager
am: 6728555d8e

* commit '6728555d8e533b3ae2efe7e48f4a0bac3809d959':
Move static IP configuration into IpManager
6728555d8e533b3ae2efe7e48f4a0bac3809d959 01-Feb-2016 Erik Kline <ek@google.com> Move static IP configuration into IpManager

Also, stop passing around "reason" for IPv4 provisioning success
or failure.

Bug: 17345682
Change-Id: Ib7f2e1ba7ce5d8c17427e21ad9035b06750d2452
ndroid/server/wifi/WifiStateMachine.java
f498fc49083e8f6e9685e3e9d3cee210160332e7 02-Feb-2016 Erik Kline <ek@google.com> Remove unused mDhcpActive variable
am: 5c175abc31

* commit '5c175abc314bbb32c7d9fb542c97577f39a910f8':
Remove unused mDhcpActive variable
5c175abc314bbb32c7d9fb542c97577f39a910f8 01-Feb-2016 Erik Kline <ek@google.com> Remove unused mDhcpActive variable

This was only ever assigned to, and never examined.

Change-Id: I1e9acdf433a2d1ade5985cc7ba33d585edca9f81
ndroid/server/wifi/WifiStateMachine.java
b7e25b4194b602300b9fc62c22f528bf5e668faf 02-Feb-2016 Pankaj Kanwar <pkanwar@google.com> Merge "Add DhcpFailure and BadNetworkEvent tests to WifiStateMachine" into mm-wireless-dev
am: bade25ebb7

* commit 'bade25ebb7b4137521576ba01e77adbda382ac11':
Add DhcpFailure and BadNetworkEvent tests to WifiStateMachine
bade25ebb7b4137521576ba01e77adbda382ac11 02-Feb-2016 Pankaj Kanwar <pkanwar@google.com> Merge "Add DhcpFailure and BadNetworkEvent tests to WifiStateMachine" into mm-wireless-dev
abcc229a23f7f0754bac999c7944e8ea4b4c3253 01-Feb-2016 Arthur Hsu <arthurhsu@google.com> Merge "Follow up of ag/848030."
142f2a85c48847ff0b15d71490b8465df0841492 01-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Revert "Refactor WifiScanner support for oneshot scans"" into mm-wireless-dev
am: aed8c07f8d

* commit 'aed8c07f8dc09da9450eae81f4fa8c63191894e0':
Revert "Refactor WifiScanner support for oneshot scans"
aed8c07f8dc09da9450eae81f4fa8c63191894e0 01-Feb-2016 Mitchell Wills <mwills@google.com> Merge "Revert "Refactor WifiScanner support for oneshot scans"" into mm-wireless-dev
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
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/ScanDetailUtil.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningScheduler.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
b96deebb3e7ce2587fef3cab0049c703d0623c24 30-Jan-2016 xinhe <xinhe@google.com> decouple Quality Network Selection with WifiStateMachine

Currently, Quality Network Selection grab a reference to
WifiStateMachine and need directly call some APIs in
WifiStateMachine. We'd like to reduce the coupling
between Quality Network Selection and WifiStateMachine
for better stronger self-containing. This can increase
the robust and test-ability.

BUG=26875232

Change-Id: Ib4e02a2d5b29bade22c416540c38d39dfee2c302
ndroid/server/wifi/WifiQualifiedNetworkSelection.java
ndroid/server/wifi/WifiStateMachine.java
c94a64a292925a00c33413c81a46941093495b3e 24-Jan-2016 pkanwar <pkanwar@google.com> Add DhcpFailure and BadNetworkEvent tests to WifiStateMachine

This CL adds 2 tests for WifiStateMachine:

- TestDhcpFailure tests failure in dhcp client.
- TestBadNetworkEvent tests sending the NETWORK_DISCONNECTION_EVENT
during connection to make sure that the state machine does not break.

BUG=26901681

Change-Id: I9e79d8a07d18f397a38816e0a508d13482143937
ndroid/server/wifi/WifiConfigStore.java
3b608e5aaaa35a2d8e03dd197eadb0f25974bcf6 01-Feb-2016 Erik Kline <ek@google.com> Fix a race that causes an NPE due to b/26238832

This should be removed with the next change to IpManager, but if the
bug gets fixed first then that's a good time to delete this too.

Bug: 26238832
Change-Id: I27085c6a15edc1eee9a149a82363e3f2d89c4ed4
ndroid/server/wifi/WifiStateMachine.java
683b98d17bfa71701eea245f334bd83d9cfa6e01 01-Feb-2016 Erik Kline <ek@google.com> resolve merge conflicts of 9bd76b7c0a to master.

Change-Id: Ia89f7d00b8a1d5d4f0c71bdc0ab3912dab9b4e41
9bd76b7c0afc90d800066397497b5947916b90fa 13-Jan-2016 Erik Kline <ek@google.com> Initial refactoring to migrate IP-related things to IpManager

Bug: 17345682
Change-Id: I2cdd59a4ed405b49dd1e5c4f382f6515705b5261
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiStateMachine.java
3a24f36a730316a194c79e87963f3b19e3b1e1e4 30-Jan-2016 Arthur Hsu <arthurhsu@google.com> Follow up of ag/848030.

Address reviewer comments and make linter happy.

Change-Id: Iba9738275038ad2dfb0f40c5112b2d6a762cb333
ndroid/server/wifi/WifiCertManager.java
c79666b79e273ceaa2f74090b02ca6cf83c61387 27-Jan-2016 Peter Qiu <zqiu@google.com> WifiApConfigStore refactoring

Here are main changes to WifiApConfigStore:
- add public APIs to get/set AP configurations, instead of doing it
via message passing between state machines.
- remove unnecessary statemachine logics.
- remove the use of a dedicated thread for writing configuration file,
the reason is that the file size is fairly small, seems unnecessary to
create a separate thread just for that (which adds complexity).
- handle setting of "null" ap configuration, by falling back to use
the default configuration.
- add unit tests

With this refactoring, WifiApConfigStore becomes more self-contained,
which can be easily reused by other modules (e.g. upcoming SoftApManager).

Bug: 26727266
TEST=runtest frameworks-wifi
TEST=manual test: update/enable WiFi hotspot

Change-Id: If438d5be7eaf59f0f2d35ed25a899cef93c5a638
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiApConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
d24bd60cc49acfabd6eb47ca77ad6af02b1082b1 30-Jan-2016 Mitchell Wills <mwills@google.com> Merge "Refactor WifiScanner support for oneshot scans" into mm-wireless-dev
am: 6788fcec7c

* commit '6788fcec7c1f46563aaf30e8cc1e8e7cb7773c60':
Refactor WifiScanner support for oneshot scans
6788fcec7c1f46563aaf30e8cc1e8e7cb7773c60 30-Jan-2016 Mitchell Wills <mwills@google.com> Merge "Refactor WifiScanner support for oneshot scans" into mm-wireless-dev
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
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/ScanDetailUtil.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningScheduler.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
030e15024e75322ba27650be2a05d15ac06026dc 29-Jan-2016 Bartosz Fabianowski <bartfab@google.com> resolve merge conflicts of aae3592ef5 to master.

Change-Id: I24cf4c223dc384861e807493637bef4da4bb5ad2
aae3592ef5a6fb1031a405248e40ce8727f3a3b9 29-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Merge "WiFiServiceImpl should not be checking who is allowed to forget networks" into mm-wireless-dev
a43ca810bea25734a8ad1a8ced14991ceb04272b 29-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Merge "Handle user switch in WifiStateMachine.DefaultState" into mm-wireless-dev
am: 9feb86132e

* commit '9feb86132e4613603f8c1ed649001014c8059969':
Handle user switch in WifiStateMachine.DefaultState
9feb86132e4613603f8c1ed649001014c8059969 29-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Merge "Handle user switch in WifiStateMachine.DefaultState" into mm-wireless-dev
b1a96d8ce9da10cd3a212d5bf41f0eee964828d9 29-Jan-2016 Erik Kline <ek@google.com> Merge "Add static getLinkPropertiesSummary() method." into mm-wireless-dev
am: d0bfb3bc03

* commit 'd0bfb3bc032f443f68ead6198cfb6ef9ca67e20d':
Add static getLinkPropertiesSummary() method.
d0bfb3bc032f443f68ead6198cfb6ef9ca67e20d 29-Jan-2016 Erik Kline <ek@google.com> Merge "Add static getLinkPropertiesSummary() method." into mm-wireless-dev
3f790a1d4483446f15216d5077c6c77dfb41408f 28-Jan-2016 Erik Kline <ek@google.com> Add static getLinkPropertiesSummary() method.

Replaces triplicate code with a call to a single static method.

Change-Id: Ie656a59c67c242ad57b3947d91fb7f748048cad2
ndroid/server/wifi/WifiStateMachine.java
04e2e800da7fc759fb2f7b54df02d9f7ea6ae4e8 28-Jan-2016 Etan Cohen <etancohen@google.com> Merge "NAN: add message ID to correlate message callbacks to original message" into mm-wireless-dev
am: d3efa09daa

* commit 'd3efa09daa49ad39ed1f6920388e9ba63c8e271b':
NAN: add message ID to correlate message callbacks to original message
d3efa09daa49ad39ed1f6920388e9ba63c8e271b 28-Jan-2016 Etan Cohen <etancohen@google.com> Merge "NAN: add message ID to correlate message callbacks to original message" into mm-wireless-dev
9a5832469bc0755635934c4343c5f63fbc893839 28-Jan-2016 Peter Qiu <zqiu@google.com> Merge "Correctly log old/new link properties when IP provisioning is lost" into mm-wireless-dev
am: 27d23f166b

* commit '27d23f166b1f33e4991cf56ca20bfe382dfcb408':
Correctly log old/new link properties when IP provisioning is lost
27d23f166b1f33e4991cf56ca20bfe382dfcb408 28-Jan-2016 Peter Qiu <zqiu@google.com> Merge "Correctly log old/new link properties when IP provisioning is lost" into mm-wireless-dev
bace539f9cdc4ffb521c8251dd1c56073e805cd4 28-Jan-2016 Bartosz Fabianowski <bartfab@google.com> WiFiServiceImpl should not be checking who is allowed to forget networks

WiFiStateMachine takes care of verifying whether the caller is allowed
to forget a network. WiFiServiceImpl should not be performing its own
(redundant, obsolete and incompatible) checks on top of this.

BUG: 26845784

Change-Id: Ia10551ce44182c6f98407201f0cdf689ce9dbc6c
ndroid/server/wifi/WifiServiceImpl.java
f2a63d82102461f1e6dbcef7ba16625bc07940ff 28-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Handle user switch in WifiStateMachine.DefaultState

The WiFiStateMachine should take not of changes to the foreground user
regardless of its current internal state. The handling of the user
switch message should therefore be implemented in the DefaultState,
which all other states are built on top of.

BUG: 26846176

Change-Id: Ie605f4df3625e445d2015797c3e9bf57615c1f4d
ndroid/server/wifi/WifiStateMachine.java
fcc5bc85293213868da5830e01c26363ee2e2cb1 28-Jan-2016 xin He <xinhe@google.com> Merge "Remodel Network Selection" into mm-wireless-dev
am: 2c990df82a

* commit '2c990df82a9e01a29b4cbe682226b22b805f527f':
Remodel Network Selection
2c990df82a9e01a29b4cbe682226b22b805f527f 28-Jan-2016 xin He <xinhe@google.com> Merge "Remodel Network Selection" into mm-wireless-dev
b50356194ccfdaf5e127d9f705f99713d6f1e98c 26-Jan-2016 xinhe <xinhe@google.com> Remodel Network Selection

There are two main changes in this CL:
(1) Add user selection preference support. If user
explicitly chooses a network, framework will remember
it and consider user has a higher preference of this
network over all other visible networks.

(2) Seperate user set BSSID and framework chosen BSSID.
The BSSID under WifiConfiguration is set by user and is
not allowed to be overrided. The BSSID under Network
selection status is the best BSSID chosen by the
framework to associate with.

BUG=26012244
BUG=26721725

Change-Id: I3cfb7db870c6abe933a296267bc1909b4810c8f8
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiQualifiedNetworkSelection.java
ndroid/server/wifi/WifiStateMachine.java
95a40b7432e9928ec6606f0c95abd428e26e758c 28-Jan-2016 Lorenzo Colitti <lorenzo@google.com> Merge "Unbreak the code that chooses the DHCP client." into mm-wireless-dev
am: 65027c30ca

* commit '65027c30caafb24f939dcc0eab716454c39bd6fe':
Unbreak the code that chooses the DHCP client.
65027c30caafb24f939dcc0eab716454c39bd6fe 28-Jan-2016 Lorenzo Colitti <lorenzo@google.com> Merge "Unbreak the code that chooses the DHCP client." into mm-wireless-dev
46c47eee5d6f557f8f1652051e5b8f0a6ed01020 27-Jan-2016 Lorenzo Colitti <lorenzo@google.com> Unbreak the code that chooses the DHCP client.

https://partner-android-review.googlesource.com/#/c/516526/ broke
the code that chooses the DHCP client, by writing code that in
effect did:

if (setting) {
use legacy DHCP client;
} else {
use legacy DHCP client;
}

This means that both mm-wireless-dev and master are using the
legacy DHCP client all the time, which we did not use in M.

Change-Id: I9f5cee93262d001f9363b9c91840add1a8c9a4a6
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/WifiStateMachine.java
a8f4fbe984b2ee4a10a98d71f61bbb7c3065c5f2 27-Jan-2016 Glen Kuhne <kuh@google.com> Merge "WifiMetric shorter proto dump" into mm-wireless-dev
am: b8bf980e58

* commit 'b8bf980e5827fb97d1b3ad5debcea74d5ad8db8b':
WifiMetric shorter proto dump
11638f348ba45f9f417928e79b81186cef76c561 27-Jan-2016 Glen Kuhne <kuh@google.com> WifiMetric shorter proto dump

Before, proto was dumped as part of the standard Wifi dump using:
'dumpsys wifi proto'
Now, proto is dumped on its own using:
'dumpsys wifi wifiMetricsProto'
This reduces dump size significantly. The old dumpsys argument is no
longer used to dump the proto.

BUG=25691077

Change-Id: I7c7d09b906b11af7842d07fc719bf52dca9ba438
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiServiceImpl.java
2e09c384f5ce86061b115f20fe3ca75a175d87f0 26-Jan-2016 Etan Cohen <etancohen@google.com> NAN: add message ID to correlate message callbacks to original message

Add message ID to be specified by caller to each message. Same message ID
is provided back in callbacks indicating message send success or failure.

Message ID is purely used as a caller-side object - the service doesn't use
the contents in any way.

Bug: 26769293
Change-Id: Ib1243f42473ecbd616a6c620d2fff4aa9d3a0d73
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
58ca3b3efbe38a3a13bba21ee312a610616fa57c 27-Jan-2016 Rubin Xu <rubinxu@google.com> Merge "Support multiple CA certificates for EAP network" into mm-wireless-dev
am: fbda49b838

* commit 'fbda49b838947610deb378d501c686965fef134e':
Support multiple CA certificates for EAP network
fbda49b838947610deb378d501c686965fef134e 27-Jan-2016 Rubin Xu <rubinxu@google.com> Merge "Support multiple CA certificates for EAP network" into mm-wireless-dev
266600869bd02f51c8351e01a9e415af8257f259 26-Jan-2016 Arthur Hsu <arthurhsu@google.com> Merge "WifiCertManager implementation."
c0428052cf4075a794e5fe34e26f461971fe7243 26-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Update bug numbers referenced by TODOs
am: 7be46e76ac

* commit '7be46e76ac639934f19e84f897cbe8b698e56dff':
Update bug numbers referenced by TODOs
7be46e76ac639934f19e84f897cbe8b698e56dff 26-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Update bug numbers referenced by TODOs

P2 and lower-priority pieces of b/25600871 were split out into their own
bugs. This CL updates bug references in TODOs accordingly.

BUG:25600871
Change-Id: Ic196506b45e87adac390252ff8b0cf5a403214e9
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
78463be32c01259841f4c0b670b742c3c2040cf3 29-Nov-2015 Rubin Xu <rubinxu@google.com> Support multiple CA certificates for EAP network

Copy all configured CA certificates to key store and set up their aliases
when adding networks. Remove all certificates when the network is removed.

Bug: 22547958
Change-Id: I91836911bfc84ec2922c5db4e9019a2872f361f0
ndroid/server/wifi/WifiConfigStore.java
2bfc67c9893c0a525b224d68dd73a74212b0c29f 20-Jan-2016 Arthur Hsu <arthurhsu@google.com> WifiCertManager implementation.

The WiFiCertManager is essentially a wrapper around the KeyStore that
filters out client certs (and their corresponding private keys) that the
current user should not see.

Change-Id: I1843114c54cb459ceec3d3546055b91f6b177125
ndroid/server/wifi/WifiCertManager.java
ndroid/server/wifi/WifiServiceImpl.java
e8401edf5e7bdb63261407b0df67cc763463c84c 25-Jan-2016 Mitchell Wills <mwills@google.com> Merge "Updates for gscan HAL updates in N" into mm-wireless-dev
am: 5b6b6d00d8

* commit '5b6b6d00d817acd25b55badf226c42b8d9811399':
Updates for gscan HAL updates in N
5b6b6d00d817acd25b55badf226c42b8d9811399 25-Jan-2016 Mitchell Wills <mwills@google.com> Merge "Updates for gscan HAL updates in N" into mm-wireless-dev
bf54d3375aea13eb0147dbea8a03933b5e83fe3e 25-Jan-2016 Peter Qiu <zqiu@google.com> Correctly log old/new link properties when IP provisioning is lost

Move the logging for new and old link properties when IP provisioning
is lost to before the check for link changes, since the link changed
check would overwrite the old link properties with the new one, results
in logging only the new link properties (which is not quiet useful for
debugging).

Bug: None
Change-Id: I314cb9fc1831dd12a03bbf48fdd93c157ed46e80
ndroid/server/wifi/WifiStateMachine.java
037b57b9c5f78b96ea01c31a602e872b35da526e 25-Jan-2016 Bartosz Fabianowski <bartfab@google.com> resolve merge conflicts of bcdabb1fa1 to master.

Change-Id: I93ead6b9e09d6d9ef0361eff42767a75961d8fd3
bcdabb1fa1894fcca610692ec94459fe623afa74 22-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Implement private network configurations in WifiService

* Make ConfigurationMap aware of the current foreground user. Suffix each
accessor with one of:
- ForCurrentUser() (operates on network configurations visible to the
current user only)
- ForAllUsers() (operates on all network configurations)
* Make WifiConfigStore aware of the current foreground user:
- Whenever the user changes, networks that are no longer visible are
disabled and networks that newly became visible are enabled.
- Account for the fact that the configKey cannot be computed from
information stored in wpa_supplicant.conf alone while loading
network configurations from disk.
- Have all public methods that add/remove/modify network configurations
operate on configurations visible to the current foreground user only.

BUG=25600871

Change-Id: Id1e81dd649ac5253c94e65b6a25e239fc3cf09a4
ndroid/server/wifi/ConfigurationMap.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiService.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
68ae7112ce5c8d7f871c816cba1f41b2da395ef2 22-Jan-2016 Peter Qiu <zqiu@google.com> Remove WifiWatchdogStateMachine
am: cb8c60a24d

* commit 'cb8c60a24d9e89f3b1aa601e76e38e05f8db6fae':
Remove WifiWatchdogStateMachine
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
ndroid/server/wifi/WifiNative.java
cb8c60a24d9e89f3b1aa601e76e38e05f8db6fae 20-Jan-2016 Peter Qiu <zqiu@google.com> Remove WifiWatchdogStateMachine

Wifi watchdog is not being used anymore, the associated setting
("Settings -> Wi-Fi -> Advanced -> Avoid poor internet connection")
had already been deleted from UI. So remove it.

While there, remove the unused state VerifyingLinkState in WifiStateMachine,
which is only triggered by WifiWatchdogStateMachine.

Bug: 26254553
TEST=runtest frameworks-wifi

Change-Id: Ic7d01d1657f7c737fd22980a7f66434c7667d4ea
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiWatchdogStateMachine.java
b48e8dabf1f3bda2b27c0a070575994cdcd2a2ed 21-Jan-2016 Mitchell Wills <mwills@google.com> Merge "Add some tests for WifiScanningService" into mm-wireless-dev
am: daf5292779

* commit 'daf5292779d8a24d02f8ec51f51b061b535ed667':
Add some tests for WifiScanningService
daf5292779d8a24d02f8ec51f51b061b535ed667 21-Jan-2016 Mitchell Wills <mwills@google.com> Merge "Add some tests for WifiScanningService" into mm-wireless-dev
94bd575cb4766ed0dfbaad0fc7719a9e9e85a260 15-Jan-2016 Mitchell Wills <mwills@google.com> Add some tests for WifiScanningService

Cleanup WifiScanningServiceImpl a little and add a few basic tests
Also cleaned up some tests and added some more utilities

Change-Id: Ic0ac34344de6cf8fa03b741189156916ae35e2a3
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiScannerImpl.java
ndroid/server/wifi/WifiScanningService.java
ndroid/server/wifi/WifiScanningServiceImpl.java
e87e2c32eb31f18c5024b6aa5d491fa5180c2d98 21-Jan-2016 Glen Kuhne <kuh@google.com> Merge "Wifi Metrics, Initial Commit" into mm-wireless-dev
am: 996ff6b8a9

* commit '996ff6b8a9d5a75ef41ad4d1efccb04a915ea2c3':
Wifi Metrics, Initial Commit
996ff6b8a9d5a75ef41ad4d1efccb04a915ea2c3 21-Jan-2016 Glen Kuhne <kuh@google.com> Merge "Wifi Metrics, Initial Commit" into mm-wireless-dev
1b067831bbff14f8e7a99b927b69f714d1b03448 04-Jan-2016 Glen Kuhne <kuh@google.com> Wifi Metrics, Initial Commit

Created WifiMetrics class to log wireless metrics.
Dumps Metrics as Base64 wifi.proto, with dumpsys option 'proto'.
Implements SOME metric collection from wifi service

Bug: 25691077
Change-Id: I28a745b5f66dd1d38868b7eadd79882fd2c5c5a2
ndroid/server/wifi/WifiMetrics.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
660f137724789c535e9468cd1572912d57150a53 20-Jan-2016 Randy Pan <zpan@google.com> Merge "Optimize WiFi scanner predefined bucket settings" into mm-wireless-dev
am: a04138fa63

* commit 'a04138fa633a02ed992e1a38decb0eb9a81430e2':
Optimize WiFi scanner predefined bucket settings
a04138fa633a02ed992e1a38decb0eb9a81430e2 20-Jan-2016 Randy Pan <zpan@google.com> Merge "Optimize WiFi scanner predefined bucket settings" into mm-wireless-dev
c6d8e5bb244533d5ce58a5107525bd6bc776cb0d 20-Jan-2016 xin He <xinhe@google.com> Merge "Constant reboots with the latest Dogfood release NYC" into mm-wireless-dev
am: 55a8036f39

* commit '55a8036f3954b99a99bc592bcf3e5ee34cabdabc':
Constant reboots with the latest Dogfood release NYC
55a8036f3954b99a99bc592bcf3e5ee34cabdabc 20-Jan-2016 xin He <xinhe@google.com> Merge "Constant reboots with the latest Dogfood release NYC" into mm-wireless-dev
0d044caad1328809a5f7fb5848e9d488b47911e1 20-Jan-2016 xinhe <xinhe@google.com> Constant reboots with the latest Dogfood release NYC

This crashs happens when user enable untrusted network
but there is no NETWORK_SCORE_SERVICE

BUG=26681441

Change-Id: I1aed84086e9aca179d86675b3756d08e38fb2d4f
ndroid/server/wifi/WifiQualifiedNetworkSelection.java
4a7fda19b731474151c768b7284ad325f6c9e46c 20-Jan-2016 Peter Qiu <zqiu@google.com> Run WifiTrafficPoller.TrafficHandler in WifiService thread
am: 8e14dcb9dc

* commit '8e14dcb9dc38149b4672eceb3fe22287ea4343a0':
Run WifiTrafficPoller.TrafficHandler in WifiService thread
8e14dcb9dc38149b4672eceb3fe22287ea4343a0 19-Jan-2016 Peter Qiu <zqiu@google.com> Run WifiTrafficPoller.TrafficHandler in WifiService thread

Currently WifiTrafficPoller.TrafficHandler is running under a non-WiFi
related thread ("SystemServer" thread). Update it to run under
WifiService thread instead.

Bug: 26584131
TEST=Run frameworks-wifi unitests

Change-Id: Ieb151f3609944f47fdd0d1f18fc483786f148342
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiTrafficPoller.java
78c66a6fa8ac2f6c9d3fa74313a4ac8c3585cb18 16-Jan-2016 Randy Pan <zpan@google.com> Optimize WiFi scanner predefined bucket settings

Configure the predefined period values to be PERIOD_MIN_GCD_MS
* 2^N. This helps power saving and cpu utilization.

Updated the scanner unit tests.

Bug: 26588661
Change-Id: I6f62fd8072086843506c9b624c67f959fcdc4ecb
ndroid/server/wifi/MultiClientScheduler.java
b48fdddedf38698f6230c07bd921e2f544abce8a 19-Jan-2016 Etan Cohen <etancohen@google.com> Merge changes from topic 'wake_cherry_pick'

* changes:
JNI interface to obtain wlan wake reasons.
Declaration of native JNI call in WiFiNative.java
5deb84dbb62c92a75f16f1f405e52a5dd8619ffc 16-Jan-2016 xinhe <xinhe@google.com> Broken Network Selection Tests
am: c84802f3c6

* commit 'c84802f3c6026f42cd39575d7cf23972ad9fe375':
Broken Network Selection Tests
c84802f3c6026f42cd39575d7cf23972ad9fe375 15-Jan-2016 xinhe <xinhe@google.com> Broken Network Selection Tests

StateMachine.sendMessage is final and can not
be mocked. Use other mothod to verify

BUG=26549815

Change-Id: I4a5fcd682654bd7925a15f1f51be808653f4e9be
ndroid/server/wifi/WifiQualifiedNetworkSelection.java
ndroid/server/wifi/WifiStateMachine.java
fb44635701d0edc9a76b3c844743b11b7940bd43 18-Dec-2015 Prerepa Viswanadham <dham@google.com> Declaration of native JNI call in WiFiNative.java

Cherry picked from 5ea42964ba17901a8d724736b450ace6ed48880f

Bug: 26572953
Change-Id: I99bae1b598ba3598413e7089bb6a9e68d9e06346
ndroid/server/wifi/WifiNative.java
2ba8086441462481427538e1cd8ab0a2c787cebf 15-Jan-2016 xin He <xinhe@google.com> Merge " NullPointerException: Attempt to read from field \'int android.net.wifi.ScanResult.level\' on a null object reference" into mm-wireless-dev
am: 0992d8b7dd

* commit '0992d8b7ddc5530800ad728ee41d8dce60002308':
NullPointerException: Attempt to read from field 'int android.net.wifi.ScanResult.level' on a null object reference
0992d8b7ddc5530800ad728ee41d8dce60002308 15-Jan-2016 xin He <xinhe@google.com> Merge " NullPointerException: Attempt to read from field 'int android.net.wifi.ScanResult.level' on a null object reference" into mm-wireless-dev
387245d75d8b572fbcf3179f477881ade58203e9 15-Jan-2016 xinhe <xinhe@google.com> NullPointerException: Attempt to read from field
'int android.net.wifi.ScanResult.level' on a null
object reference

This bug is due to such a case: The first scan
result belong to a network which is disabled
temporarily or permanently

Also clean the code remove dsiabled network since it is useless.

BUG=26576928

Change-Id: Id4f32f6f85df06659279a363906b63becceb6f76
ndroid/server/wifi/WifiQualifiedNetworkSelection.java
80f2b7568ef7e18ffc83dd8f39e222bd9a8f9259 15-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Remove spurious import added by auto-merger

The auto-merger picked up an import statement for a file that does not
exist in master. This CL removes the spurious import.

BUG=25600871

Change-Id: I1934aa33d5d1e60b076d64a61eb2e5c45c212092
ndroid/server/wifi/WifiNative.java
921358408d25f4042acaf2d8b73a95a5491c1502 15-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Store configKey in wpa_supplicant.conf
am: fbb081b7c2

* commit 'fbb081b7c28c18f0644701061a1ab38a4627db27':
Store configKey in wpa_supplicant.conf
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
ndroid/server/wifi/ConfigurationMap.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
31921cc78d7c997dff60a4cbd3f1bf29b3a63fed 15-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Merge "Revert "Store configKey in wpa_supplicant.conf"" into mm-wireless-dev
am: 0fd73e0888

* commit '0fd73e0888e297a7a01118f0552783f5ff4ec39d':
Revert "Store configKey in wpa_supplicant.conf"
4fe40b729af7ef20685004516dd85f79d4c57eda 15-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Revert "Restore import order"
am: 1b45ac8ca6

* commit '1b45ac8ca62c6a82813871ebe8e3df24dc2f9d0e':
Revert "Restore import order"
39c3574fa3be035eafbf86462f3ca1bb859060fa 15-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Revert "Store configKey in wpa_supplicant.conf"

This reverts commit 3552d3bc8329aa9bc843f62c3a854e5ad2b41037.

Change-Id: Ib0d425baa3ac38a20d3ba660e5e5da490a1551e0
ndroid/server/wifi/ConfigurationMap.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
1b45ac8ca62c6a82813871ebe8e3df24dc2f9d0e 15-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Revert "Restore import order"

This reverts commit d56219f62d7bd1104c0d76fbc187ec8378a030f6.

Change-Id: I36b8c218c15ea569e4a267933203fc63ada67038
ndroid/server/wifi/WifiNative.java
ef73682633c428f70157e33bccb4897e22492281 15-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Restore import order
am: d56219f62d

* commit 'd56219f62d7bd1104c0d76fbc187ec8378a030f6':
Restore import order
d56219f62d7bd1104c0d76fbc187ec8378a030f6 15-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Restore import order

As part of "Store configKey in wpa_supplicant.conf", I tidied up the
order of imports as advised by the checkstyle script. For some reason,
that is causing one of the imports to not be found. This CL reverts the
import order to fix the build breakage.

BUG=25600871

Change-Id: I5e6bf2545d2070026537dd73533f731da5aee854
ndroid/server/wifi/WifiNative.java
73b19b3084d21a3fa9227b4b6723a1fd20fb2e5c 15-Jan-2016 Bartosz Fabianowski <bartfab@google.com> Store configKey in wpa_supplicant.conf
am: 3552d3bc83

* commit '3552d3bc8329aa9bc843f62c3a854e5ad2b41037':
Store configKey in wpa_supplicant.conf
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
ndroid/server/wifi/ConfigurationMap.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
938651399d38ba46e7c588785ff7ec0b177fcb84 15-Jan-2016 Vinit Deshpande <vinitd@google.com> Merge "Fix broken WifiStateMachine tests" into mm-wireless-dev
am: 7bec7def69

* commit '7bec7def6968a224f026df852d744011030b9c1b':
Fix broken WifiStateMachine tests
c5ab6bc3c683f9d97e1af9887136a44fce133afc 15-Jan-2016 Vinit Deshpande <vinitd@google.com> Merge "Unit test for WifiController\'s emergency mode behaviors" into mm-wireless-dev
am: 859240c33a

* commit '859240c33a7af91ed5cfe64813a0d296981d2f63':
Unit test for WifiController's emergency mode behaviors
5fa540c1bf4e4529ed892b9526cf9c661c04c578 15-Jan-2016 Vinit Deshpande <vinitd@google.com> Merge "Allow turning off Wi-Fi when emergency call is made" into mm-wireless-dev
am: a84fd7d178

* commit 'a84fd7d178aedbea7ba73bd68c810fb4294f3094':
Allow turning off Wi-Fi when emergency call is made
7bec7def6968a224f026df852d744011030b9c1b 15-Jan-2016 Vinit Deshpande <vinitd@google.com> Merge "Fix broken WifiStateMachine tests" into mm-wireless-dev
859240c33a7af91ed5cfe64813a0d296981d2f63 15-Jan-2016 Vinit Deshpande <vinitd@google.com> Merge "Unit test for WifiController's emergency mode behaviors" into mm-wireless-dev
a84fd7d178aedbea7ba73bd68c810fb4294f3094 15-Jan-2016 Vinit Deshpande <vinitd@google.com> Merge "Allow turning off Wi-Fi when emergency call is made" into mm-wireless-dev
a3b6ba415e187a5b4ac07f007373dffde5d9fe10 15-Jan-2016 xin He <xinhe@google.com> Merge "Broken WifiStateMachine and Network Selection Test" into mm-wireless-dev
am: f26259a93c

* commit 'f26259a93c77a0069deb46ca29a864de31c99ba6':
Broken WifiStateMachine and Network Selection Test
f26259a93c77a0069deb46ca29a864de31c99ba6 15-Jan-2016 xin He <xinhe@google.com> Merge "Broken WifiStateMachine and Network Selection Test" into mm-wireless-dev
f7c95ec09ee41c4ab06c1effa6d9cf3b13a2e664 15-Jan-2016 Vinit Deshpande <vinitd@google.com> Fix broken WifiStateMachine tests

Removal of a facade call is causing these to fail

Change-Id: I981ed0b65b9c63cdd78bbfbd71b87cb903467fed
ndroid/server/wifi/WifiStateMachine.java
79a4204d12f32d2f6a4dfc8500f5e74718cabb8d 14-Jan-2016 Vinit Deshpande <vinitd@google.com> Unit test for WifiController's emergency mode behaviors

Change-Id: Ic3d8618501632d449bbd3432b95542ac92f336e4
ndroid/server/wifi/WifiController.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiSettingsStore.java
89c1bd779fcf2e4631a5da21333ef7775b397050 15-Jan-2016 Vinit Deshpande <vinitd@google.com> resolve merge conflicts of 7e03151407 to master.

Change-Id: I7ab6a5e2fa7fd3a6502ddf5e02e2fa64b4493a63
5aa63dd6c8a00c9dea40a2105c5a774c19c58cb3 15-Jan-2016 Etan Cohen <etancohen@google.com> resolve merge conflicts of 17b7a79520 to master.

Change-Id: I779f8bbf80a3d08b119078d31960fda0951723f4
090aa74f2d36010abba6563a39c87ab7ba8a7473 14-Jan-2016 Vinit Deshpande <vinitd@google.com> Allow turning off Wi-Fi when emergency call is made

Bug: 24147407

Change-Id: I52db1b34df318d0754b1c316806712a61fc3a1f5
ndroid/server/wifi/WifiController.java
ndroid/server/wifi/WifiServiceImpl.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
ndroid/server/wifi/BaseWifiLogger.java
ndroid/server/wifi/WifiLogger.java
ndroid/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
ndroid/server/wifi/WifiNative.java
97c5ad54fcc5499d22292e65114ea332e6e39352 15-Jan-2016 Vinit Deshpande <vinitd@google.com> Merge "Reset idenitities for EAP-SIM networks when SIM is pulled [DO NOT MERGE]" into mm-wireless-dev
17b7a795202659694aeb21e45b4dd4a4b016ac4d 15-Jan-2016 Etan Cohen <etancohen@google.com> Merge "NAN: initial service implementation for discovery" into mm-wireless-dev
2ada3ea8a48bfc8202d692a70bde6bc14708b4b5 07-Jan-2016 Vinit Deshpande <vinitd@google.com> Reset idenitities for EAP-SIM networks when SIM is pulled [DO NOT MERGE]

This change resets identity and anonymous_identity for all
netorks that use SIM based auth. This ensures that all cached
data is destoryed when SIM is removed; and newly added SIM
must be authorized on the network to connect again.

Bug: 23703716

Change-Id: I83d80336b2089c73d99214651b64b79443faf7f7
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
e978c4348f2dc0d0af3393f669ce382d7e1a841a 15-Jan-2016 Vinit Deshpande <vinitd@google.com> Merge "Appropriately fail EAP-SIM/AKA when SIM doesn't generate good response [DO NOT MERGE]" into mm-wireless-dev
8f3ec73d1ce52b3f23e4cccd6a202b5707874f46 15-Jan-2016 xinhe <xinhe@google.com> Broken WifiStateMachine and Network Selection Test

Fix the broken on Network Selection Test

BUG=26549815

Change-Id: I1e331c6c677b050b3625ca708c8513dcbd3c192f
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
df9b18c89d406a346aa6c55cd168dcd907037fc8 15-Jan-2016 xin He <xinhe@google.com> Merge "Device restarted multiple times upon tapping any option in settings after performing tap and go V2" into mm-wireless-dev
am: 68bca95e16

* commit '68bca95e166d3af64dc7b519a06a2ee0bc062588':
Device restarted multiple times upon tapping any option in settings after performing tap and go V2
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/nan/WifiNanClientState.java
ndroid/server/wifi/nan/WifiNanNative.java
ndroid/server/wifi/nan/WifiNanService.java
ndroid/server/wifi/nan/WifiNanServiceImpl.java
ndroid/server/wifi/nan/WifiNanSessionState.java
ndroid/server/wifi/nan/WifiNanStateManager.java
68bca95e166d3af64dc7b519a06a2ee0bc062588 15-Jan-2016 xin He <xinhe@google.com> Merge "Device restarted multiple times upon tapping any option in settings after performing tap and go V2" into mm-wireless-dev
21a7287737e8b2a122b07d63a7393868101a99a1 15-Jan-2016 xinhe <xinhe@google.com> Device restarted multiple times upon tapping any option in
settings after performing tap and go V2

This is due to print the wrong configuration information
and check the pointer before use

BUG=26564614

Change-Id: I19505646c78d2dd8c469805c6775ec71611c35bd
ndroid/server/wifi/WifiStateMachine.java
426f0b86c837307c8ea6d49003c7feccf426fe1a 14-Jan-2016 Mitchell Wills <mwills@google.com> Fix a couple bugs in WifiScanner and improve tests
am: 2771787818

* commit '2771787818003e53e8175036a3d09688c783f350':
Fix a couple bugs in WifiScanner and improve tests
2771787818003e53e8175036a3d09688c783f350 07-Jan-2016 Mitchell Wills <mwills@google.com> Fix a couple bugs in WifiScanner and improve tests

Ordering of scan results for HAL scanner implementation was wrong.
Generated scan results for tests were very similar in some cases leading
to tests missing the bug above. This CL makes generated scan results
dependant on the test case name as well.

Change-Id: Ibb35abf275db3585766be630585d0e3c8870494c
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiScannerImpl.java
0c52bc5370597f9ea584d88497c181694a32ad2d 14-Jan-2016 Mitchell Wills <mwills@google.com> Cleanup some of the wifi logging
am: 65b752f1da

* commit '65b752f1da25f028a204a88264380c610866c027':
Cleanup some of the wifi logging
65b752f1da25f028a204a88264380c610866c027 14-Jan-2016 Mitchell Wills <mwills@google.com> Cleanup some of the wifi logging

There were many things that were being logged as errors that
weren't. This either removes those log statements entirely if they are no
longer needed or reduces the log level.

Change-Id: I4a150b7bb862b187cb52d03a9714ddfc496a775b
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiServiceImpl.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
f2de9d11f230272b49c5fd62c98058386b841b8a 14-Jan-2016 Randy Pan <zpan@google.com> Fix multi client scheduler bucket creation
am: 2fb3b7ef14

* commit '2fb3b7ef1446f6963f95600f1a5cf395ee7439ec':
Fix multi client scheduler bucket creation
2fb3b7ef1446f6963f95600f1a5cf395ee7439ec 14-Jan-2016 Randy Pan <zpan@google.com> Fix multi client scheduler bucket creation

Use the real time active regular bucket count value instead of
its initial value when compacting buckets.

Bug: 26550853
Change-Id: I3ae1fb2a741bb56b1e9ceb6ea363b8685ecf1f29
ndroid/server/wifi/MultiClientScheduler.java
0341b9c9301628467a19ffaff6492cff715e6bec 14-Jan-2016 Vinit Deshpande <vinitd@google.com> Allow turning off Wi-Fi when emergency call is made [DO NOT MERGE]
am: e5048be9b9

* commit 'e5048be9b96c84659631fd5a95a2c80242df859d':
Allow turning off Wi-Fi when emergency call is made [DO NOT MERGE]
e5048be9b96c84659631fd5a95a2c80242df859d 14-Jan-2016 Vinit Deshpande <vinitd@google.com> Allow turning off Wi-Fi when emergency call is made [DO NOT MERGE]

Bug: 24147407

Change-Id: I52db1b34df318d0754b1c316806712a61fc3a1f5
ndroid/server/wifi/WifiController.java
ndroid/server/wifi/WifiServiceImpl.java
ea8d2bc41b1db1f38237f19db344a212e244cf13 14-Jan-2016 xin He <xinhe@google.com> Merge "Initial codes for Quality network selection"
5da1f05c912128e7880c832e7995bdd5884cf7a0 01-Dec-2015 xinhe <xinhe@google.com> Initial codes for Quality network selection

In this change list, the old WifiAutojoin module is
refactored initially. The old WifiAutojoinController is
replaced with a new WifiQualifiedNetworkSelector.
WifiConfiguration, WifiConfigureStore and
WifiStateMachine have been modified accordingly. The new
network selection logic is refactored with a more clear
and deterministci one. To refer to thedescribed in
details, in "Quality Network Selection and Connectivity
Scan Management in N". The link of the document is:
https://docs.google.com/document/d
/1JPTa2NEk-PgjCJ16fIrR6ohV-kDKveDlYDOeiMCB2_c

Also the initial unit test codes are added. Test case of
5GHz network over 2GHz network is added.

cherry-picked from 8f0f666c8bdaf508f191f8590755140b92d970ea
Bug:26012244
Change-Id: I60d676a1589de0e0417fbf44ab75ab0ef7cedc85
ndroid/server/wifi/SupplicantStateTracker.java
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiQualifiedNetworkSelection.java
ndroid/server/wifi/WifiStateMachine.java
3072998deeec2fbf78fbcfd8bf10d16a8d27dc59 13-Jan-2016 Rebecca Silberstein <silberst@google.com> Merge "Tests for InformationElementUtil" into mm-wireless-dev
am: 611faf5ce1

* commit '611faf5ce1f33711b71294aa0245f164bb3b09da':
Tests for InformationElementUtil
611faf5ce1f33711b71294aa0245f164bb3b09da 13-Jan-2016 Rebecca Silberstein <silberst@google.com> Merge "Tests for InformationElementUtil" into mm-wireless-dev
6a6e335012652ab68aabf56bc98770046629d1a0 13-Jan-2016 Randy Pan <zpan@google.com> Merge changes I259c735c,Ia8006f3e into mm-wireless-dev
am: 932de59143

* commit '932de591430383f0704d1cec2e61b8f2b1657ee0':
Exponential back off scan unit tests
Scanner scheduler support for special scan request
b907b456dfba8417b913508533145e374e40c2b7 13-Jan-2016 xin He <xinhe@google.com> Merge "Initial codes for Quality network selection [DO NOT MERGE]" into mm-wireless-dev
932de591430383f0704d1cec2e61b8f2b1657ee0 13-Jan-2016 Randy Pan <zpan@google.com> Merge changes I259c735c,Ia8006f3e into mm-wireless-dev

* changes:
Exponential back off scan unit tests
Scanner scheduler support for special scan request
9a3910bf92b44ece75c53bb88f05615ff500b64c 13-Jan-2016 Jan Nordqvist <jannq@google.com> Merge "Drop checks for locked WiFi key store when installing keys/certs."
8bfdddc25c3ed7da67baf954cf13052ee81009ab 13-Jan-2016 Vinit Deshpande <vinitd@google.com> Guard against HAL returning null scan results am: 549225687b
am: 0b457a8117

* commit '0b457a8117bf23c996a76ecf89dcc46dfa3b9c50':
Guard against HAL returning null scan results
e920c0f1b632d8edb40c44a6db86440aef3282a1 13-Jan-2016 Vinit Deshpande <vinitd@google.com> Reset idenitities for EAP-SIM networks when SIM is pulled am: fdce524fd0
am: 83a6330e24

* commit '83a6330e24d3b829580504920d292ac2c7f51700':
Reset idenitities for EAP-SIM networks when SIM is pulled
afa00a39e89927b59d4002ed2712c136bec27020 13-Jan-2016 Vinit Deshpande <vinitd@google.com> Appropriately fail EAP-SIM/AKA when SIM doesn\'t generate good response am: 5ebc35f19f
am: 919d54801a

* commit '919d54801a367e9ec9fcdfcfd1133d4a09d29bbe':
Appropriately fail EAP-SIM/AKA when SIM doesn't generate good response
0b457a8117bf23c996a76ecf89dcc46dfa3b9c50 13-Jan-2016 Vinit Deshpande <vinitd@google.com> Guard against HAL returning null scan results
am: 549225687b

* commit '549225687bc441fff055c58c777498f83b8cc29f':
Guard against HAL returning null scan results
5bf4e69ad25b09eeb6b0ba66f33b772b223f7b93 13-Jan-2016 Mitchell Wills <mwills@google.com> Disable registering for scan events in SupplicantWifiScannerImpl
am: 7d2d8c2764

* commit '7d2d8c27647676c51208e417afbb8dd6c6784b7c':
Disable registering for scan events in SupplicantWifiScannerImpl
7d2d8c27647676c51208e417afbb8dd6c6784b7c 13-Jan-2016 Mitchell Wills <mwills@google.com> Disable registering for scan events in SupplicantWifiScannerImpl

This interferes with WifiStateMachine getting scan events when the gscan
HAL is not supported

Bug: 26501100
Change-Id: I660f2457d4277a73be70467a463b9b9cf2944f83
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
549225687bc441fff055c58c777498f83b8cc29f 13-Jan-2016 Vinit Deshpande <vinitd@google.com> Guard against HAL returning null scan results

Bug: 26374148
Change-Id: I3355f969f237fd4ba50e980f83bcbcacc7e55c84
ndroid/server/wifi/WifiNative.java
83a6330e24d3b829580504920d292ac2c7f51700 13-Jan-2016 Vinit Deshpande <vinitd@google.com> Reset idenitities for EAP-SIM networks when SIM is pulled
am: fdce524fd0

* commit 'fdce524fd05844c996cf1c5c0c102a87fde8e32c':
Reset idenitities for EAP-SIM networks when SIM is pulled
919d54801a367e9ec9fcdfcfd1133d4a09d29bbe 13-Jan-2016 Vinit Deshpande <vinitd@google.com> Appropriately fail EAP-SIM/AKA when SIM doesn\'t generate good response
am: 5ebc35f19f

* commit '5ebc35f19feab2755a13cf7d5acaeff4bbc78994':
Appropriately fail EAP-SIM/AKA when SIM doesn't generate good response
8f0f666c8bdaf508f191f8590755140b92d970ea 01-Dec-2015 xinhe <xinhe@google.com> Initial codes for Quality network selection [DO NOT MERGE]

In this change list, the old WifiAutojoin module is
refactored initially. The old WifiAutojoinController is
replaced with a new WifiQualifiedNetworkSelector.
WifiConfiguration, WifiConfigureStore and
WifiStateMachine have been modified accordingly. The new
network selection logic is refactored with a more clear
and deterministci one. To refer to thedescribed in
details, in "Quality Network Selection and Connectivity
Scan Management in N". The link of the document is:
https://docs.google.com/document/d
/1JPTa2NEk-PgjCJ16fIrR6ohV-kDKveDlYDOeiMCB2_c

Also the initial unit test codes are added. Test case of
5GHz network over 2GHz network is added.

Bug:26012244

Change-Id: I8dc240115c0625c0fae13a5b3965f70556040448
ndroid/server/wifi/SupplicantStateTracker.java
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiQualifiedNetworkSelection.java
ndroid/server/wifi/WifiStateMachine.java
fdce524fd05844c996cf1c5c0c102a87fde8e32c 07-Jan-2016 Vinit Deshpande <vinitd@google.com> Reset idenitities for EAP-SIM networks when SIM is pulled

This change resets identity and anonymous_identity for all
networks that use SIM based auth. This ensures that all cached
data is destroyed when SIM is removed; and newly added SIM
must be authorized on the network to connect again.

Bug: 23703716

Change-Id: I83d80336b2089c73d99214651b64b79443faf7f7
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
55b76cb796b79397360603cf327710848f93c48d 08-Jan-2016 Randy Pan <zpan@google.com> Scanner scheduler support for special scan request

Extend the multi client scanner scheduler to support sepcial scan
requests, such as exponential back off scan and context hub scan.

Addressed the checkstyle.py complaints in this file.

Bug: 26236392
Change-Id: Ia8006f3eb84f676cbee909195089397cebd3304b
ndroid/server/wifi/MultiClientScheduler.java
18772539a3c8fd0855f5f725e8c6998c0f482eec 12-Jan-2016 Jan Nordqvist <jannq@google.com> Drop checks for locked WiFi key store when installing keys/certs.

The security provided by the PIN lock is not considered to provide
any added value over disk encryption for the protection of the WiFi
key store.
In addition the PIN lock is major hurdle for onboarding 802.1X users
who do need a trust cert installed.

BUG=25887356

Change-Id: I137aecd4b0c8593a48f30043d6f1f9b62b8120ff
ndroid/server/wifi/WifiConfigStore.java
da51c12f413d54517aea317e37ba82e45d1e4a30 16-Dec-2015 Rebecca Silberstein <silberst@google.com> Tests for InformationElementUtil

Add tests for parsing InformationElements. Covers multiple types of invalid
input.

In addition, added check to parseInformationElements to check for null
input. If the input byte array is null, returns an empty
InformationElement array.

Bug: 26228026
Change-Id: I49e0f6ca938e07c7d961853279645f8511dbd0c3
ndroid/server/wifi/util/InformationElementUtil.java
e5b3ea90b17af7347541534cdeec93fc0a554f1b 08-Jan-2016 Vinit Deshpande <vinitd@google.com> Merge "First WifiStateMachine UnitTests" into mm-wireless-dev
am: 57483a79c2

* commit '57483a79c2f9d5a9fe3e950553d95f3ad75842a3':
First WifiStateMachine UnitTests
eee1d479d8d402a2e78e2f143e957030cfc77749 29-Dec-2015 Vinit Deshpande <vinitd@google.com> First WifiStateMachine UnitTests

Change-Id: I044b54f18f1a75b5b33c3fc9fc71a8da820d2521
ndroid/server/wifi/BaseWifiLogger.java
ndroid/server/wifi/DummyWifiLogger.java
ndroid/server/wifi/FrameworkFacade.java
ndroid/server/wifi/SupplicantStateTracker.java
ndroid/server/wifi/WifiApConfigStore.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
7cbde334a29f9914889e98b56f30751976b532d6 28-Dec-2015 Vinit Deshpande <vinitd@google.com> Fix crash caused by a race condition [DO NOT MERGE]

(cherry-picked from master
sha1: ae5144e8dd634f68a5a112e9ad17e31dbd70158b)

Bug: 26271785
Change-Id: Ie3e13eb68596b6e1756cacae5d5f88acc97289bc
ndroid/server/wifi/WifiStateMachine.java
7126dc1758b16872ab66313803753d735b988a40 05-Jan-2016 Mitchell Wills <mwills@google.com> Some improvements for WifiScanner scheduler
am: 1a16020f8d

* commit '1a16020f8d611c94797884b212ee6a26817fad82':
Some improvements for WifiScanner scheduler
1a16020f8d611c94797884b212ee6a26817fad82 16-Dec-2015 Mitchell Wills <mwills@google.com> Some improvements for WifiScanner scheduler

Make sure that bands are used instead of channels lists if they can
represent all requested channels.
Only deliver the maximum number of bssids requested and no more.
Make sure chips maximum number of bssids per scan is respected.

Bug: 26217163

Change-Id: Iac9cd9f3983f2e1397aec7802155358516d154bf
ndroid/server/wifi/MultiClientScheduler.java
5a37587a6888439f43ef24d9225033357f42222b 05-Jan-2016 Mitchell Wills <mwills@google.com> Add support for oneshot scan API in supplicant WifiScannerImpl
am: 5fa6221c4e

* commit '5fa6221c4e507cbc596b6de77d793ec08d690157':
Add support for oneshot scan API in supplicant WifiScannerImpl
29e270080753e4fb63678389f692bdbe7fac0604 05-Jan-2016 Mitchell Wills <mwills@google.com> Make HAL oneshot wifi scans use wpa_supplicant
am: f2f6f79242

* commit 'f2f6f79242454ff9161f5af772292fa0180436f8':
Make HAL oneshot wifi scans use wpa_supplicant
5fa6221c4e507cbc596b6de77d793ec08d690157 12-Dec-2015 Mitchell Wills <mwills@google.com> Add support for oneshot scan API in supplicant WifiScannerImpl

Implement startSingleScan for in SupplicantWifiScannerImpl
Also some style cleanup in SupplicantWifiScannerImpl
Refactor HalWifiScanner tests to be a base for both supplicant and hal
implementations

Change-Id: Ic6d4db7acda39207861bad8b33ddb433c3917b8b
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
f2f6f79242454ff9161f5af772292fa0180436f8 04-Nov-2015 Mitchell Wills <mwills@google.com> Make HAL oneshot wifi scans use wpa_supplicant

Currently this code path isn't used, but will be enabled once the
supplicant scanner implementation also supports the seperate oneshot
scan api

Change-Id: I23ce63172b82b9b4b824093885f78064fc064144
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiScannerImpl.java
266a90bc1de766ce46ec8dc48a4b485359773c97 05-Jan-2016 Peter Qiu <zqiu@google.com> Send a failure reply when enabling a network with an invalid ID
am: 74b6bb8904

* commit '74b6bb890405612e69a8305be40743ccdc4884d3':
Send a failure reply when enabling a network with an invalid ID
74b6bb890405612e69a8305be40743ccdc4884d3 04-Jan-2016 Peter Qiu <zqiu@google.com> Send a failure reply when enabling a network with an invalid ID

This avoids the caller from hanging when issuing a CMD_ENABLE_NETWORK
command with an invalid network ID. Since CMD_ENABLE_NETWORK is
a synchronous command, reply is expected in all cases.

Bug: 26259840
Change-Id: Idbf4f2cfc13e6eff7c52a2048a12ad690845ec3b
ndroid/server/wifi/WifiStateMachine.java
71e47e7653da09f326c9932349123255b1e56046 30-Dec-2015 Vinit Deshpande <vinitd@google.com> Merge "Fix crash caused by a race condition"
8f7a6f619af3c5edd2add7eb399c724ae067077f 29-Dec-2015 Randy Pan <zpan@google.com> Wifi binary exponential back off scan support
am: 062e3f39e3

* commit '062e3f39e37874fedc01f267de5f4cf7dbebe2b4':
Wifi binary exponential back off scan support
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ae5144e8dd634f68a5a112e9ad17e31dbd70158b 28-Dec-2015 Vinit Deshpande <vinitd@google.com> Fix crash caused by a race condition

Bug: 26271785
Change-Id: Ie3e13eb68596b6e1756cacae5d5f88acc97289bc
ndroid/server/wifi/WifiStateMachine.java
0e3ee3c7c14d604774bfd120c3cc6b43a86ad086 19-Dec-2015 Jan Nordqvist <jannq@google.com> Merge "DO NOT MERGE Fixed ConcurrentModificationException in WifiConfigStore." into mm-wireless-dev
e69488000bff995a0a30a7c45322d5ec0522ab6e 19-Dec-2015 Jan Nordqvist <jannq@google.com> DO NOT MERGE Fixed ConcurrentModificationException in WifiConfigStore.

BUG=26241528
BUG=26271352

Change-Id: I96cc0bb247e5be267c5b424942541e9d4e92b300
ndroid/server/wifi/hotspot2/osu/OSUManager.java
ca4d852d155e40c55b9f757c1732191917d2ed91 19-Dec-2015 Jan Nordqvist <jannq@google.com> Fixed ConcurrentModificationException in WifiConfigStore.

BUG=26241528
BUG=26271352

Change-Id: I96cc0bb247e5be267c5b424942541e9d4e92b300
ndroid/server/wifi/hotspot2/osu/OSUManager.java
5ea42964ba17901a8d724736b450ace6ed48880f 18-Dec-2015 Prerepa Viswanadham <dham@google.com> Declaration of native JNI call in WiFiNative.java

Change-Id: I99bae1b598ba3598413e7089bb6a9e68d9e06346
ndroid/server/wifi/WifiNative.java
4d3f7bb45f7d87b6a14e49295d894ba1f81c2371 17-Dec-2015 Erik Kline <ek@google.com> Merge "Address failure to properly include TAG in logging."
b1f57994b3d976cd6ac69297872f5c2ce38f0a2e 17-Dec-2015 Erik Kline <ek@google.com> Address failure to properly include TAG in logging.

Change-Id: I5c4c6f5c840bd243052b2b2dc2b2dbce762496cc
ndroid/server/wifi/WifiStateMachine.java
6dd42662e45750910d8743f7f154269c2755df93 19-Nov-2015 Jan Nordqvist <jannq@google.com> DO NOT MERGE Changed to use special "in-memory" icon command to wpa_supplicant.

Hotspot2.0: Icon query changed to use new command.
Cherry-picked from e511ec7a4f53f7204a85075b23318f9f11c46d94
Bug: 24681079
Change-Id: Iac65eddff82763d42193edfb683266e7b0b8d720
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/anqp/I18Name.java
ndroid/server/wifi/hotspot2/IconEvent.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
ndroid/server/wifi/hotspot2/WifiNetworkAdapter.java
ndroid/server/wifi/hotspot2/osu/IconCache.java
ndroid/server/wifi/hotspot2/osu/OSUManager.java
ndroid/server/wifi/hotspot2/osu/OSUSocketFactory.java
c813356fd99aab102da69524e8144fe273a2ab54 15-Dec-2015 Adam Lesinski <adamlesinski@google.com> Fix issue with WiFi scan reporting
am: a9fa44d1d9

* commit 'a9fa44d1d9c27b0456849421dbcab921c37c2a74':
Fix issue with WiFi scan reporting
a9fa44d1d9c27b0456849421dbcab921c37c2a74 12-Nov-2015 Adam Lesinski <adamlesinski@google.com> Fix issue with WiFi scan reporting

Need to assign the overridden WorkSource to the member
mScanWorkSource in order to properly finish the scan.

Bug:23868900
Change-Id: Iac13583bd1ecf65513a7e655b46f6e19e588a99d
(cherry picked from commit 60e5908f0df75b9fda15c325f279381783b5d07d)
ndroid/server/wifi/WifiStateMachine.java
e511ec7a4f53f7204a85075b23318f9f11c46d94 19-Nov-2015 Mitchell Wills <mwills@google.com> Changed to use special "in-memory" icon command to wpa_supplicant.

Hotspot2.0: Icon query changed to use new command.

Bug: 24681079
Change-Id: Iac65eddff82763d42193edfb683266e7b0b8d720
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/anqp/I18Name.java
ndroid/server/wifi/hotspot2/IconEvent.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
ndroid/server/wifi/hotspot2/WifiNetworkAdapter.java
ndroid/server/wifi/hotspot2/osu/IconCache.java
ndroid/server/wifi/hotspot2/osu/OSUManager.java
ndroid/server/wifi/hotspot2/osu/OSUSocketFactory.java
85f946b14fb6d51ae109d0983261e6721a19d1fa 10-Dec-2015 Randy Pan <zpan@google.com> DO NOT MERGE Revert "fix wifi forget acl"

This reverts commit e65f56fdddd0d7f0b03d6bfe9c979125ded9b7b6.

This is required to get build pass on partner's branch.

Change-Id: Icbb7cefb0d700e5f1236dd0711e94212ad2c7a5f
ndroid/server/wifi/WifiServiceImpl.java
41e38d84f562e12198f7db0d45f633712cae6cba 19-Nov-2015 Mitchell Wills <mwills@google.com> Tests for SupplicantWifiScannerImpl

Other small fixes/aids for testing
* deliver full scan results in the order they are returned from
supplicant
* Now use AlarmListener AlarmManager API instead of intents
* Use WifiChannelHelper instead of direct native calls

Change-Id: I3133a21162f598e5e5973ec67ebc9521a3a387ab
ndroid/server/wifi/SupplicantWifiScannerImpl.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
ndroid/server/wifi/MultiClientScheduler.java
ndroid/server/wifi/WifiChannelHelper.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningScheduler.java
ndroid/server/wifi/WifiScanningService.java
ndroid/server/wifi/WifiScanningServiceImpl.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
ndroid/server/wifi/HalWifiScannerImpl.java
ndroid/server/wifi/SupplicantWifiScannerImpl.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScannerImpl.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
36514deaa0890e080185d6d03dd9403b7632ab21 03-Dec-2015 Jan Nordqvist <jannq@google.com> Merge "Network scoring of all WiFi networks, final version."
4b7bc26fb99803f0cedcca16310d345e337f950c 03-Dec-2015 Jan Nordqvist <jannq@google.com> Network scoring of all WiFi networks, final version.

Bug: 25562019
Change-Id: I250cbb823aec6f366bcf2d84e19f7e4a9e75954b
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
4e210ea1c7eb7d3a70792571651181e429b39582 29-Sep-2015 Mitchell Wills <mwills@google.com> Make WifiMonitor a singleton and add explicit event registration

Change-Id: If99cf107abe381d2527a84f7e71c0c8363bff4db
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
18786eca942042388748b0d98979f21c9dff4a89 20-Nov-2015 Mitchell Wills <mwills@google.com> Turn WifiNative into a singleton for each interface

Change-Id: Ida8225c1c8434f5cffbdfd2ebbc4a7b240976a15
ndroid/server/wifi/RttService.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningService.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.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
8613b7330a8691ea5cbd2ce0d151ef8c6e8a18e8 02-Dec-2015 xinhe <xinhe@google.com> WiFi not connecting to WiFi when screen OFF
am: e26ad459b6

* commit 'e26ad459b63271548abbdeba4f8d77fcca9f88bd':
WiFi not connecting to WiFi when screen OFF
cb8d0007e99af74c69494b3ce720b548566a1bee 02-Dec-2015 Peter Qiu <zqiu@google.com> Merge "Remove unused imports"
d21ed8f3eb29718c3eaacbecdb024841efb17c23 01-Dec-2015 Peter Qiu <zqiu@google.com> Remove unused imports

Bug: None
Change-Id: I4ff51b2be3fa367922dea755e3259cd7b67f10ec
ndroid/server/wifi/WifiService.java
cb447f89d6338b5599a564b080b6837e4799506e 30-Nov-2015 Jan Nordqvist <jannq@google.com> Merge "Applied changes from comments."
9a069cba2e5ae31ee00d9ec9a3c25bdb7052aa78 25-Nov-2015 Jan Nordqvist <jannq@google.com> Applied changes from comments.

Bug: 25869687
Change-Id: I79a4ae543e7c3797620bf4492f4794523fac8c4d
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/configparse/ConfigBuilder.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
60e5908f0df75b9fda15c325f279381783b5d07d 12-Nov-2015 Adam Lesinski <adamlesinski@google.com> Fix issue with WiFi scan reporting

Need to assign the overridden WorkSource to the member
mScanWorkSource in order to properly finish the scan.

Bug:23868900
Change-Id: Iac13583bd1ecf65513a7e655b46f6e19e588a99d
ndroid/server/wifi/WifiStateMachine.java
19531944ccfdfa2293aacfefcf8e8799c2dd6a15 10-Nov-2015 Mitchell Wills <mwills@google.com> Merge "Revert "Remove WifiScanner significant change implementation""
578f7a33d0085559485bccfe7d1e26f813dc081d 10-Nov-2015 Mitchell Wills <mwills@google.com> Revert "Remove WifiScanner significant change implementation"

This reverts commit 7a6ef782e906f22c9426bd594017843d84c92229.

Change-Id: I6f8f667b0aa8cfb69187e0946de145a7f7025b17
ndroid/server/wifi/WifiScanningServiceImpl.java
9f743918a412fec9ad5a0386fbf6cf0361313f58 05-Nov-2015 xinhe <xinhe@google.com> Center frequency is incorrectly parsed for 40MHz

b/25499446

Change-Id: Ice9884f860e4b68ec62d87ed24adeab8864beb3f
ndroid/server/wifi/util/InformationElementUtil.java
7a6ef782e906f22c9426bd594017843d84c92229 04-Nov-2015 Mitchell Wills <mwills@google.com> Remove WifiScanner significant change implementation

The API is not used or tested and will not be touched in N.

Change-Id: I2bfbd8b33d51f934704cd70bf3618adb8ac39a9e
ndroid/server/wifi/WifiScanningServiceImpl.java
8383c1b0fbdf3eb64653849ba65e0b0f9739f190 31-Oct-2015 Mitchell Wills <mwills@google.com> Merge "Remove old API implementations"
aea5ce790c16ba89be7b306cff812fee01d99acb 30-Oct-2015 Mitchell Wills <mwills@google.com> Merge "Moved Wifi InformationElement parsing to a common utility class"
691908111a2cea40d8afa325a2ebc1bc5b197ea1 30-Oct-2015 Mitchell Wills <mwills@google.com> Merge "Moved scan result parsing from WifiStateMachine to WifiNative"
ad3e8e31131c9347dd7a089f70a85ffcd4066c21 29-Oct-2015 Mitchell Wills <mwills@google.com> Don\'t set RSSI to -1 when no value is returned am: 78ca9b3d6f am: 06f83655f7 am: d5f9ae241e
am: 2aedabd814

* commit '2aedabd814e096bbd7e5fe62d3e76c217c67fb1b':
Don't set RSSI to -1 when no value is returned
2aedabd814e096bbd7e5fe62d3e76c217c67fb1b 29-Oct-2015 Mitchell Wills <mwills@google.com> Don\'t set RSSI to -1 when no value is returned am: 78ca9b3d6f am: 06f83655f7
am: d5f9ae241e

* commit 'd5f9ae241e9fc9842e9bea60ff7f128e7292f055':
Don't set RSSI to -1 when no value is returned
06f83655f769d9649cfd51fda485cd553dfca7cf 29-Oct-2015 Mitchell Wills <mwills@google.com> Don\'t set RSSI to -1 when no value is returned
am: 78ca9b3d6f

* commit '78ca9b3d6fb28abc6d52a31791f4b4084af76e65':
Don't set RSSI to -1 when no value is returned
78ca9b3d6fb28abc6d52a31791f4b4084af76e65 26-Oct-2015 Mitchell Wills <mwills@google.com> Don't set RSSI to -1 when no value is returned

Bug: 19928834
Change-Id: I25eebee0dcd01f7e8ea2791ccdcc75cd1066f3c0
ndroid/server/wifi/WifiStateMachine.java
814230f58f5cb96db2a75c95a44c3d5890586486 24-Oct-2015 Mitchell Wills <mwills@google.com> Merge "Check if link stats are supported when reporting activity info"
cb7bc8f6401bfae7cf40aff9e45dcd22fb2daf0d 24-Oct-2015 xin He <xinhe@google.com> Merge "[DO NOT MERGE] Fix build breakage introduced by CL 797896" into mnc-dr-dev am: b5cef8e440 am: 9f4c81f701
am: b8487ba5ce

* commit 'b8487ba5ce4de3624af3141d18f1d3c5d3822e8c':
[DO NOT MERGE] Fix build breakage introduced by CL 797896
9f4c81f7018c3c8a5af1e0784b3c7d0a583ec95b 23-Oct-2015 xin He <xinhe@google.com> Merge "[DO NOT MERGE] Fix build breakage introduced by CL 797896" into mnc-dr-dev
am: b5cef8e440

* commit 'b5cef8e440ee5b054d8b38103aa2d6989c7361ef':
[DO NOT MERGE] Fix build breakage introduced by CL 797896
b5cef8e440ee5b054d8b38103aa2d6989c7361ef 23-Oct-2015 xin He <xinhe@google.com> Merge "[DO NOT MERGE] Fix build breakage introduced by CL 797896" into mnc-dr-dev
dd772a1d2fff70ffcb479422bfcf05ba51f2a2ce 23-Oct-2015 xinhe <xinhe@google.com> [DO NOT MERGE] Fix build breakage introduced by CL 797896

Change-Id: I8ba0ca94c814e833816cab17ae328a95823512fd
ndroid/server/wifi/WifiStateMachine.java
89dd25f571aa22ac7a573cd7b6671e1fd4dbb547 23-Oct-2015 xin He <xinhe@google.com> Merge "[DO NOT MERGE] EAP-TLS PMKID mismatch error" into mnc-dr-dev am: e8e62c91f8 am: 0b14bbb35f
am: 292b3ecc53

* commit '292b3ecc53acad6b288920eef58dd7db98d4ec2c':
[DO NOT MERGE] EAP-TLS PMKID mismatch error
0b14bbb35f1561e7ab529e32fe529a041610cc68 23-Oct-2015 xin He <xinhe@google.com> Merge "[DO NOT MERGE] EAP-TLS PMKID mismatch error" into mnc-dr-dev
am: e8e62c91f8

* commit 'e8e62c91f883eff9d0d0729b4bf5ffd6007a9ae4':
[DO NOT MERGE] EAP-TLS PMKID mismatch error
e8e62c91f883eff9d0d0729b4bf5ffd6007a9ae4 23-Oct-2015 xin He <xinhe@google.com> Merge "[DO NOT MERGE] EAP-TLS PMKID mismatch error" into mnc-dr-dev
eb5caea63b1eae6c0739dafa129a4e2e56553118 21-Oct-2015 xinhe <xinhe@google.com> [DO NOT MERGE] EAP-TLS PMKID mismatch error

b/24253154

Change-Id: I992a99d46f94e72564d8d1a2c357f6ff1c53a11d
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
5d31cedf4024e0f038b4dfc2081016c8631ee8fe 28-Jul-2015 Mitchell Wills <mwills@google.com> Moved Wifi InformationElement parsing to a common utility class

Change-Id: If3e58aa01ad2a75c0f4942428392c0e7f833143c
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/util/InformationElementUtil.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
2bb02861ac08054f2c06a71c2077e9be4625b9a4 21-Oct-2015 Pavel Zhamaitsiak <pavelz@google.com> Merge "Disable Portable Wi-Fi hotspot in ECM" into mnc-dr-dev am: 2fd94d6887 am: 02d8a99ce6 am: bba10cdfad
am: 1ca800cc05

* commit '1ca800cc054cb74f5c8324792d4eacbff511525d':
Disable Portable Wi-Fi hotspot in ECM
1ca800cc054cb74f5c8324792d4eacbff511525d 21-Oct-2015 Pavel Zhamaitsiak <pavelz@google.com> Merge "Disable Portable Wi-Fi hotspot in ECM" into mnc-dr-dev am: 2fd94d6887 am: 02d8a99ce6
am: bba10cdfad

* commit 'bba10cdfadc2a9ca5db5720e897ee7a4a14b1f16':
Disable Portable Wi-Fi hotspot in ECM
02d8a99ce6c64e6bd4e0e15cd72efe53bf2e7b22 21-Oct-2015 Pavel Zhamaitsiak <pavelz@google.com> Merge "Disable Portable Wi-Fi hotspot in ECM" into mnc-dr-dev
am: 2fd94d6887

* commit '2fd94d6887868f769adc237fd5b9190e3a3569d3':
Disable Portable Wi-Fi hotspot in ECM
1f8a91389bf7d03635c43df52ca73d353d5a5e94 20-Oct-2015 Pavel Zhamaitsiak <pavelz@google.com> Disable Portable Wi-Fi hotspot in ECM

Bug: 24147407
Change-Id: I254f6f70375774ea9de51be369f6b17437ba20ef
ndroid/server/wifi/WifiController.java
e3dbf7f9cca0d7706f2c4de020061d7912e45872 20-Oct-2015 Mitchell Wills <mwills@google.com> Merge "Reduce logging levels of some messages in WifiService"
f9946f5663f2d7a9a69cb8b7e82a4ef8b1825c48 19-Oct-2015 Mitchell Wills <mwills@google.com> Reduce logging levels of some messages in WifiService

Some log messages were marked as errors that weren't

Change-Id: I7309143bafea74b5a7ee4d17d3c105656b86100c
ndroid/server/wifi/WifiServiceImpl.java
016284c9e9fd219429c230e373d914f98db6a9a1 19-Oct-2015 Xiaohui Chen <xiaohuic@google.com> Merge "fix wifi forget acl"
a15a2ee69156fa6fff09c0dd9b8182cb8fafde1c 16-Oct-2015 xinhe <xinhe@google.com> Security Vulnerability in android::onPnoNetworkFound [DO NOT MERGE]

Ask for system permission to enable ePNO

b/24872703

Change-Id: I8a7aafdb3f4074089777ad6b1402d4bf4954e81a
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
6c72b28e3b26aad3d2036a25aec0b5a2aba712b1 14-Oct-2015 Fyodor Kupolov <fkupolov@google.com> Fix foreground scans for pre-M apps when location is disabled

Wi-Fi scans should be enabled for legacy foreground apps when location is
disabled.

Bug: 23081999
Change-Id: I09ff32ab9845e989ed292824b7aee84d10d260cf
ndroid/server/wifi/WifiServiceImpl.java
31d81f38ad711c458aa474cfe42fb289c82112ac 17-Oct-2015 Fyodor Kupolov <fkupolov@google.com> am 9af17998: am be964f00: am 35f3b9ce: Merge "Fix foreground scans for pre-M apps when location is disabled" into mnc-dr-dev

* commit '9af179986539ea927978f61262a33223f39a5f19':
Fix foreground scans for pre-M apps when location is disabled
be964f00e71597f880c051772e8acd1a44b08e17 17-Oct-2015 Fyodor Kupolov <fkupolov@google.com> am 35f3b9ce: Merge "Fix foreground scans for pre-M apps when location is disabled" into mnc-dr-dev

* commit '35f3b9ce41b43de59487b3231aedc64d735593a8':
Fix foreground scans for pre-M apps when location is disabled
35f3b9ce41b43de59487b3231aedc64d735593a8 17-Oct-2015 Fyodor Kupolov <fkupolov@google.com> Merge "Fix foreground scans for pre-M apps when location is disabled" into mnc-dr-dev
7955da2fd9044beb2663227be4faebf024792123 16-Oct-2015 xin He <xinhe@google.com> am 72790f92: am a8249332: am c9bea298: am f2e7f4fa: Merge "Security Vulnerability in android::onPnoNetworkFound" into mnc-dr-dev

* commit '72790f92ae580758df92444b6f96d7a27bb9571d':
Security Vulnerability in android::onPnoNetworkFound
72790f92ae580758df92444b6f96d7a27bb9571d 16-Oct-2015 xin He <xinhe@google.com> am a8249332: am c9bea298: am f2e7f4fa: Merge "Security Vulnerability in android::onPnoNetworkFound" into mnc-dr-dev

* commit 'a8249332821bd9be23df911aa9e0fbe5eac4f22a':
Security Vulnerability in android::onPnoNetworkFound
c9bea298d4b6d4c9920914d3dc8df23e3c595700 16-Oct-2015 xin He <xinhe@google.com> am f2e7f4fa: Merge "Security Vulnerability in android::onPnoNetworkFound" into mnc-dr-dev

* commit 'f2e7f4fa1ac1481cdbc7bf3296321ac0fa159cc6':
Security Vulnerability in android::onPnoNetworkFound
f2e7f4fa1ac1481cdbc7bf3296321ac0fa159cc6 16-Oct-2015 xin He <xinhe@google.com> Merge "Security Vulnerability in android::onPnoNetworkFound" into mnc-dr-dev
20de5ba628240951562958595d5b6ec8edc2b13e 16-Oct-2015 xinhe <xinhe@google.com> Security Vulnerability in android::onPnoNetworkFound

Ask for system permission to enable ePNO

b/24872703

Change-Id: I8a7aafdb3f4074089777ad6b1402d4bf4954e81a
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
b3fe01d22d2e927d4336eb70518673800881d8f2 16-Oct-2015 Mitchell Wills <mwills@google.com> am 799ee792: am 9d864238: am a8ed84c5: DO NOT MERGE Make sure wifi driver is actually turned off when requested

* commit '799ee792f8d985fe1d24638e9d7d6463dd8d39f9':
DO NOT MERGE Make sure wifi driver is actually turned off when requested
9d86423893492156db7fbc1b4f94ef0517ca9220 16-Oct-2015 Mitchell Wills <mwills@google.com> am a8ed84c5: DO NOT MERGE Make sure wifi driver is actually turned off when requested

* commit 'a8ed84c590e48ce3e5b31b2f3d0ddd53a22b6a65':
DO NOT MERGE Make sure wifi driver is actually turned off when requested
a8ed84c590e48ce3e5b31b2f3d0ddd53a22b6a65 05-Aug-2015 Mitchell Wills <mwills@google.com> DO NOT MERGE Make sure wifi driver is actually turned off when requested

Bug: 22808676
Change-Id: Iddcda4ae77235c789a3e6a96b946bb720f73b122
ndroid/server/wifi/WifiStateMachine.java
9bf7c88906843aad03d7c96ebda9a5c6b5a9e683 15-Oct-2015 xin He <xinhe@google.com> Merge "Disable networks with no internet connectivity and user confirmed"
edfae468ff546b7d52f8a7693520f27eecd087e4 28-Aug-2015 xinhe <xinhe@google.com> Disable networks with no internet connectivity and user confirmed

This shall ensure that such networks are not configured by PNO
and thus shall avoid unnecessary host wake ups.

b/23398768

Change-Id: I1a3c0789b1bd25c210b0d22dfd8fc3a43be4c9ef
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
4baf08217d550ad01b54bfc2b317b91ce83e0f38 15-Oct-2015 Mitchell Wills <mwills@google.com> am d8ca95d6: am 93fb74bd: am 680ac28c: am 4a7d3850: Merge "Prevent corruption of Wifi scan battery stats" into mnc-dr-dev

* commit 'd8ca95d629ed82926832900c1c910e97ad454f1b':
Prevent corruption of Wifi scan battery stats
d8ca95d629ed82926832900c1c910e97ad454f1b 15-Oct-2015 Mitchell Wills <mwills@google.com> am 93fb74bd: am 680ac28c: am 4a7d3850: Merge "Prevent corruption of Wifi scan battery stats" into mnc-dr-dev

* commit '93fb74bd37bc4d2198e751958cd425073e5c2911':
Prevent corruption of Wifi scan battery stats
680ac28ce035a3765d64dd0e747af942e4438e3c 15-Oct-2015 Mitchell Wills <mwills@google.com> am 4a7d3850: Merge "Prevent corruption of Wifi scan battery stats" into mnc-dr-dev

* commit '4a7d385069e9e1a490d6d2a8427536e1506a5801':
Prevent corruption of Wifi scan battery stats
4a7d385069e9e1a490d6d2a8427536e1506a5801 15-Oct-2015 Mitchell Wills <mwills@google.com> Merge "Prevent corruption of Wifi scan battery stats" into mnc-dr-dev
3b8a078d5ed10a614401375e37a97c239244abd7 15-Oct-2015 Fyodor Kupolov <fkupolov@google.com> am a3de81f4: am d8c80cc7: am e2ba917b: Merge "Do not throw an exception if appop\'s result is MODE_IGNORED" into mnc-dr-dev

* commit 'a3de81f4084bca4f66f58c03dc027aa784dcc1a0':
Do not throw an exception if appop's result is MODE_IGNORED
65ada07fcc88600d1a8c77269f62590f630f7aab 14-Oct-2015 Fyodor Kupolov <fkupolov@google.com> Fix foreground scans for pre-M apps when location is disabled

Wi-Fi scans should be enabled for legacy foreground apps when location is
disabled.

Bug: 23081999
Change-Id: I09ff32ab9845e989ed292824b7aee84d10d260cf
ndroid/server/wifi/WifiServiceImpl.java
d8c80cc7ff540c103e48cf298d196a6b66548134 15-Oct-2015 Fyodor Kupolov <fkupolov@google.com> am e2ba917b: Merge "Do not throw an exception if appop\'s result is MODE_IGNORED" into mnc-dr-dev

* commit 'e2ba917b13c0271e018457917a6388a2f84e20ab':
Do not throw an exception if appop's result is MODE_IGNORED
e2ba917b13c0271e018457917a6388a2f84e20ab 15-Oct-2015 Fyodor Kupolov <fkupolov@google.com> Merge "Do not throw an exception if appop's result is MODE_IGNORED" into mnc-dr-dev
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.
7d5049066cb72d12c76260f8b5dd108bb8248022 15-Oct-2015 Pankaj Kanwar <pkanwar@google.com> am 98f03db9: am 7af1ef61: am 7b97c836: Merge "Set hs20 property to 1 when connecting to passpoint network" into mnc-dr-dev

* commit '98f03db90fd6877598b6b8669fb324c70b9cfb91':
Set hs20 property to 1 when connecting to passpoint network
7af1ef61493d25c333561071dc8bbc3da8f0a86b 15-Oct-2015 Pankaj Kanwar <pkanwar@google.com> am 7b97c836: Merge "Set hs20 property to 1 when connecting to passpoint network" into mnc-dr-dev

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

* commit 'd1a59e6237c00c2fd27f2de1b07954b49086304b':
Fix center frequency parsing bug.
a29ea4f648cc12ad81bc258ad11ae3d63cd4921f 15-Oct-2015 Pankaj Kanwar <pkanwar@google.com> am 12a1007d: Merge "Fix center frequency parsing bug." into mnc-dr-dev

* commit '12a1007dc04897e000f91ae43f9ca90cd7441f9d':
Fix center frequency parsing bug.
12a1007dc04897e000f91ae43f9ca90cd7441f9d 15-Oct-2015 Pankaj Kanwar <pkanwar@google.com> Merge "Fix center frequency parsing bug." into mnc-dr-dev
12167e21e1371720b49055ce69a178727d0ae37c 08-Sep-2015 Fyodor Kupolov <fkupolov@google.com> Do not throw an exception if appop's result is MODE_IGNORED

Previously, an exception was thrown when a result of checking for an app op
was MODE_IGNORED. We should return zero results instead.

Bug: 23675817
Bug: 23563867
Change-Id: Iba6b6eca8a0d21acd77b8d388b8bfe3119cac8f9
ndroid/server/wifi/WifiServiceImpl.java
03dab7e3fbd1ebbd4a3e7637f8feae5806ab149d 15-Oct-2015 Mitchell Wills <mwills@google.com> Prevent corruption of Wifi scan battery stats

Ensure that the previous wifi scan is noted as completed before noting
that the next one started. This may happen if a scan starts before the
previous one completes.

Bug: 24250984
Change-Id: I2aaa6131cb5dd4b9deae3bea6e19570f6e24632d
ndroid/server/wifi/WifiStateMachine.java
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
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
e65f56fdddd0d7f0b03d6bfe9c979125ded9b7b6 13-Oct-2015 Xiaohui Chen <xiaohuic@google.com> fix wifi forget acl

In the new multi user enviroment, we should be checking the admin
flag instead of relying on the user id.

Bug: 24909021
Change-Id: Iea6d100fbb2f2503f4a9bcc523db14a8feb67c56
ndroid/server/wifi/WifiServiceImpl.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
46d6996d9b066e3c165a9c1b0b23dc23cf4bf2c8 13-Oct-2015 Mitchell Wills <mwills@google.com> am 79d76ec0: am 6b6673a2: am ca452804: am d3ae426c: When entering disconnected state imediatly start a scan

* commit '79d76ec0a71d727ac21fa5f19feedd597878f619':
When entering disconnected state imediatly start a scan
79d76ec0a71d727ac21fa5f19feedd597878f619 13-Oct-2015 Mitchell Wills <mwills@google.com> am 6b6673a2: am ca452804: am d3ae426c: When entering disconnected state imediatly start a scan

* commit '6b6673a22801bcbb13c5e0beac7e3bfd3a390de6':
When entering disconnected state imediatly start a scan
ca45280461867c973acb736f6e8efe1518c03dc9 13-Oct-2015 Mitchell Wills <mwills@google.com> am d3ae426c: When entering disconnected state imediatly start a scan

* commit 'd3ae426c1b298f038b34171d13d710524779074e':
When entering disconnected state imediatly start a scan
ac1f408138f092fe2a41cb5898163e05979c1cdd 13-Oct-2015 Wei Wang <weiwa@google.com> Fix center frequency parsing bug.

Bug:24881521

Change-Id: I2d4200c7f4ad03af2564fd3321205409cc2c8b84
ndroid/server/wifi/WifiNative.java
d3ae426c1b298f038b34171d13d710524779074e 18-Sep-2015 Mitchell Wills <mwills@google.com> When entering disconnected state imediatly start a scan

This reduces the chance of a scan request being scheduled before this
one runs, which causes it to be marked as obsolete.

Bug: 24000670
Change-Id: I78655a8a20e6354aa69cc796dc053803466f2ddf
ndroid/server/wifi/WifiStateMachine.java
6f42772cabf49822bf9595d7060d873a4e5caaa6 12-Oct-2015 Pankaj Kanwar <pkanwar@google.com> am 470f5c17: am b14cbd44: am f76c13a4: am a7d7d91e: Merge "Handle supplicant state changes in non-ConnectModeState" into mnc-dr-dev

* commit '470f5c17a744c202080b475a14bbd9b16fcc3b29':
Handle supplicant state changes in non-ConnectModeState
6846e3eeb3769c4173d04f74930b29b6aa85495a 12-Oct-2015 Mitchell Wills <mwills@google.com> am 4666dd2b: am 0dc1746e: am 082dd48c: am 6d88025b: Merge "Don\'t hold on to last scan results if scan is empty" into mnc-dr-dev

* commit '4666dd2b4ee1f8d6faabfe79a64b1a84be5b0700':
Don't hold on to last scan results if scan is empty
470f5c17a744c202080b475a14bbd9b16fcc3b29 12-Oct-2015 Pankaj Kanwar <pkanwar@google.com> am b14cbd44: am f76c13a4: am a7d7d91e: Merge "Handle supplicant state changes in non-ConnectModeState" into mnc-dr-dev

* commit 'b14cbd44f066a43dd6c5de0efe8533ce0cdaaf95':
Handle supplicant state changes in non-ConnectModeState
f76c13a415da5e64aca41083b2c1642844311b3b 12-Oct-2015 Pankaj Kanwar <pkanwar@google.com> am a7d7d91e: Merge "Handle supplicant state changes in non-ConnectModeState" into mnc-dr-dev

* commit 'a7d7d91ebbeb326d9d41e05768aa5f5667e68106':
Handle supplicant state changes in non-ConnectModeState
a7d7d91ebbeb326d9d41e05768aa5f5667e68106 12-Oct-2015 Pankaj Kanwar <pkanwar@google.com> Merge "Handle supplicant state changes in non-ConnectModeState" into mnc-dr-dev
4666dd2b4ee1f8d6faabfe79a64b1a84be5b0700 11-Oct-2015 Mitchell Wills <mwills@google.com> am 0dc1746e: am 082dd48c: am 6d88025b: Merge "Don\'t hold on to last scan results if scan is empty" into mnc-dr-dev

* commit '0dc1746ef6668427ca96920efcaabdad589f2a97':
Don't hold on to last scan results if scan is empty
082dd48cb77c4ba0fccaa13906b32f3219184b37 11-Oct-2015 Mitchell Wills <mwills@google.com> am 6d88025b: Merge "Don\'t hold on to last scan results if scan is empty" into mnc-dr-dev

* commit '6d88025b66d5407bf132f23a7a6cc3fd97f0632b':
Don't hold on to last scan results if scan is empty
5e3dba910eb8c050b1e55e328d394e36c24d63a6 08-Oct-2015 Prerepa Viswanadham <dham@google.com> Handle supplicant state changes in non-ConnectModeState

Due to race conditions, where in supplicant state in WiFi State machine
can get get stuck in ASSOCIATING state, whereas the underlying
supplicant has disconnected. This event is dropped in WiFi StateMachine
if it transitions out to non-ConnectModeState causing state mismatch and
future inability for auto join to kick in and connect.

Bug: 24580325
Change-Id: I9e833f3e3ca01f04f76ad348c92f2b29fef8f817
ndroid/server/wifi/WifiStateMachine.java
428079ef0616c7dce48a22ca4a7dbc50506cf3ea 18-Aug-2015 xinhe <xinhe@google.com> Handle duplicate network configuration created by WPS

WPS configurations are created by Supplicant, and may collide with
configuration created by Framework. This change updates framework's
notion configuration with the newly created WPS network.

b/22250876

Change-Id: Ic2505c634d907eb0d7c531b83395ecef7bed2b33
ndroid/server/wifi/WifiConfigStore.java
c1155a0d09eac695af5d1c695e592bb25f8ab7d7 06-Oct-2015 Erik Wolsheimer <ewol@google.com> am 34b0cd94: am 5e5f50da: am 87a52147: Avoid calling Class#getSimpleName from WifiStateMachine when not necessary. BUG: 24507822

* commit '34b0cd9454857da7d8a6af827432c16a2cf33f06':
Avoid calling Class#getSimpleName from WifiStateMachine when not necessary. BUG: 24507822
34b0cd9454857da7d8a6af827432c16a2cf33f06 06-Oct-2015 Erik Wolsheimer <ewol@google.com> am 5e5f50da: am 87a52147: Avoid calling Class#getSimpleName from WifiStateMachine when not necessary. BUG: 24507822

* commit '5e5f50da9ee67dc6d081c5aded4f7132cb84882e':
Avoid calling Class#getSimpleName from WifiStateMachine when not necessary. BUG: 24507822
7421421975d8e440bb4bab47eaa2dc8d05270bd7 05-Oct-2015 Mitchell Wills <mwills@google.com> Don't hold on to last scan results if scan is empty

Also remove commented out removal of scan results by age

Bug: 24528851
Change-Id: Iba96310f708b81dfbf313e317c27bee31699b329
ndroid/server/wifi/WifiStateMachine.java
87a52147753aebb1ab4721663899c30223a44d5d 01-Oct-2015 Erik Wolsheimer <ewol@google.com> Avoid calling Class#getSimpleName from WifiStateMachine when not necessary.
BUG: 24507822

Change-Id: I7debe415186d6cfb9404ac9ccf309fa1cbd78579
ndroid/server/wifi/WifiStateMachine.java
abbe16be5712d85e35937f58377bd4f3053ee6d2 02-Oct-2015 Vinit Deshpande <vinitd@google.com> am e7de3ecd: am b0f387d0: am 7ef581ab: am 70478da8: Persist and use country code reliably

* commit 'e7de3ecd77d05b7b1ef80d391b0af2d0350f74fd':
Persist and use country code reliably
e7de3ecd77d05b7b1ef80d391b0af2d0350f74fd 02-Oct-2015 Vinit Deshpande <vinitd@google.com> am b0f387d0: am 7ef581ab: am 70478da8: Persist and use country code reliably

* commit 'b0f387d0574c8745719af5a7248af399ccef1507':
Persist and use country code reliably
70478da87767198d8a9b9314f890fba1d5997e4d 01-Oct-2015 Vinit Deshpande <vinitd@google.com> Persist and use country code reliably

It looks like we never persisted country code if it wasn't
set on the driver; this is not correct.

Also fixed initial sequence - the cached country code is now
trashed on reboot if config_wifi_revert_country_code_on_cellular_loss
is set. New country codes will be set if telephony stacks
retrieve them; or else, ro.boot.wificountrycode will stick.

Note that there are possible race conditions between telephony
finding country codes and starting Wifi functionality (like SoftAP)
so it is possible that Wifi uses more conservative country code
from ro.boot.wificountrycode even if telephony finds a better
country code later. The situation will recover eventually.

Bug: 24553903

Change-Id: I37bb2f64947ab04a82a0392eb85f521a08147e29
ndroid/server/wifi/WifiStateMachine.java
97fffca306a4aa1eac1bdb78d2484ff343cb23d8 02-Oct-2015 Mitchell Wills <mwills@google.com> Merge "Fixed copy-paste typo in WifiNative"
851075f4f345d98de885bd2f6b833944b282097e 17-Jul-2015 Mitchell Wills <mwills@google.com> Fixed copy-paste typo in WifiNative

Change-Id: I97dd29ed17974b24edda024ba4312d9be793a3c5
ndroid/server/wifi/WifiNative.java
259b345a237c2b79d465ebd28807d64523f0b0c3 02-Oct-2015 xinhe <xinhe@google.com> am 54cd5e91: am 937c699b: am ac71270e: resolved conflicts for 57b578f2 to cw-e-dev

* commit '54cd5e91a0c8a4ab982d6a96cf1ac5a183ddeebc':
Phone rebooted when trying to select problematic WiFi network
54cd5e91a0c8a4ab982d6a96cf1ac5a183ddeebc 02-Oct-2015 xinhe <xinhe@google.com> am 937c699b: am ac71270e: resolved conflicts for 57b578f2 to cw-e-dev

* commit '937c699bbef40bc1d4bc14de35d5008e2c0eaf24':
Phone rebooted when trying to select problematic WiFi network
57b578f21d16d3b0da0162cb6eb9fa8b29895d8f 30-Sep-2015 xinhe <xinhe@google.com> Phone rebooted when trying to select problematic WiFi network

b/24515222

Change-Id: Id18dcbdae97ad6a5fb22dfd8e9cf7c117a3bffa9
ndroid/server/wifi/WifiConfigStore.java
a397a4242d3be2dbd02e3d10b2d9791df2a5e576 28-Sep-2015 Vinit Deshpande <vinitd@google.com> am 709c2b50: am 2da736b7: am b45816dc: am 98e43e5f: Don\'t reset country code on mobile signal loss

* commit '709c2b5024d2ab819a27ccbfdddc4830f911459b':
Don't reset country code on mobile signal loss
709c2b5024d2ab819a27ccbfdddc4830f911459b 28-Sep-2015 Vinit Deshpande <vinitd@google.com> am 2da736b7: am b45816dc: am 98e43e5f: Don\'t reset country code on mobile signal loss

* commit '2da736b76233645068903e44cd1b6e345881136a':
Don't reset country code on mobile signal loss
b45816dc9458590766f7bc79b225e6a6184585bc 28-Sep-2015 Vinit Deshpande <vinitd@google.com> am 98e43e5f: Don\'t reset country code on mobile signal loss

* commit '98e43e5f48a4c87343fc311feda4fa5489948822':
Don't reset country code on mobile signal loss
98e43e5f48a4c87343fc311feda4fa5489948822 27-Sep-2015 Vinit Deshpande <vinitd@google.com> Don't reset country code on mobile signal loss

Since mobile signal is lost too often; resetting country
code on this trigger causes too many changes. This change
restricts resetting country code only on two triggers

1. When airplane mode is turned ON
2. When SIM is removed

all other triggeres to reset country code are ignored.

Bug: 24363012
Change-Id: I5bc4bd8af7461da916c9a7638cf9cb457c73ac8b
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
a7fb235eb00711dbc436e5fea0e4f4e12750c87d 25-Sep-2015 Sharvil Nanavati <sharvil@google.com> am 024f57be: am 362185fa: am d2c4a206: Merge "Fix incorrect comparator implementation leading to IllegalArgumentException." into cw-e-dev

* commit '024f57be6c866dd4b900d71b1cdaa28bd208e355':
Fix incorrect comparator implementation leading to IllegalArgumentException.
024f57be6c866dd4b900d71b1cdaa28bd208e355 25-Sep-2015 Sharvil Nanavati <sharvil@google.com> am 362185fa: am d2c4a206: Merge "Fix incorrect comparator implementation leading to IllegalArgumentException." into cw-e-dev

* commit '362185fa89166f7dfd3a63a6cc576ea116b70389':
Fix incorrect comparator implementation leading to IllegalArgumentException.
d2c4a206cbda822a1c1f575fa29975565e4a8ea3 25-Sep-2015 Sharvil Nanavati <sharvil@google.com> Merge "Fix incorrect comparator implementation leading to IllegalArgumentException." into cw-e-dev
bddf925068d0037a1298ff3ffd1b17ffedb43745 25-Sep-2015 Sharvil Nanavati <sharvil@google.com> Fix incorrect comparator implementation leading to IllegalArgumentException.

The current comparator implementation does not implement the compare()
function according to the interface definition. In particular, the
following clause is violated:

"The implementor must ensure that sgn(compare(x, y)) == -sgn(compare(y, x))
for all x and y."

If a.priority == b.priority, the comparator throws.

Bug: 24223197
Change-Id: Ibff94067de272d8c9372474fa24a161bf95bf6f1
ndroid/server/wifi/WifiConfigStore.java
5fc890105154949a0754dd00786bae280a9c8693 25-Sep-2015 Vinit Deshpande <vinitd@google.com> resolved conflicts for 0b17544f to master

Change-Id: I6676066fc97d6959abaa2eb3bce15b551ce66685
0b17544f2c484be1bd9ae15d000c993ee172c36b 25-Sep-2015 Vinit Deshpande <vinitd@google.com> am ae156509: am 828559f9: am 39bf8e13: Merge "Honor country code change in wifi disabled state" into mnc-dr-dev

* commit 'ae15650959a00a014c31042efd560d9dded54bdf':
Honor country code change in wifi disabled state
39bf8e134381411a7a46cc4c2b635c83d630db71 25-Sep-2015 Vinit Deshpande <vinitd@google.com> Merge "Honor country code change in wifi disabled state" into mnc-dr-dev
19d6fba32b3d930764d0476b031e9126ec83e551 24-Sep-2015 Erik Kline <ek@google.com> Merge "IpReachabilityMonitor is now in the android.net.ip package"
6ba920080784e63d938543af984affd402d97aeb 24-Sep-2015 Vinit Deshpande <vinitd@google.com> am 810eeac3: am 8ec7d702: am af14b1fc: am 4689d5dd: Merge "Disable wifi firmware logging by default" into mnc-dr-dev

* commit '810eeac391f074eb4d7fa6b7a023093b850436f7':
Disable wifi firmware logging by default
810eeac391f074eb4d7fa6b7a023093b850436f7 24-Sep-2015 Vinit Deshpande <vinitd@google.com> am 8ec7d702: am af14b1fc: am 4689d5dd: Merge "Disable wifi firmware logging by default" into mnc-dr-dev

* commit '8ec7d702e297ae918d9655dc333efd6359fbc2d0':
Disable wifi firmware logging by default
4689d5dd1c8d028d7b10646db09d1899b8119006 24-Sep-2015 Vinit Deshpande <vinitd@google.com> Merge "Disable wifi firmware logging by default" into mnc-dr-dev
e863a2b7d3010ac197d81fb4ba504e74d8cffad6 18-Sep-2015 Erik Kline <ek@google.com> IpReachabilityMonitor is now in the android.net.ip package

Change-Id: I2e25e53cd41425c8b205fbcf2fad0c61ee8f76c7
ndroid/server/wifi/WifiStateMachine.java
e28ce6be22c1389847e77d2be9c8390689cdf395 24-Sep-2015 Vinit Deshpande <vinitd@google.com> Disable wifi firmware logging by default

This is really needed for debugging phase, which is over
now; and disabling it will reduce surface area

Bug: 24317401

Change-Id: I0acf9efc94333cb274d4286df9c853431d86883d
ndroid/server/wifi/DummyWifiLogger.java
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiStateMachine.java
1d5cd3938f9191184cd9aea3059a3b62bf3a0372 22-Jul-2015 Jan Nordqvist <jannq@google.com> Hotspot 2.0 relase 2 first cut.

Policy provisioning.
API methods.
Timers for policy and remediation.
Icon and friendly name checking.
Channel bindings for EST.

Change-Id: Ifa7125743ea93d7d4329cb53fd70c99b9b06fffe
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/anqp/ANQPFactory.java
ndroid/server/wifi/anqp/Constants.java
ndroid/server/wifi/anqp/HSIconFileElement.java
ndroid/server/wifi/anqp/HSOsuProvidersElement.java
ndroid/server/wifi/anqp/I18Name.java
ndroid/server/wifi/anqp/IconInfo.java
ndroid/server/wifi/anqp/OSUProvider.java
ndroid/server/wifi/anqp/eap/NonEAPInnerAuth.java
ndroid/server/wifi/configparse/ConfigBuilder.java
ndroid/server/wifi/hotspot2/ANQPData.java
ndroid/server/wifi/hotspot2/AnqpCache.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/hotspot2/OMADMAdapter.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
ndroid/server/wifi/hotspot2/Utils.java
ndroid/server/wifi/hotspot2/WifiNetworkAdapter.java
ndroid/server/wifi/hotspot2/asn1/Asn1Boolean.java
ndroid/server/wifi/hotspot2/asn1/Asn1Class.java
ndroid/server/wifi/hotspot2/asn1/Asn1Constructed.java
ndroid/server/wifi/hotspot2/asn1/Asn1Decoder.java
ndroid/server/wifi/hotspot2/asn1/Asn1ID.java
ndroid/server/wifi/hotspot2/asn1/Asn1Integer.java
ndroid/server/wifi/hotspot2/asn1/Asn1Object.java
ndroid/server/wifi/hotspot2/asn1/Asn1Octets.java
ndroid/server/wifi/hotspot2/asn1/Asn1Oid.java
ndroid/server/wifi/hotspot2/asn1/Asn1String.java
ndroid/server/wifi/hotspot2/asn1/Asn1Tag.java
ndroid/server/wifi/hotspot2/asn1/DecodeException.java
ndroid/server/wifi/hotspot2/asn1/OidMappings.java
ndroid/server/wifi/hotspot2/est/ESTHandler.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
ndroid/server/wifi/hotspot2/omadm/MOTree.java
ndroid/server/wifi/hotspot2/omadm/MultiValueMap.java
ndroid/server/wifi/hotspot2/omadm/OMAConstants.java
ndroid/server/wifi/hotspot2/omadm/OMAConstructed.java
ndroid/server/wifi/hotspot2/omadm/OMANode.java
ndroid/server/wifi/hotspot2/omadm/OMAScalar.java
ndroid/server/wifi/hotspot2/omadm/RequestDetail.java
ndroid/server/wifi/hotspot2/omadm/SOAPParser.java
ndroid/server/wifi/hotspot2/omadm/XMLNode.java
ndroid/server/wifi/hotspot2/osu/ClientKeyManager.java
ndroid/server/wifi/hotspot2/osu/ExchangeCompleteResponse.java
ndroid/server/wifi/hotspot2/osu/ExecCommand.java
ndroid/server/wifi/hotspot2/osu/HTTPHandler.java
ndroid/server/wifi/hotspot2/osu/IconCache.java
ndroid/server/wifi/hotspot2/osu/OSUCertType.java
ndroid/server/wifi/hotspot2/osu/OSUClient.java
ndroid/server/wifi/hotspot2/osu/OSUCommand.java
ndroid/server/wifi/hotspot2/osu/OSUCommandID.java
ndroid/server/wifi/hotspot2/osu/OSUError.java
ndroid/server/wifi/hotspot2/osu/OSUInfo.java
ndroid/server/wifi/hotspot2/osu/OSUListener.java
ndroid/server/wifi/hotspot2/osu/OSUManager.java
ndroid/server/wifi/hotspot2/osu/OSUMessageType.java
ndroid/server/wifi/hotspot2/osu/OSUOperationStatus.java
ndroid/server/wifi/hotspot2/osu/OSUResponse.java
ndroid/server/wifi/hotspot2/osu/OSUSocketFactory.java
ndroid/server/wifi/hotspot2/osu/OSUStatus.java
ndroid/server/wifi/hotspot2/osu/PostDevDataResponse.java
ndroid/server/wifi/hotspot2/osu/RequestReason.java
ndroid/server/wifi/hotspot2/osu/ResponseFactory.java
ndroid/server/wifi/hotspot2/osu/SOAPBuilder.java
ndroid/server/wifi/hotspot2/osu/SOAPParser.java
ndroid/server/wifi/hotspot2/osu/SPVerifier.java
ndroid/server/wifi/hotspot2/osu/UserInputListener.java
ndroid/server/wifi/hotspot2/osu/WiFiKeyManager.java
ndroid/server/wifi/hotspot2/osu/XMLParser.java
ndroid/server/wifi/hotspot2/osu/commands/BrowserURI.java
ndroid/server/wifi/hotspot2/osu/commands/ClientCertInfo.java
ndroid/server/wifi/hotspot2/osu/commands/GetCertData.java
ndroid/server/wifi/hotspot2/osu/commands/MOData.java
ndroid/server/wifi/hotspot2/osu/commands/MOURN.java
ndroid/server/wifi/hotspot2/osu/commands/OSUCommandData.java
ndroid/server/wifi/hotspot2/osu/service/RedirectListener.java
ndroid/server/wifi/hotspot2/osu/service/SubscriptionTimer.java
ndroid/server/wifi/hotspot2/pps/HomeSP.java
ndroid/server/wifi/hotspot2/pps/Policy.java
ndroid/server/wifi/hotspot2/pps/SubscriptionParameters.java
ndroid/server/wifi/hotspot2/pps/UpdateInfo.java
ndroid/server/wifi/hotspot2/utils/HTTPMessage.java
ndroid/server/wifi/hotspot2/utils/HTTPRequest.java
ndroid/server/wifi/hotspot2/utils/HTTPResponse.java
d3629ea845f3e49cdba20255a83068dced281d09 23-Sep-2015 Vinit Deshpande <vinitd@google.com> Honor country code change in wifi disabled state

Bug: 22937052

Change-Id: I8394531e50c4c6b41c6f376a4eb2d8205bd10af7
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
4351eeda51e8c3763b456a5b402e3c433563382e 21-Sep-2015 xin He <xinhe@google.com> am 514d70b0: am 16b77473: am 60dc786b: am fe710a84: Merge "Disconnection seen when roaming from 2.4Ghz to 5Ghz radio of the same AP" into mnc-dr-dev

* commit '514d70b0ebebed12ffafe3f16b827ab4c052112c':
Disconnection seen when roaming from 2.4Ghz to 5Ghz radio of the same AP
514d70b0ebebed12ffafe3f16b827ab4c052112c 21-Sep-2015 xin He <xinhe@google.com> am 16b77473: am 60dc786b: am fe710a84: Merge "Disconnection seen when roaming from 2.4Ghz to 5Ghz radio of the same AP" into mnc-dr-dev

* commit '16b774739508f3225c60177e7124aac07d2a9683':
Disconnection seen when roaming from 2.4Ghz to 5Ghz radio of the same AP
fe710a84935b653979bba9fe9cbcb6a71f38f78b 21-Sep-2015 xin He <xinhe@google.com> Merge "Disconnection seen when roaming from 2.4Ghz to 5Ghz radio of the same AP" into mnc-dr-dev
07198ad239254a5ce7cbf05b9094a66d1fcd91a8 21-Sep-2015 xin He <xinhe@google.com> am ed4fac77: am a9801ecd: am 1330d2c3: am 8647cf63: Merge "initial wifi with default country code" into mnc-dr-dev

* commit 'ed4fac7752804241d2a8bf91a449af3c221a19b5':
initial wifi with default country code
ed4fac7752804241d2a8bf91a449af3c221a19b5 21-Sep-2015 xin He <xinhe@google.com> am a9801ecd: am 1330d2c3: am 8647cf63: Merge "initial wifi with default country code" into mnc-dr-dev

* commit 'a9801ecd0f622db65c136f81c8fbf0debeaa2429':
initial wifi with default country code
8647cf637681b858b09e277ad65dffe46230b247 21-Sep-2015 xin He <xinhe@google.com> Merge "initial wifi with default country code" into mnc-dr-dev
9652e67414cd32e6aae978b96a8ccac34468053a 21-Sep-2015 Erik Kline <ek@google.com> am e2af37f5: am 5d8bc9e3: am 003075fa: Pass Context to IpReachabilityMonitor

* commit 'e2af37f5397a14e170e9ab3758ee401337fd0424':
Pass Context to IpReachabilityMonitor
003075fad19ffd21ae48c863b26c146e1b135617 17-Sep-2015 Erik Kline <ek@google.com> Pass Context to IpReachabilityMonitor

This is to enable IpReachabilityMonitor to properly request a wakelock
during probes.

Bug: 23197666
Change-Id: Ie8eb8271d7bc11b76e67dbc12b1eb57790784d0b
ndroid/server/wifi/WifiStateMachine.java
7de206ddfd3bc193b49e31b3a71dfd88a86df22a 19-Sep-2015 Mitchell Wills <mwills@google.com> am 61497ddb: am b65bfe98: am c5e22bdc: am ed34692d: Make sure to cleanup rssi cmd before starting new one

* commit '61497ddb21d80977e594007981c6b9c44fc8a65b':
Make sure to cleanup rssi cmd before starting new one
61497ddb21d80977e594007981c6b9c44fc8a65b 19-Sep-2015 Mitchell Wills <mwills@google.com> am b65bfe98: am c5e22bdc: am ed34692d: Make sure to cleanup rssi cmd before starting new one

* commit 'b65bfe98f710093b8760a5dc24e738780e3f3c1e':
Make sure to cleanup rssi cmd before starting new one
ed34692d4c4e202748d41f90db397f1cc3dc8320 19-Sep-2015 Mitchell Wills <mwills@google.com> Make sure to cleanup rssi cmd before starting new one

Bug: 24196771
Change-Id: Ied140eac38452c4f914c188ff87c37182d79c5ff
ndroid/server/wifi/WifiNative.java
9a37b9eee2e9892e4d05ee25372a5de5c2ea317b 18-Sep-2015 Erik Kline <ek@google.com> Merge "Pass Context to IpReachabilityMonitor"
a6b433d78621ee760428813f4f77682d87352106 17-Sep-2015 Erik Kline <ek@google.com> Pass Context to IpReachabilityMonitor

This is to enable IpReachabilityMonitor to properly request a wakelock
during probes.

Bug: 23197666
Change-Id: Ie8eb8271d7bc11b76e67dbc12b1eb57790784d0b
ndroid/server/wifi/WifiStateMachine.java
e3dff88903d6011ed135ba0fa5eb538f9f2bcc0e 18-Sep-2015 Mitchell Wills <mwills@google.com> am fa89695a: am 3ffbae25: am c0ede1c5: am 2b822d60: Remove all scans before scheduling a new scan

* commit 'fa89695aa0f323712e8521844cb93b6d65d0f195':
Remove all scans before scheduling a new scan
fa89695aa0f323712e8521844cb93b6d65d0f195 18-Sep-2015 Mitchell Wills <mwills@google.com> am 3ffbae25: am c0ede1c5: am 2b822d60: Remove all scans before scheduling a new scan

* commit '3ffbae25cbc1ff62175bf7a55932f7a5e7bce949':
Remove all scans before scheduling a new scan
2b822d60e4e623e678e48352b9493c52f349fab5 17-Sep-2015 Mitchell Wills <mwills@google.com> Remove all scans before scheduling a new scan

Bug: 23815756
Change-Id: I6c924f17516fb94c81e3bd2a660be5e5d3becd52
ndroid/server/wifi/WifiScanningServiceImpl.java
570beb51bc1daa2eb122d68f5ccac7e0ce840293 11-Sep-2015 xinhe <xinhe@google.com> Disconnection seen when roaming from 2.4Ghz to 5Ghz radio of the same AP

b/22729460

Change-Id: I9ac9dd0dba2bf0179b728607ea0cf9b7f05f6ed9
ndroid/server/wifi/WifiStateMachine.java
57f108bfcb288aba5c2b557a4ab77019f45af747 17-Sep-2015 xinhe <xinhe@google.com> initial wifi with default country code

b/24082611

Change-Id: I59c2bf90b679313630919d33bb90e8a51e335437
ndroid/server/wifi/WifiStateMachine.java
3781f7eb0ed6ed29f84429244dce5cb5d6ceb248 16-Sep-2015 Lorenzo Colitti <lorenzo@google.com> am a772a520: am 302ebaee: am ab9b5756: am 7e89aecd: Wifi fixes for RSSI offload.

* commit 'a772a520e624362df873985d5a5db9623e2dcd1a':
Wifi fixes for RSSI offload.
a772a520e624362df873985d5a5db9623e2dcd1a 16-Sep-2015 Lorenzo Colitti <lorenzo@google.com> am 302ebaee: am ab9b5756: am 7e89aecd: Wifi fixes for RSSI offload.

* commit '302ebaeee85f367adbe4ddc838aac4cbf8a8f950':
Wifi fixes for RSSI offload.
7e89aecdbe4eea3ae955b2b52dd10191685049f6 14-Sep-2015 Lorenzo Colitti <lorenzo@google.com> Wifi fixes for RSSI offload.

1. When disconnecting, stop RSSI monitoring.
2. If no thresholds are specified, stop offload.
3. If invalid threholds are specified, stop offload.
3. When logging CMD_START_RSSI_MONITORING_OFFLOAD, include the
thresholds as well.
5. Delete stopRssiMonitoring(), which is unused.
6. Minor code and logging simplification.

Bug: 21405941
Bug: 23679346
Bug: 23815756
Change-Id: Iddbd2d3c6a3e2a8f1b283fbe5b41e3e4e3acbfa1
ndroid/server/wifi/WifiStateMachine.java
a9f2ed26044349832b022569165cba9a5ba430f1 12-Sep-2015 Daniel Cashman <dcashman@google.com> am 0a9dd7cb: am a6a6c4bc: am d3f1473c: am 7b28f041: Merge "Add DUMP permission check to WifiScanner service." into mnc-dr-dev

* commit '0a9dd7cbf5a38559c6085527706894acfeac87ad':
Add DUMP permission check to WifiScanner service.
a303955fa5ad6cb03502eaaf4cf4e253843b64d4 12-Sep-2015 Prerepa Viswanadham <dham@google.com> resolved conflicts for b7900943 to master

Change-Id: I4b421a8f67bc8651118ff72d471873ddf7a88fbe
0a9dd7cbf5a38559c6085527706894acfeac87ad 12-Sep-2015 Daniel Cashman <dcashman@google.com> am a6a6c4bc: am d3f1473c: am 7b28f041: Merge "Add DUMP permission check to WifiScanner service." into mnc-dr-dev

* commit 'a6a6c4bc83cbaf499292dfaaf2fcb5706d72541b':
Add DUMP permission check to WifiScanner service.
b790094360345d100088ed1b55e7a5083cab3803 12-Sep-2015 Prerepa Viswanadham <dham@google.com> am 4b3b0fc0: am 616c05e5: resolved conflicts for f2c41da8 to cw-e-dev

* commit '4b3b0fc00c6a7206092009b97287b5f5788dbc26':
Process RSSI breach event in L2 connect state; protect from crash that can occur when it comes in Disconnected state.
7b28f0415fb90593190bde734eeece86b0c6ae53 12-Sep-2015 Daniel Cashman <dcashman@google.com> Merge "Add DUMP permission check to WifiScanner service." into mnc-dr-dev
f2c41da8b231d0f4712adcd48af33f91d8785ade 11-Sep-2015 Prerepa Viswanadham <dham@google.com> Process RSSI breach event in L2 connect state; protect from
crash that can occur when it comes in Disconnected state.

Bug: 23847831
Change-Id: I693384c61d43ad377c30ef2797937d1dfd48eeb3
ndroid/server/wifi/WifiStateMachine.java
cbf5c1792df8509c1b0de0a1b73d1c004a83e4bf 09-Sep-2015 dcashman <dcashman@google.com> Add DUMP permission check to WifiScanner service.

Bug: 23936840
Change-Id: I0b0e0594f098916f1131e98d8500c33752912395
ndroid/server/wifi/WifiScanningServiceImpl.java
1a9d88ad4a89400b9c177089f7db3d424a346b4c 08-Sep-2015 Fyodor Kupolov <fkupolov@google.com> Do not throw an exception if appop's result is MODE_IGNORED

Previously, an exception was thrown when a result of checking for an app op
was MODE_IGNORED. We should return zero results instead.

Bug: 23675817
Change-Id: Iba6b6eca8a0d21acd77b8d388b8bfe3119cac8f9
ndroid/server/wifi/WifiServiceImpl.java
29fa7d2ffc3bba55173969309e280328b43eeca1 09-Sep-2015 dcashman <dcashman@google.com> Add DUMP permission check to WifiScanner service.

Bug: 23936840
Change-Id: Ia1853db65bf277ed096c1385097bab2e5f76922d
ndroid/server/wifi/WifiScanningServiceImpl.java
ce3d849dd65a1308571a906723c01871752bb9df 09-Sep-2015 Vineeta Srivastava <vsrivastava@google.com> am 05bfc35b: am 3852bd26: am de23839d: am 6e481814: Merge "Revert "Dump more ring buffer data in bugreports"" into mnc-dr-dev

* commit '05bfc35ba7913b119c4c9146681a6421169f4f82':
Revert "Dump more ring buffer data in bugreports"
05bfc35ba7913b119c4c9146681a6421169f4f82 09-Sep-2015 Vineeta Srivastava <vsrivastava@google.com> am 3852bd26: am de23839d: am 6e481814: Merge "Revert "Dump more ring buffer data in bugreports"" into mnc-dr-dev

* commit '3852bd26ca8896818c8a588657fd709ce1c256f3':
Revert "Dump more ring buffer data in bugreports"
de23839d85b92cd0eb4cf20311b1b6e5a3211fa7 09-Sep-2015 Vineeta Srivastava <vsrivastava@google.com> am 6e481814: Merge "Revert "Dump more ring buffer data in bugreports"" into mnc-dr-dev

* commit '6e4818147592bfcdf2f5b54df439e315055135dd':
Revert "Dump more ring buffer data in bugreports"
6e4818147592bfcdf2f5b54df439e315055135dd 09-Sep-2015 Vineeta Srivastava <vsrivastava@google.com> Merge "Revert "Dump more ring buffer data in bugreports"" into mnc-dr-dev
674602ce4a5e0c6df7e67230310ad842deb532e9 09-Sep-2015 Vineeta Srivastava <vsrivastava@google.com> Revert "Dump more ring buffer data in bugreports"

This reverts commit d564996d66942dc11ccbafa70c38ef26320b8b8a.

Bug: 23790222
Change-Id: I28862a3ed9938184d1540b89a878189eefc084f9
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiStateMachine.java
f0332c70db9e19433404218713da89b96b8ee6c3 09-Sep-2015 Lorenzo Colitti <lorenzo@google.com> am 086e0c1f: am 18443a38: am a3ab79e3: am 4d2dbfa9: Merge "Return ERROR_HARDWARE_ERROR if the hardware reports an error." into mnc-dr-dev

* commit '086e0c1f65cee592b892821094ff1b7c21481c05':
Return ERROR_HARDWARE_ERROR if the hardware reports an error.
086e0c1f65cee592b892821094ff1b7c21481c05 09-Sep-2015 Lorenzo Colitti <lorenzo@google.com> am 18443a38: am a3ab79e3: am 4d2dbfa9: Merge "Return ERROR_HARDWARE_ERROR if the hardware reports an error." into mnc-dr-dev

* commit '18443a38077ef1012423b0a47fdbb9032abf5e9e':
Return ERROR_HARDWARE_ERROR if the hardware reports an error.
a3ab79e39a5261ce2034100ee606202e7e783a63 09-Sep-2015 Lorenzo Colitti <lorenzo@google.com> am 4d2dbfa9: Merge "Return ERROR_HARDWARE_ERROR if the hardware reports an error." into mnc-dr-dev

* commit '4d2dbfa9ac535063ce4b32530e24e38af22b4ee2':
Return ERROR_HARDWARE_ERROR if the hardware reports an error.
4d2dbfa9ac535063ce4b32530e24e38af22b4ee2 09-Sep-2015 Lorenzo Colitti <lorenzo@google.com> Merge "Return ERROR_HARDWARE_ERROR if the hardware reports an error." into mnc-dr-dev
a157e67a26205d8c3177f8fe5b8d918ffd115a1a 08-Sep-2015 Vinit Deshpande <vinitd@google.com> am 6208dbb4: am cd793ef9: am c55fc96c: am 6194a637: Support config_wifi_revert_country_code_on_cellular_loss

* commit '6208dbb4fb3319121caade3f6b83d4550a21a3be':
Support config_wifi_revert_country_code_on_cellular_loss
6208dbb4fb3319121caade3f6b83d4550a21a3be 08-Sep-2015 Vinit Deshpande <vinitd@google.com> am cd793ef9: am c55fc96c: am 6194a637: Support config_wifi_revert_country_code_on_cellular_loss

* commit 'cd793ef98272738ef2a3c8d45b26c92094348017':
Support config_wifi_revert_country_code_on_cellular_loss
c55fc96c9bc6abd71a50054d98e8d093540de26d 08-Sep-2015 Vinit Deshpande <vinitd@google.com> am 6194a637: Support config_wifi_revert_country_code_on_cellular_loss

* commit '6194a637d789ec915d58c3f569618cb3ad43a93b':
Support config_wifi_revert_country_code_on_cellular_loss
707f8dba7c1bced3034f1066c3b8d759c8826422 08-Sep-2015 Lorenzo Colitti <lorenzo@google.com> Return ERROR_HARDWARE_ERROR if the hardware reports an error.

Previously we'd just return whatever integer the HAL returned.
This is bad because callers would interpret this integer as a
PacketKeepalive error code and would have no idea what it meant.

Bug: 21405946
Change-Id: I1f1f6a7e00ff8694e1f8ca7b5bf2b045c6e4036d
ndroid/server/wifi/WifiStateMachine.java
6194a637d789ec915d58c3f569618cb3ad43a93b 05-Sep-2015 Vinit Deshpande <vinitd@google.com> Support config_wifi_revert_country_code_on_cellular_loss

This change supports config_wifi_revert_country_code_on_cellular_loss;
when this overlay setting is set to true, and ro.boot.wificountrycode
property is set, it will reset wifi chipset to default country code
(designated by ro.boot.wificountrycode) in order to conform with local
regulations.

bug: 21795172

Change-Id: I20bd3a260b639dba331305c6baa39ffb52e2fd6f
ndroid/server/wifi/WifiStateMachine.java
108eb1b4b56d86f2df9c5ae08694ed58d7eee2e2 03-Sep-2015 Vinit Deshpande <vinitd@google.com> am 987ae534: am 3775f20e: am fbd5d5db: am d564996d: Dump more ring buffer data in bugreports

* commit '987ae534b1b6a06cd44154a108d6acedc2bcfd88':
Dump more ring buffer data in bugreports
987ae534b1b6a06cd44154a108d6acedc2bcfd88 03-Sep-2015 Vinit Deshpande <vinitd@google.com> am 3775f20e: am fbd5d5db: am d564996d: Dump more ring buffer data in bugreports

* commit '3775f20e2f882bcb355102b125d708f04b750ebc':
Dump more ring buffer data in bugreports
fbd5d5db3a0f589ca76b7bbb2627517f3b4ce884 03-Sep-2015 Vinit Deshpande <vinitd@google.com> am d564996d: Dump more ring buffer data in bugreports

* commit 'd564996d66942dc11ccbafa70c38ef26320b8b8a':
Dump more ring buffer data in bugreports
d564996d66942dc11ccbafa70c38ef26320b8b8a 27-Aug-2015 Vinit Deshpande <vinitd@google.com> Dump more ring buffer data in bugreports

This change caches wifi ring buffer data for last one hour instead
of caching fixed size of data. This will help debug transitional
issues better.

This change also captures firmware dump when IP reachablity is lost.
hopefully, this will help debug elusive connectivity issues.

Bug: 23320188

Change-Id: I03c944967b73aeeb56df05f481e41f90715291f4
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiStateMachine.java
aed0ffae9579a068b37cb7b38f4ed0aa072bd927 28-Aug-2015 Mitchell Wills <mwills@google.com> am 1086377c: am 24a99090: am f424a327: am 85d1a896: am 0553024a: Merge "Revert "Add wake lock that is acquired during full wifi scans"" into mnc-dev

* commit '1086377cf6c1408bf0438a1bfce07a23db30b170':
Revert "Add wake lock that is acquired during full wifi scans"
1086377cf6c1408bf0438a1bfce07a23db30b170 28-Aug-2015 Mitchell Wills <mwills@google.com> am 24a99090: am f424a327: am 85d1a896: am 0553024a: Merge "Revert "Add wake lock that is acquired during full wifi scans"" into mnc-dev

* commit '24a99090a5bf385827734c531e4860c389544ac6':
Revert "Add wake lock that is acquired during full wifi scans"
f424a327159e68051349008ca1dbcad69140295b 28-Aug-2015 Mitchell Wills <mwills@google.com> am 85d1a896: am 0553024a: Merge "Revert "Add wake lock that is acquired during full wifi scans"" into mnc-dev

* commit '85d1a896c94123727d70fcb309ca5355ee73c74e':
Revert "Add wake lock that is acquired during full wifi scans"
85d1a896c94123727d70fcb309ca5355ee73c74e 28-Aug-2015 Mitchell Wills <mwills@google.com> am 0553024a: Merge "Revert "Add wake lock that is acquired during full wifi scans"" into mnc-dev

* commit '0553024a5d7ca6593f61335ead1bade23d3d2e40':
Revert "Add wake lock that is acquired during full wifi scans"
0553024a5d7ca6593f61335ead1bade23d3d2e40 28-Aug-2015 Mitchell Wills <mwills@google.com> Merge "Revert "Add wake lock that is acquired during full wifi scans"" into mnc-dev
c1608581b6fc89bb00bfa4aa1684380fa53e755c 28-Aug-2015 Mitchell Wills <mwills@google.com> Revert "Add wake lock that is acquired during full wifi scans"

This reverts commit b3dd8fb7956874fa23f4095d065fd665b3772aa2.

Change-Id: I0982ca449ee5382d749210859e861135073f963b
Bug: 23540206
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
e529e250515e5ad78dc0bda27c62ba5d9c9ed949 28-Aug-2015 Jan Nordqvist <jannq@google.com> am 6a950ac7: am f5c84055: am 90c01769: Merge "Moved domain suffix enforcement setting to WifiConfigStore." into mnc-dev

* commit '6a950ac79fd0e00b065b49888381df66b3794cbb':
Moved domain suffix enforcement setting to WifiConfigStore.
6a950ac79fd0e00b065b49888381df66b3794cbb 28-Aug-2015 Jan Nordqvist <jannq@google.com> am f5c84055: am 90c01769: Merge "Moved domain suffix enforcement setting to WifiConfigStore." into mnc-dev

* commit 'f5c840550f86bd073060ca82f191eadb307ff1dc':
Moved domain suffix enforcement setting to WifiConfigStore.
8f86e4afb100d6943463efd16101917ee281b948 27-Aug-2015 Jan Nordqvist <jannq@google.com> am f2ccc594: am 90c01769: Merge "Moved domain suffix enforcement setting to WifiConfigStore." into mnc-dev

* commit 'f2ccc594030d9a36947973e9b66b269dedf37734':
Moved domain suffix enforcement setting to WifiConfigStore.
f2ccc594030d9a36947973e9b66b269dedf37734 27-Aug-2015 Jan Nordqvist <jannq@google.com> am 90c01769: Merge "Moved domain suffix enforcement setting to WifiConfigStore." into mnc-dev

* commit '90c01769ebbae7d5256ef1e1675c1f21dd94ea70':
Moved domain suffix enforcement setting to WifiConfigStore.
f5c840550f86bd073060ca82f191eadb307ff1dc 27-Aug-2015 Jan Nordqvist <jannq@google.com> am 90c01769: Merge "Moved domain suffix enforcement setting to WifiConfigStore." into mnc-dev

* commit '90c01769ebbae7d5256ef1e1675c1f21dd94ea70':
Moved domain suffix enforcement setting to WifiConfigStore.
90c01769ebbae7d5256ef1e1675c1f21dd94ea70 27-Aug-2015 Jan Nordqvist <jannq@google.com> Merge "Moved domain suffix enforcement setting to WifiConfigStore." into mnc-dev
a472694e74f336e88a77e867c2d66ba4a902fbd8 25-Aug-2015 xin He <xinhe@google.com> am e0673490: am 1ae13301: am ce7c3057: am e766da2d: Merge "Ignore NETWORK_CONNECTION_EVENT when already in ConnectedState" into mnc-dr-dev

* commit 'e0673490b0cd3ea91ea1589bdb9f310fbc61c615':
Ignore NETWORK_CONNECTION_EVENT when already in ConnectedState
e0673490b0cd3ea91ea1589bdb9f310fbc61c615 25-Aug-2015 xin He <xinhe@google.com> am 1ae13301: am ce7c3057: am e766da2d: Merge "Ignore NETWORK_CONNECTION_EVENT when already in ConnectedState" into mnc-dr-dev

* commit '1ae13301608d90146cfeb93bf9d3991689aa0adf':
Ignore NETWORK_CONNECTION_EVENT when already in ConnectedState
ce7c30570b89eea5f474f54df56c5145d5c6a498 25-Aug-2015 xin He <xinhe@google.com> am e766da2d: Merge "Ignore NETWORK_CONNECTION_EVENT when already in ConnectedState" into mnc-dr-dev

* commit 'e766da2dd496d4bcbca4c8ef75c575aaba1752c7':
Ignore NETWORK_CONNECTION_EVENT when already in ConnectedState
e766da2dd496d4bcbca4c8ef75c575aaba1752c7 25-Aug-2015 xin He <xinhe@google.com> Merge "Ignore NETWORK_CONNECTION_EVENT when already in ConnectedState" into mnc-dr-dev
f88d5ab0130eafcfb9ae11f3ba8f3b0f90e3ee8a 25-Aug-2015 Prem Kumar <premk@google.com> am 9baa0526: am b3762801: am 19894873: am 97c6feca: am 83265fd0: Merge "Fire scanResultsAvailableBroadcast as system" into mnc-dev

* commit '9baa05266ef341f8a7dd300f08460fdb775c84dc':
Fire scanResultsAvailableBroadcast as system
9baa05266ef341f8a7dd300f08460fdb775c84dc 25-Aug-2015 Prem Kumar <premk@google.com> am b3762801: am 19894873: am 97c6feca: am 83265fd0: Merge "Fire scanResultsAvailableBroadcast as system" into mnc-dev

* commit 'b3762801604e590c64ad4027ef1e045f3d88aeec':
Fire scanResultsAvailableBroadcast as system
19894873a0930fc5229347f8ae19627864be66ad 25-Aug-2015 Prem Kumar <premk@google.com> am 97c6feca: am 83265fd0: Merge "Fire scanResultsAvailableBroadcast as system" into mnc-dev

* commit '97c6fecadd27d0ecd6557527dd4a7304f9f859cb':
Fire scanResultsAvailableBroadcast as system
97c6fecadd27d0ecd6557527dd4a7304f9f859cb 25-Aug-2015 Prem Kumar <premk@google.com> am 83265fd0: Merge "Fire scanResultsAvailableBroadcast as system" into mnc-dev

* commit '83265fd0ad5f89ed860f76a78f55dc9f3e2d4d27':
Fire scanResultsAvailableBroadcast as system
7ebab34600c9b4388308ef92c59c2fa1adfd9494 25-Aug-2015 Prem Kumar <premk@google.com> am 83265fd0: Merge "Fire scanResultsAvailableBroadcast as system" into mnc-dev

* commit '83265fd0ad5f89ed860f76a78f55dc9f3e2d4d27':
Fire scanResultsAvailableBroadcast as system
83265fd0ad5f89ed860f76a78f55dc9f3e2d4d27 25-Aug-2015 Prem Kumar <premk@google.com> Merge "Fire scanResultsAvailableBroadcast as system" into mnc-dev
5c487a02cbae0e7b5d68e3841b80bf7d9413597b 25-Aug-2015 xinhe <xinhe@google.com> Ignore NETWORK_CONNECTION_EVENT when already in ConnectedState

b/22729460

Change-Id: I86b25d9dd8b41039d7627c86596f71c73018645b
ndroid/server/wifi/WifiStateMachine.java
5f30066b5609002673289860cd1cdae49c5e83dc 25-Aug-2015 Jan Nordqvist <jannq@google.com> Moved domain suffix enforcement setting to WifiConfigStore.

Bug: 23359149
Change-Id: I2f66041e5125b1b032da54616b152cf6990c3bc8
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/configparse/ConfigBuilder.java
691fb51e7ac5e4d0b91a4719cd0ed10a8c212e50 21-Aug-2015 Vinit Deshpande <vinitd@google.com> Fire scanResultsAvailableBroadcast as system

In idle mode, WifiService fires it as the calling app; but the apps
can't fire UserHandle.ALL broadcasts.

Bug: 22466691
Change-Id: Ib6d0e1fb570c430184e5af8ba7c796e19b02ba08
ndroid/server/wifi/WifiServiceImpl.java
2ab27e892ac48acfb960c18bb68a4ebd2a7570a2 22-Aug-2015 Jan Nordqvist <jannq@google.com> am c39c56f1: am a211a2d6: am af163db0: am 6b56e742: am 57011843: Merge "Fixed incorrect bounds check." into mnc-dev

* commit 'c39c56f15646478c937d9e435bb4de770ceca19a':
Fixed incorrect bounds check.
c39c56f15646478c937d9e435bb4de770ceca19a 22-Aug-2015 Jan Nordqvist <jannq@google.com> am a211a2d6: am af163db0: am 6b56e742: am 57011843: Merge "Fixed incorrect bounds check." into mnc-dev

* commit 'a211a2d62bb05dd8f8dccec1a86003ab3cc6a523':
Fixed incorrect bounds check.
af163db0c3868df7ef0c45c0a0b55ec2535e1e5c 22-Aug-2015 Jan Nordqvist <jannq@google.com> am 6b56e742: am 57011843: Merge "Fixed incorrect bounds check." into mnc-dev

* commit '6b56e742abfd5828f27e799f126ccacfee39dc44':
Fixed incorrect bounds check.
8aaad5e73a9e80b8da5cb3f0cf1d4641205e99ce 21-Aug-2015 Jan Nordqvist <jannq@google.com> am 57011843: Merge "Fixed incorrect bounds check." into mnc-dev

* commit '57011843dc0eb7cf1f2c2052a302ffbbc2f769d6':
Fixed incorrect bounds check.
6b56e742abfd5828f27e799f126ccacfee39dc44 21-Aug-2015 Jan Nordqvist <jannq@google.com> am 57011843: Merge "Fixed incorrect bounds check." into mnc-dev

* commit '57011843dc0eb7cf1f2c2052a302ffbbc2f769d6':
Fixed incorrect bounds check.
57011843dc0eb7cf1f2c2052a302ffbbc2f769d6 21-Aug-2015 Jan Nordqvist <jannq@google.com> Merge "Fixed incorrect bounds check." into mnc-dev
1c99377a2831c520b75f6dd2c7e1f2672be7d73f 21-Aug-2015 Jan Nordqvist <jannq@google.com> Fixed incorrect bounds check.

Bug: 23394258
Change-Id: I3cabd90fc9a863d3ada06dc258da57e90b5863e1
ndroid/server/wifi/anqp/IPAddressTypeAvailabilityElement.java
37907ee01ee921eb2f5ad17bdf25c35d6d41c54c 20-Aug-2015 Mitchell Wills <mwills@google.com> am 083c8dd3: am 3cbdc5f2: am 347a7826: am 9cea6662: Merge "Allow SAP enable while STA is enabled (and restore on disable)" into mnc-dr-dev

* commit '083c8dd3d87c5025c2c61cd073209394e3955c4c':
Allow SAP enable while STA is enabled (and restore on disable)
083c8dd3d87c5025c2c61cd073209394e3955c4c 20-Aug-2015 Mitchell Wills <mwills@google.com> am 3cbdc5f2: am 347a7826: am 9cea6662: Merge "Allow SAP enable while STA is enabled (and restore on disable)" into mnc-dr-dev

* commit '3cbdc5f211f8c1e213e9b270930cf6c71bc80d9d':
Allow SAP enable while STA is enabled (and restore on disable)
347a78264315033138ce2defa64ed60626670af2 20-Aug-2015 Mitchell Wills <mwills@google.com> am 9cea6662: Merge "Allow SAP enable while STA is enabled (and restore on disable)" into mnc-dr-dev

* commit '9cea6662a459bd1635ed65be7239549234975da9':
Allow SAP enable while STA is enabled (and restore on disable)
9cea6662a459bd1635ed65be7239549234975da9 20-Aug-2015 Mitchell Wills <mwills@google.com> Merge "Allow SAP enable while STA is enabled (and restore on disable)" into mnc-dr-dev
39ddd1ac0b7bc0c15f690b350dd694808cce6abc 20-Aug-2015 Erik Kline <ek@google.com> am 09b9b8e4: am bc70a41f: am 3b3ff4cd: am 14a4e553: am 195e2b5b: Merge "Also track loss of IPv6 provisioning, not just IPv4" into mnc-dev

* commit '09b9b8e43839f38f2e162138555ce945c0f2b03c':
Also track loss of IPv6 provisioning, not just IPv4
09b9b8e43839f38f2e162138555ce945c0f2b03c 20-Aug-2015 Erik Kline <ek@google.com> am bc70a41f: am 3b3ff4cd: am 14a4e553: am 195e2b5b: Merge "Also track loss of IPv6 provisioning, not just IPv4" into mnc-dev

* commit 'bc70a41f69ce855047ab758e00edcf4f8d64bbfb':
Also track loss of IPv6 provisioning, not just IPv4
3b3ff4cdda3d3c1a735baaf809548b3a8a69418f 20-Aug-2015 Erik Kline <ek@google.com> am 14a4e553: am 195e2b5b: Merge "Also track loss of IPv6 provisioning, not just IPv4" into mnc-dev

* commit '14a4e5532bbb9b962025abbe842d60f52569364c':
Also track loss of IPv6 provisioning, not just IPv4
5ee3629e4c349f1e06b5c62a409f9233c84d34af 20-Aug-2015 Erik Kline <ek@google.com> am 195e2b5b: Merge "Also track loss of IPv6 provisioning, not just IPv4" into mnc-dev

* commit '195e2b5b6822142e7b8b91843aecc5d9f0b252ed':
Also track loss of IPv6 provisioning, not just IPv4
14a4e5532bbb9b962025abbe842d60f52569364c 20-Aug-2015 Erik Kline <ek@google.com> am 195e2b5b: Merge "Also track loss of IPv6 provisioning, not just IPv4" into mnc-dev

* commit '195e2b5b6822142e7b8b91843aecc5d9f0b252ed':
Also track loss of IPv6 provisioning, not just IPv4
195e2b5b6822142e7b8b91843aecc5d9f0b252ed 20-Aug-2015 Erik Kline <ek@google.com> Merge "Also track loss of IPv6 provisioning, not just IPv4" into mnc-dev
61ba5535a4534a97fd3987e9bd0a31498256a5bc 19-Aug-2015 Mitchell Wills <mwills@google.com> Merge "Correctly compute WifiScanner channel count and scan length"
cbc29b608bf589294fe2a3785b0202dcee77b11c 19-Aug-2015 Jan Nordqvist <jannq@google.com> am 1cefbedc: am 92aaceb0: am e364dffa: am b869c6f7: am 8be016e0: Ignoring SSID for Passpoint networks.

* commit '1cefbedc8a860b630da89a3035512ba7528d1e0d':
Ignoring SSID for Passpoint networks.
1cefbedc8a860b630da89a3035512ba7528d1e0d 19-Aug-2015 Jan Nordqvist <jannq@google.com> am 92aaceb0: am e364dffa: am b869c6f7: am 8be016e0: Ignoring SSID for Passpoint networks.

* commit '92aaceb02b9a6132e956a16e8c99d144643fe4cc':
Ignoring SSID for Passpoint networks.
e364dffa30ab2afa81a818f7a34426e8ef7a5a28 19-Aug-2015 Jan Nordqvist <jannq@google.com> am b869c6f7: am 8be016e0: Ignoring SSID for Passpoint networks.

* commit 'b869c6f79a8edc4786311f01b5bad8b7d45effbd':
Ignoring SSID for Passpoint networks.
b869c6f79a8edc4786311f01b5bad8b7d45effbd 19-Aug-2015 Jan Nordqvist <jannq@google.com> am 8be016e0: Ignoring SSID for Passpoint networks.

* commit '8be016e09c31c9d0fb9044a9d3a9008bde559ca8':
Ignoring SSID for Passpoint networks.
f71a07dcc2bc09588ad111cf3ed936fd048f02dd 19-Aug-2015 Jan Nordqvist <jannq@google.com> am 8be016e0: Ignoring SSID for Passpoint networks.

* commit '8be016e09c31c9d0fb9044a9d3a9008bde559ca8':
Ignoring SSID for Passpoint networks.
1f8f2971309aee4de9c35723f6fbca6fcab9a3be 18-Aug-2015 Mitchell Wills <mwills@google.com> Check if link stats are supported when reporting activity info

Bug: 23286362
Change-Id: Ib5629d2547957ae1f6215f719377fad96f4e10f8
ndroid/server/wifi/WifiServiceImpl.java
8be016e09c31c9d0fb9044a9d3a9008bde559ca8 19-Aug-2015 Jan Nordqvist <jannq@google.com> Ignoring SSID for Passpoint networks.

Bug: 23108342
Change-Id: I73eec12165cc7d506dbce99cd6752a4ca3232737
ndroid/server/wifi/WifiConfigStore.java
50cc4f8cf4c35d5b97aceea4956f37724a91f207 18-Aug-2015 Erik Kline <ek@google.com> Also track loss of IPv6 provisioning, not just IPv4

Bug: 23226635
Change-Id: I2215add147c02021a8389b05545ccf87a1509ce8
ndroid/server/wifi/WifiStateMachine.java
b44ff9a5341fdb87d0169984729d077afc3fb806 05-Aug-2015 Mitchell Wills <mwills@google.com> Don't delay wifi driver shutdown

Bug: 22808676
Change-Id: Ia016959a226a77bd350191b69b869583883520d0
ndroid/server/wifi/WifiStateMachine.java
84060523b84e860ffd81050a73917721328d5c58 17-Aug-2015 xin He <xinhe@google.com> am bc452a8e: am c95ac1c2: am 4451482d: am 519e3982: Merge "Disconnection seen when roaming from 2.4Ghz to 5Ghz radio of the same AP" into mnc-dr-dev

* commit 'bc452a8ee0ec9d188ae77e099c25af611f7605f1':
Disconnection seen when roaming from 2.4Ghz to 5Ghz radio of the same AP
bc452a8ee0ec9d188ae77e099c25af611f7605f1 17-Aug-2015 xin He <xinhe@google.com> am c95ac1c2: am 4451482d: am 519e3982: Merge "Disconnection seen when roaming from 2.4Ghz to 5Ghz radio of the same AP" into mnc-dr-dev

* commit 'c95ac1c2702babb161d06a259687eca5aeb214b3':
Disconnection seen when roaming from 2.4Ghz to 5Ghz radio of the same AP
4451482db9d679eef6b373bb9d9061568b874eb4 17-Aug-2015 xin He <xinhe@google.com> am 519e3982: Merge "Disconnection seen when roaming from 2.4Ghz to 5Ghz radio of the same AP" into mnc-dr-dev

* commit '519e3982ee6ada654744def6e431b29fe7d10e95':
Disconnection seen when roaming from 2.4Ghz to 5Ghz radio of the same AP
519e3982ee6ada654744def6e431b29fe7d10e95 17-Aug-2015 xin He <xinhe@google.com> Merge "Disconnection seen when roaming from 2.4Ghz to 5Ghz radio of the same AP" into mnc-dr-dev
69a6102e30eabffefa7bfad6a4f016de8110013a 11-Aug-2015 Mitchell Wills <mwills@google.com> Allow SAP enable while STA is enabled (and restore on disable)

This moves the logic of remembering if wifi was enabled when enabling
softap to WifiController and restores the remembered state when
disabling softap.

Bug: 22729316
Change-Id: I83cfe587a0f9660aa3382c485f2f5cf7660af05c
ndroid/server/wifi/WifiController.java
845ecd3a1619c1e638aada572d08952608ef9ed4 14-Aug-2015 xinhe <xinhe@google.com> Disconnection seen when roaming from 2.4Ghz to 5Ghz radio of the same AP

b/22729460

Change-Id: I7ed9b2956c05171438fed00449e8aac0aca3709c
ndroid/server/wifi/WifiStateMachine.java
c3bf77a2810b67fcaeda388f094141080b2b3970 14-Aug-2015 Mitchell Wills <mwills@google.com> Correctly compute WifiScanner channel count and scan length

Bug: 23218323
Change-Id: I7b126cef6f83cfe4de893299e8b1a8fb87f6bad6
ndroid/server/wifi/WifiScanningServiceImpl.java
cdef7c0f7de2a6b582807ec50c1bd4bcf4056cab 14-Aug-2015 Vinit Deshpande <vinitd@google.com> Merge "Fix a crash caused by race of RSSI monitoring and connection events" into mnc-dr-dev
b767cfa8975511aede9bf82397f330930acd2d18 13-Aug-2015 Mitchell Wills <mwills@google.com> am 24d27d46: Merge "Add wake lock that is acquired during full wifi scans" into mnc-dev

* commit '24d27d46ad357c27254b05c49ec33a210aca7436':
Add wake lock that is acquired during full wifi scans
829570a34b9bde87a6b2f8419bd22dbc31c341ad 13-Aug-2015 Mitchell Wills <mwills@google.com> am 9a02fc05: am 386d3542: am 9a6cc8a9: am 363bcd1b: am 24d27d46: Merge "Add wake lock that is acquired during full wifi scans" into mnc-dev

* commit '9a02fc0526dd5bbd5df7edf52ed1c2f7fb0caf23':
Add wake lock that is acquired during full wifi scans
9a02fc0526dd5bbd5df7edf52ed1c2f7fb0caf23 13-Aug-2015 Mitchell Wills <mwills@google.com> am 386d3542: am 9a6cc8a9: am 363bcd1b: am 24d27d46: Merge "Add wake lock that is acquired during full wifi scans" into mnc-dev

* commit '386d3542a5135c1aa941871f9e13345ae0043ae0':
Add wake lock that is acquired during full wifi scans
9a6cc8a9d6d7233780fcd3d75a000acbfcc1c2f2 13-Aug-2015 Mitchell Wills <mwills@google.com> am 363bcd1b: am 24d27d46: Merge "Add wake lock that is acquired during full wifi scans" into mnc-dev

* commit '363bcd1b3f8a04e8a401fb8080eb8b913cdc9fd6':
Add wake lock that is acquired during full wifi scans
363bcd1b3f8a04e8a401fb8080eb8b913cdc9fd6 13-Aug-2015 Mitchell Wills <mwills@google.com> am 24d27d46: Merge "Add wake lock that is acquired during full wifi scans" into mnc-dev

* commit '24d27d46ad357c27254b05c49ec33a210aca7436':
Add wake lock that is acquired during full wifi scans
24d27d46ad357c27254b05c49ec33a210aca7436 13-Aug-2015 Mitchell Wills <mwills@google.com> Merge "Add wake lock that is acquired during full wifi scans" into mnc-dev
d373fa35fe37a9b3153797a951ecbff42536d77c 13-Aug-2015 xinhe <xinhe@google.com> am 2cdba3e0: am b6133b18: am 79e766f9: am eefa1470: am 26c09042: Phone connects to 2.4GHz wifi network when configured for 5GHz only

* commit '2cdba3e06181ba3247854746742e9fe7563a63d3':
Phone connects to 2.4GHz wifi network when configured for 5GHz only
33258d201093aed46ed75f9b9d5e631ebcece54a 13-Aug-2015 xinhe <xinhe@google.com> am 26c09042: Phone connects to 2.4GHz wifi network when configured for 5GHz only

* commit '26c0904253b5f4c6ecaf7a9ce160d93dcb2b1ff7':
Phone connects to 2.4GHz wifi network when configured for 5GHz only
2cdba3e06181ba3247854746742e9fe7563a63d3 13-Aug-2015 xinhe <xinhe@google.com> am b6133b18: am 79e766f9: am eefa1470: am 26c09042: Phone connects to 2.4GHz wifi network when configured for 5GHz only

* commit 'b6133b182b191c23ba490a93797fb0746d5a1468':
Phone connects to 2.4GHz wifi network when configured for 5GHz only
79e766f95dea07e1cdbebb64daef7d9dbc9db78b 13-Aug-2015 xinhe <xinhe@google.com> am eefa1470: am 26c09042: Phone connects to 2.4GHz wifi network when configured for 5GHz only

* commit 'eefa1470d798bd7d07109e2ec4924feb8e0b77c1':
Phone connects to 2.4GHz wifi network when configured for 5GHz only
eefa1470d798bd7d07109e2ec4924feb8e0b77c1 13-Aug-2015 xinhe <xinhe@google.com> am 26c09042: Phone connects to 2.4GHz wifi network when configured for 5GHz only

* commit '26c0904253b5f4c6ecaf7a9ce160d93dcb2b1ff7':
Phone connects to 2.4GHz wifi network when configured for 5GHz only
26c0904253b5f4c6ecaf7a9ce160d93dcb2b1ff7 11-Aug-2015 xinhe <xinhe@google.com> Phone connects to 2.4GHz wifi network when configured for 5GHz only

b/22830798

Change-Id: I164b1fe21d3e7b675420c9688f8cffc03dc27517
ndroid/server/wifi/WifiStateMachine.java
b3dd8fb7956874fa23f4095d065fd665b3772aa2 06-Aug-2015 Mitchell Wills <mwills@google.com> Add wake lock that is acquired during full wifi scans

Bug: 22832222
Change-Id: Ia69dc251aa54c1aee9c319c686dd1c88ae7f5f19
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
f07075e5000f47cae7c22979fe9c5b4bc0e1d8b5 12-Aug-2015 Fyodor Kupolov <fkupolov@google.com> am f2cdb162: am 2c6d6b38: am 61d442fb: am 274d409a: am 57dd660f: Merge "Legacy foreground apps should continue getting scan results" into mnc-dev

* commit 'f2cdb162a2bcec1e9ab013dd3155d44ea220e4c2':
Legacy foreground apps should continue getting scan results
f2cdb162a2bcec1e9ab013dd3155d44ea220e4c2 12-Aug-2015 Fyodor Kupolov <fkupolov@google.com> am 2c6d6b38: am 61d442fb: am 274d409a: am 57dd660f: Merge "Legacy foreground apps should continue getting scan results" into mnc-dev

* commit '2c6d6b38e0ec8097e503e9a521aa1ed71665f763':
Legacy foreground apps should continue getting scan results
61d442fb70c53c3289d56731599ac77e245d0189 12-Aug-2015 Fyodor Kupolov <fkupolov@google.com> am 274d409a: am 57dd660f: Merge "Legacy foreground apps should continue getting scan results" into mnc-dev

* commit '274d409a81db25afed12b90d7b6db4dee747f82d':
Legacy foreground apps should continue getting scan results
274d409a81db25afed12b90d7b6db4dee747f82d 12-Aug-2015 Fyodor Kupolov <fkupolov@google.com> am 57dd660f: Merge "Legacy foreground apps should continue getting scan results" into mnc-dev

* commit '57dd660fb81e51df080c4b57e1fc171eb5827cb0':
Legacy foreground apps should continue getting scan results
c510c3a277950106fc905a701b2965899eefed37 12-Aug-2015 Fyodor Kupolov <fkupolov@google.com> am 57dd660f: Merge "Legacy foreground apps should continue getting scan results" into mnc-dev

* commit '57dd660fb81e51df080c4b57e1fc171eb5827cb0':
Legacy foreground apps should continue getting scan results
57dd660fb81e51df080c4b57e1fc171eb5827cb0 12-Aug-2015 Fyodor Kupolov <fkupolov@google.com> Merge "Legacy foreground apps should continue getting scan results" into mnc-dev
c16b86a63a77c8a629f4c448e7d07ed143e2591e 12-Aug-2015 Vinit Deshpande <vinitd@google.com> am 1430bfef: am 3c1a2b9d: DO NOT MERGE Fix a crash caused by race of RSSI monitoring and connection events

* commit '1430bfef2f6052a71ce0036dcda28a860c650ee7':
DO NOT MERGE Fix a crash caused by race of RSSI monitoring and connection events
3c1a2b9d7090705382b1fdc1612c63263562a646 11-Aug-2015 Vinit Deshpande <vinitd@google.com> DO NOT MERGE Fix a crash caused by race of RSSI monitoring and connection events

Disconnect can occur during RSSI monitoring; leaving current config
to be undefined.

Bug: 22956360
Change-Id: I54f5a87651a0ab64a9ffda22f4207beb4316d9e4
ndroid/server/wifi/WifiStateMachine.java
2df05d93888c996753f77c27cdd1f7e5fbfa0d87 11-Aug-2015 xin He <xinhe@google.com> am 2cf7bd56: am fa83c9cc: am 3f2085b0: am 1294aa45: Merge "Bad Wifi = strange looping of trying to connect" into mnc-dev

* commit '2cf7bd56b36f358b3ce72541289a471140c1323c':
Bad Wifi = strange looping of trying to connect
2cf7bd56b36f358b3ce72541289a471140c1323c 11-Aug-2015 xin He <xinhe@google.com> am fa83c9cc: am 3f2085b0: am 1294aa45: Merge "Bad Wifi = strange looping of trying to connect" into mnc-dev

* commit 'fa83c9ccfa8a2e387d95fa2bbe9ef394e2847bca':
Bad Wifi = strange looping of trying to connect
b8ba77db66a94d88163254cee43893a968d2f9f0 11-Aug-2015 xin He <xinhe@google.com> am 1294aa45: Merge "Bad Wifi = strange looping of trying to connect" into mnc-dev

* commit '1294aa4550666b871239dc22622eefa76ec05206':
Bad Wifi = strange looping of trying to connect
3f2085b0e2dddeb768c6ff042ffeeb7ea1221d46 11-Aug-2015 xin He <xinhe@google.com> am 1294aa45: Merge "Bad Wifi = strange looping of trying to connect" into mnc-dev

* commit '1294aa4550666b871239dc22622eefa76ec05206':
Bad Wifi = strange looping of trying to connect
1294aa4550666b871239dc22622eefa76ec05206 11-Aug-2015 xin He <xinhe@google.com> Merge "Bad Wifi = strange looping of trying to connect" into mnc-dev
34512427a8b0b64c81a3bd94ff1498ad6601a92d 11-Aug-2015 Vinit Deshpande <vinitd@google.com> Fix a crash caused by race of RSSI monitoring and connection events

Disconnect can occur during RSSI monitoring; leaving current config
to be undefined.

Bug: 22956360
Change-Id: I54f5a87651a0ab64a9ffda22f4207beb4316d9e4
ndroid/server/wifi/WifiStateMachine.java
82a40869d64684bd8f73001aba80516503f43ed9 07-Aug-2015 xinhe <xinhe@google.com> Bad Wifi = strange looping of trying to connect

b/22682106

Change-Id: I74111c145a9935d8b5d0651035147eade89042db
ndroid/server/wifi/WifiConfigStore.java
6b51d3979474b763b2e48afc8d7925fa3f67f60e 06-Aug-2015 Vinit Deshpande <vinitd@google.com> am 2d3ab024: am 0e498b4c: am 67eb2983: am 851a49c6: Merge "Start scan immediately after disconnect is noticed" into mnc-dev

* commit '2d3ab024f870dca4bb0995d859b47e5d888d2946':
Start scan immediately after disconnect is noticed
2d3ab024f870dca4bb0995d859b47e5d888d2946 06-Aug-2015 Vinit Deshpande <vinitd@google.com> am 0e498b4c: am 67eb2983: am 851a49c6: Merge "Start scan immediately after disconnect is noticed" into mnc-dev

* commit '0e498b4c9b5ab25b432a96239f58e1a8076406c0':
Start scan immediately after disconnect is noticed
9a89da6eb4b307ff05ca2b74249c8eefc39038dd 06-Aug-2015 Vinit Deshpande <vinitd@google.com> am 851a49c6: Merge "Start scan immediately after disconnect is noticed" into mnc-dev

* commit '851a49c67efe70b090e8d8f2572ac1f66fbe2730':
Start scan immediately after disconnect is noticed
67eb298371b04d03c0140ccde890f2ecf7bf30c0 06-Aug-2015 Vinit Deshpande <vinitd@google.com> am 851a49c6: Merge "Start scan immediately after disconnect is noticed" into mnc-dev

* commit '851a49c67efe70b090e8d8f2572ac1f66fbe2730':
Start scan immediately after disconnect is noticed
851a49c67efe70b090e8d8f2572ac1f66fbe2730 06-Aug-2015 Vinit Deshpande <vinitd@google.com> Merge "Start scan immediately after disconnect is noticed" into mnc-dev
c0f76bad043a03a911c4121f58e599433dd31a63 06-Aug-2015 xinhe <xinhe@google.com> am 66c09a52: am b97abedb: am 9dc6bda4: resolved conflicts for merge of ee0a0132 to mnc-dr-dev

* commit '66c09a523324b80b9497a73b081ae6b7fe11ebad':
WiFi tethering AP says I can't use 5g in this country while in the US
66c09a523324b80b9497a73b081ae6b7fe11ebad 06-Aug-2015 xinhe <xinhe@google.com> am b97abedb: am 9dc6bda4: resolved conflicts for merge of ee0a0132 to mnc-dr-dev

* commit 'b97abedbc3399762d8c563c38aea953e6b008403':
WiFi tethering AP says I can't use 5g in this country while in the US
9dc6bda43f0767a1ecb3f901d9be0f523e9463f1 06-Aug-2015 xinhe <xinhe@google.com> resolved conflicts for merge of ee0a0132 to mnc-dr-dev

Change-Id: I61046edb56b9b54a759e4964762fa7b01d4eaba1
9affd084ee12ecbf935993884648b947c0d40208 05-Aug-2015 xinhe <xinhe@google.com> am ee0a0132: WiFi tethering AP says I can\'t use 5g in this country while in the US

* commit 'ee0a0132ebb0d7e9baf42e778ea9c094966ffb14':
WiFi tethering AP says I can't use 5g in this country while in the US
c065315c23f78ec462a56aec1aaa4e2a34549b8d 05-Aug-2015 Fyodor Kupolov <fkupolov@google.com> Legacy foreground apps should continue getting scan results

Pre-M apps running in the foreground now get scan results. For legacy apps
running in the background, no results are returned and the error is logged.

Bug: 22891540
Bug: 21852542
Change-Id: Ifc872888556f8c7b665b3bef3a4c02b1f67b0bad
ndroid/server/wifi/WifiServiceImpl.java
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
d40eb7ad3e3ad904621822b773af8b2532110bbb 05-Aug-2015 xin He <xinhe@google.com> am a8a23321: am f6b387dd: am 0cc09187: am 69a99c03: Merge "Boot loop when SSID has non UTF-8 character in the name" into mnc-dev

* commit 'a8a2332141962f42e41fe9fec6461ac12dff4287':
Boot loop when SSID has non UTF-8 character in the name
a8a2332141962f42e41fe9fec6461ac12dff4287 05-Aug-2015 xin He <xinhe@google.com> am f6b387dd: am 0cc09187: am 69a99c03: Merge "Boot loop when SSID has non UTF-8 character in the name" into mnc-dev

* commit 'f6b387dd7b5d8be3620b171401c778cb535a49a2':
Boot loop when SSID has non UTF-8 character in the name
0f343412244ba8110be9837b71cbd9e953297d6e 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
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
69a99c03a9c78a507266c18443dc044a7b3e7869 05-Aug-2015 xin He <xinhe@google.com> Merge "Boot loop when SSID has non UTF-8 character in the name" into mnc-dev
d8ce388d48cc171307a588cf955acae687ecef69 05-Aug-2015 Vinit Deshpande <vinitd@google.com> Start scan immediately after disconnect is noticed

We are waiting some 15 second to do this; which can cause
lots of problems - including device going to doze mode.

Bug: 22922868
Change-Id: I654700d053591f463fef876199c7756f103373bc
ndroid/server/wifi/WifiStateMachine.java
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
2db5ea10f5ba8aafa983d81ad6ab347dd6f77586 04-Aug-2015 Adam Lesinski <adamlesinski@google.com> am d76cdd8e: Log error when energy info is negative

* commit 'd76cdd8e08476ad5025f07a5d77a8d8f920a0721':
Log error when energy info is negative
94e82231b1b6553113e10b6bade81d30451ed6e2 04-Aug-2015 Adam Lesinski <adamlesinski@google.com> am 3ead4237: am 133d375f: am a7e4384d: am d76cdd8e: Log error when energy info is negative

* commit '3ead4237f7aba6824aab512b48439411ec9ad634':
Log error when energy info is negative
3ead4237f7aba6824aab512b48439411ec9ad634 04-Aug-2015 Adam Lesinski <adamlesinski@google.com> am 133d375f: am a7e4384d: am d76cdd8e: Log error when energy info is negative

* commit '133d375f410aee20611d966a1ba703ae26b7419f':
Log error when energy info is negative
a7e4384d748dcb5d46fe6343288681c43f5d3055 04-Aug-2015 Adam Lesinski <adamlesinski@google.com> am d76cdd8e: Log error when energy info is negative

* commit 'd76cdd8e08476ad5025f07a5d77a8d8f920a0721':
Log error when energy info is negative
d76cdd8e08476ad5025f07a5d77a8d8f920a0721 04-Aug-2015 Adam Lesinski <adamlesinski@google.com> Log error when energy info is negative

Bug:22822659
Change-Id: Iadab004b8dcdccbfae435990357426ec0e197dc2
ndroid/server/wifi/WifiServiceImpl.java
ed02133db15058d89c7ac6a0c1e3363bfe053759 03-Aug-2015 Jan Nordqvist <jannq@google.com> am 3dec2dfe: am ff8b1405: am eff8f206: am 0b9684f3: Merge "Failed ANQP responses incorrectly stored as empty data in ANQP cache." into mnc-dev

* commit '3dec2dfeaffd63ef6c93a7785777e136da8661cb':
Failed ANQP responses incorrectly stored as empty data in ANQP cache.
3dec2dfeaffd63ef6c93a7785777e136da8661cb 03-Aug-2015 Jan Nordqvist <jannq@google.com> am ff8b1405: am eff8f206: am 0b9684f3: Merge "Failed ANQP responses incorrectly stored as empty data in ANQP cache." into mnc-dev

* commit 'ff8b14052e9b7103ec836dd0e083880d865a738c':
Failed ANQP responses incorrectly stored as empty data in ANQP cache.
21e58490dd37652850abe27818b2eba64fc58212 03-Aug-2015 Jan Nordqvist <jannq@google.com> am 0b9684f3: Merge "Failed ANQP responses incorrectly stored as empty data in ANQP cache." into mnc-dev

* commit '0b9684f3f0edb76242eda2f7772d9b7cc7662dda':
Failed ANQP responses incorrectly stored as empty data in ANQP cache.
eff8f206d07435447646cbbd930cd24dd82852c0 03-Aug-2015 Jan Nordqvist <jannq@google.com> am 0b9684f3: Merge "Failed ANQP responses incorrectly stored as empty data in ANQP cache." into mnc-dev

* commit '0b9684f3f0edb76242eda2f7772d9b7cc7662dda':
Failed ANQP responses incorrectly stored as empty data in ANQP cache.
0b9684f3f0edb76242eda2f7772d9b7cc7662dda 03-Aug-2015 Jan Nordqvist <jannq@google.com> Merge "Failed ANQP responses incorrectly stored as empty data in ANQP cache." into mnc-dev
6ffe92fafa67feb670e5ed2adf755d124946260a 01-Aug-2015 Vinit Deshpande <vinitd@google.com> am 06de46bd: am 34ce9ef6: am 0c741595: am 1c95611c: Merge "Remove more spammy logs" into mnc-dev

* commit '06de46bdd50dfad82e3a88a10201a4e46191b89c':
Remove more spammy logs
2a2d06101c258ef788e4698ec3884b5e7660f235 01-Aug-2015 Vinit Deshpande <vinitd@google.com> am 34d07e12: am e674d1eb: am 47f5e33b: am eef1bd1f: Merge "Fix incorrect network selection despite enableNetwork(disableOthers)" into mnc-dev

* commit '34d07e121c3213952a141127111f171e00f2e459':
Fix incorrect network selection despite enableNetwork(disableOthers)
ad5291057968db7be29bb284bbdccd05b629c9b8 01-Aug-2015 Dianne Hackborn <hackbod@google.com> am f453980f: am f5f7088d: am 5420f4c0: am 017fabff: Change MNC codename to just M.

* commit 'f453980fe691cf53dcb2b0dcdcd6ba104cd21c45':
Change MNC codename to just M.
06de46bdd50dfad82e3a88a10201a4e46191b89c 01-Aug-2015 Vinit Deshpande <vinitd@google.com> am 34ce9ef6: am 0c741595: am 1c95611c: Merge "Remove more spammy logs" into mnc-dev

* commit '34ce9ef642dd8ae65a918f36659f71b05fde1ab1':
Remove more spammy logs
34d07e121c3213952a141127111f171e00f2e459 01-Aug-2015 Vinit Deshpande <vinitd@google.com> am e674d1eb: am 47f5e33b: am eef1bd1f: Merge "Fix incorrect network selection despite enableNetwork(disableOthers)" into mnc-dev

* commit 'e674d1eb41b5069ac6dd23b00aa3e44955f77ffa':
Fix incorrect network selection despite enableNetwork(disableOthers)
f453980fe691cf53dcb2b0dcdcd6ba104cd21c45 01-Aug-2015 Dianne Hackborn <hackbod@google.com> am f5f7088d: am 5420f4c0: am 017fabff: Change MNC codename to just M.

* commit 'f5f7088dc07bdd9b0c6ddcd3ef92c7d5020593b4':
Change MNC codename to just M.
0c7415958305ba4a90920f9339e3a29f61139202 01-Aug-2015 Vinit Deshpande <vinitd@google.com> am 1c95611c: Merge "Remove more spammy logs" into mnc-dev

* commit '1c95611caf52644154f6c5ddd6cde843b63c5231':
Remove more spammy logs
86ef602ba6a28bee2067eba1df80ee05358b1de0 01-Aug-2015 Vinit Deshpande <vinitd@google.com> am 1c95611c: Merge "Remove more spammy logs" into mnc-dev

* commit '1c95611caf52644154f6c5ddd6cde843b63c5231':
Remove more spammy logs
1c95611caf52644154f6c5ddd6cde843b63c5231 01-Aug-2015 Vinit Deshpande <vinitd@google.com> Merge "Remove more spammy logs" into mnc-dev
42a1bf5e9b21288524d9a5fe90556abefc035879 01-Aug-2015 Jan Nordqvist <jannq@google.com> Failed ANQP responses incorrectly stored as empty data in ANQP cache.

Bug: 22882190
Change-Id: I2793247027579f07301bfc206800827a46af8c4e
ndroid/server/wifi/hotspot2/SupplicantBridge.java
c7a79b5523683993b23b8890e7752a1dbfd4d589 01-Aug-2015 Vinit Deshpande <vinitd@google.com> am eef1bd1f: Merge "Fix incorrect network selection despite enableNetwork(disableOthers)" into mnc-dev

* commit 'eef1bd1f89c70d561e7e4ac4299c16e4bd9ef696':
Fix incorrect network selection despite enableNetwork(disableOthers)
47f5e33bd45f8fcb0a73cc07ebe4a49a713a9ad0 01-Aug-2015 Vinit Deshpande <vinitd@google.com> am eef1bd1f: Merge "Fix incorrect network selection despite enableNetwork(disableOthers)" into mnc-dev

* commit 'eef1bd1f89c70d561e7e4ac4299c16e4bd9ef696':
Fix incorrect network selection despite enableNetwork(disableOthers)
eef1bd1f89c70d561e7e4ac4299c16e4bd9ef696 01-Aug-2015 Vinit Deshpande <vinitd@google.com> Merge "Fix incorrect network selection despite enableNetwork(disableOthers)" into mnc-dev
5420f4c0fbd25a006218c399be08d9286bd50d8b 31-Jul-2015 Dianne Hackborn <hackbod@google.com> am 017fabff: Change MNC codename to just M.

* commit '017fabff2169403c27e551b39e87d3b2cd837409':
Change MNC codename to just M.
5252bba57aa6fd3f9a377fff12110e4028aca8cc 31-Jul-2015 Dianne Hackborn <hackbod@google.com> am 017fabff: Change MNC codename to just M.

* commit '017fabff2169403c27e551b39e87d3b2cd837409':
Change MNC codename to just M.
017fabff2169403c27e551b39e87d3b2cd837409 30-Jul-2015 Dianne Hackborn <hackbod@google.com> Change MNC codename to just M.

Change-Id: I04b95d96032bfca6cce5d957ee937d34128121cd
ndroid/server/wifi/WifiServiceImpl.java
807f6a8502cc35bd250b903e2315bcdc34c49a92 31-Jul-2015 Vinit Deshpande <vinitd@google.com> Remove more spammy logs

Bug: 20416721

Change-Id: I2ddcc405d120208271e3a4740053987538924690
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
c7c402b2ac54f039a311e47a8d2f9b94c9598a61 31-Jul-2015 Shirish Kalele <kalele@google.com> am c2f412ec: am d66d06c5: am 3c40de91: am 8be2ac8c: Allow active network scorer access to scan results.

* commit 'c2f412ecd18cd332962f16f797c06f1419b97914':
Allow active network scorer access to scan results.
c2f412ecd18cd332962f16f797c06f1419b97914 31-Jul-2015 Shirish Kalele <kalele@google.com> am d66d06c5: am 3c40de91: am 8be2ac8c: Allow active network scorer access to scan results.

* commit 'd66d06c56d73c184f161dd6425ded7a4e0e15d54':
Allow active network scorer access to scan results.
0b67197e0a12381c645d972b6a1a700b58a57ff3 31-Jul-2015 Shirish Kalele <kalele@google.com> am 8be2ac8c: Allow active network scorer access to scan results.

* commit '8be2ac8cec40a2000715849b627642bdc87c10b3':
Allow active network scorer access to scan results.
3c40de9172bf0d691e2678ee099dc3e725d03a3b 31-Jul-2015 Shirish Kalele <kalele@google.com> am 8be2ac8c: Allow active network scorer access to scan results.

* commit '8be2ac8cec40a2000715849b627642bdc87c10b3':
Allow active network scorer access to scan results.
afb3e0da51f0c04752db8f049270824311c0e24e 30-Jul-2015 Fyodor Kupolov <fkupolov@google.com> am cf2cde7d: am cdec2f94: am e2019253: am c6b1ed46: Merge "Use PEERS_MAC_ADDRESS permission instead of isSystemProcess" into mnc-dev

* commit 'cf2cde7dde7ca1364e5099bff8f8d6e22c283cb2':
Use PEERS_MAC_ADDRESS permission instead of isSystemProcess
8be2ac8cec40a2000715849b627642bdc87c10b3 30-Jul-2015 Shirish Kalele <kalele@google.com> Allow active network scorer access to scan results.

BTW, AS corrected the import order of a lot of imports. Let me
know if you want it restored.

Bug: 22777873
Change-Id: Ia6ad069b83ecf9c0f07a620dbc98c85161a8e396
ndroid/server/wifi/WifiServiceImpl.java
cf2cde7dde7ca1364e5099bff8f8d6e22c283cb2 30-Jul-2015 Fyodor Kupolov <fkupolov@google.com> am cdec2f94: am e2019253: am c6b1ed46: Merge "Use PEERS_MAC_ADDRESS permission instead of isSystemProcess" into mnc-dev

* commit 'cdec2f943441eab742b28e0eb4e8c48fb779ebdc':
Use PEERS_MAC_ADDRESS permission instead of isSystemProcess
c2c9d622a1de69eade77e56fd3aef888e78c8459 30-Jul-2015 Fyodor Kupolov <fkupolov@google.com> am c6b1ed46: Merge "Use PEERS_MAC_ADDRESS permission instead of isSystemProcess" into mnc-dev

* commit 'c6b1ed46dd5fe44da9fca8959f062e7bf6a7a800':
Use PEERS_MAC_ADDRESS permission instead of isSystemProcess
e2019253596def7ad445552d8bc48e7e4735f3cd 30-Jul-2015 Fyodor Kupolov <fkupolov@google.com> am c6b1ed46: Merge "Use PEERS_MAC_ADDRESS permission instead of isSystemProcess" into mnc-dev

* commit 'c6b1ed46dd5fe44da9fca8959f062e7bf6a7a800':
Use PEERS_MAC_ADDRESS permission instead of isSystemProcess
c6b1ed46dd5fe44da9fca8959f062e7bf6a7a800 30-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Merge "Use PEERS_MAC_ADDRESS permission instead of isSystemProcess" into mnc-dev
560c50dedb0a39f2804d300387a3fe6f8a96edbf 27-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Use PEERS_MAC_ADDRESS permission instead of isSystemProcess

A signature-level permission PEERS_MAC_ADDRESS was added to support a
use-case when SystemUI should be able to get the list of WiFi scan results for
Quick Settings. even when location is turned off in Settings.

Bug: 22777873
Bug: 21852542
Bug: 22728628
Change-Id: I68b42725ca5bc81f035f7e351070e5b7c5ff3050
ndroid/server/wifi/WifiServiceImpl.java
e84a8320bf381aeffa61ff0a988a8d0641162ae2 30-Jul-2015 Vinit Deshpande <vinitd@google.com> am 7a5af20c: am cd36dbb2: am 41bb2e40: am 84e718d7: Improved wifiscanner logging

* commit '7a5af20c7c2c38fe382b3cc3d2e6b203fac3e86d':
Improved wifiscanner logging
7a5af20c7c2c38fe382b3cc3d2e6b203fac3e86d 30-Jul-2015 Vinit Deshpande <vinitd@google.com> am cd36dbb2: am 41bb2e40: am 84e718d7: Improved wifiscanner logging

* commit 'cd36dbb2832e4559f3d16db9b06372341c27ca99':
Improved wifiscanner logging
50291037eb02c3817d14c4610b04537a39883fad 30-Jul-2015 Vinit Deshpande <vinitd@google.com> am 84e718d7: Improved wifiscanner logging

* commit '84e718d76c7412121b64ed9ac497c8071f0ef5e9':
Improved wifiscanner logging
41bb2e409a6e5418d06b38def7bfcd4187661471 30-Jul-2015 Vinit Deshpande <vinitd@google.com> am 84e718d7: Improved wifiscanner logging

* commit '84e718d76c7412121b64ed9ac497c8071f0ef5e9':
Improved wifiscanner logging
84e718d76c7412121b64ed9ac497c8071f0ef5e9 30-Jul-2015 Vinit Deshpande <vinitd@google.com> Improved wifiscanner logging

Bug: 22833037

Change-Id: I7d39ec370153530fe588a0e7608d790033de197d
ndroid/server/wifi/WifiScanningServiceImpl.java
3c5247a46ed8b4fa80bdf18578fba9269c2b1690 29-Jul-2015 Paul Jensen <pauljensen@google.com> am c50fe22d: am 72f0e2f6: am 48d3539f: resolved conflicts for merge of 9b82dc74 to mnc-dr-dev

* commit 'c50fe22d2854612b71c2d25931e00715cc61c721':
Disable WiFi autojoin when user decides via "Stay connected?" dialog
c50fe22d2854612b71c2d25931e00715cc61c721 29-Jul-2015 Paul Jensen <pauljensen@google.com> am 72f0e2f6: am 48d3539f: resolved conflicts for merge of 9b82dc74 to mnc-dr-dev

* commit '72f0e2f6aef6fa31324f3df8b2f8db661c5d33ac':
Disable WiFi autojoin when user decides via "Stay connected?" dialog
48d3539f991d4879d8009f78fa44dea902fb5e3a 29-Jul-2015 Paul Jensen <pauljensen@google.com> resolved conflicts for merge of 9b82dc74 to mnc-dr-dev

Change-Id: I67c8ba7dc94e17eb34fd315c969f02889a1596cc
149a700217f6b8016bcf458cac300d5ac52ba7ca 29-Jul-2015 Paul Jensen <pauljensen@google.com> am 9b82dc74: Merge "Disable WiFi autojoin when user decides via "Stay connected?" dialog" into mnc-dev

* commit '9b82dc749dc3bcb5c9fb57ec35d8030ae7098192':
Disable WiFi autojoin when user decides via "Stay connected?" dialog
9b82dc749dc3bcb5c9fb57ec35d8030ae7098192 29-Jul-2015 Paul Jensen <pauljensen@google.com> Merge "Disable WiFi autojoin when user decides via "Stay connected?" dialog" into mnc-dev
fa51d5cb6d2caad89d841d48719b6cf05f2b5273 29-Jul-2015 Jan Nordqvist <jannq@google.com> am dda245ac: am aaf32c8f: am 84fd44ab: am 57e85b00: Merge "Upped time-out for zero ANQP domain ID from 1 to 5 minutes. Implemented exponential back off for repetetive failing quesries." into mnc-dev

* commit 'dda245ac6ce09bfd3b307fa04a8ff6230bfb98c7':
Upped time-out for zero ANQP domain ID from 1 to 5 minutes. Implemented exponential back off for repetetive failing quesries.
dda245ac6ce09bfd3b307fa04a8ff6230bfb98c7 29-Jul-2015 Jan Nordqvist <jannq@google.com> am aaf32c8f: am 84fd44ab: am 57e85b00: Merge "Upped time-out for zero ANQP domain ID from 1 to 5 minutes. Implemented exponential back off for repetetive failing quesries." into mnc-dev

* commit 'aaf32c8fced463b429103e88342dc02fd8abbad2':
Upped time-out for zero ANQP domain ID from 1 to 5 minutes. Implemented exponential back off for repetetive failing quesries.
bd139462d94f581f8e2e9c906c10ffec0bc18aa9 29-Jul-2015 Vinit Deshpande <vinitd@google.com> Fix incorrect network selection despite enableNetwork(disableOthers)

App selection is overridden by auto-join selection, if network isn't
connected to. This change fixes the problem by adding a timeout during
which auto-join selection isn't allowed to be made.

Bug: 22127532

Change-Id: Ief78b6bf6e69d38ea8f43021e2a5316d52f8809f
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
adb8612b067500829948ff003ef0355975ae4293 28-Jul-2015 Jan Nordqvist <jannq@google.com> am 57e85b00: Merge "Upped time-out for zero ANQP domain ID from 1 to 5 minutes. Implemented exponential back off for repetetive failing quesries." into mnc-dev

* commit '57e85b00f16e03c1c7b24f561117131df33e7a04':
Upped time-out for zero ANQP domain ID from 1 to 5 minutes. Implemented exponential back off for repetetive failing quesries.
84fd44abe68148ab83a6dc76a80335015264fd5d 28-Jul-2015 Jan Nordqvist <jannq@google.com> am 57e85b00: Merge "Upped time-out for zero ANQP domain ID from 1 to 5 minutes. Implemented exponential back off for repetetive failing quesries." into mnc-dev

* commit '57e85b00f16e03c1c7b24f561117131df33e7a04':
Upped time-out for zero ANQP domain ID from 1 to 5 minutes. Implemented exponential back off for repetetive failing quesries.
57e85b00f16e03c1c7b24f561117131df33e7a04 28-Jul-2015 Jan Nordqvist <jannq@google.com> Merge "Upped time-out for zero ANQP domain ID from 1 to 5 minutes. Implemented exponential back off for repetetive failing quesries." into mnc-dev
407fa6084ac2796e6562843598b2654f36eb324d 28-Jul-2015 Vinit Deshpande <vinitd@google.com> am 81dddeb9: am 1b8096eb: Fix a race in WifiNative objects

* commit '81dddeb9108efcbec2cb95365dc0303f3b1cdf77':
Fix a race in WifiNative objects
4f14fb2dd825aea180082d3abed71211c1cfecd4 28-Jul-2015 xin He <xinhe@google.com> am 5d31474f: am 6fe0821a: am 34f73ba7: Merge "Framework should not call blacklist API on HAL unless ePNO is enabled" into mnc-dev

* commit '5d31474f28baf2d9f66cac9079fed7f5f9c2b060':
Framework should not call blacklist API on HAL unless ePNO is enabled
312c60d9779c200e8250b8a7ae32eaea01b08b42 13-Jul-2015 Paul Jensen <pauljensen@google.com> Disable WiFi autojoin when user decides via "Stay connected?" dialog

If the user selects "No" in the "Stay connected?" dialog box:
1. Disable autojoining that network in the future, and
2. Disassociate from that network.
Also, correct the name of a constant that was misleading.

Bug:22187193
Change-Id: I14dc9236c57e3ab7d3ec95edc906787cbfbf3c9f
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiStateMachine.java
81dddeb9108efcbec2cb95365dc0303f3b1cdf77 28-Jul-2015 Vinit Deshpande <vinitd@google.com> am 1b8096eb: Fix a race in WifiNative objects

* commit '1b8096ebeb6360ac6f25d81eff36cc6926973e68':
Fix a race in WifiNative objects
1b8096ebeb6360ac6f25d81eff36cc6926973e68 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
ndroid/server/wifi/WifiNative.java
ffdef92ed945b7744f5df5effdbba152e022b0c3 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
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
a142187a4cd133a193675caf419ea25423eeab85 28-Jul-2015 Vinit Deshpande <vinitd@google.com> Merge "Fix a race in WifiNative objects" into mnc-dev
5d31474f28baf2d9f66cac9079fed7f5f9c2b060 28-Jul-2015 xin He <xinhe@google.com> am 6fe0821a: am 34f73ba7: Merge "Framework should not call blacklist API on HAL unless ePNO is enabled" into mnc-dev

* commit '6fe0821af95c86df9c5fcc71aeeada863c953250':
Framework should not call blacklist API on HAL unless ePNO is enabled
65fbeb4a190293c618416c7cd0898d4e819259d3 28-Jul-2015 xin He <xinhe@google.com> am 34f73ba7: Merge "Framework should not call blacklist API on HAL unless ePNO is enabled" into mnc-dev

* commit '34f73ba7cbcf3c4ed54898e808caa9d24bc3561c':
Framework should not call blacklist API on HAL unless ePNO is enabled
6fe0821af95c86df9c5fcc71aeeada863c953250 28-Jul-2015 xin He <xinhe@google.com> am 34f73ba7: Merge "Framework should not call blacklist API on HAL unless ePNO is enabled" into mnc-dev

* commit '34f73ba7cbcf3c4ed54898e808caa9d24bc3561c':
Framework should not call blacklist API on HAL unless ePNO is enabled
34f73ba7cbcf3c4ed54898e808caa9d24bc3561c 28-Jul-2015 xin He <xinhe@google.com> Merge "Framework should not call blacklist API on HAL unless ePNO is enabled" into mnc-dev
68aaaa93878daeb9f1cb95baca79ee03154f15f5 24-Jul-2015 xinhe <xinhe@google.com> Framework should not call blacklist API on HAL unless ePNO is enabled

b/22699627

Change-Id: I270d2d628d989dbd03934c9449bf3db6101f28f5
ndroid/server/wifi/WifiConfigStore.java
8408fc51cf15e20700b66242ef921b252552e9b1 27-Jul-2015 Mitchell Wills <mwills@google.com> Merge "Removed old code to support PasspointStateMachine"
22286a97a855119b0e28f725e89b1cf98efd6bad 24-Jul-2015 Fyodor Kupolov <fkupolov@google.com> am 13af7314: am b19027f0: Merge "Enforce location permission for apps targeting M" into mnc-dev

* commit '13af7314dce8dbee1a436252ef2bf0db4956fa77':
Enforce location permission for apps targeting M
400be6641e79d90452077f1412a85b9c26761810 24-Jul-2015 xin He <xinhe@google.com> am 8c640956: am fbd35be2: Merge "Restart loop on MRA16G: Abort message:" into mnc-dev

* commit '8c640956f308202f9cdcc3c2a313f1d69e9e118d':
Restart loop on MRA16G: Abort message:
9fb2505ef188e67351988ed9f31363171177fa33 24-Jul-2015 Jan Nordqvist <jannq@google.com> am 6a067c5f: am 7278b8ad: Merge "Added NPE guard around wpa_supplicant results." into mnc-dev

* commit '6a067c5f9e23072f8493f119d5b999ef5e865d0e':
Added NPE guard around wpa_supplicant results.
42c9036be37bb265d03d53ad2c6fd153500c9f62 24-Jul-2015 xin He <xinhe@google.com> am 140333f4: am c28e026a: Merge "Angler Should Not Use Channel 11 for SoftAP" into mnc-dev

* commit '140333f4a79ae4bcf026cd2255bf5a7460d17e75':
Angler Should Not Use Channel 11 for SoftAP
13af7314dce8dbee1a436252ef2bf0db4956fa77 23-Jul-2015 Fyodor Kupolov <fkupolov@google.com> am b19027f0: Merge "Enforce location permission for apps targeting M" into mnc-dev

* commit 'b19027f007c641debd423e3f1fa7f56d891045ef':
Enforce location permission for apps targeting M
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:
6a067c5f9e23072f8493f119d5b999ef5e865d0e 23-Jul-2015 Jan Nordqvist <jannq@google.com> am 7278b8ad: Merge "Added NPE guard around wpa_supplicant results." into mnc-dev

* commit '7278b8ad40ab62383229e458be962d28321158ed':
Added NPE guard around wpa_supplicant results.
140333f4a79ae4bcf026cd2255bf5a7460d17e75 23-Jul-2015 xin He <xinhe@google.com> am c28e026a: Merge "Angler Should Not Use Channel 11 for SoftAP" into mnc-dev

* commit 'c28e026a27212c867d0b863ec65c71b67513b429':
Angler Should Not Use Channel 11 for SoftAP
bb30263048e44498ca263d0114157c14392daeec 23-Jul-2015 Fyodor Kupolov <fkupolov@google.com> am b19027f0: Merge "Enforce location permission for apps targeting M" into mnc-dev

* commit 'b19027f007c641debd423e3f1fa7f56d891045ef':
Enforce location permission for apps targeting M
25eea106cbc3cdaa4deff56c55ae03a023a250a5 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:
38062f8b9bc77602b3320dd491b6f70eac988688 23-Jul-2015 Jan Nordqvist <jannq@google.com> am 7278b8ad: Merge "Added NPE guard around wpa_supplicant results." into mnc-dev

* commit '7278b8ad40ab62383229e458be962d28321158ed':
Added NPE guard around wpa_supplicant results.
8d72ce06429c1bf3faeae2d85b896ca6ba279734 23-Jul-2015 xin He <xinhe@google.com> am c28e026a: Merge "Angler Should Not Use Channel 11 for SoftAP" into mnc-dev

* commit 'c28e026a27212c867d0b863ec65c71b67513b429':
Angler Should Not Use Channel 11 for SoftAP
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
ndroid/server/wifi/WifiNative.java
82414ead13eb2554cf412ad00a30d9e21499bf75 23-Jul-2015 Jan Nordqvist <jannq@google.com> Upped time-out for zero ANQP domain ID from 1 to 5 minutes.
Implemented exponential back off for repetetive failing quesries.

Bug: 22662457
Change-Id: Ie9a8ccb71adc74e38c4a5f2a96431dcbd20b7833
ndroid/server/wifi/hotspot2/ANQPData.java
ndroid/server/wifi/hotspot2/AnqpCache.java
b19027f007c641debd423e3f1fa7f56d891045ef 23-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Merge "Enforce location permission for apps targeting M" into mnc-dev
fbd35be2ee76cb2f8090f563c8f2666ce0dee607 23-Jul-2015 xin He <xinhe@google.com> Merge "Restart loop on MRA16G: Abort message:" into mnc-dev
7278b8ad40ab62383229e458be962d28321158ed 23-Jul-2015 Jan Nordqvist <jannq@google.com> Merge "Added NPE guard around wpa_supplicant results." into mnc-dev
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
ndroid/server/wifi/WifiNative.java
086148f550b6e293ef3154265ec32317a10c7217 23-Jul-2015 Mitchell Wills <mwills@google.com> Removed old code to support PasspointStateMachine

Change-Id: Ieb84b84848d42befe963ba5a9be96d508f02ed7d
ndroid/server/wifi/WifiMonitor.java
c28e026a27212c867d0b863ec65c71b67513b429 22-Jul-2015 xin He <xinhe@google.com> Merge "Angler Should Not Use Channel 11 for SoftAP" into mnc-dev
5ef40f88bab7e645a5a9e42aeae768d3b916c02c 22-Jul-2015 Jan Nordqvist <jannq@google.com> Added NPE guard around wpa_supplicant results.

Bug: 22661007
Change-Id: I4d8629ba0033599ceb995349ee16139e96970240
ndroid/server/wifi/hotspot2/SupplicantBridge.java
e660aa2b9c9ca3a5c7903c37571ca7b91feb4ccf 22-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Enforce location permission for apps targeting M

Enforce location permission for apps targeting M, for legacy apps - log an
error.

Also fixed an issue, when calling uid was not used to check permission.

Bug: 21852542
Change-Id: I8186acbeb4e8a2c5285f05ce3335e9c18a780112
ndroid/server/wifi/WifiServiceImpl.java
52b6d4cbf2815d18f35c64af955bf3859907b5c1 17-Jul-2015 xinhe <xinhe@google.com> Angler Should Not Use Channel 11 for SoftAP

b/22541346

Change-Id: I300605d8d305214e81803d5d54549e7c3e5bc5bb
ndroid/server/wifi/WifiApConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
bfb8d4c62ffd17acfa35e75e60519d8ed93cb16c 18-Jul-2015 Erik Kline <ek@google.com> am 5114ec46: Don\'t ignore our own default values

* commit '5114ec4642ac9624c68aead71dd7b741e27262e7':
Don't ignore our own default values
4c8db7864157490ec3497c22e1d863e0e11c725b 18-Jul-2015 Prerepa Viswanadham <dham@google.com> am 19d76428: Fix build

* commit '19d764282b423ca65aec084bebe5d9bb89dfcc07':
Fix build
7f0c9b01595bebdc4d7b70939fc3444cdcda78da 18-Jul-2015 Prerepa Viswanadham <dham@google.com> am aed5cb65: RSSI monitoring in Wifi state machine

* commit 'aed5cb65d8eefb2eee56a29e33ac3cd8b03312e7':
RSSI monitoring in Wifi state machine
7ab2c03dcfab34f451aee22d689ba0078a28ce10 18-Jul-2015 Prerepa Viswanadham <dham@google.com> am 3bd22ceb: Fix code review comments in WiFi offload CL f7fe4b25bf294f808b99b1e1f25e8a7a62817ef7

* commit '3bd22cebc41ed0786d0e7bd2970a634a8bb0093e':
Fix code review comments in WiFi offload CL f7fe4b25bf294f808b99b1e1f25e8a7a62817ef7
ce9ef32854b10f38c73b311a1e6362e625aba5aa 18-Jul-2015 Prerepa Viswanadham <dham@google.com> am c55e8816: WiFi keep alive offloading service implementation

* commit 'c55e88163b223db0ca6a99ed6ffe91845c30a576':
WiFi keep alive offloading service implementation
8e853fb9dcfe46bcd5be18e12885120e4eae8ca4 18-Jul-2015 Prerepa Viswanadham <dham@google.com> am 50de00cb: Merge "Sample code for RSSI callbacks on wifi." into mnc-dr-dev

* commit '50de00cb49bb5110b5e9a75058468e68f1368f8d':
Sample code for RSSI callbacks on wifi.
5114ec4642ac9624c68aead71dd7b741e27262e7 13-Jul-2015 Erik Kline <ek@google.com> Don't ignore our own default values

Bug: 21407651
Change-Id: I5cd13c460a439a8345efb64f3418dd526660ac89
ndroid/server/wifi/WifiStateMachine.java
19d764282b423ca65aec084bebe5d9bb89dfcc07 11-Jul-2015 Prerepa Viswanadham <dham@google.com> Fix build

Change-Id: I02eb29bca90c6bb507511f9e9ad7dec97411ffe0
ndroid/server/wifi/WifiStateMachine.java
aed5cb65d8eefb2eee56a29e33ac3cd8b03312e7 10-Jul-2015 Prerepa Viswanadham <dham@google.com> RSSI monitoring in Wifi state machine

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

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

Bug: 21405946
Change-Id: If7fe4b25bf294f808b99b1e1f25e8a7a62817ef7
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
50de00cb49bb5110b5e9a75058468e68f1368f8d 18-Jul-2015 Prerepa Viswanadham <dham@google.com> Merge "Sample code for RSSI callbacks on wifi." into mnc-dr-dev
5730605bb29ce630a0ab6611ea3a04ba6553c2d5 18-Jul-2015 xinhe <xinhe@google.com> am 266f3111: Merge "Add API to turn OFF "best network selection" feature" into mnc-dev

* commit '266f3111427002d10ffd85fcea828a2725e540de':
Add API to turn OFF "best network selection" feature
e96078fd4764526c6ab245aac1e763016f00eab3 18-Jul-2015 xinhe <xinhe@google.com> am 266f3111: Merge "Add API to turn OFF "best network selection" feature" into mnc-dev

* commit '266f3111427002d10ffd85fcea828a2725e540de':
Add API to turn OFF "best network selection" feature
266f3111427002d10ffd85fcea828a2725e540de 18-Jul-2015 xinhe <xinhe@google.com> Merge "Add API to turn OFF "best network selection" feature" into mnc-dev
ea3db156b75f448d8a63dc75bd7ce310e607da96 17-Jul-2015 Jan Nordqvist <jannq@google.com> am a9ca951e: Merge "Passpoint: Realm or PLMN match should promote SP match to Roaming" into mnc-dev

* commit 'a9ca951ea5ddd4159ca709f762b224172501e4f1':
Passpoint: Realm or PLMN match should promote SP match to Roaming
a562928cd4969896b56d555198658bdc6fbf3518 17-Jul-2015 Jan Nordqvist <jannq@google.com> am a9ca951e: Merge "Passpoint: Realm or PLMN match should promote SP match to Roaming" into mnc-dev

* commit 'a9ca951ea5ddd4159ca709f762b224172501e4f1':
Passpoint: Realm or PLMN match should promote SP match to Roaming
a9ca951ea5ddd4159ca709f762b224172501e4f1 17-Jul-2015 Jan Nordqvist <jannq@google.com> Merge "Passpoint: Realm or PLMN match should promote SP match to Roaming" into mnc-dev
e1e95ff407e7d5654f9b753ced04ff6ae8137d59 08-Jul-2015 Lorenzo Colitti <lorenzo@google.com> Sample code for RSSI callbacks on wifi.

Bug: 21405941
Change-Id: I08961e766e0ab3872d90868b882e4e2e24ab0c03
ndroid/server/wifi/WifiStateMachine.java
55d79585463b7b2c99e7e0ef97f1e44e62898a96 17-Jul-2015 Vinit Deshpande <vinitd@google.com> am af5b4988: Synchronize getScanCapabilities() with other commands

* commit 'af5b49884f189bb171c9dc6c6a4405d97e7912ac':
Synchronize getScanCapabilities() with other commands
f0a605f355cd1425bf2a3e92a4d78a271045574a 16-Jul-2015 Vinit Deshpande <vinitd@google.com> am af5b4988: Synchronize getScanCapabilities() with other commands

* commit 'af5b49884f189bb171c9dc6c6a4405d97e7912ac':
Synchronize getScanCapabilities() with other commands
c2db1a4ff61fdf72be070e0c1cb739e755760bf3 16-Jul-2015 Jan Nordqvist <jannq@google.com> Passpoint: Realm or PLMN match should promote SP match to Roaming

Bug: 22531732
Change-Id: Ie695b0e9c70abe50e26e5bcf516d382c90b7aa87
ndroid/server/wifi/anqp/NAIRealmData.java
ndroid/server/wifi/anqp/NAIRealmElement.java
ndroid/server/wifi/anqp/eap/EAPMethod.java
ndroid/server/wifi/hotspot2/AuthMatch.java
ndroid/server/wifi/hotspot2/pps/HomeSP.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
ndroid/server/wifi/WifiNative.java
4a2f6028419315f3b104b1a488136774c6907794 16-Jul-2015 Jan Nordqvist <jannq@google.com> am 4aef3283: Fixed incorrect network validation.

* commit '4aef3283bf78e233a11fa34af2c7c38362879625':
Fixed incorrect network validation.
423f02272e956f6836198996e8f862eee703624a 16-Jul-2015 Jan Nordqvist <jannq@google.com> am 4aef3283: Fixed incorrect network validation.

* commit '4aef3283bf78e233a11fa34af2c7c38362879625':
Fixed incorrect network validation.
4aef3283bf78e233a11fa34af2c7c38362879625 16-Jul-2015 Jan Nordqvist <jannq@google.com> Fixed incorrect network validation.

Bug: 22490051
Change-Id: I2d9a39502a10170bb452766fb9078939225dba2e
ndroid/server/wifi/WifiServiceImpl.java
d40902df46e1bc3784e52fb59d54c84ead9d60fa 16-Jul-2015 Jan Nordqvist <jannq@google.com> am 026d97e4: Merge "Added dump of ANQP cache to bugreport." into mnc-dev

* commit '026d97e484da6d2dd01f2e3d39d0e214170293f0':
Added dump of ANQP cache to bugreport.
f331075eb4fa3f663746d885cf7c311371e51547 16-Jul-2015 Jan Nordqvist <jannq@google.com> am 026d97e4: Merge "Added dump of ANQP cache to bugreport." into mnc-dev

* commit '026d97e484da6d2dd01f2e3d39d0e214170293f0':
Added dump of ANQP cache to bugreport.
026d97e484da6d2dd01f2e3d39d0e214170293f0 16-Jul-2015 Jan Nordqvist <jannq@google.com> Merge "Added dump of ANQP cache to bugreport." into mnc-dev
a8647b8cb29de22765062714cb265247234c3d32 10-Jul-2015 xinhe <xinhe@google.com> Add API to turn OFF "best network selection" feature

b/14990268

Change-Id: Ifa96a08f4bf9868afc8ddc88e178fc6375e70f8b
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
b374c15f2cfcc25830a7f11e98621c5adbae5619 15-Jul-2015 xinhe <xinhe@google.com> am 98c49c03: Merge "Need to disable 5GHz bands for WiFi tethering in Japan Also fix the wificontroller dose not update state if Softap start failed. This will block further enable STA or re-enable AP." into mnc-dev

* commit '98c49c031b5f0d6d28068aa738d32f952ea6c8cf':
Need to disable 5GHz bands for WiFi tethering in Japan Also fix the wificontroller dose not update state if Softap start failed. This will block further enable STA or re-enable AP.
53f8182196482a0a3c35dee72c7aa947eea1d7ee 15-Jul-2015 xinhe <xinhe@google.com> am 98c49c03: Merge "Need to disable 5GHz bands for WiFi tethering in Japan Also fix the wificontroller dose not update state if Softap start failed. This will block further enable STA or re-enable AP." into mnc-dev

* commit '98c49c031b5f0d6d28068aa738d32f952ea6c8cf':
Need to disable 5GHz bands for WiFi tethering in Japan Also fix the wificontroller dose not update state if Softap start failed. This will block further enable STA or re-enable AP.
6c09f82f502ed1f1344437617b0bc25f89e48d86 15-Jul-2015 Fyodor Kupolov <fkupolov@google.com> am 4ea0748b: Merge "Block results if location is disabled in Settings" into mnc-dev

* commit '4ea0748bf5f8028a7766f9eb694a2eb3ef7bcf57':
Block results if location is disabled in Settings
98c49c031b5f0d6d28068aa738d32f952ea6c8cf 15-Jul-2015 xinhe <xinhe@google.com> Merge "Need to disable 5GHz bands for WiFi tethering in Japan Also fix the wificontroller dose not update state if Softap start failed. This will block further enable STA or re-enable AP." into mnc-dev
db2c70445b3c5ef5742bfcdbdfdbeafe4a40787b 15-Jul-2015 Fyodor Kupolov <fkupolov@google.com> am 4ea0748b: Merge "Block results if location is disabled in Settings" into mnc-dev

* commit '4ea0748bf5f8028a7766f9eb694a2eb3ef7bcf57':
Block results if location is disabled in Settings
9f7795c694d048fdfecc4117cf5ddbd3e6ae1406 14-Jul-2015 Jan Nordqvist <jannq@google.com> Added dump of ANQP cache to bugreport.

Bug: 22410118
Change-Id: Ibc396ecf779087473f5fee0db732baf3ece16aab
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/hotspot2/ANQPData.java
ndroid/server/wifi/hotspot2/AnqpCache.java
4ea0748bf5f8028a7766f9eb694a2eb3ef7bcf57 14-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Merge "Block results if location is disabled in Settings" into mnc-dev
f08fd3ea3fda7a74f20fa6bf0a7f77798672e053 14-Jul-2015 Vinit Deshpande <vinitd@google.com> am f33245e1: Merge "Allowing rewrite of Passpoint credential." into mnc-dev

* commit 'f33245e1755794a0b6f1b8bfa7376ead57e68b53':
Allowing rewrite of Passpoint credential.
588e4ba694aba1b5b34aa2596809d8fa80ecb59d 14-Jul-2015 xinhe <xinhe@google.com> Need to disable 5GHz bands for WiFi tethering in Japan
Also fix the wificontroller dose not update state if Softap
start failed. This will block further enable STA or
re-enable AP.

b/22396383

Change-Id: Idb920a79bba7078cda3493211fd4108560dd261d
ndroid/server/wifi/WifiController.java
ndroid/server/wifi/WifiStateMachine.java
97fca972c995a3eb7cc8632ba6cf1c4626205ecc 14-Jul-2015 Vinit Deshpande <vinitd@google.com> am f33245e1: Merge "Allowing rewrite of Passpoint credential." into mnc-dev

* commit 'f33245e1755794a0b6f1b8bfa7376ead57e68b53':
Allowing rewrite of Passpoint credential.
f33245e1755794a0b6f1b8bfa7376ead57e68b53 14-Jul-2015 Vinit Deshpande <vinitd@google.com> Merge "Allowing rewrite of Passpoint credential." into mnc-dev
2812e1e19291d4f0dbabf7fe23d031d8cd641830 10-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Block results if location is disabled in Settings

Bug: 21852542, 22389679
Change-Id: Ia84b209167308b65387153d37c5e51fb71083fb2
ndroid/server/wifi/WifiServiceImpl.java
75551d3fd0effa88131be1d8cfbe47a6e34f20da 10-Jul-2015 Vinit Deshpande <vinitd@google.com> am 0401bed8: Merge "Capture an additional report when user captures a bugreport" into mnc-dev

* commit '0401bed81a8a4ed5b6459dc0b3063aca14827bd7':
Capture an additional report when user captures a bugreport
32044fca97fb7ea60ee55e4527a891d6472440d2 10-Jul-2015 Vinit Deshpande <vinitd@google.com> am 0401bed8: Merge "Capture an additional report when user captures a bugreport" into mnc-dev

* commit '0401bed81a8a4ed5b6459dc0b3063aca14827bd7':
Capture an additional report when user captures a bugreport
0401bed81a8a4ed5b6459dc0b3063aca14827bd7 10-Jul-2015 Vinit Deshpande <vinitd@google.com> Merge "Capture an additional report when user captures a bugreport" into mnc-dev
83e4b27d653d5413eac4a87313df395c72ebd8ee 10-Jul-2015 Prem Kumar <premk@google.com> am ceca87b7: Merge "Added guard around IMSI parameter." into mnc-dev

* commit 'ceca87b79c38c6ef7aeb2a4728e8b82e4fcdb4ac':
Added guard around IMSI parameter.
c3231a1d9c4b124e51ff7bb99c5480c6c1d86e67 10-Jul-2015 Prem Kumar <premk@google.com> am ceca87b7: Merge "Added guard around IMSI parameter." into mnc-dev

* commit 'ceca87b79c38c6ef7aeb2a4728e8b82e4fcdb4ac':
Added guard around IMSI parameter.
9a41261e4f688411a7038781ca959b2007965f06 09-Jul-2015 Vinit Deshpande <vinitd@google.com> Capture an additional report when user captures a bugreport

Currently, all ringbuffer data and memory dump are captured when
an error is discovered. But that leaves a lot of scenarios
where we don't have this data. This change captures this data
on each dupmsys operation as well.

This change also captures firmware memory dump to debug
additional problems.

Bug: 22390445

Change-Id: I1fab1dacc4b11287697e9b7d97670bebc4c4bac5
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiStateMachine.java
ceca87b79c38c6ef7aeb2a4728e8b82e4fcdb4ac 10-Jul-2015 Prem Kumar <premk@google.com> Merge "Added guard around IMSI parameter." into mnc-dev
640187cb348201ed63820cfcb66bdfc1f19cdcc8 10-Jul-2015 Jan Nordqvist <jannq@google.com> Added guard around IMSI parameter.

Bug: 22388499
Change-Id: If68165b8d89f369d83c9d6d19896d1802805cef7
ndroid/server/wifi/ConfigurationMap.java
39dc3af67b55e5472b0bbf11ce5932f7496a15d8 09-Jul-2015 Jan Nordqvist <jannq@google.com> Allowing rewrite of Passpoint credential.

Bug: 21779835
Change-Id: I4f1e265bbf222b64935613ef8fa1519a54aab0f8
ndroid/server/wifi/WifiConfigStore.java
a75273a202e3b0d22a254abf2f51d0880635723d 09-Jul-2015 Fyodor Kupolov <fkupolov@google.com> am aca3b874: Merge "Check location permission/appop in getScanResults" into mnc-dev

* commit 'aca3b874dfcf503a7de41d13be449557369116ef':
Check location permission/appop in getScanResults
575ff3d863319a19a5ea20925d5a4a6b266ea148 09-Jul-2015 Fyodor Kupolov <fkupolov@google.com> am aca3b874: Merge "Check location permission/appop in getScanResults" into mnc-dev

* commit 'aca3b874dfcf503a7de41d13be449557369116ef':
Check location permission/appop in getScanResults
aca3b874dfcf503a7de41d13be449557369116ef 09-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Merge "Check location permission/appop in getScanResults" into mnc-dev
85964a7ee402dda831e2d78898c872b317d21ff7 09-Jul-2015 Navtej Singh Mann <navtejsingh@google.com> am d2b8f8b2: Merge "Use device capabilities for setting default scan parameters" into mnc-dev

* commit 'd2b8f8b2467928aee672382bc95e3be76235d186':
Use device capabilities for setting default scan parameters
a9345fe9947682d4a5a4e0bc576dc760a15293a6 09-Jul-2015 Navtej Singh Mann <navtejsingh@google.com> am d2b8f8b2: Merge "Use device capabilities for setting default scan parameters" into mnc-dev

* commit 'd2b8f8b2467928aee672382bc95e3be76235d186':
Use device capabilities for setting default scan parameters
d2b8f8b2467928aee672382bc95e3be76235d186 09-Jul-2015 Navtej Singh Mann <navtejsingh@google.com> Merge "Use device capabilities for setting default scan parameters" into mnc-dev
98819c29b449d95c057b8f89e5984f2fabacb1fd 08-Jul-2015 Vinit Deshpande <vinitd@google.com> am 4e17f1cf: Merge "Add information in logs about lost wifi networks" into mnc-dev

* commit '4e17f1cf17db8a1e22e69367257d1e288ee880d0':
Add information in logs about lost wifi networks
49439ff84c31efb3cabca214705fd8dced99acbc 08-Jul-2015 Vinit Deshpande <vinitd@google.com> am 4e17f1cf: Merge "Add information in logs about lost wifi networks" into mnc-dev

* commit '4e17f1cf17db8a1e22e69367257d1e288ee880d0':
Add information in logs about lost wifi networks
4e17f1cf17db8a1e22e69367257d1e288ee880d0 08-Jul-2015 Vinit Deshpande <vinitd@google.com> Merge "Add information in logs about lost wifi networks" into mnc-dev
538fac5da0097cf893f0bbb19e99132fef91df7d 08-Jul-2015 Navtej Singh Mann <navtejsingh@google.com> Use device capabilities for setting default scan parameters

Bug: 22233853
Change-Id: Ib34863cdc24a2396e15aadfb4a77d262efb07ca1
ndroid/server/wifi/WifiScanningServiceImpl.java
f5cf5c05f61e5003dd04ccd2a3d55e7b927bef83 07-Jul-2015 xin He <xinhe@google.com> am c87ac34c: Merge "wifi: Fix softAP turn-ON issue in statically linked driver" into mnc-dev

* commit 'c87ac34c595f06504665be11faa97884ee2852af':
wifi: Fix softAP turn-ON issue in statically linked driver
56a132f286849c5730aba2c555f5e323054b08cf 07-Jul-2015 xin He <xinhe@google.com> am c87ac34c: Merge "wifi: Fix softAP turn-ON issue in statically linked driver" into mnc-dev

* commit 'c87ac34c595f06504665be11faa97884ee2852af':
wifi: Fix softAP turn-ON issue in statically linked driver
c87ac34c595f06504665be11faa97884ee2852af 07-Jul-2015 xin He <xinhe@google.com> Merge "wifi: Fix softAP turn-ON issue in statically linked driver" into mnc-dev
699828f0f5b3bcb8d54a3196d325abe78dc4ae22 07-Jul-2015 Jan Nordqvist <jannq@google.com> am 07f11f6f: Reworked code to allow wildcard prefix IMSIs.

* commit '07f11f6f2ee7ec17cb08180035dfb5002aaaf5df':
Reworked code to allow wildcard prefix IMSIs.
299e2bf3b5e8a80747f39fad3def91b59cd9c399 07-Jul-2015 Jan Nordqvist <jannq@google.com> am 07f11f6f: Reworked code to allow wildcard prefix IMSIs.

* commit '07f11f6f2ee7ec17cb08180035dfb5002aaaf5df':
Reworked code to allow wildcard prefix IMSIs.
84649ea634d480be6bee19f155a1da5a4ec93e60 07-Jul-2015 Vinit Deshpande <vinitd@google.com> Add information in logs about lost wifi networks

We have multiple files of interest; this change dumps them
all if we lose networks.

Change-Id: Ie80085834b0dfe7d1c0480fdeac013e7293c6d2c
ndroid/server/wifi/WifiConfigStore.java
07f11f6f2ee7ec17cb08180035dfb5002aaaf5df 18-Jun-2015 Jan Nordqvist <jannq@google.com> Reworked code to allow wildcard prefix IMSIs.

Change-Id: I08b7addb8dd407d9fc4f8a32a1fd2f86edde0e7a
ndroid/server/wifi/ConfigurationMap.java
ndroid/server/wifi/IMSIParameter.java
ndroid/server/wifi/SIMAccessor.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/anqp/CellularNetwork.java
ndroid/server/wifi/anqp/NAIRealmData.java
ndroid/server/wifi/anqp/NAIRealmElement.java
ndroid/server/wifi/anqp/eap/EAPMethod.java
ndroid/server/wifi/configparse/ConfigBuilder.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
ndroid/server/wifi/hotspot2/pps/Credential.java
ndroid/server/wifi/hotspot2/pps/HomeSP.java
e87a8da7bb513ca720b0160e3bff8c9f355faabb 20-Jun-2015 Fyodor Kupolov <fkupolov@google.com> Check location permission/appop in getScanResults

Return an empty list if the calling process has no location permission/appop

Bug: 21852542
Change-Id: I0811a497327451c6a1527a3d041eeb8b7e2c81a0
ndroid/server/wifi/WifiServiceImpl.java
549b97948785dd9a51a4837fbe86a0b77410bb3b 02-Jul-2015 Pierre Vandwalle <vandwalle@google.com> am b9766f51: Merge changes I03899867,I225e875d into mnc-dev

* commit 'b9766f51bcbd50f178d2c20d61f3d631c699b836':
restart PNO/AutoJoinOffload when a network gets disabled Bug:22062116
add HS20 event strings to the WifiStateMachine logs
41efceef67f2b82908ffc4a4a44c37e5f865b0ca 02-Jul-2015 Vinit Deshpande <vinitd@google.com> am 7e6573a1: Dump multicast lock holders in bugreport

* commit '7e6573a1866812a302c1bfd224a2ed2d5633259f':
Dump multicast lock holders in bugreport
d47b132da465adebb4336329d287de1204d364fe 02-Jul-2015 Vinit Deshpande <vinitd@google.com> am f480e3b4: Merge "Use wifi_reset_log_handler to stop logging" into mnc-dev

* commit 'f480e3b42686d28eaf4b11474969875d65ac2023':
Use wifi_reset_log_handler to stop logging
231a96e57abf245ce558e19e32cc69e96dc0056b 02-Jul-2015 Vinit Deshpande <vinitd@google.com> am a07f06cc: Merge "Fixed bad check for Passpoint being enabled." into mnc-dev

* commit 'a07f06ccec5576e99e2c2c213ceb84cd1425e3fb':
Fixed bad check for Passpoint being enabled.
4b70fae9ca77ba69e5f64894e99b66e163d2496d 02-Jul-2015 Vinit Deshpande <vinitd@google.com> am c0d8226f: More API review feedback

* commit 'c0d8226ffa0e51c143271fead90dd3e8c6594d01':
More API review feedback
3d7490b9b4dadffb7d5e70736108d39db0cf504f 29-Jun-2015 Ravi Joshi <ravij@codeaurora.org> wifi: Fix softAP turn-ON issue in statically linked driver

SoftAP fails to turn-ON on some statically linked driver architectures
in which the interfaces are not available until firmware is reloaded
in the AP mode. The change provides the fix for this issue by loading
the firmware ahead of time to enable to driver to create wlan0 interface.

b/22236507

Change-Id: Icf13184df315c4be8b63024fafe772f0d9c8718b
ndroid/server/wifi/WifiStateMachine.java
b9766f51bcbd50f178d2c20d61f3d631c699b836 01-Jul-2015 Pierre Vandwalle <vandwalle@google.com> Merge changes I03899867,I225e875d into mnc-dev

* changes:
restart PNO/AutoJoinOffload when a network gets disabled Bug:22062116
add HS20 event strings to the WifiStateMachine logs
7e6573a1866812a302c1bfd224a2ed2d5633259f 01-Jul-2015 Vinit Deshpande <vinitd@google.com> Dump multicast lock holders in bugreport

Change-Id: I8108b05e0728cfa468d36002c2a1fe578e537c34
ndroid/server/wifi/WifiServiceImpl.java
f480e3b42686d28eaf4b11474969875d65ac2023 01-Jul-2015 Vinit Deshpande <vinitd@google.com> Merge "Use wifi_reset_log_handler to stop logging" into mnc-dev
a07f06ccec5576e99e2c2c213ceb84cd1425e3fb 01-Jul-2015 Vinit Deshpande <vinitd@google.com> Merge "Fixed bad check for Passpoint being enabled." into mnc-dev
c0d8226ffa0e51c143271fead90dd3e8c6594d01 30-Jun-2015 Vinit Deshpande <vinitd@google.com> More API review feedback

ScanResult now hides all flags and their values, only methods
are public; and converted roaming consortium to an array of longs
instead of Longs.

Bug: 22179306

Change-Id: I644110dbddd5fa7a7109ac16051845fcc4c4e9d1
ndroid/server/wifi/ConfigurationMap.java
ndroid/server/wifi/configparse/ConfigBuilder.java
1816209b3c52f1debacd275aec2148cd89ff3444 01-Jul-2015 Pierre Vandwalle <vandwalle@google.com> restart PNO/AutoJoinOffload when a network gets disabled
Bug:22062116

Change-Id: I03899867b1ecfa6985ad57e0ccba8c4e1c9aa5b6
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
b797893fc1966803d0c013faac42e6396a37a384 26-Jun-2015 xinhe <xinhe@google.com> Use wifi_reset_log_handler to stop logging

b/22098062

Change-Id: I6bc701ba81a9dad323403a39e3cb385153d2ed88
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiNative.java
35871a9e772c24d409518a3a92232afd590a1af3 30-Jun-2015 Zoltan Szatmary-Ban <szatmz@google.com> am 80270e91: Merge "Clear WiFi bitset variables before reading them from supplicant" into mnc-dev

* commit '80270e911b86a78f7512fed4ad1172c8034b7159':
Clear WiFi bitset variables before reading them from supplicant
80270e911b86a78f7512fed4ad1172c8034b7159 30-Jun-2015 Zoltan Szatmary-Ban <szatmz@google.com> Merge "Clear WiFi bitset variables before reading them from supplicant" into mnc-dev
9d83ed3f43eee232160fb9547338928ce0f8828b 30-Jun-2015 Erik Kline <ek@google.com> am b9084191: Merge "Prune unreachable DNS servers during makeLinkProperties()" into mnc-dev

* commit 'b908419110e3fce25632e27da1c577a345ec01fd':
Prune unreachable DNS servers during makeLinkProperties()
b908419110e3fce25632e27da1c577a345ec01fd 30-Jun-2015 Erik Kline <ek@google.com> Merge "Prune unreachable DNS servers during makeLinkProperties()" into mnc-dev
83e653cbdcb944038927e4c25837895626354e61 26-Jun-2015 Jan Nordqvist <jannq@google.com> Fixed bad check for Passpoint being enabled.

Bug: 21170278
Change-Id: Id4bee1851ace4673688bc0087e9c4fe40f66c25f
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
a32bb77d2edbaafe2c76f1f1723d595900e76c09 30-Jun-2015 Vinit Deshpande <vinitd@google.com> am 48cf05de: Merge "Fix potential system crash beacuse of bad Wifi parsing" into mnc-dev

* commit '48cf05de203ced8a11aebe38da58c48ea9952082':
Fix potential system crash beacuse of bad Wifi parsing
48cf05de203ced8a11aebe38da58c48ea9952082 30-Jun-2015 Vinit Deshpande <vinitd@google.com> Merge "Fix potential system crash beacuse of bad Wifi parsing" into mnc-dev
36c1dce4cc0a26b456a17becb7b0745f533d2b58 30-Jun-2015 Pierre Vandwalle <vandwalle@google.com> add HS20 event strings to the WifiStateMachine logs

Change-Id: I225e875dce6b63df872f32c7b0525560f65e4027
ndroid/server/wifi/WifiStateMachine.java
2ecfc4b85ef5db62228e69e96a289545c3471a81 29-Jun-2015 Pierre Vandwalle <vandwalle@google.com> am 2a4b11b8: Merge "print kernel time for all messages" into mnc-dev

* commit '2a4b11b86792fc9092daf0f685d29820ee44ea19':
print kernel time for all messages
fb80c4e9859161ba3492b79f485b9e554177c8c1 29-Jun-2015 Vinit Deshpande <vinitd@google.com> Fix potential system crash beacuse of bad Wifi parsing

WifiMonitor may throw an exception on some malformed events
taking the entire system down. This change gauards against
such crash.

Bug: 17698782
Change-Id: Ib855419c5ed24ec174889185c4d0b450403778de
ndroid/server/wifi/WifiMonitor.java
2a4b11b86792fc9092daf0f685d29820ee44ea19 29-Jun-2015 Pierre Vandwalle <vandwalle@google.com> Merge "print kernel time for all messages" into mnc-dev
f4c48cbf965d334f319393707b59c6a19149a87c 29-Jun-2015 Erik Kline <ek@google.com> Prune unreachable DNS servers during makeLinkProperties()

Bug: 20733156
Change-Id: Idc61376f25d7b51e2a649f3bc1d8a229cb4a7f95
ndroid/server/wifi/WifiStateMachine.java
c589b79dbf7c22e7eb92109551267451fbf8841a 27-Jun-2015 Vinit Deshpande <vinitd@google.com> am a9d408b2: Merge "Re-enable Driver/Firmware based logs" into mnc-dev

* commit 'a9d408b279235dc1f5f8dbf513ae932d56e2c0e9':
Re-enable Driver/Firmware based logs
a9d408b279235dc1f5f8dbf513ae932d56e2c0e9 27-Jun-2015 Vinit Deshpande <vinitd@google.com> Merge "Re-enable Driver/Firmware based logs" into mnc-dev
03d6b9c9942adba095f90c547a8e5a19cd5bebdb 27-Jun-2015 Shirish Kalele <kalele@google.com> am 1efb8a06: Merge "Surface ephemeralness of connection in WifiInfo." into mnc-dev

* commit '1efb8a06775f612c57603a8107ffe87f0ae90b29':
Surface ephemeralness of connection in WifiInfo.
1efb8a06775f612c57603a8107ffe87f0ae90b29 26-Jun-2015 Shirish Kalele <kalele@google.com> Merge "Surface ephemeralness of connection in WifiInfo." into mnc-dev
473b3bc83b29d6ded68e57e28b66a426903a24eb 26-Jun-2015 Pierre Vandwalle <vandwalle@google.com> print kernel time for all messages

Change-Id: Ibae85a2d182b7d7d7246956d0f96afcbc477eaf6
ndroid/server/wifi/WifiStateMachine.java
6414301b7b685307e8ae8cea6976ed05cc49b254 25-Jun-2015 Vinit Deshpande <vinitd@google.com> Re-enable Driver/Firmware based logs

Change-Id: If2c929a1156d936ac1a17681d1f171ae1f9dd1bf
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiNative.java
86b1b52530bba4a35e81bd7c5d7d52139fa0c822 25-Jun-2015 Shirish Kalele <kalele@google.com> Surface ephemeralness of connection in WifiInfo.

Bug: 21960219
Change-Id: I3d63633fcb30785328d030660951f9e96f0e53ad
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
0fc0c775fb6a493569d51b30020246e9efc000d0 25-Jun-2015 Amarnath Hullur Subramanyam <amarnath@codeaurora.org> am 87e2455e: Wifi: Exit the monitor thread when killSupplicant is issued.

* commit '87e2455ee2a232db01029a93edea179528d1a5c2':
Wifi: Exit the monitor thread when killSupplicant is issued.
c7198df99b1b0176715911de51f5ce76bd446f7f 25-Jun-2015 xin He <xinhe@google.com> am 73375507: Merge "wifi : Fix for Wi-Fi grayed out issue" into mnc-dev

* commit '733755071170d0918ecb856481525b274a75d3e0':
wifi : Fix for Wi-Fi grayed out issue
87e2455ee2a232db01029a93edea179528d1a5c2 09-Jun-2015 Amarnath Hullur Subramanyam <amarnath@codeaurora.org> Wifi: Exit the monitor thread when killSupplicant is issued.

When Wifi is turned off, WifiStateMachine issues terminate command
to the supplicant and waits for the event CTRL-EVENT-TERMINATING.
On receiving this TERMINTING event, WifiMonitor stops further monitoring
of events. In some instances, WifiMonitor fails to receive the event
CTRL-EVENT-TERMINATING and subsequently when Wifi framework times out it
kills the supplicant.
But this recovery logic has an issue where even though the supplicant is
killed, the monitor thread is not stopped from listening the events and
WifiMonitor continues looking for the events. Since at the time of killing
the supplicant monitor_conn is initialized to NULL, internally fabricated
WPA_EVENT_TERMINATING event is issued by the framework. This again leads
to the deinitialization of the wlan0 / p2p0 interfaces while the process
of initialization is in progress. This leads to concurrent actions of
supplicant connection closure and command execution on the control socket.
But wpa control interface library is not designed to concurrently handle
activities on the control and monitor sockets.
To solve this issue, exit the monitor thread when Wifi framework kills
the supplicant explicitly (mConnected is set to FALSE).

b/21899315

Change-Id: Ie22447d5ce73fb0a22da309cca69a620f1974368
ndroid/server/wifi/WifiMonitor.java
733755071170d0918ecb856481525b274a75d3e0 25-Jun-2015 xin He <xinhe@google.com> Merge "wifi : Fix for Wi-Fi grayed out issue" into mnc-dev
6ae1a88c51b9db16ce82b4f4752cca54e961be51 05-Jun-2015 Sunil Dutt <usdutt@codeaurora.org> wifi : Fix for Wi-Fi grayed out issue

During the initialization, WiFiMonitor shall try to open the
control/monitor socket interface with the supplicant.On a
failed attempt to open the control interface, WiFiMonitor
thread shall trigger an event SUP_DISCONNECTION_EVENT to
WiFiStateMachine with the expectation that the connection
attempt restarts.In addition,it also removes the interface
from the mIfaceMap.During the restart,WiFiMonitor does not
proceed to open the control interface with the supplicant
if the mIfaceMap does not point to the interface. Thus,do
not remove the interface from mIfaceMap on a failed attempt
to create a control interface with the supplicant to
provision a reinitialization attempt.

b/18798914
Change-Id: Iefb8942a7561699557ea21cb87f4754da024139a
ndroid/server/wifi/WifiMonitor.java
725004d112bb6fb87888f28098abae6b4ba7c9e0 24-Jun-2015 Jeremy Joslin <jjoslin@google.com> am 78638d80: Merge "Protect from NPEs." into mnc-dev

* commit '78638d80490e95beb62f46f47f9c98d357830064':
Protect from NPEs.
78638d80490e95beb62f46f47f9c98d357830064 24-Jun-2015 Jeremy Joslin <jjoslin@google.com> Merge "Protect from NPEs." into mnc-dev
9a24f0203bcf9a19419cc00294275449c87dacde 24-Jun-2015 Pierre Vandwalle <vandwalle@google.com> am 36375b66: Merge "prevent calling WifiNEtworkScoreCache.java with null scan result Bug:21957885" into mnc-dev

* commit '36375b663fcb5d3deb0119359b03623717d933aa':
prevent calling WifiNEtworkScoreCache.java with null scan result Bug:21957885
127a2b56e232b7c4f378160a18501113c5fdca11 24-Jun-2015 Jan Nordqvist <jannq@google.com> am 903814ca: Merge "Fixed ArrayIndexOutOfBounds and some more sanity in NetworkDetail." into mnc-dev

* commit '903814ca886b4a090816216d5e8464b65b0121c9':
Fixed ArrayIndexOutOfBounds and some more sanity in NetworkDetail.
36375b663fcb5d3deb0119359b03623717d933aa 24-Jun-2015 Pierre Vandwalle <vandwalle@google.com> Merge "prevent calling WifiNEtworkScoreCache.java with null scan result Bug:21957885" into mnc-dev
903814ca886b4a090816216d5e8464b65b0121c9 24-Jun-2015 Jan Nordqvist <jannq@google.com> Merge "Fixed ArrayIndexOutOfBounds and some more sanity in NetworkDetail." into mnc-dev
be24c9af85b8a6e02b24582418a4608e14396f2a 23-Jun-2015 Jan Nordqvist <jannq@google.com> Fixed ArrayIndexOutOfBounds and some more sanity in NetworkDetail.

Bug: 20304261
Change-Id: I4951b5274d148b1c4848363f915d278fbaa1f7c9
ndroid/server/wifi/hotspot2/NetworkDetail.java
be4d4bfef88bb0870e1e8bb464c302a2e54bbed4 23-Jun-2015 Pierre Vandwalle <vandwalle@google.com> prevent calling WifiNEtworkScoreCache.java with null scan result
Bug:21957885

Change-Id: I94039a4f0dd87249a4a431aa3f7c7769713843f4
ndroid/server/wifi/WifiAutoJoinController.java
086e68a257abf43dc999433b4de00cd896c06d3a 23-Jun-2015 Jeremy Joslin <jjoslin@google.com> Protect from NPEs.

Protect against possible NPEs in both buildNetworkKey() methods.

BUG:21957885
Change-Id: I6e1ab7ec0d67432470addc29aab3c68cbe005920
ndroid/server/wifi/WifiNetworkScoreCache.java
2a76a286cdb57e0ed4f2e7c87b55b3bc1a2294c9 23-Jun-2015 Zoltan Szatmary-Ban <szatmz@google.com> am b724ba81: Merge "Respect all factors in determining editability of a WiFi config" into mnc-dev

* commit 'b724ba818fa8ba5c2887de16250ff46193b0d9ea':
Respect all factors in determining editability of a WiFi config
b724ba818fa8ba5c2887de16250ff46193b0d9ea 23-Jun-2015 Zoltan Szatmary-Ban <szatmz@google.com> Merge "Respect all factors in determining editability of a WiFi config" into mnc-dev
ef5ca2b857f2661c7567a8d91676541f02ee9c8b 23-Jun-2015 Vinit Deshpande <vinitd@google.com> am cd08c5da: Merge "Address API review comments" into mnc-dev

* commit 'cd08c5daab08121d7f4ffc211ce477a412247bc4':
Address API review comments
72ef16c25571a764fa62adabade6f30501fc6497 23-Jun-2015 Vinit Deshpande <vinitd@google.com> am ea6ffb26: Merge "am 364f83d..034205e from mirror-m-wireless-internal-release" into mnc-dev

* commit 'ea6ffb2628c850ab1ef524a10069b9aa6f9798be':
Added config_wifi_hotspot2_enabled.
dont optimize the pno set/clear commands since framework and driver can get out of sync Bug:21734054
add creation/update time to WifiConfiguration fix carry over of validatedInternetAccess Bug:21390908
make sure ephemeral config are written to file Bug:21293078
Support 32 channels from different band per bucket for scanning
Separated auth checking from SP matching.
call setWifiLinkLayerStats Bug:21617639
Missing final keyword.
ANQP cache sweeping.
make sure validatedInternetAccess boolean is written to disk right away Bug:21390908
dont keep bad link score due to txerrors for too long
cd08c5daab08121d7f4ffc211ce477a412247bc4 23-Jun-2015 Vinit Deshpande <vinitd@google.com> Merge "Address API review comments" into mnc-dev
b4ece4e093647267e9b57a5eee2754fa0fc6ae09 23-Jun-2015 Vinit Deshpande <vinitd@google.com> am 364f83d..034205e from mirror-m-wireless-internal-release

034205e Added config_wifi_hotspot2_enabled.
883e4cb Merge "dont optimize the pno set/clear commands since framework and driver can get out of sync Bug:21734054" into m-wireless-dev
2f1c1c7 dont optimize the pno set/clear commands since framework and driver can get out of sync Bug:21734054
d565262 add creation/update time to WifiConfiguration fix carry over of validatedInternetAccess Bug:21390908
40c87db Merge "Support 32 channels from different band per bucket for scanning" into m-wireless-dev
7ee84d8 make sure ephemeral config are written to file Bug:21293078
28fc233 Support 32 channels from different band per bucket for scanning
3baa176 Separated auth checking from SP matching.
486cc89 call setWifiLinkLayerStats Bug:21617639
7a94f84 Missing final keyword.
c465290 ANQP cache sweeping.
890e70d make sure validatedInternetAccess boolean is written to disk right away Bug:21390908

Change-Id: Ibacd79799465f11bd82311391f7a9420e0c50927
cf4fb0f23e3c734832f198400ef51866a3a831a3 22-Jun-2015 Vinit Deshpande <vinitd@google.com> am 5103e301: Merge "Support 32 channels from different band per bucket for scanning" into mnc-dev

* commit '5103e301c3aa2cbfe19d73a22f5ab4d8f548ff3a':
Support 32 channels from different band per bucket for scanning
5103e301c3aa2cbfe19d73a22f5ab4d8f548ff3a 22-Jun-2015 Vinit Deshpande <vinitd@google.com> Merge "Support 32 channels from different band per bucket for scanning" into mnc-dev
554a689e9e2490759c66c7963e26919cab80cc5b 22-Jun-2015 xinhe <xinhe@google.com> am 83c06fcc: Merge "fix SoftAP start failure on deb device" into mnc-dev

* commit '83c06fccd3bb8f3ac748aeee7b774d601f6f54e0':
fix SoftAP start failure on deb device
83c06fccd3bb8f3ac748aeee7b774d601f6f54e0 22-Jun-2015 xinhe <xinhe@google.com> Merge "fix SoftAP start failure on deb device" 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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/ConfigurationMap.java
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/configparse/ConfigBuilder.java
0c853aed098cbdb79694b71b855e99ab150f190b 19-Jun-2015 Pierre Vandwalle <vandwalle@google.com> am 365f5e3b: Merge "make PNO autojoin retries exponential, use elapsedTime instead of upTime for aging out networks Bug:21856344" into mnc-dev

* commit '365f5e3b7221137391949391bde8401e117a0923':
make PNO autojoin retries exponential, use elapsedTime instead of upTime for aging out networks Bug:21856344
365f5e3b7221137391949391bde8401e117a0923 19-Jun-2015 Pierre Vandwalle <vandwalle@google.com> Merge "make PNO autojoin retries exponential, use elapsedTime instead of upTime for aging out networks Bug:21856344" into mnc-dev
7b828c866a69440f6786f4c462ff8b775006a9fa 19-Jun-2015 Adam Lesinski <adamlesinski@google.com> am bbb9dfd2: Merge "Don\'t report internal UIDs to BatteryStats" into mnc-dev

* commit 'bbb9dfd2f4382665d245052693c82a6e0126415f':
Don't report internal UIDs to BatteryStats
5fa961aa35447d2747fb414ad06b701db8e55249 19-Jun-2015 Pierre Vandwalle <vandwalle@google.com> am d9dcc7c6: reload the wifi config when autoconnecting, after updating the config Bug:20299767

* commit 'd9dcc7c6d03a0d93c50bada805ad4047aab8642a':
reload the wifi config when autoconnecting, after updating the config Bug:20299767
cb59612d2af82044ee74e8f595c9a40498db14b4 19-Jun-2015 Pierre Vandwalle <vandwalle@google.com> make PNO autojoin retries exponential, use elapsedTime instead of upTime for aging out networks
Bug:21856344

Change-Id: I99ed09467aba757eb09ceb8e0fe8eaff3fbf5e67
ndroid/server/wifi/ScanDetailCache.java
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiStateMachine.java
bbb9dfd2f4382665d245052693c82a6e0126415f 19-Jun-2015 Adam Lesinski <adamlesinski@google.com> Merge "Don't report internal UIDs to BatteryStats" into mnc-dev
d9dcc7c6d03a0d93c50bada805ad4047aab8642a 19-Jun-2015 Pierre Vandwalle <vandwalle@google.com> reload the wifi config when autoconnecting, after updating the config
Bug:20299767

Change-Id: I41f60c1c91778570d63262c608052eb57e99e3d0
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
fa67e84b51c4e7f334162f06393dc5b767c340a1 19-Jun-2015 Pierre Vandwalle <vandwalle@google.com> am b9795564: Merge "use the scan result timestamp for aging out networks Bug:21936726" into mnc-dev

* commit 'b9795564613a68ede0c590e9637aad68695e320b':
use the scan result timestamp for aging out networks Bug:21936726
b48af9d5884f7f52f25ca1e14ae5f26037399c9c 19-Jun-2015 Pierre Vandwalle <vandwalle@google.com> am 805243ea: Merge " retry autojoin to pno network after a minute Bug:21740448" into mnc-dev

* commit '805243ea08f55f415d70038f7e0bd1d3a45c1c18':
retry autojoin to pno network after a minute Bug:21740448
1a86f1f7c11aaa9070a356ed2606c2a5d8d19adb 27-May-2015 Zoltan Szatmary-Ban <szatmz@google.com> Respect all factors in determining editability of a WiFi config

Also, use creatorUid instead of lastUpdateName in determining
modifiability of config.

Bug: 21427528
Bug: 21150087
Bug: 21612565
Bug: 21887465
Change-Id: I0f8fb72bf9da1597e08d3dfc631d37b6b4178ff5
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
b9795564613a68ede0c590e9637aad68695e320b 19-Jun-2015 Pierre Vandwalle <vandwalle@google.com> Merge "use the scan result timestamp for aging out networks Bug:21936726" into mnc-dev
e3e4fad6e9b2022018a33507e93a39c6446f9916 19-Jun-2015 Pierre Vandwalle <vandwalle@google.com> use the scan result timestamp for aging out networks
Bug:21936726

Change-Id: Icfbae91053663fc7a2ad26a649e2764f5cd5b884
ndroid/server/wifi/ScanDetailCache.java
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiStateMachine.java
f0dacfe3c7f894166e87c8a90ef0a645cebc8996 19-Jun-2015 Adam Lesinski <adamlesinski@google.com> Don't report internal UIDs to BatteryStats

Wifi uses special UIDs in the WorkSource for scanning operations
done on its own accord. BatteryStats has no idea what these are,
so just report the WIFI UID when these special UIDs are encountered.

Bug:21929283
Change-Id: Icd81ae0fec049da1f0cdf0a552aae124212af6f1
ndroid/server/wifi/WifiStateMachine.java
805243ea08f55f415d70038f7e0bd1d3a45c1c18 19-Jun-2015 Pierre Vandwalle <vandwalle@google.com> Merge " retry autojoin to pno network after a minute Bug:21740448" into mnc-dev
0510c350db16f6bd2930f0a5ace483efbfa681d5 18-Jun-2015 Pierre Vandwalle <vandwalle@google.com> retry autojoin to pno network after a minute
Bug:21740448

Change-Id: I50b91da5f7fb23f5e3366c7e7b79811c89314f72
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiStateMachine.java
6471778905e0b92bd7a20d8a82e51c307dd0b96f 13-Jun-2015 Navtej Singh Mann <navtejsingh@google.com> Support 32 channels from different band per bucket for scanning


cherry pick: https://partner-android-review.googlesource.com/#/c/215470/

Change-Id: I773621f87b3544bbf5fc30b47d9b88811339ce11
ndroid/server/wifi/WifiScanningServiceImpl.java
034205ec8ee3d608546ab9327fb650d9a259efad 12-Jun-2015 Jan Nordqvist <jannq@google.com> Added config_wifi_hotspot2_enabled.

Change-Id: I9c48f9ab9698c167b29af887015442e739af4997
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
fdb4e3e460b501148032546ccb8ad633af71faea 18-Jun-2015 Zoltan Szatmary-Ban <szatmz@google.com> Clear WiFi bitset variables before reading them from supplicant

Otherwise if the config that is being filled in may have some bits
already set.
Also refactored repetitive code.

Bug: 21152481
Change-Id: I3506c4b2472577dd355e94d40783c2c1dd31dc98
ndroid/server/wifi/WifiConfigStore.java
2f42fca3b01d6379c487379acfe7f3005978cc74 18-Jun-2015 Zoltan Szatmary-Ban <szatmz@google.com> am a233de4a: Make WiFi network history be actually read

* commit 'a233de4a7978d98b515a6c7c27a45b6b55bde5aa':
Make WiFi network history be actually read
a233de4a7978d98b515a6c7c27a45b6b55bde5aa 12-Jun-2015 Zoltan Szatmary-Ban <szatmz@google.com> Make WiFi network history be actually read

Reintroduced mistakenly removed line in WifiConfigStore.readNetworkHistory
which prevented any of the network history being read from file.

Bug: 20846840
Change-Id: Id98404bd40d48b8ee0fce6f668334460348fb495
ndroid/server/wifi/WifiConfigStore.java
e7721a15949929558a02e577041295b536222d9f 18-Jun-2015 Pierre Vandwalle <vandwalle@google.com> am c97b98d6: dont optimize the pno set/clear commands since framework and driver can get out of sync Bug:21734054

* commit 'c97b98d6877f6603a6a0eee820576f59e7da5e52':
dont optimize the pno set/clear commands since framework and driver can get out of sync Bug:21734054
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
883e4cbb86a7970c568268e254aa2a246c6d12e0 18-Jun-2015 Pierre Vandwalle <vandwalle@google.com> Merge "dont optimize the pno set/clear commands since framework and driver can get out of sync Bug:21734054" into m-wireless-dev
2f1c1c7fec9ebc2ca73c05a479a7669bcc922cf3 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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
0d607e8c0044f1a2843cc8895a8411611e13f6e7 17-Jun-2015 Jan Nordqvist <jannq@google.com> am 866c5b06: Separated auth checking from SP matching.

* commit '866c5b061e6e762f2627e3467afc0fe6f29c2668':
Separated auth checking from SP matching.
0f6465d58efb630a7ed121f102d56d41e45a9b69 17-Jun-2015 Pierre Vandwalle <vandwalle@google.com> am e63336e9: add creation/update time to WifiConfiguration fix carry over of validatedInternetAccess Bug:21390908

* commit 'e63336e926e60ba9b0cf0702be9bec2718de27d8':
add creation/update time to WifiConfiguration fix carry over of validatedInternetAccess Bug:21390908
866c5b061e6e762f2627e3467afc0fe6f29c2668 12-Jun-2015 Jan Nordqvist <jannq@google.com> Separated auth checking from SP matching.

Bug: 21729565

Change-Id: Ia0617efaf32f4dc9dddc6059322265520f2d5c3a
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/anqp/NAIRealmData.java
ndroid/server/wifi/anqp/NAIRealmElement.java
ndroid/server/wifi/anqp/eap/EAPMethod.java
ndroid/server/wifi/hotspot2/AuthMatch.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/hotspot2/pps/HomeSP.java
e63336e926e60ba9b0cf0702be9bec2718de27d8 16-Jun-2015 Pierre Vandwalle <vandwalle@google.com> add creation/update time to WifiConfiguration
fix carry over of validatedInternetAccess
Bug:21390908

Change-Id: I723f4fd740959b2d4f9898846897e37734b2a438
ndroid/server/wifi/WifiConfigStore.java
f2a15dbb8e30adb48d77acbb4099e5e9e9622bca 17-Jun-2015 Pierre Vandwalle <vandwalle@google.com> am fb650bfb: make sure ephemeral config are written to file Bug:21293078

* commit 'fb650bfb264b7ff31c927498faf8343b5895c6ab':
make sure ephemeral config are written to file Bug:21293078
cc8d5c1e8e89f36b5b11a5267c457f035b12d6a0 17-Jun-2015 Pierre Vandwalle <vandwalle@google.com> am d745a52d: call setWifiLinkLayerStats Bug:21617639

* commit 'd745a52dc4f929d4a4030f205ed173bdf60eaf10':
call setWifiLinkLayerStats Bug:21617639
39cff8f958e57fb76ff9cff48dae2269c38d87d7 17-Jun-2015 Pierre Vandwalle <vandwalle@google.com> am 39ca3a2f: make sure validatedInternetAccess boolean is written to disk right away Bug:21390908

* commit '39ca3a2fff1e2f7dd8613b094984199b95931671':
make sure validatedInternetAccess boolean is written to disk right away Bug:21390908
fb650bfb264b7ff31c927498faf8343b5895c6ab 12-Jun-2015 Pierre Vandwalle <vandwalle@google.com> make sure ephemeral config are written to file
Bug:21293078

Change-Id: I84346d1a8d766205be57e5e624614a70511f7862
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
d745a52dc4f929d4a4030f205ed173bdf60eaf10 12-Jun-2015 Pierre Vandwalle <vandwalle@google.com> call setWifiLinkLayerStats
Bug:21617639

Change-Id: Idf7d066a20b96ed1e39cdd164b7159d5843c2f99
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
2372d51a055daebbefffcc0b52b77d7da27ac77b 17-Jun-2015 Pierre Vandwalle <vandwalle@google.com> am b53a183e: dont keep bad link score due to txerrors for too long

* commit 'b53a183e0284025e11b4304c50d18c3f80f66e85':
dont keep bad link score due to txerrors for too long
39ca3a2fff1e2f7dd8613b094984199b95931671 11-Jun-2015 Pierre Vandwalle <vandwalle@google.com> make sure validatedInternetAccess boolean is written to disk right away
Bug:21390908

Change-Id: Ia64068bccb84973aac6c26de96c074ffc6f4fae4
ndroid/server/wifi/WifiStateMachine.java
b53a183e0284025e11b4304c50d18c3f80f66e85 10-Jun-2015 Pierre Vandwalle <vandwalle@google.com> dont keep bad link score due to txerrors for too long

Change-Id: I181eabc72ca93d29470d46017e9f34df2e71093e
ndroid/server/wifi/WifiStateMachine.java
d565262c07df6c7cf58a6f800c77a596ae0e4610 16-Jun-2015 Pierre Vandwalle <vandwalle@google.com> add creation/update time to WifiConfiguration
fix carry over of validatedInternetAccess
Bug:21390908

Change-Id: I723f4fd740959b2d4f9898846897e37734b2a438
ndroid/server/wifi/WifiConfigStore.java
63951e369140dbb51d7133499b6c3ac933d377ed 16-Jun-2015 Adam Lesinski <adamlesinski@google.com> am dbfd22cb: Merge "Wifi energy: Use longs for energy calculations" into mnc-dev

* commit 'dbfd22cbc43f79707b8b1844087e31be5900d95f':
Wifi energy: Use longs for energy calculations
dbfd22cbc43f79707b8b1844087e31be5900d95f 16-Jun-2015 Adam Lesinski <adamlesinski@google.com> Merge "Wifi energy: Use longs for energy calculations" into mnc-dev
94a2dd090b7d3823058b7a69cf4653d5663708cd 16-Jun-2015 Adam Lesinski <adamlesinski@google.com> Wifi energy: Use longs for energy calculations

The framework is now using longs to store energy data, so update the code
to do the same.

Change-Id: Ia01d9c13240c9644efcea93b370eca20890964c2
ndroid/server/wifi/WifiServiceImpl.java
1588b44785cffb4668565c149af3b705e4d53582 15-Jun-2015 Chris Wren <cwren@android.com> am c0a37e1f: Merge "remove setLatestEventInfo from wifi" into mnc-dev

* commit 'c0a37e1f482f3f42c4f87e0571f28b084ffc7aa9':
remove setLatestEventInfo from wifi
c0a37e1f482f3f42c4f87e0571f28b084ffc7aa9 15-Jun-2015 Chris Wren <cwren@android.com> Merge "remove setLatestEventInfo from wifi" into mnc-dev
40c87dbd7fb69deb32073dd6f9f773053884b0b2 13-Jun-2015 Vinit Deshpande <vinitd@google.com> Merge "Support 32 channels from different band per bucket for scanning" into m-wireless-dev
280c723256c0c4920b98cec32a3ccc3739bf6c7a 13-Jun-2015 Vinit Deshpande <vinitd@google.com> am a1276378: Ensure FW version in bugreport

* commit 'a1276378c5a215774193e745568d6dec0d19a722':
Ensure FW version in bugreport
7ee84d83c86794ad2330563565119d5e31f88891 12-Jun-2015 Pierre Vandwalle <vandwalle@google.com> make sure ephemeral config are written to file
Bug:21293078

Change-Id: I84346d1a8d766205be57e5e624614a70511f7862
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
28fc233963eb95abc077e0aab4fda7d259873ae2 13-Jun-2015 Navtej Singh Mann <navtejsingh@google.com> Support 32 channels from different band per bucket for scanning

Change-Id: I773621f87b3544bbf5fc30b47d9b88811339ce11
ndroid/server/wifi/WifiScanningServiceImpl.java
3baa1769b394a44351228f1b6950706d56fe61fa 12-Jun-2015 Jan Nordqvist <jannq@google.com> Separated auth checking from SP matching.

Bug: 21729565

Change-Id: Ia0617efaf32f4dc9dddc6059322265520f2d5c3a
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/anqp/NAIRealmData.java
ndroid/server/wifi/anqp/NAIRealmElement.java
ndroid/server/wifi/anqp/eap/EAPMethod.java
ndroid/server/wifi/hotspot2/AuthMatch.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/hotspot2/pps/HomeSP.java
a1276378c5a215774193e745568d6dec0d19a722 10-Jun-2015 Vinit Deshpande <vinitd@google.com> Ensure FW version in bugreport

Change-Id: I851b92a77abe647ed904ed4d55dddfdc0dfff366
ndroid/server/wifi/WifiLogger.java
486cc89df3277ce7c7ace55fdfd02ae24ce0d665 12-Jun-2015 Pierre Vandwalle <vandwalle@google.com> call setWifiLinkLayerStats
Bug:21617639

Change-Id: Idf7d066a20b96ed1e39cdd164b7159d5843c2f99
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
7a94f84d2c4c7c34baaba9b87d9565f74b1eebfd 12-Jun-2015 Jan Nordqvist <jannq@google.com> Missing final keyword.

Change-Id: I3fb18c8e0a48283ce4f645db3fea98f5635548c0
ndroid/server/wifi/configparse/ConfigBuilder.java
c465290772b735d97cba451c9bc5b6cc76db9147 11-Jun-2015 Jan Nordqvist <jannq@google.com> ANQP cache sweeping.

Bug: 21786417

Change-Id: I44b44dd09c00364b0dc7d21640d5e803ffa6263c
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/AnqpCache.java
290efe67c9f4836f99fc8471c044b79ca1764471 12-Jun-2015 Vinit Deshpande <vinitd@google.com> am 656fad7e: Merge "Disable long running chronograph thread" into mnc-dev

* commit '656fad7edc1c850ad6b092789067d0a742ee158d':
Disable long running chronograph thread
656fad7edc1c850ad6b092789067d0a742ee158d 11-Jun-2015 Vinit Deshpande <vinitd@google.com> Merge "Disable long running chronograph thread" into mnc-dev
bf5f728c6dd10bcdfb184339c3471ffae43b2e5e 11-Jun-2015 Vinit Deshpande <vinitd@google.com> Disable long running chronograph thread

Bug: 21781020
Change-Id: Ia9ad08faf18fd890ee6ce63c83a45938dd7a0a47
ndroid/server/wifi/WifiConfigStore.java
2247009c2527c80e7fb00f056aea67d1fe09671b 11-Jun-2015 Chris Wren <cwren@android.com> remove setLatestEventInfo from wifi

Bug: 18510449
Change-Id: I155caaf80d90b15b1a1ee1cc71819358edb4c604
ndroid/server/wifi/WifiNotificationController.java
d9db3540d213cef5855c6b9154cb8d4abc6a97e2 11-Jun-2015 Prerepa Viswanadham <dham@google.com> am a6777abf: Don\'t log PSK or password in to bugreport

* commit 'a6777abfc90496801e9942f57fbfa091ba85ae82':
Don't log PSK or password in to bugreport
890e70d78c91e884b00da947cb14841d3186ad90 11-Jun-2015 Pierre Vandwalle <vandwalle@google.com> make sure validatedInternetAccess boolean is written to disk right away
Bug:21390908

Change-Id: Ia64068bccb84973aac6c26de96c074ffc6f4fae4
ndroid/server/wifi/WifiStateMachine.java
ad08f977f8dbe97bb7d6b65759979be37fd420d6 11-Jun-2015 Vinit Deshpande <vinitd@google.com> am 35287503: am 05d1550..05d1550 from mirror-m-wireless-internal-release

* commit '352875034165d338738ded4b7b1f1d997e413262':
Dont enable legacy pno if state is not Disconnected or scan is ongoing Bug:21368736
a6777abfc90496801e9942f57fbfa091ba85ae82 11-Jun-2015 Prerepa Viswanadham <dham@google.com> Don't log PSK or password in to bugreport

Bug: 21576757
Change-Id: If74ece7cc541075bee46cf8b80765bd0ac2d367c
ndroid/server/wifi/WifiNative.java
77faab4be7695e6adddc1e1e5589ded2e4333fdc 10-Jun-2015 Kyle Wang <kylew@nvidia.com> am 5f63208a: fix the false wifi \'CONNECTED\' broadcast

* commit '5f63208a36a89c83c265efac5391a1ecbeccdf92':
fix the false wifi 'CONNECTED' broadcast
364f83d061817e3632e8259da47a6c39500947b8 10-Jun-2015 Pierre Vandwalle <vandwalle@google.com> dont keep bad link score due to txerrors for too long

Change-Id: I181eabc72ca93d29470d46017e9f34df2e71093e
ndroid/server/wifi/WifiStateMachine.java
352875034165d338738ded4b7b1f1d997e413262 10-Jun-2015 Vinit Deshpande <vinitd@google.com> am 05d1550..05d1550 from mirror-m-wireless-internal-release

05d1550 Dont enable legacy pno if state is not Disconnected or scan is ongoing Bug:21368736
5f63208a36a89c83c265efac5391a1ecbeccdf92 04-Jun-2015 Kyle Wang <kylew@nvidia.com> fix the false wifi 'CONNECTED' broadcast

WifiStatemachine should use 'WifiSsid.NONE' instead of 'null' to judge the return
value of WifiInfo#getSSID() which will never be 'null'. Otherwise it will send a
false 'CONNECTED' broadcast first then 'DISCONNECTED' broadcast when we disable
wifi from System Setting GUI.

Change-Id: I9682a69cc3acad1a90d1b4fe96d53d3a28cf8277
ndroid/server/wifi/WifiStateMachine.java
05d155034b789d0bcc73deefb29ab6db90e57ddf 09-Jun-2015 Pierre Vandwalle <vandwalle@google.com> Dont enable legacy pno if state is not Disconnected or scan is ongoing
Bug:21368736

Change-Id: I5b87e77b814cda0c1202d647e6ceb2d2e706f223
ndroid/server/wifi/WifiStateMachine.java
ba5908f65b0470be02ec7b5c035a3aec22eb0c11 10-Jun-2015 Vinit Deshpande <vinitd@google.com> Temporarily disable wifi logger

It is causing memory corruption; we'll enable it after
that is dealt with.

Bug: 21730601
Bug: 21668637

Change-Id: I0c0d9410b7498f80d937ed4cf494e569d3e51cd4
ndroid/server/wifi/WifiLogger.java
c85fd892c72e7d15f7e092f29f6cf095b46783a0 09-Jun-2015 Vinit Deshpande <vinitd@google.com> am 5bee0e4..7ec7de9 from mirror-m-wireless-internal-release

7ec7de9 Fixed PLMN ANQP parsing and added Runtime guard on parsing.
54fcb6c Prevent repeating EAP connection forever

Change-Id: I3006e488d5c422330f4cc2aee0d366351ecc36e1
4a9e6c6f8bd09082e928ae2fbd9d600b9086d3de 09-Jun-2015 Lorenzo Colitti <lorenzo@google.com> Merge "Get rid of the CAPTIVE_PORTAL_CHECK state broadcast." into mnc-dev
9f1d0eda5b026472704575376a9ffbdd6f20581b 08-Jun-2015 Vinit Deshpande <vinitd@google.com> Fixed missing period range in standard buckets [DO NOT MERGE]

Bug: 21596369

Change-Id: I65f6e3dbbd23e753d37df066cb93fc5e5ec9bd44
ndroid/server/wifi/WifiScanningServiceImpl.java
448dfc1761ccf6e5bc0aeb29ee585b5c07e02e56 06-Jun-2015 Vinit Deshpande <vinitd@google.com> Capture alert data; and require verbose to capture firmware dump [DO NOT MERGE]

This change starts capturing data on firmware alert. Alerts by
default capture FW memory dump.

It also requires 'wifi verbose debugging' to be enabled to capture
firmware dumps; they are taking too much space.

Change-Id: I9bf8c274eef263be4c2fda62bed128048f36b972
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiStateMachine.java
cb3977a1e54ab258733062137ec5aa78a7720332 06-Jun-2015 Vinit Deshpande <vinitd@google.com> Fix a null pointer exception in logger [DO NOT MERGE]

Bug: 21668637
Change-Id: I677c971cb06fbcb638d9a40f6aee3114d517f0ba
ndroid/server/wifi/WifiLogger.java
b755905d087d8224151019e15897e3f63efc244b 09-Jun-2015 Vinit Deshpande <vinitd@google.com> Merge "Fixed missing period range in standard buckets" into mnc-dev
7ec7de9f415179e38a39e7b1be917ba77e3b68eb 09-Jun-2015 Jan Nordqvist <jannq@google.com> Fixed PLMN ANQP parsing and added Runtime guard on parsing.

Bug: 21668177
Change-Id: I36a7bc37752410bed78ab877a69b98f7a952e83d
ndroid/server/wifi/anqp/CellularNetwork.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
54fcb6c0a81f6c025dc8574c95593da1c4eafb29 27-Feb-2015 Akihiro Onodera <akihiro.x.onodera@sonymobile.com> Prevent repeating EAP connection forever

Android framework does not handle a message
("Authentication with timed out")
for EAP connection and thus connection retry
happens continuously in case of authentication
timed out.

Change-Id: Iadf99bacc9f89d8d18f91231d9263e5b890ba0b9
ndroid/server/wifi/WifiMonitor.java
5bee0e4616e2f8025d60cbfe3eec3e274a68a452 06-Jun-2015 Jan Nordqvist <jannq@google.com> ANQP caching cleaned up.

Disabling all HS2.0 logic with no SPs.

Bug: 21306404
Bug: 21660552

Change-Id: I080e99b5e41ead0b718c9e14514fba3108f19ac9
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/ANQPData.java
ndroid/server/wifi/hotspot2/AnqpCache.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
ndroid/server/wifi/hotspot2/Utils.java
f7db07b9cc88ceef2ca3d77414834d0d75b4ece7 06-Jun-2015 Vinit Deshpande <vinitd@google.com> Capture alert data; and require verbose to capture firmware dump

This change starts capturing data on firmware alert. Alerts by
default capture FW memory dump.

It also requires 'wifi verbose debugging' to be enabled to capture
firmware dumps; they are taking too much space.

Change-Id: I9bf8c274eef263be4c2fda62bed128048f36b972
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiStateMachine.java
d27cbe81e1b51f09081c667c275019e63a0399a2 06-Jun-2015 Vinit Deshpande <vinitd@google.com> Fix a null pointer exception in logger

Bug: 21668637
Change-Id: I677c971cb06fbcb638d9a40f6aee3114d517f0ba
ndroid/server/wifi/WifiLogger.java
7903814396eaa352c333a85dc7ee3b80acc224e1 08-Jun-2015 Vinit Deshpande <vinitd@google.com> Fixed missing period range in standard buckets

Bug: 21596369

Change-Id: I65f6e3dbbd23e753d37df066cb93fc5e5ec9bd44
ndroid/server/wifi/WifiScanningServiceImpl.java
10943fe0f4b3beb8998300b6a2517bbd8bac9f0a 08-Jun-2015 Alex Klyubin <klyubin@google.com> Switch from KeyStore.delKey to KeyStore.delete.

KeyStore.delKey's functionality is now covered by KeyStore.delete.

Bug: 18088752
Change-Id: I71aa8ef21c63744cf60cc85a5e88020229f102da
ndroid/server/wifi/WifiConfigStore.java
6eb4db053766557a4ebd2a969e0605b0eb6d68fc 04-Jun-2015 Vinit Deshpande <vinitd@google.com> Shut up a noisy log from WifiStateMachine [DO NOT MERGE]

Bug: 20416721

Change-Id: I675942232f2120a203c531d7ed8f214c3322d7dc
ndroid/server/wifi/WifiStateMachine.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
9ef23e4b9b75270b052f9abeea9d00edfefa1e6d 05-Jun-2015 Lorenzo Colitti <lorenzo@google.com> Get rid of the CAPTIVE_PORTAL_CHECK state broadcast.

This broadcast is useless, because:

- It is guaranteed to be immediately followed by a CONNECTED
state broadcast.
- The CAPTIVE_PORTAL_CHECK doesn't actually do anything - in
fact, since L CAPTIVE_PORTAL_CHECK happens only after we
transition to CONNECTED state.

The broadcast results in ConnectivityService logspam and makes
the wifi icon flicker on DHCP renew because CAPTIVE_PORTAL_CHECK
is mapped to CONNECTING and not CONNECTED, and we don't display
the wifi icon in CONNECTING.

Bug: 21352084
Change-Id: I70bff6ad98709512388b0b234443bc00a9fc2546
ndroid/server/wifi/WifiStateMachine.java
09f267b3bc61f3f472516a406fd64be81dc5ccd5 05-Jun-2015 Pierre Vandwalle <vandwalle@google.com> prevent false wifi roaming signal
Bug:21617059

Change-Id: I3ed85339d177c2c15831c59662f693ba4882919b
ndroid/server/wifi/WifiStateMachine.java
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.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
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
800f0bd2fd9ef6886a9d2d3fd08e14ec32fa9066 04-Jun-2015 Vinit Deshpande <vinitd@google.com> Shut up a noisy log from WifiStateMachine

Bug: 20416721

Change-Id: I675942232f2120a203c531d7ed8f214c3322d7dc
ndroid/server/wifi/WifiStateMachine.java
550ae0842c9ca95facfe8b310de5c6d2a0601a89 03-Jun-2015 Pierre Vandwalle <vandwalle@google.com> Merge "fix overflow bug in WifiManager reportActivityInfo Bug:20232188" into m-wireless-dev
70b75cda33a05e8b6e6724ed08e4e72f6fee0471 03-Jun-2015 Pierre Vandwalle <vandwalle@google.com> fix overflow bug in WifiManager reportActivityInfo
Bug:20232188

Change-Id: I2613ead34398d03ce631974cc1ee3f340ffec55e
ndroid/server/wifi/WifiServiceImpl.java
3f6620290d7462f3642c82e535146ce9de5e20b3 03-Jun-2015 Vinit Deshpande <vinitd@google.com> am a40265e..7ab5189 from mirror-m-wireless-internal-release

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
cbda71c Merge "make WiFi No Network Periodic Scans Interval to 5 minutes Bug:21274132" into m-wireless-dev
c538878 make WiFi No Network Periodic Scans Interval to 5 minutes Bug:21274132
7ab51890d35ee9965fff17fd2d8c2eed4971e288 03-Jun-2015 Pierre Vandwalle <vandwalle@google.com> Merge "Make autojoin parameters configurable" into m-wireless-dev
7ff782a43c621f1ba554948fe6e82069740c0b17 03-Jun-2015 Pierre Vandwalle <vandwalle@google.com> Make autojoin parameters configurable

Fix typos which were preventing autojoin parameters to be
configurable thru /data/misc/wifi/autojoinconfig.txt

Change-Id: Icc3aac71e860c14f75dfc6d2cf29b92b6bfd0962
ndroid/server/wifi/WifiConfigStore.java
d03a9283285bb7adef6c687eb3a91fa4a8c4b502 02-Jun-2015 Vinit Deshpande <vinitd@google.com> Fix build breaks from last merge

Change-Id: I6ef088cfd3a796b7455df025b37a017c3a4da483
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
cd0af1c9ddcac881f49c815fb9da45433eb50736 02-Jun-2015 Vinit Deshpande <vinitd@google.com> am 21d43c4..9a270a7 from mirror-m-wireless-internal-release

9a270a7 Merge "Removed cert verification from ConfigBuilder." into m-wireless-dev
31891af Minor fixes from comments.
fce249d Merge changes I1da47e51,I5d6b0cbe into m-wireless-dev
0600b63 Removed cert verification from ConfigBuilder.
03a529a Fixed incorrect mnc-mcc matching.
6f3626f dont use wifiscanner pauseScan/restartScan
a203056 fix crash in autojoincontroller Bug:21495346
07a3f9d Fixed sequencing issue for Hotspot 2.0 IMSI matching.
ea748f7 Merge "update current configuration based on wifi SSID whitelist roam" into m-wireless-dev
f71c259 Fix bad logs and a crash while reading configs [DO NOT MERGE]
605c327 Fixed bad network history saving and reading. [DO NOT MERGE]
6dd83f1 Merge "fix handling of command for bssid hot list" into m-wireless-dev
a63da80 fix handling of command for bssid hot list

Change-Id: I1ba36f5939f44551946b4756c2074e02f71cedc9
f72f48afc909bd4b7371559aa034054da979942d 02-Jun-2015 Vinit Deshpande <vinitd@google.com> am 22fd854..6dd83f1 from mirror-m-wireless-internal-release

6dd83f1 Merge "fix handling of command for bssid hot list" into m-wireless-dev
a63da80 fix handling of command for bssid hot list
b090f62 make sure unblacklist thresholds are initialized Bug:21161557
4c94fc6 Wifi: Disable PNO (if enabled) only when the scan is allowed to trigger
be2981a fix enabling autojoin offload based on tx/rx counters
a3e4c84 Move Halutil to vendor/google_testing/comms

Change-Id: I9663436ad92094b1cde0e00d217b1fd9ca728351
cbda71c1f091b9ebcf77242795774e85d35ec992 02-Jun-2015 Pierre Vandwalle <vandwalle@google.com> Merge "make WiFi No Network Periodic Scans Interval to 5 minutes Bug:21274132" into m-wireless-dev
c5388781595174cb9d8e055bc846da8056f56346 02-Jun-2015 Pierre Vandwalle <vandwalle@google.com> make WiFi No Network Periodic Scans Interval to 5 minutes
Bug:21274132

Change-Id: I307f08e38edb6729a318d6cfa1f9310141970c3f
ndroid/server/wifi/WifiStateMachine.java
a40265e3235b984099c59dfc5ce155d251fcae9e 02-Jun-2015 Pierre Vandwalle <vandwalle@google.com> Remove quotes around SSID when calling ssid white list API

Change-Id: I20b18e7abbfff869bbe02f42d81b9743132eecfd
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
483cef98baaff3d4de18dc29aa5e5cce2ccd9716 02-Jun-2015 Vinit Deshpande <vinitd@google.com> am 9ccffbb..5a091fb from mirror-m-wireless-internal-release

5a091fb Wifi log spam is still a thing The root cause is that inner class WifiScanningStateMachine of WifiScanningServiceImpl use the log from WifiStateMachine rather than from WifiScanningServiceImpl. Reanme log to logLocal
b66b29a turn off WifiNative DBG
98dca33 FW memory dump should be compressed
e5c48b5 wifi: Do not kill the supplicant on a request to stop it
5caa43b add ssid white list for roam offload
a8e38ba111bac40e374412253fc6b6a542c7714f 02-Jun-2015 Erik Kline <ek@google.com> simplify processing DhcpResults LinkAddress data

Bug: 20451261
Change-Id: Ie95d430da58b94ee8b26e79442a35614cb86e78e
ndroid/server/wifi/WifiStateMachine.java
9a270a7dc1a0ad24668ee95dbc93fd42de4c7d44 02-Jun-2015 Vinit Deshpande <vinitd@google.com> Merge "Removed cert verification from ConfigBuilder." into m-wireless-dev
31891afce40b903ada9b24ec12e3648ae6aa27b2 29-May-2015 Jan Nordqvist <jannq@google.com> Minor fixes from comments.

Bug: 21306404
Bug: 21283355
Bug: 21171957

Fixed trust cert validation.

Fixed bad network history saving and reading.
Bug: 21022868

Bug in domain matcher, fixed some log levels.

Finished HS2.0/legacy network persistence consistency.

Change-Id: Ic93093a41dd87d70a386909bdea744b5810c7299
ndroid/server/wifi/ConfigurationMap.java
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
ndroid/server/wifi/hotspot2/pps/DomainMatcher.java
ndroid/server/wifi/hotspot2/pps/HomeSP.java
fce249dbb4390a13f61148680ffe9ade03d584b4 01-Jun-2015 Vinit Deshpande <vinitd@google.com> Merge changes I1da47e51,I5d6b0cbe into m-wireless-dev

* changes:
Fixed incorrect mnc-mcc matching.
Fixed sequencing issue for Hotspot 2.0 IMSI matching.
f9d866f1b4e93593b3411886fd71e729f4a5a205 21-Apr-2015 Stuart Scott <stuartscott@google.com> Network Reset should have a lockdown like Factory Reset.

bug:20332322
Change-Id: I0d40ecf39f48131b7aa64e85a0e77d127cc93fa4
(cherry picked from commit 77860074303214f736aee0a26bf38e796461bf17)
ndroid/server/wifi/WifiServiceImpl.java
0600b63042d269dbf99197e188000a134511c978 30-May-2015 Jan Nordqvist <jannq@google.com> Removed cert verification from ConfigBuilder.

Change-Id: Id1036ab1a9fa9302e7260fd5d8e6178e65e6d42a
ndroid/server/wifi/configparse/ConfigBuilder.java
03a529ae85d526110f2a715168739618f0775493 29-May-2015 Jan Nordqvist <jannq@google.com> Fixed incorrect mnc-mcc matching.

Change-Id: I1da47e51f00ea2c25a1e99911b6da27c8849c599
ndroid/server/wifi/hotspot2/Utils.java
ndroid/server/wifi/hotspot2/pps/HomeSP.java
6f3626faf50499dd95aa299bb1011c27ab05776d 29-May-2015 Pierre Vandwalle <vandwalle@google.com> dont use wifiscanner pauseScan/restartScan

Change-Id: Ie73fafdde61a9ff218bf6a96e5f3741f98706fad
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
716921f71ceeda2dc00bdd997f54fe7010b3ed0a 19-May-2015 xinhe <xinhe@google.com> Wifi log spam is still a thing

The root cause is that inner class WifiScanningStateMachine
of WifiScanningServiceImpl use the log from WifiStateMachine
rather than from WifiScanningServiceImpl. Reanme log to logLocal

Bug:20416721

Change-Id: I7ad24c4e98062351940d1f52cab02a5c993159e6
ndroid/server/wifi/WifiScanningServiceImpl.java
a20305612380c956fa84b1e80523eb7719f62fd1 28-May-2015 Pierre Vandwalle <vandwalle@google.com> fix crash in autojoincontroller
Bug:21495346

Change-Id: Ib99c9c996bba78369c358a33829269d93b11d324
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiStateMachine.java
07a3f9d97394b97965e6754271fb66c1d6bd1753 28-May-2015 Jan Nordqvist <jannq@google.com> Fixed sequencing issue for Hotspot 2.0 IMSI matching.

Change-Id: I5d6b0cbe85d1598901695f923be33ec672580e2d
ndroid/server/wifi/SIMAccessor.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/hotspot2/pps/HomeSP.java
ea748f7778a63f07db20b1c2de89c8060c7cd18e 28-May-2015 Pierre Vandwalle <vandwalle@google.com> Merge "update current configuration based on wifi SSID whitelist roam" into m-wireless-dev
21d43c487ca1f719cd2c170e1fac88c7b62a836a 23-May-2015 Pierre Vandwalle <vandwalle@google.com> update current configuration based on wifi SSID whitelist roam

Change-Id: If5d2010740b5d11749aeb82b825a248566c16aaf
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiStateMachine.java
21e50f97f3a6e8b08b73e0266204eae3e6351742 26-May-2015 Vinit Deshpande <vinitd@google.com> Fix an ANR in WifiSettings

getMatchingPasspointConfig doesn't return any value in
some states; this change fixes that by returning default
value.

Bug: 21362013
Change-Id: Ib63d5fa12cce318482cee8781ce4fb97a23e92ef
ndroid/server/wifi/WifiStateMachine.java
f71c25960b4fdaf8c1cc7d42ddcad37fd967b63a 21-May-2015 Vinit Deshpande <vinitd@google.com> Fix bad logs and a crash while reading configs [DO NOT MERGE]

(cherry-picked from 33bc37d3a0de7d0043c43a6e77beaff8d82837af in mnc-dev)

Some users have seen NumberFormatExeptions; while this is not
fully explained, it results in a crash. This change fixes that
by handling the exception.

There is also a misleading log (complains about error writing
file) and there's a spammy log about RSSI.

Bug: 21338785

Change-Id: Ifc7c04785ac6cccced2896ccccbedfbb3470fb01
ndroid/server/wifi/WifiConfigStore.java
605c327fbf1562e3e66eef8c1ad56bcbdffb3de5 19-May-2015 Jan Nordqvist <jannq@google.com> Fixed bad network history saving and reading. [DO NOT MERGE]

(cherry-picked from 8bc78bddb29cdd9e845f313fabb08c485aa40c21 in mnc-dev)

Bug: 21022868

Change-Id: I62ebbac09da14d140655af4aa69fb8b50fc703f4
ndroid/server/wifi/WifiConfigStore.java
6dd83f1bf785fd06609b7fe717b5b4d5f17c12c0 23-May-2015 Vinit Deshpande <vinitd@google.com> Merge "fix handling of command for bssid hot list" into m-wireless-dev
b92960b9bd5b7bbad332f9dee801937a1f76befa 23-May-2015 Pierre Vandwalle <vandwalle@google.com> make sure unblacklist thresholds are initialized
Bug:21161557

Change-Id: Ibba1bc6b0cd2f15d91521c523a2da6357320c5be
ndroid/server/wifi/WifiConfigStore.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
ndroid/server/wifi/WifiNative.java
b090f622d0fd9dcdc22d3f54265b72982a2eeed3 23-May-2015 Pierre Vandwalle <vandwalle@google.com> make sure unblacklist thresholds are initialized
Bug:21161557

Change-Id: Ibba1bc6b0cd2f15d91521c523a2da6357320c5be
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
f00c0f3de27bce2a1cefafae3aefa2f1812a8a53 22-May-2015 Prem Kumar <premk@google.com> Merge "Fix bad logs and a crash while reading configs" into mnc-dev
610b648ee56dc5c4accddb4522cb5fd927e9fa10 22-May-2015 Erik Kline <ek@google.com> Merge "Do some DNAv4/DNAv6 -style probing on roaming." into mnc-dev
33bc37d3a0de7d0043c43a6e77beaff8d82837af 21-May-2015 Vinit Deshpande <vinitd@google.com> Fix bad logs and a crash while reading configs

Some users have seen NumberFormatExeptions; while this is not
fully explained, it results in a crash. This change fixes that
by handling the exception.

There is also a misleading log (complains about error writing
file) and there's a spammy log about RSSI.

Bug: 21338785

Change-Id: Ifc7c04785ac6cccced2896ccccbedfbb3470fb01
ndroid/server/wifi/WifiConfigStore.java
49dfc6768889a33eb67102b16faf21667af2a60d 20-May-2015 Vinit Deshpande <vinitd@google.com> Indicate failed scans with EXTRA_RESULTS_UPDATED

This flag indicates if scan was successful and results were
updated. It will be set to false if a scan is not performed
(intentionally) or if it failed to produce any results.

Bug: 20642015

Change-Id: I06a1fdd684932db68891ee28d5a049980f483f0f
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
4c94fc6a884fc17424c76d791a42c3c263b390b2 20-May-2015 Sunil Dutt <usdutt@codeaurora.org> Wifi: Disable PNO (if enabled) only when the scan is allowed to trigger

In WiFi's disconnected state and when a PNO is enabled, a scan
request through an alarm source shall disable the PNO, though
the scan fails to trigger (if cancelled due to cancelDelayedScan).
This commit ensures to disable the PNO only before the scan request
succeeds to trigger.

Change-Id: Ie462011d99644e83314c55e8135f8cbf2b8de5c7
ndroid/server/wifi/WifiStateMachine.java
c4a5807e031412bd4529daa46baa8b1bdb06295f 19-May-2015 Erik Kline <ek@google.com> Do some DNAv4/DNAv6 -style probing on roaming.

Bug: 18581716
Bug: 19866451
Bug: 20944464
Change-Id: Id2b2c9755fea8b9c9b6a2760949919bc3fb1abde
ndroid/server/wifi/WifiStateMachine.java
4dd753e0a6b133b32a4ee9304415aa6eb4da0fff 21-May-2015 Erik Kline <ek@google.com> Merge "Factor out code that makes a new LinkProperties object" into mnc-dev
0ac0f5b76c61707aededb5f959d6df2b2cead3a4 21-May-2015 Erik Kline <ek@google.com> Factor out code that makes a new LinkProperties object

Change-Id: Ia6a0ccb10da62efc261e6ea6d862e4617b9df739
ndroid/server/wifi/WifiStateMachine.java
be2981ae2e3d7d8325fa7815731e45bc64e17f2f 21-May-2015 Pierre Vandwalle <vandwalle@google.com> fix enabling autojoin offload based on tx/rx counters

Change-Id: I2fa7970d249638b17f06763246af15f5308d4d55
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
8bc78bddb29cdd9e845f313fabb08c485aa40c21 19-May-2015 Jan Nordqvist <jannq@google.com> Fixed bad network history saving and reading.

Bug: 21022868

Change-Id: I62ebbac09da14d140655af4aa69fb8b50fc703f4
ndroid/server/wifi/WifiConfigStore.java
22fd854ef9c1fd6df6542c87e1e26e88a66e1fc3 20-May-2015 Pierre Vandwalle <vandwalle@google.com> enable SSID whitelist

Change-Id: I59e8acb0ea0224bc3c365041913f4f375fb03606
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
5a091fb6a7f51f701e81a45174c9fd74f97dce22 19-May-2015 xinhe <xinhe@google.com> Wifi log spam is still a thing
The root cause is that inner class WifiScanningStateMachine
of WifiScanningServiceImpl use the log from WifiStateMachine
rather than from WifiScanningServiceImpl. Reanme log to logLocal

Bug:20416721
Change-Id: I7ad24c4e98062351940d1f52cab02a5c993159e6
ndroid/server/wifi/WifiScanningServiceImpl.java
9057c94158c31e040583617bbce19313adf2e58d 19-May-2015 Vinit Deshpande <vinitd@google.com> Interpret scan-failed event from wpa_supplicant

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
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
b66b29a00da970ee75052e24f592c8d6c16bd0ed 19-May-2015 xinhe <xinhe@google.com> turn off WifiNative DBG

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

Bug:21271572
Change-Id: Icfcdcc3551c7a83fbd4903fd551dae38498d66ce
ndroid/server/wifi/WifiNative.java
e5c48b5cd1325f4cd67a798de4028f2a5567bc10 15-May-2015 Sunil Dutt <usdutt@codeaurora.org> wifi: Do not kill the supplicant on a request to stop it

Supplicant is killed on obtaining the first TERMINATE event when
requested to stop from the framework. This shall result in improper
shutdown of the supplicant without proper cleanup of the resources
allocated for all the interfaces.
Moreover, there is no point in killing the supplicant when the
request itself is to to stop the same. Thus, do not kill the
supplicant on the TERMINATE event.

Change-Id: I9a86e725c83374ed8f9b8f203d75928a5deed851
ndroid/server/wifi/WifiStateMachine.java
cbe99401672e263d6043cd1bc0c37d2dd871cac0 19-May-2015 Svet Ganov <svetoslavganov@google.com> Merge "Do not report WiFi and Bluetooth MAC addresses - wifi" into mnc-dev
fab7a7bb20990d4792f00a30eca9be307792b79a 13-May-2015 Svet Ganov <svetoslavganov@google.com> Do not report WiFi and Bluetooth MAC addresses - wifi

As a part of the new runtime permissions work we are limiting
the PII apps can access. BT and WiFi MAC addresses are PII and
based on our research there is no valid use case for app dev
to get these addresses aside of user tracking which we are
trying to limit.

bug:21078858

Change-Id: Id0524ba068ad53542f9904314ac4c8581e98cc5d
ndroid/server/wifi/WifiStateMachine.java
5caa43b34e0445ff08bff5931b84ffbc850b2a66 16-May-2015 Pierre Vandwalle <vandwalle@google.com> add ssid white list for roam offload

Change-Id: I9fad659cc6527a271251c7403852dc87ef460207
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
6a95e83c7e411a21cf6f6d912ab8498d2de858c9 18-May-2015 xinhe <xinhe@google.com> Merge remote-tracking branch 'goog/mirror-m-wireless-internal-release' into merging

Change-Id: Iec12d73f244bc58e7fcf1154ea8047a03925c241
9ccffbb6c3fe8eaa7d70cc3076d0dc3c6a9073e7 16-May-2015 Pierre Vandwalle <vandwalle@google.com> add BSSID blacklist to autojoin/roam offload

Change-Id: I7eced80f7406de44e96bebc9a3ac3dc648a23eef
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
4bc2080c7eac7d06913715fc09d242ba515b14cf 15-May-2015 Zoltan Szatmary-Ban <szatmz@google.com> Merge "Restrict Wifi config editability lockdown" into mnc-dev
c3a4a8936ce4b473f89ee130baed34afc8f3186a 15-May-2015 Craig Lafayette <craiglafa@google.com> Check for null return from getRingBufferStatus [DO NOT MERGE]

Bug: 21165036
Change-Id: I4f4fb468b66e233fe88f8dbeda5d1a780bdb0cbe
ndroid/server/wifi/WifiStateMachine.java
bffd83b768c3f34305bd61cd857a8c0d2f49bab9 15-May-2015 Craig Lafayette <craiglafa@google.com> Check for null return from getRingBufferStatus

Bug: 21165036
Change-Id: I4f4fb468b66e233fe88f8dbeda5d1a780bdb0cbe
ndroid/server/wifi/WifiStateMachine.java
12aeea8779cc4ee74ce390460e9dc4f2a6a94021 14-May-2015 Erik Kline <ek@google.com> create IpReachabilityMonitor only in L2ConnectedState

- revert some previous null avoidance hacks
- create IpReachabilityMonitor only in L2ConnectedState

Bug: 21147252
Bug: 21165241
Change-Id: I648852e358a5165621bcb1c33384d783bac0c9f2
ndroid/server/wifi/WifiStateMachine.java
76f41991291f2141f256f06efb3746fa0e1b7974 15-May-2015 Erik Kline <ek@google.com> If the interface at start-up isn't valid don't NPE on missing IpReachabilityMonitor

Bug: 21165241
Change-Id: I2348d6e07daf2a910078b2413d70e711d34a1630
ndroid/server/wifi/WifiStateMachine.java
b0b0cc202b7d7aaad7b3f69d73e9b58ea2968b05 06-May-2015 Pierre Vandwalle <vandwalle@google.com> hal based Pno and lazy roam implementation

Change-Id: Ib814ff6d29c8d7f1b579f7c088cd4eb104e5b637
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
b1c872f0353647b658742376709e0060fd025040 15-May-2015 Erik Kline <ek@google.com> Merge "Only notify of new link properties if they are non-null" into mnc-dev
ec3b75eb1487ec4423abc132cebc3ce6efd6d094 14-May-2015 Erik Kline <ek@google.com> Only notify of new link properties if they are non-null

Bug: 21147252
Change-Id: I5552a167425b0d54b22003a3675b560ee0b0da19
ndroid/server/wifi/WifiStateMachine.java
a6a56c98a21a07d874abbed2b5f83d8a9be7f2f7 14-May-2015 Lorenzo Colitti <lorenzo@google.com> Merge "Keep track of lastConnectUid in more cases." into mnc-dev
ab99a7a345781a9f3ff07335744c1f2073c44ac6 13-May-2015 Lorenzo Colitti <lorenzo@google.com> Keep track of lastConnectUid in more cases.

1. When we switch from a different network, and the connect
happens via AutoJoinController sending us CMD_AUTO_CONNECT.
2. When we interpret SAVE_NETWORK as a request to connect.
3. When we interpret CMD_ADD_OR_UPDATE_NETWORK as a request to
connect.

We were already keeping track of lastConnectUid when receiving
CMD_ENABLE_NETWORK because WifiConfigStore.enableNetwork takes
care of that.

Bug: 20081183
Change-Id: Icb9873057c30e73ad5a105083aa3d60d31d2ce32
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
1227b49a94f33844ad0606b48b591bea4d27b08e 14-May-2015 Vinit Deshpande <vinitd@google.com> Build Fixes after the merge

Change-Id: I6f9d28051b6f4d6688c4b76c1923e57febe31145
ndroid/server/wifi/WifiServiceImpl.java
347a9779b10304865e478af01ab95871c7614b29 14-May-2015 Vinit Deshpande <vinitd@google.com> am d7cbebf..6111ff7 from mirror-m-wireless-internal-release

6111ff7 minor fix for warning
e026d53 Added cert path validation for CA cert.
9a64375 Changed SSID consistency check to deal with hidden SSIDs (logging only).
1c03d75 Changed log tag, and fixed a NPE.
7d5357a Disable PDBG in WifiStateMachine

Change-Id: I0100a9e48f383266487c43426a55509cf8868f47
e5bf4b884cbbb435dc9268dff61955bcc2b81471 14-May-2015 Vinit Deshpande <vinitd@google.com> am 03ba4a5..ed3f1dd from mirror-m-wireless-internal-release

ed3f1dd Fix permissions check on WifiScanner APIs
f4b30aa Don't pause/restart scans across network connections
ad99846 Remove old (KK based) batched scan API support
fc42a2c Introduce battery blaming for WifiScanner
87df79e make autojoin more deterministic
d79bb0e Merge "enable background scan as soon as screen is off Bug:20909311" into m-wireless-dev
9ac124e enable background scan as soon as screen is off Bug:20909311
6d0cd10 change wifi Logging header
d4c25fd 5GHz roam configuration

Change-Id: Ib7621b11ca851236f9003947c24c5d84670fac94
28d09d2d947ee5814401d1778b7038db23f1a6ba 14-May-2015 Zoltan Szatmary-Ban <szatmz@google.com> Restrict Wifi config editability lockdown

DO created WiFi configurations are now only locked down
for editing/removing if DISALLOW_CONFIG_WIFI is not set.

Bug: 20719934
Change-Id: Ibd218821ab46cca8396084e2d73ae5ee00b584b3
ndroid/server/wifi/WifiConfigStore.java
b86f76f28ae06442e458a8cd4d7ddca210a102ef 12-May-2015 xinhe <xinhe@google.com> Diff SSID 2.5 to 5Ghz auto switching

Bug:20631573
Change-Id: I5e36c38e795429be1a527e79e69b7243395a511f
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
f8229a4bc77f2f8cf23a00ba0930a9bbb520d424 10-Apr-2015 Erik Kline <ek@google.com> Incorporate IpReachabilityMonitor into WifiStateMachine

The IpReachability Monitorcallback sends a new CMD_IP_REACHABILITY_LOST.
This is handled by all L2ConnectedState (sub)states.

Bug: 18581716
Change-Id: Ic107574f954e23545a8ad2b73f5c67f823b20bc9
ndroid/server/wifi/WifiStateMachine.java
e026d53099b5220c7184cb4bcee3af0542ffc6ee 12-May-2015 Jan Nordqvist <jannq@google.com> Added cert path validation for CA cert.

Bug: 20862882

Change-Id: I22c7d243422c427908a0def09d4f0519171e0868
ndroid/server/wifi/configparse/ConfigBuilder.java
9a64375bfb3431ef8d4ec1f2e97349c106c9c5f0 29-Apr-2015 Jan Nordqvist <jannq@google.com> Changed SSID consistency check to deal with hidden SSIDs (logging only).

Change-Id: I80ef72d6a209571643b49c9fd144144e333f6486
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
1c03d75c73b9f5fa24a795a0d546f4f56b82ab9b 27-Apr-2015 Jan Nordqvist <jannq@google.com> Changed log tag, and fixed a NPE.

Change-Id: I216a9df2397427a1175ea930c501f47cd843b742
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/configparse/MIMEContainer.java
ndroid/server/wifi/hotspot2/AnqpCache.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
ndroid/server/wifi/hotspot2/Utils.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
ndroid/server/wifi/hotspot2/pps/Credential.java
ndroid/server/wifi/hotspot2/pps/HomeSP.java
7d5357abafeb8b4a8510cf944685a521996a3940 12-May-2015 Vinit Deshpande <vinitd@google.com> Disable PDBG in WifiStateMachine

Bug: 20416721
Change-Id: I60b177d5e078fe5e11101a114cb368bd3dab915d
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.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
ndroid/server/wifi/WifiNative.java
de1bebe09457d4c54c81c0ad3a3fd3bf7b0d43a4 12-May-2015 Erik Kline <ek@google.com> Don't spuriously fail link properties comparisons.

Set the TCP buffer size appropriately before checking for equality.

Bug: 18581716
Change-Id: Iaa1e8a14bdfea02d2e610772a27e267eb7359c5e
ndroid/server/wifi/WifiStateMachine.java
ed3f1ddf197602340e675ae4357cd0fbb145f078 11-May-2015 Vinit Deshpande <vinitd@google.com> Fix permissions check on WifiScanner APIs

Bug: 19990774

Change-Id: Ibf2f118b918d6cc1b28aea97ad812fe518c4502a
ndroid/server/wifi/WifiScanningServiceImpl.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
f4b30aacbaf31865c7f31e4902d40ff7fdfe9e41 08-May-2015 Vinit Deshpande <vinitd@google.com> Don't pause/restart scans across network connections

These are to be handled by the firmware; so there is
no need to be proactive.

Bug: 20153728

Change-Id: Id13de1fa2edb06cff4b44f9623967f30d3c5beb6
ndroid/server/wifi/WifiStateMachine.java
00ebd8f3776aa8e6f91e9a1ab541f53f389b00b6 22-Apr-2015 Vinit Deshpande <vinitd@google.com> Add WifiScanner data in bugreports [DO NOT MERGE]

This change also adds meat in in dumping the service data
to allow debugging.

cherry-picked from a879e0a04ca77d37e976e1de8e03c5d8e26b3a1b

Change-Id: I2cfed36270d44952d731dd07233a2bc80b204696
ndroid/server/wifi/WifiScanningServiceImpl.java
ad9984607c007b15b9eb6601facf821cb57e1555 11-May-2015 Vinit Deshpande <vinitd@google.com> Remove old (KK based) batched scan API support

Bug: 18000475

Change-Id: I0b6054f291cadefb1d153692b61f1c3d2ddab0c1
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
fc42a2cd2d461dc39b6853c130bae7dc69ed68e3 11-May-2015 Vinit Deshpande <vinitd@google.com> Introduce battery blaming for WifiScanner

Bug: 17695516

Change-Id: I0de69718bfc1c8115bcc6f835d1470883ee15322
ndroid/server/wifi/WifiScanningServiceImpl.java
829909a64bdac0ea0f30907efc44e27685314225 09-May-2015 xinhe <xinhe@google.com> Unable to turn on Portable WiFi hotspot for 5GHz band

Bug:19857413
Change-Id: Ic15c5e643c2c1ed1cafab6809126555ff4a4cc56
ndroid/server/wifi/WifiNative.java
87df79e235c64f7062d0c50658fe1999b1225435 08-May-2015 Pierre Vandwalle <vandwalle@google.com> make autojoin more deterministic

- when registering a user preference, make sure that the preference always
override RSSI based comparison between network, i.e. we will always select
a network prefered by user (provided its RSSI is above autojoin threshold).

Change-Id: Ia0825427014a7d61ac4cf9fccec426826915f24e
ndroid/server/wifi/WifiAutoJoinController.java
9ac124e3b281e356ceb5d2faab7932fd77dbe63f 08-May-2015 Pierre Vandwalle <vandwalle@google.com> enable background scan as soon as screen is off
Bug:20909311

Change-Id: Ibb2a0650dbf8e0f56743f9cd4a94b6e39fcc191c
ndroid/server/wifi/WifiStateMachine.java
d4c25fd76644d5490700ae69fada4669de5193a1 17-Apr-2015 Pierre Vandwalle <vandwalle@google.com> 5GHz roam configuration

Change-Id: I34a59b6de90bda5198e42c3ecf24e978efc73c93
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
49ec3641622a34f4102d57d2b2ae44d52b9e6426 05-May-2015 Prerepa Viswanadham <dham@google.com> Merge changes from topic 'mwd-merge-050415' into mnc-dev

* changes:
Merge commit '5199fba' into master_merge
Merge commit 'b77b98d' into master_merge
Merge commit '624b4e2' into master_merge
5b3b6f748060cc831d52df06d5456d70d6e7ff9e 04-May-2015 Sanket Padawe <sanketpadawe@google.com> Merge "Add new API for getting netId of current wifi network" into mnc-dev
03ba4a5b108ab2bbdb5d0e7be46ac45c00a6d9ff 28-Apr-2015 xinhe <xinhe@google.com> Initial bring up for debug framework

Change-Id: I0e78897d1440f0b7c56740ff7890e2f3d6a0d951
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
9846078598c3468f8813dbfa58238a1846bd81ef 02-May-2015 Sanket Padawe <sanketpadawe@google.com> Add new API for getting netId of current wifi network

Bug: 17380953
Change-Id: I44030e5ffb32322667e729303487f66af39c665c
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
5fdecb4165634b27b024ece39d488791532d1658 01-May-2015 Vinit Deshpande <vinitd@google.com> Fix unhandled CMD_GET_MATCHING_CONFIG

This causes ANRs, since the request may not get completed
in certain cases (such as scan only mode).

Bug: 20747903
Change-Id: I40388c16bed7d14386c1c3808ceaccb850ad2a13
ndroid/server/wifi/WifiStateMachine.java
c308372401d89ad7a4ec1e04e72d25f3fc34ddb4 01-May-2015 Prerepa Viswanadham <dham@google.com> Merge commit '5199fba' into master_merge
7ea679c65dd903b1eca6b68019784244a5a369f4 01-May-2015 Prerepa Viswanadham <dham@google.com> Merge commit '624b4e2' into master_merge

Change-Id: Iaf46e8490ccb35519aaa7db6873db6abf93d48a0
f7767c9fa5cbf3c79cffbef5b23c7957c4a7cf06 30-Apr-2015 Zoltan Szatmary-Ban <szatmz@google.com> Merge "Fix NPE on devices without DPM service" into mnc-dev
230e384850ce825e335bb2cb3e06e676b3e9571a 30-Apr-2015 Zoltan Szatmary-Ban <szatmz@google.com> Fix NPE on devices without DPM service

Bug: 20563108
Change-Id: Ie2bda65c834ddad9db8753f7616c2754072551cd
ndroid/server/wifi/WifiConfigStore.java
5199fba99dccfcd89ee7a1a43e4dd545b4106902 21-Apr-2015 Vinit Deshpande <vinitd@google.com> Fix indentation on state chart

Change-Id: I50ea10f375ea215373e11f49a5fd4c1937acf3cf
ndroid/server/wifi/WifiStateMachine.java
8f4eb8631b1b3f3a462d43d280d85983af8ae3e9 29-Apr-2015 Jan Nordqvist <jannq@google.com> Fixed a crash matching home SPs

Change-Id: I1a662063c5043ba9f0e318a8d6c12933194d6997
ndroid/server/wifi/WifiConfigStore.java
2341febfffd241b111577bc20d82c8d15e6a2f40 28-Apr-2015 Andreas Gampe <agampe@google.com> Wifi: RttService must be public

The class is used outside this package, e.g., SystemServiceManager.
It must be accessible.

(cherry picked from commit eeefcd82f4c80048f7cf49bfc1972bdfce5ecf82)

Change-Id: Ifa07c676794fa07c9e13db33107e1ae40d498cf3
ndroid/server/wifi/RttService.java
5b9814fe1afe13f4171c912efa73ba7b54997bb2 28-Apr-2015 Vinit Deshpande <vinitd@google.com> Merge "Fixed FQDN matching of HomeSP." into m-wireless-dev
98b464aee95412a582f8c8b503f0bde7baf122d0 28-Apr-2015 Vinit Deshpande <vinitd@google.com> Merge "Reworked persistence semantics for MO." into m-wireless-dev
49b9bea195f8c4d30bbf3610a444fef3797523c0 28-Apr-2015 Vinit Deshpande <vinitd@google.com> Merge "Fixes related to config persistence in PPS. o Fixed up comparison criteria for rewriting of PPS MO. o Quoting of id_string added to make wpa_supplicant happy. o Expire and creation time of credential fully supported in MO." into m-wireless-dev
ec63e6d7dd5a6f6a4ccf2d55f36571227a846c77 28-Apr-2015 Vinit Deshpande <vinitd@google.com> Merge "Clearing ANQP cache when stopping WiFi service, moved ANQP result handling to DriverStartedState." into m-wireless-dev
eeefcd82f4c80048f7cf49bfc1972bdfce5ecf82 28-Apr-2015 Andreas Gampe <agampe@google.com> Wifi: RttService must be public

The class is used outside this package, e.g., SystemServiceManager.
It must be accessible.

Change-Id: Ifa07c676794fa07c9e13db33107e1ae40d498cf3
ndroid/server/wifi/RttService.java
624b4e283031091716075e5b6fcdab0547fef83a 25-Apr-2015 xinhe <xinhe@google.com> Merge "No Permission check for WiFi RTT" into m-wireless-dev
f84b6a49bc64a11be2382869c04523380116cce3 24-Apr-2015 Etan Cohen <etancohen@google.com> Merge commit 'ea5c862' into merge2
a9831bdcf0a2eb278a4f2b3fc290de6f4d7ad0b4 24-Apr-2015 Etan Cohen <etancohen@google.com> Merge commit '218394c' into merge2
bd6653f996468560cf636e513ec5eda8cbb18b18 24-Apr-2015 Etan Cohen <etancohen@google.com> Merge commit '05d2f4e' into merge2
fa0502b4e2171143f133bb46e03143328c15e995 24-Apr-2015 Etan Cohen <etancohen@google.com> Merge commit 'baa9bdf' into merge2
126f922831da97d28e6a52ffb30d36b9f21233d2 24-Apr-2015 Jan Nordqvist <jannq@google.com> Fixed FQDN matching of HomeSP.

Change-Id: I6a958ea992918e76c8417120801cfff9508f199a
ndroid/server/wifi/WifiConfigStore.java
54d65cf6fa73fd5717ff3791cedb7a1a7d7fa9a0 24-Apr-2015 Lorenzo Colitti <lorenzo@google.com> Merge "Add logging to the "no internet access detected" prompt."
56286fb3e8823d461e899f621587ea0782a98086 24-Apr-2015 Lorenzo Colitti <lorenzo@google.com> Add logging to the "no internet access detected" prompt.

Bug: 20081183
Change-Id: Ic53745a4742c6dd93804e8fb8e70c2506d790e08
ndroid/server/wifi/WifiStateMachine.java
e73629f79c8bd59f0f0857a5101160a4d93b1190 24-Apr-2015 Vinit Deshpande <vinitd@google.com> Fix more logspam from HAL and WifiStateMachine

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

Bug: 20416721
Change-Id: I58f9940d57b27752287e594ecca394c206eb060f
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
2070c02cdd4fc765747121c9b02caf1b1bab89fb 24-Apr-2015 Jan Nordqvist <jannq@google.com> Reworked persistence semantics for MO.

Change-Id: I03c44ea9dae2c07634bc8ce1508c80ef78f1892a
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/hotspot2/Utils.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
ndroid/server/wifi/hotspot2/pps/Credential.java
f3bc3c6dcde09a8e39f0a30febf6ae47e882ce90 24-Apr-2015 Vinit Deshpande <vinitd@google.com> Fix more logspam from HAL and WifiStateMachine

Bug: 20416721

Change-Id: I00eef7c9fbbed1403e73e8184de8956677649b8c
ndroid/server/wifi/WifiStateMachine.java
820d73615f338d6c71f2d75aba0ad8410e9eed3e 22-Apr-2015 Jan Nordqvist <jannq@google.com> Fixes related to config persistence in PPS.
o Fixed up comparison criteria for rewriting of PPS MO.
o Quoting of id_string added to make wpa_supplicant happy.
o Expire and creation time of credential fully supported in MO.

Change-Id: If7e8104bdec396837d32d11b63ce2dced9a29e95
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/anqp/eap/EAPMethod.java
ndroid/server/wifi/configparse/MIMEContainer.java
ndroid/server/wifi/hotspot2/Utils.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
ndroid/server/wifi/hotspot2/pps/Credential.java
ndroid/server/wifi/hotspot2/pps/HomeSP.java
a879e0a04ca77d37e976e1de8e03c5d8e26b3a1b 22-Apr-2015 Vinit Deshpande <vinitd@google.com> Add WifiScanner data in bugreports

This change also adds meat in in dumping the service data
to allow debugging.

Change-Id: I2cfed36270d44952d731dd07233a2bc80b204696
ndroid/server/wifi/WifiScanningServiceImpl.java
bb6942c6b6d129fd8904e341c9ce4a4118ed3e0b 11-Apr-2015 Vinit Deshpande <vinitd@google.com> Fix WifiScanner's getChannelsForBand logspam

Change-Id: Ie0e0ce69877200ea5652f8f11df611cfe7890397
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiScanningServiceImpl.java
b11bfe8318f52585b7fc65cbbe8890aa562eb525 23-Apr-2015 xinhe <xinhe@google.com> No Permission check for WiFi RTT

Bug:19918231
Change-Id: Iee3b8120df3bc2c8c1f02c23c4d43f19b0bdcdb9
ndroid/server/wifi/RttService.java
d57f630f6a7a5fca872d2b96fc4cce1905daee5d 15-Apr-2015 xinhe <xinhe@google.com> TDLS enhancement HAL interface update

Bug:15152152
Change-Id: I6ef4924f8db85244723cdee89166811f058fd675
ndroid/server/wifi/WifiNative.java
4075f980d4f526723d88b6ae3c1c6af14fdfa355 23-Apr-2015 Dianne Hackborn <hackbod@google.com> Merge "Don't allow scans while device is idle."
8366a82ee1bff4c66d3f3642bf0a60538de5d9da 22-Apr-2015 Jan Nordqvist <jannq@google.com> Clearing ANQP cache when stopping WiFi service, moved ANQP result handling to DriverStartedState.

Change-Id: I8b9aa953cbf1309ff2d0174c8a23946b3f7086a8
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiController.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/ANQPData.java
ndroid/server/wifi/hotspot2/AnqpCache.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
a818ef7d4d9a1212daed202eb7b583a9badc9441 22-Apr-2015 Zoltan Szatmary-Ban <szatmz@google.com> Merge "WiFi config editability lockdown for Device Owner created configs"
ea5c862ceca7130bfcbcc4c072d6fae3f433b909 22-Apr-2015 xinhe <xinhe@google.com> Merge "listenning key error on RTT" into m-wireless-dev
f95649f33db0a328cb4c0bb5e10c7075e6c828f8 22-Apr-2015 xinhe <xinhe@google.com> listenning key error on RTT

Bug:20309046
Change-Id: Id0a0ee57b549984118e3e64530e2c29c87caaed7
ndroid/server/wifi/RttService.java
ndroid/server/wifi/WifiNative.java
70be7f18b526243679eaaa5f03b7f53417ecf1c7 11-Apr-2015 Vinit Deshpande <vinitd@google.com> Fix WifiScanner's getChannelsForBand logspam

Change-Id: Ie0e0ce69877200ea5652f8f11df611cfe7890397
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiScanningServiceImpl.java
218394c7dbfc9fb185e9fe405e7bf3a37f42f86e 17-Apr-2015 Jan Nordqvist <jannq@google.com> Changed [gs]etDomSubjectMatch to [gs]etDomainSubjectMatch and added case insensitive matching.

Change-Id: Ic30c8a4a6265b97fe368334c5304275d464fbb79
ndroid/server/wifi/configparse/ConfigBuilder.java
ndroid/server/wifi/hotspot2/omadm/OMAConstructed.java
51dad1d02cb0c3308ea26df198f3057c69690add 17-Apr-2015 xinhe <xinhe@google.com> HAL crash due to debug

Bug:20299517
Change-Id: Idb60c797f620ef58fdd893d9afbe54355449760f
ndroid/server/wifi/WifiNative.java
63cde0cdab3f4f2aadac5e2b3dc5cf1b4a5e30f9 20-Apr-2015 Stuart Scott <stuartscott@google.com> Merge "Move factoryReset to service and protect."
b8671cfafc2830ebddeafcfb2d91f2b39b19019b 09-Apr-2015 Stuart Scott <stuartscott@google.com> Move factoryReset to service and protect.

bug:16161518
Change-Id: I7d099099aaf0a306d0a3c5b63dde0ba5108456c3
ndroid/server/wifi/WifiServiceImpl.java
4f930e99b36d7f2547cec17a00ad8166e30af4bb 17-Apr-2015 Vinit Deshpande <vinitd@google.com> Fix a race condition in WifiScanner

Bug: 20337061

Change-Id: I3d401164f2be7a88fae313f31f56f315b54ca160
ndroid/server/wifi/WifiScanningServiceImpl.java
05d2f4e6f26834a94b53187e6121379a16749088 17-Apr-2015 Jan Nordqvist <jannq@google.com> Various Passpoint Fixes

- Changed lifecycle of MOManager and confined all PPS access to it.
- Fixed topology issues in the MO.
- Added all HomeSP fields to MO.
- A number of tidy ups: Changed to Java7 diamonds, added curlies, "m_" fixes and dropped a few more PARSE-LOG
- Added anonynmous@realm as anonymous identity to HS2.0 configs.
- Implemented domain_suffix_match for AAA server cert matching.

Change-Id: I79c7a545b396ba3cd409d923c4ee339a1d6fea27
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/anqp/DomainNameElement.java
ndroid/server/wifi/configparse/ConfigBuilder.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
ndroid/server/wifi/hotspot2/omadm/MOTree.java
ndroid/server/wifi/hotspot2/omadm/OMAConstructed.java
ndroid/server/wifi/hotspot2/omadm/OMANode.java
ndroid/server/wifi/hotspot2/omadm/OMAScalar.java
ndroid/server/wifi/hotspot2/pps/Credential.java
ndroid/server/wifi/hotspot2/pps/HomeSP.java
baa9bdfd34a95aef26c0099282a7d437739ef8c1 17-Apr-2015 Vinit Deshpande <vinitd@google.com> Merge "Various minor fixes." into m-wireless-dev
d6307b404302949f6dadd14fa0860ff1aec432dc 17-Apr-2015 xinhe <xinhe@google.com> HAL crash due to debug

Bug:20299517
Change-Id: Idb60c797f620ef58fdd893d9afbe54355449760f
ndroid/server/wifi/WifiNative.java
4e940bb499f65b4305dbeb2e01237c43c2b0b42d 15-Apr-2015 Jan Nordqvist <jannq@google.com> Various minor fixes.

Change-Id: I227c67740f7c18f059e37b3c41fd18225365c7d1
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/configparse/ConfigBuilder.java
ndroid/server/wifi/configparse/MIMEContainer.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
ndroid/server/wifi/hotspot2/pps/Credential.java
965101c0a9af6e9194a04b77c22b0e7fcad481a8 16-Apr-2015 Pierre Vandwalle <vandwalle@google.com> Merge commit '5040e99' into mg

Change-Id: I133038f35817681a74664d0ad66594615d35f6e9
c67323bf72e65c3d4d38e99d39bcaedf88683df0 10-Apr-2015 Lorenzo Colitti <lorenzo@google.com> Don't allow apps to trigger explicitlySelected.

Instead, rely on WifiManager to pin these apps to their chosen
network using setProcessDefaultNetwork.

Bug: 20081183
Change-Id: Ic9ae3d4f97ae6dcc0e38fcf8fb5bccfcc02407a5
ndroid/server/wifi/WifiStateMachine.java
4f04c06ae450834328d8f5467d19e9d54b16371f 16-Apr-2015 Lorenzo Colitti <lorenzo@google.com> Merge "Fix WifiStateMachine message numbers."
340b59c0d6f9f46c2fd128946f4346277f437c31 15-Apr-2015 Lorenzo Colitti <lorenzo@google.com> Fix WifiStateMachine message numbers.

This fixes two issues:

1. The values here conflict with the values in m-wireless-dev.
2. The 149 was assigned to CMD_ACCEPT_UNVALIDATED, thus hiding
the previous assignment of CMD_REMOVE_USER_CONFIGURATIONS.

Change-Id: I96a305b11a3e1b32984e2a83252e6326fbca7d78
ndroid/server/wifi/WifiStateMachine.java
a4a473dfad55b2b9edfe5058779531daf01c82f5 16-Apr-2015 Vinit Deshpande <vinitd@google.com> Merge "am f24e3d7..a547460 from mirror-m-wireless-internal-release"
dd490cf1df37b70a8625dc4ec8e712f740dd1e4a 21-Mar-2015 Pierre Vandwalle <vandwalle@google.com> epno initial implementation

Change-Id: I47ede001aa22089bab099072810d648999104091
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
50bb8f65526b16ca8a354fd485d2ed7a343e97ae 15-Apr-2015 Zoltan Szatmary-Ban <szatmz@google.com> WiFi config editability lockdown for Device Owner created configs

Any WiFi configuration created by an active DO app is neither modifiable
nor removable.

Bug:18930324
Change-Id:I3fa986c10b6ff47d1a897794213c225c8c6f579b
ndroid/server/wifi/WifiConfigStore.java
3e351b0c2da2d53bf5b21ffb57df83813d6cc219 06-Apr-2015 Lorenzo Colitti <lorenzo@google.com> Wifi changes for "No internet access detected" prompt.

1. Only set explicitlySelected (which causes ConnectivityService
to display the "No internet access detected, use this network
anyway?") if the connection request came from the system and
not from an app.
2. Don't display the dialog if the saved configuration specifies
that this network is not expected to have an Internet
connection.
3. Save the response of the "no Internet access" dialog in the
wifi configuration.

Bug: 20081183
Change-Id: I4f80245e3aee5075c0833749a28755d20f4da5d6
ndroid/server/wifi/WifiStateMachine.java
03b70b37a8a20cb92d860b5015f6762dcb5e75cc 14-Apr-2015 Dianne Hackborn <hackbod@google.com> Don't allow scans while device is idle.

Change-Id: If682daba7948c64872fc07e539e957cbf9f3d31f
ndroid/server/wifi/WifiServiceImpl.java
5ee18dc63952ff80f4ea21296a0df4f7b27eafe6 15-Apr-2015 Vinit Deshpande <vinitd@google.com> am f24e3d7..a547460 from mirror-m-wireless-internal-release

a547460 Fix incorrect matching of Passpoint networks
93a1dbd fix RTT crashes runtime This is due to local referencs have been used up Bug:20143987
5faa29d changes to support wifi_logger.h API changes
a7ead3d Corrected and tightened up MO tree and mapping from/to configs.
71cd814 Merge "Use PasspointMatchInfo to select good passpoint network" into m-wireless-dev
0c14982 Merge "Store PasspointMatchInfo in ScanDetailCache" into m-wireless-dev
8eefaf2 Use PasspointMatchInfo to select good passpoint network
4d381bc Store PasspointMatchInfo in ScanDetailCache

Change-Id: If9ce95af4968cee4a458dddf21151eaf015880dc
f7afe8414224cb9a959c18763a489ef33a8265fe 06-Apr-2015 Lorenzo Colitti <lorenzo@google.com> Make connecting to a wifi network set config.lastConnectUid.

Bug: 20081183
Change-Id: I2add0cfe870f18dd3ef98e7a311b5ac75e5438d9
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
37f96bc22bc79950a030cb13d19146c2065d4103 14-Apr-2015 Vinit Deshpande <vinitd@google.com> Merge "fix default threshold for wifiscanner scan"
73649368ebda32ba0852280add45387506c226f0 14-Apr-2015 Navtej Singh Mann <navtejsingh@google.com> fix default threshold for wifiscanner scan

Change-Id: Icc74072077a9e948db5874081fe46da84facfa55
ndroid/server/wifi/WifiScanningServiceImpl.java
a547460e835d6dfde84eda72df470846d11ba807 11-Apr-2015 Vinit Deshpande <vinitd@google.com> Fix incorrect matching of Passpoint networks

Change-Id: I09cd67d666a781ec6eb2c0f339331d5725149799
ndroid/server/wifi/ScanDetailCache.java
ndroid/server/wifi/WifiConfigStore.java
6aef95a3cfa0b825ff93c45e95f89cc8c5c85164 11-Apr-2015 Prerepa Viswanadham <dham@google.com> Merge commit '70deeca' into merge_work

Change-Id: I77fdf057818f0bc2742e923e71b248648e152e1a
b2ee665db50bad2a0df9b495fc5d6b1dc40a5328 11-Apr-2015 Prerepa Viswanadham <dham@google.com> Merge commit 'bed4746' into merge_work

Change-Id: Ie8a9a1e34650e8b177b99acd2fbf17b5f70be592
a7ead3d4be45cb69bb5851f1a6f9673e93607fc2 10-Apr-2015 Jan Nordqvist <jannq@google.com> Corrected and tightened up MO tree and mapping from/to configs.

Change-Id: Ia5d8aac3131b5b1985c200b565b692499cc4ae92
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/anqp/eap/EAPMethod.java
ndroid/server/wifi/anqp/eap/NonEAPInnerAuth.java
ndroid/server/wifi/configparse/ConfigBuilder.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
ndroid/server/wifi/hotspot2/pps/Credential.java
8eefaf2c281b44fb7a4d951ba587f447800c4b4f 09-Apr-2015 Vinit Deshpande <vinitd@google.com> Use PasspointMatchInfo to select good passpoint network

This allows selection using various parameters that we care
about; such as WAN metrics et al.

This ignores RSSI based selection of BSSIDs for now; that
may come in later.

Change-Id: Ic88f41a0b26d031c11765e7988deeb092a6472ca
ndroid/server/wifi/ScanDetailCache.java
ndroid/server/wifi/WifiAutoJoinController.java
4d381bc39f5263effdae73ec99065eb299b806ca 09-Apr-2015 Vinit Deshpande <vinitd@google.com> Store PasspointMatchInfo in ScanDetailCache

This change moves ScanDetailCache as a stand alone class; since
it has lot of logic related sorting and finding candidates.

This will get used in network selection going forward.

Change-Id: If039779f4274dca64fa7aceae62dca26caeae2d4
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/ScanDetailCache.java
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/PasspointMatchInfo.java
d33dc0d01f16ef7c338c3e3c82eaefa9e914ff83 03-Apr-2015 Jan Nordqvist <jannq@google.com> Refined SSID parsing in NetworkDetail.

Change-Id: Iaf5d796df472a501ce188755061600b255181c46
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
a1edc185d46d85e04930a5e12b465de9fea64afe 19-Mar-2015 Jan Nordqvist <jannq@google.com> Various fixes for Passpoint.

A couple of fixes in AnqpCache, better logging.

Fixed BufferUnderdflowException in NetworkDetail.

Bug: 19888749

Modifications to support WiFi config app.

Rework to fit config builder into apps framework.

API for WiFi config app, 3GPP matching, BufferUnderflowException bug fix and some other fixes.

Fixed a log statement.

Clean up.

Change-Id: I763d47b9c7943a8aa4c94afd2678ccea2dd915cc
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/anqp/eap/EAP.java
ndroid/server/wifi/configparse/ConfigBuilder.java
ndroid/server/wifi/configparse/MIMEContainer.java
ndroid/server/wifi/hotspot2/ANQPData.java
ndroid/server/wifi/hotspot2/AnqpCache.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
ndroid/server/wifi/hotspot2/Utils.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
ndroid/server/wifi/hotspot2/omadm/OMAParser.java
ndroid/server/wifi/hotspot2/pps/Credential.java
ndroid/server/wifi/hotspot2/pps/HomeSP.java
f10f5212bf1b6d35f36509e4c72f8bdd21c5e3bb 06-Apr-2015 Vinit Deshpande <vinitd@google.com> Handle potential buffer underflow when parsing beacons

Bug: 20046298
Change-Id: I7a1dd0caf99131c622ea84fd65883b57eaf8bd41
ndroid/server/wifi/WifiStateMachine.java
ccbe820337a230f0827f734aca2c51a244a0837f 04-Apr-2015 Vinit Deshpande <vinitd@google.com> Implement 'Available via Passpoint' feature

This also fixes the issues related to explicit connection
to passpoint AP, and fixes occassional mention of
'connected via Wi-Fi Assistent'

Change-Id: Ib4de956f2ea29709d0212fbcb392815644800e78
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
fe6ed7981b30e478ea620432a48f9517bccf7583 02-Apr-2015 Etan Cohen <etancohen@google.com> Merge commit 'dfc7d48' into merge_yet_again
1b707e1788e3a2be6f341b3d02e4c5700efd7fee 02-Apr-2015 Etan Cohen <etancohen@google.com> Merge commit '78d94b8' into merge_yet_again
05d04f448d8e2d44f9eae8e54f17a7bdf57ca1f7 02-Apr-2015 Etan Cohen <etancohen@google.com> Merge commit 'b151395' into merge_yet_again
a389bb4bb5a30d77d026851d2f57b60d1ef6a5ab 01-Apr-2015 Vinit Deshpande <vinitd@google.com> Fix a crash in auto-join selection

Change-Id: I91b1ded0477b098acbc21ee90a427ea2c0a377a9
ndroid/server/wifi/WifiConfigStore.java
33f9ad2442844df078dde3ae67961e7132a8a48d 31-Mar-2015 Vinit Deshpande <vinitd@google.com> When user preference doesn't exist, use built-in security preference

This change implements wpa-personal/enterprise over passpoint over
open network preference by including it as default user preference.
If user preference is present, then it is used, when it is not
present this peference is used.

Change-Id: Iae9e9dd0c33baed85f43361514fd42f34533c5f4
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiStateMachine.java
d0f5ce9218deb720d6ae33113257a1f1c2019af7 31-Mar-2015 Vinit Deshpande <vinitd@google.com> Merge "Stop using scanResultCache, and move to ScanDetailCache" into m-wireless-dev
25ee2d5d30434712b28aef6eec9460035101e493 31-Mar-2015 Vinit Deshpande <vinitd@google.com> Stop using scanResultCache, and move to ScanDetailCache

Change-Id: I28898eb8f1dfc0b8d6a8f9029e94784e99565fa1
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
5f5a449365f9f0a716d4b1ccddb3735d088d7f04 28-Mar-2015 Vinit Deshpande <vinitd@google.com> Merge "Fix a crash in WifiStateMachine"
1d38d75ab764e0d1f89154e34a3fab5b95f2c618 27-Mar-2015 Vinit Deshpande <vinitd@google.com> Fix a crash in WifiStateMachine

Bug: 19949563

Change-Id: I8fc910154783028b57ea3239a79af3376cb1edd9
ndroid/server/wifi/WifiStateMachine.java
dfc7d4893df5662f5bbad7a94c662e4b02d685e9 27-Mar-2015 Navtej Singh Mann <navtejsingh@google.com> Add support for DFS channel band selection for scanning

Bug:19963571
Change-Id: I3abc5e2a275cbb1e6058710ace54813029ed071b
ndroid/server/wifi/WifiScanningServiceImpl.java
c1072acda7dc8b9d7bc4a9bb0b1177b14ecaf276 27-Mar-2015 xinhe <xinhe@google.com> remove wifi beacon parsing debug log

Bug:19771472
Change-Id: I3b51390d9c825520b6eddea452620f6e07be69ab
ndroid/server/wifi/hotspot2/NetworkDetail.java
78d94b854b98a094c8659cdc33b1061a31d43aaf 25-Mar-2015 Vinit Deshpande <vinitd@google.com> Merge "EAP-AKA' : Implementation in WiFiStateMachine" into m-wireless-dev
0db2f21276305cc6dfd0b216be355ab85422d49f 25-Mar-2015 Vinit Deshpande <vinitd@google.com> Merge "fix EAP-SIM End-to-End issue" into m-wireless-dev
0669ce85174cdca56edfc9f3bf131012c07b70fa 25-Mar-2015 Vinit Deshpande <vinitd@google.com> Merge "WIFI: EAP-AKA End-To-End" into m-wireless-dev
b322e956c1ce514ca4edcdfe4c712adb85db7b5b 25-Mar-2015 Vinit Deshpande <vinitd@google.com> Merge "EAP-SIM: handle dynamic identity request [DO NOT MERGE]" into m-wireless-dev
e9f41b0c0220c689f7468c1b2149db7ec1995e32 11-Dec-2014 Jean-Michel Bachot <jean-michel.bachot@intel.com> EAP-AKA' : Implementation in WiFiStateMachine

Use external SIM processor:
retrieve AKA' challenges responses from Telephony stack
Inject AKA'challenges responses to wpa_supplicant

Change-Id: Ic103b25ad58807eebd5e0f8eefe3bfc02397aedc
Signed-off-by: Jean-Michel Bachot <jean-michel.bachot@intel.com>
ndroid/server/wifi/WifiStateMachine.java
ea1222cb493a909abdf7066195284efe0d39533a 13-Nov-2014 Honore Tricot <honorex.tricot@intel.com> fix EAP-SIM End-to-End issue

- fix connection issue when sim type is SIM
- avoid challenge attempts when RAND is empty that cause telephony exception

Change-Id: I71dd1f4804e406731d5b84fc792acabc0ee60e8d
Signed-off-by: Honore Tricot <honorex.tricot@intel.com>
ndroid/server/wifi/WifiStateMachine.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>
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.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>
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
b151395e1d4de62ea8a9254e69e1878d3d1cde28 25-Mar-2015 Vinit Deshpande <vinitd@google.com> Set passpointNetwork flag and a crash on forgetNetwork

Crash is due to an incorrect lookup of WifiConfiguration.

Change-Id: Ib273f820f149fd195c7b4cb9b74ae783b2518550
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/WifiConfigStore.java
2740001002132ed305034de64a58b0805fa4e392 25-Mar-2015 Pierre Vandwalle <vandwalle@google.com> fix typo in wifi power caldulation API

Change-Id: Ie8493ef98a20d1b36fa4dfd582e56c8db04d07a9
ndroid/server/wifi/WifiServiceImpl.java
f9f7c4ceed78d380a78c2d79a2af3d0cf473e065 25-Mar-2015 Prerepa Viswanadham <dham@google.com> Fix build after m-wireless-internal-release merge

Change-Id: I79ad5b380c06d2096c19328c4f4258abe110c8d8
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
84a11a3d54b7c6f043dcf7a874b7c0d45709677a 24-Mar-2015 Pierre Vandwalle <vandwalle@google.com> add WiFi energy calculation

Change-Id: Ic368558be45eed7c1c49096966917166b641d1ac
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
e9418ca9dd1975f84260e491a041cac87381693c 24-Mar-2015 Prerepa Viswanadham <dham@google.com> Merge remote-tracking branch 'goog/mirror-m-wireless-internal-release' into master_merge

Change-Id: Id9033b0a7d6bd3c8ecab1648fc8c67feae18c41c
939177ff615062ec826601d536466875d8457375 23-Mar-2015 xinhe <xinhe@google.com> add Framework for set country code through HAL

Bug:19896389
Change-Id: Idc92e11b75db71ab6b9bc7ee54889bd41c68b9ce
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
b89d5aca82817b0916ab692eb29c578449a286ce 23-Mar-2015 Vinit Deshpande <vinitd@google.com> Set default value of num_scans to 10

Making it same as what we had in m-wireless-dev.

Change-Id: Idc9622e30da5a41245c30223d9bd788f81128c9a
ndroid/server/wifi/WifiScanningServiceImpl.java
bae8e9bc7b8c17f55784ce695bc6b76825b2389c 20-Mar-2015 Vinit Deshpande <vinitd@google.com> Merge "Handle bad IEs coming from APs more gracefully"
418d56ca82dbb35f51c866d4d1069979859ecf3e 20-Mar-2015 Vinit Deshpande <vinitd@google.com> Handle bad IEs coming from APs more gracefully

Bug: 19788443
Change-Id: I0c781c74878b57933777171e3c6230d88cb42a1a
ndroid/server/wifi/WifiStateMachine.java
c55fc72b3c2fa2f47a52138e53a86460ba87a1c5 19-Mar-2015 Pierre Vandwalle <vandwalle@google.com> fix writing of networkHistory.txt file
Bug:19770620

Change-Id: I469a50ffc5f33101ed5e46eb5603689f2982f30d
ndroid/server/wifi/WifiConfigStore.java
24eeb0b725974dd56031205c5dd877040d67cad3 19-Mar-2015 Vinit Deshpande <vinitd@google.com> Merge "Fix an incorrectly merged change to start wifi HAL"
b0b20342e849017c98b33d8c500dff643ec01b6a 19-Mar-2015 Vinit Deshpande <vinitd@google.com> Fix an incorrectly merged change to start wifi HAL

This is breaking quite a few things; softAP doesn't work
nor does GScan etc.

Bug: 19786626
Change-Id: Iaa225be272a81df0272fc16a876ee04124abb748
ndroid/server/wifi/WifiNative.java
bcbe8d690aec513cb1b753160b3b4d7e306a9570 19-Mar-2015 Vinit Deshpande <vinitd@google.com> Merge "Disable user consent for connecting to app-added networks"
ac5ef7ed57cc198486d4c411f39ca89192ed6395 19-Mar-2015 Alan Viverette <alanv@google.com> Hide NetworkDetail logspam behind debug flag

Bug: 19771472
Change-Id: I2ea9f6e040bc094fc331dcf46a5af84bc28d0f87
ndroid/server/wifi/hotspot2/NetworkDetail.java
0047ccf563baa288777e06c6fe95d3681fcf5ccd 18-Mar-2015 Vinit Deshpande <vinitd@google.com> More bug fixes to enable passpoint

Change-Id: Icbf65a731c93deecc49178f9628b1ee3a9c91a00
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
7f3218ac0469ec2064253325708fe17550b43dfa 19-Mar-2015 Vinit Deshpande <vinitd@google.com> Disable user consent for connecting to app-added networks

Bug: 19829426
Change-Id: I6d19600fdf5e2707be0cb11d57c22de2170f04c2
ndroid/server/wifi/WifiStateMachine.java
7d6301ead19afdf3de37455e9ed133c25b4938cd 19-Mar-2015 Vinit Deshpande <vinitd@google.com> Fix a runtime crash introduced by incorrect JNI mapping

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

Change-Id: Ie08d4184efe40c91969914ce84a1a6f1d255ec21
ndroid/server/wifi/WifiLogger.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
228fedec31770b8469432a513732d4df82987b83 19-Mar-2015 Vinit Deshpande <vinitd@google.com> Merge "Fixed bug in IE parser." into m-wireless-dev
398823d45a240ff90ff2ffab3ff4a8b8646f24c9 19-Mar-2015 Jan Nordqvist <jannq@google.com> Fixed bug in IE parser.

Change-Id: I607081f2a651a7859b53f4b5cdda46c48e1e6480
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
e9726dc7bb4af2fd9370d6eb83fe6f834b7918ec 18-Mar-2015 xinhe <xinhe@google.com> Merge "Change rtt Framework interface" into m-wireless-dev
12cf388ecf3b2aa5ba66ed680b931fa356ab75b5 13-Mar-2015 xinhe <xinhe@google.com> Change rtt Framework interface

Bug:19735392
Change-Id: Ie64e4609c9804c904836bb37255d4efe9211f39f
ndroid/server/wifi/RttService.java
ndroid/server/wifi/WifiNative.java
d3fb9cbb12d013dd70e672ace5c41ab18a3679a0 18-Mar-2015 Vinit Deshpande <vinitd@google.com> Connect to passpoint end-to-end

Change-Id: I9bdec486b2a5963ce8858ad1ed322f6d62e6349f
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/anqp/eap/EAP.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/hotspot2/PasspointMatchInfo.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
ndroid/server/wifi/hotspot2/pps/Credential.java
f5d683bceb3aff47282636e425425f3733c0b45f 18-Mar-2015 Pierre Vandwalle <vandwalle@google.com> export API to disable autojoin scan initial implementation
automerge: e2614ba

* commit 'e2614ba1b774529ee68cc4ac189f7492cff89db3':
export API to disable autojoin scan initial implementation
a85a0bf4acd319bb37091565c19b33290bf98618 15-Mar-2015 Vinit Deshpande <vinitd@google.com> Removed older passpoint code that is no longer in use

Change-Id: I03da89238a3abd8c00f694914c41e26ac40fca2e
ndroid/server/wifi/passpoint/WifiPasspointCertificate.java
ndroid/server/wifi/passpoint/WifiPasspointCertificateHelper.java
ndroid/server/wifi/passpoint/WifiPasspointClient.java
ndroid/server/wifi/passpoint/WifiPasspointDmClient.java
ndroid/server/wifi/passpoint/WifiPasspointDmTreeHelper.java
ndroid/server/wifi/passpoint/WifiPasspointHttpClient.java
ndroid/server/wifi/passpoint/WifiPasspointService.java
ndroid/server/wifi/passpoint/WifiPasspointServiceImpl.java
ndroid/server/wifi/passpoint/WifiPasspointSoapClient.java
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
af955ffa0082189fb688429732427c333f2491ce 12-Mar-2015 Vinit Deshpande <vinitd@google.com> Integration fixes to add/save/restore passpoint networks

Change-Id: Ic7fad523e1fe2bdc7ac9509b5998576b62909fcd
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
ndroid/server/wifi/hotspot2/omadm/MOTree.java
ndroid/server/wifi/hotspot2/omadm/OMAConstructed.java
ndroid/server/wifi/hotspot2/omadm/OMANode.java
ndroid/server/wifi/hotspot2/omadm/OMAScalar.java
ndroid/server/wifi/hotspot2/pps/Credential.java
fea443b1b8807443544dfdb29a9c237b3ccf964a 17-Mar-2015 Jan Nordqvist <jannq@google.com> Tightened up and moved IE parse syntax checking.

Change-Id: I5e764dfb4f4d2d83466ee9659da86679bed403e7

Fixed up previous check in.

Change-Id: I8ef944b23d3cb6c8c426377442890bc366593e47
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
55482d0e98028d33b3b707498bd6136e209728a0 17-Mar-2015 Vinit Deshpande <vinitd@google.com> Merge "Introduced scoring of PassspointMatchInfo" into m-wireless-dev
cd605289f40664a2bfa051986a544f1d050961da 17-Mar-2015 Jan Nordqvist <jannq@google.com> Introduced scoring of PassspointMatchInfo

Change-Id: Ib284af5c4e6ba4f0a22df90ca907e8be9a7de90c
ndroid/server/wifi/hotspot2/PasspointMatchInfo.java
0ebfc80ff9c9db920ed1cea01e3518a7b4b856ac 17-Mar-2015 Lorenzo Colitti <lorenzo@google.com> Merge "Support using the Java DHCP client." into m-wireless-dev
207af567531a0813a9c8651d28bc4bda0ea22088 16-Mar-2015 xinhe <xinhe@google.com> remove wifi beacon parsing debug log

Bug:19771472
Change-Id: Ibb56afdb8edbd25396ac4ab51d685a39f1df9c1f
ndroid/server/wifi/hotspot2/NetworkDetail.java
660c10ba84cfa370896750855511d81b50759313 05-Mar-2015 Lorenzo Colitti <lorenzo@google.com> Support using the Java DHCP client.

Change-Id: I296d1481d79cc22420b98a9455f86fd80d02e694
ndroid/server/wifi/WifiStateMachine.java
8401b58cd0198a8068cd6ad90215e3cd7fb2c5d0 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "add 2 side RTT support on scan"

merged from goog/mirror-m-wireless-internal-release
243931f add 2 side RTT support on scan
00367222c429bcbe2f6071f480981a049cf5aaf9 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Couple of bug fixes to enable/disable wifi"

merged from goog/mirror-m-wireless-internal-release
e2434ec Couple of bug fixes to enable/disable wifi
8b63d114d1cbfd270f6d2f07675fafa3183b38c7 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "HS20: Selection code moved to WifiAutoJoinController"

merged from goog/mirror-m-wireless-internal-release
ef1567e HS20: Selection code moved to WifiAutoJoinController
494ea3f652ebb1f5fd626848000a7e52fa1260fe 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "break missing for P2P_CONNECTION_CHANGED"

merged from goog/mirror-m-wireless-internal-release
8433fd1 break missing for P2P_CONNECTION_CHANGED
3346645330acde6a938289c47654b0a524205100 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "country code setting broken"

merged from goog/mirror-m-wireless-internal-release
80d14d6 country code setting broken
2c6b0bfdf07eedc5a646af26e4e552aa477b8fc5 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Introduce ANQP cache."

merged from goog/mirror-m-wireless-internal-release
751c5a4 Introduce ANQP cache.
ec544b277cb2444f66fa1738027874e057048061 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Integrate passpoint with existing Wifi infrastructure"

merged from goog/mirror-m-wireless-internal-release
77f2b82 Integrate passpoint with existing Wifi infrastructure

Change-Id: If4e54914a5c2c37733e488969e85a3a8312bb71d
44c4650300148f52d476708790074ee0ae4ba3dd 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Passpoint API - Take 1"

merged from goog/mirror-m-wireless-internal-release
03e92b9 Passpoint API - Take 1
a4decb57ff612b21dade7c732f0a73dd4081947a 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Unable to see Tethering/portable Hotspot SSID"

merged from goog/mirror-m-wireless-internal-release
b830d76 Unable to see Tethering/portable Hotspot SSID
9b5fbb7be00bbd41d4efdb1ac6c641f4628b0cd9 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "get channel list from driver for SoftAP channel selection"

merged from goog/mirror-m-wireless-internal-release
8262822 get channel list from driver for SoftAP channel selection
68cfb779bd412bd016696bd1085c9eeda6501590 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Updating scan status after scan for full scan result completed"

merged from goog/mirror-m-wireless-internal-release
2b26ad1 Updating scan status after scan for full scan result completed
0f7a675fa6a6d12db478d0ddb413cbe9e151a478 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "send network state changed broadcast when BSSID change"

merged from goog/mirror-m-wireless-internal-release
e7c2a0e send network state changed broadcast when BSSID change
8eb05b1d0312b1699d95a20a0375253782374307 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Added a comment."

merged from goog/mirror-m-wireless-internal-release
e0a4f90 Added a comment.
08c90dffcc1af42d13394d7893426f1e22dc28c1 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Credential/profile storage added, completed network matching and added HS20 Simulator."

merged from goog/mirror-m-wireless-internal-release
71a988c Credential/profile storage added, completed network matching and added HS20 Simulator.
b78e5df0e45617f8bad616934d0014d28ba78788 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "A few more bug fixes and addition of Icon and Home realm queries."

merged from goog/mirror-m-wireless-internal-release
7b2caa2 A few more bug fixes and addition of Icon and Home realm queries.
d14fd7e3a89abf15e0224599fe38e7f71fda81c2 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Fix getScanResults API call for fetching the scan results"

merged from goog/mirror-m-wireless-internal-release
14aadf3 Fix getScanResults API call for fetching the scan results
6e54e0738e517318eb116b4b4768d74966583c4f 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Fixed a couple of inconsistencies around method length."

merged from goog/mirror-m-wireless-internal-release
3be1b3f Fixed a couple of inconsistencies around method length.
e6bc410414babb0a9211019816afaaceefa937dc 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Bug fixes after test run. First pass all OK."

merged from goog/mirror-m-wireless-internal-release
777f4fc Bug fixes after test run. First pass all OK.
3ae5d2f8ee095a39d180824653e781e9cc76f2d6 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Base Hotspot 2.0 code (moved from base)."

merged from goog/mirror-m-wireless-internal-release
6a3903f Base Hotspot 2.0 code (moved from base).
3e1df321a7486739e7f4c3c9d27a9595d91db14b 15-Mar-2015 Vinit Deshpande <vinitd@google.com> am "set softAP on a specified band, including both 2.4 and 5 GHz band"

merged from goog/mirror-m-wireless-internal-release
0e8f0d8 set softAP on a specified band, including both 2.4 and 5 GHz band
e2614ba1b774529ee68cc4ac189f7492cff89db3 13-Mar-2015 Pierre Vandwalle <vandwalle@google.com> export API to disable autojoin scan initial implementation

Change-Id: I504f135ab91c5e483a92306a9b96d70b80f11362
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
73185809f4a44a8ee272afe3e5253496aeb966ce 13-Mar-2015 Lorenzo Colitti <lorenzo@google.com> Don't crash the system when an element is too long.

Change-Id: I09b5ed2713ea470dc410f7f2d9cc84413843023c
ndroid/server/wifi/hotspot2/NetworkDetail.java
a7992ef326a670a5a3ae7ccfe6da41649f672104 13-Mar-2015 Vinit Deshpande <vinitd@google.com> am "add 2 side RTT support on scan"

merged from partner/m-wireless-wifi-dev
243931f add 2 side RTT support on scan
2b4e16a18872d4fd2d562aa3196641b07218ef50 10-Mar-2015 Vinit Deshpande <vinitd@google.com> Merge "Workaround multiple onClick events"
4f5ea4c36f490f9427b49b7818deda15a8ef9b94 09-Mar-2015 Vinit Deshpande <vinitd@google.com> Workaround multiple onClick events

User consent dialog box's onClick() event may get called multiple
times on certain occassions. This results in newMessage being sent
twice; which isn't correct.

This change works around that problem by making onClick() work only
on first try. Subsequent onClicks() are ignored.

Bug: 19641226
Change-Id: I6e6ff8cf6921c53670db1f4dfca28b45dd384268
ndroid/server/wifi/WifiStateMachine.java
186f7513a080eb1a419b6d83286d62961168a5fe 27-Feb-2015 Adam Lesinski <adamlesinski@google.com> Change to use new Structure

Change-Id: I5c6b23b8e1441d4de9056aa959ddedf297823bec
ndroid/server/wifi/WifiServiceImpl.java
b88096a09212ab483e1a7b8b3a6cde011d8fb0e6 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Couple of bug fixes to enable/disable wifi"

merged from partner/m-wireless-wifi-dev
e2434ec Couple of bug fixes to enable/disable wifi
a5c1a1d6af3ce2586f41cf44477837a7488d600c 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "HS20: Selection code moved to WifiAutoJoinController"

merged from partner/m-wireless-wifi-dev
ef1567e HS20: Selection code moved to WifiAutoJoinController
5268e39bcc84eca60a42c98a623583cb3e89206e 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "break missing for P2P_CONNECTION_CHANGED"

merged from partner/m-wireless-wifi-dev
8433fd1 break missing for P2P_CONNECTION_CHANGED
e1e919cdd71dc4ec0d852e0ba62a1901e6c51e33 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "country code setting broken"

merged from partner/m-wireless-wifi-dev
80d14d6 country code setting broken
265b87e9aa6d11f6b1ae3023e28b1f58290f907f 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Introduce ANQP cache."

merged from partner/m-wireless-wifi-dev
751c5a4 Introduce ANQP cache.
171bc9b46cd9443088412dd3234b220f4d757524 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Integrate passpoint with existing Wifi infrastructure"

merged from partner/m-wireless-wifi-dev
77f2b82 Integrate passpoint with existing Wifi infrastructure

Change-Id: I20355d2554ee38509c21aa954d21435c6b9a3716
03ec2b718f384de591ffaa525e5d0e8070aa3c57 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Passpoint API - Take 1"

merged from partner/m-wireless-wifi-dev
03e92b9 Passpoint API - Take 1
d061f6840535717fae0d4f29bce6d7435b1cdfb8 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Introduce onLost event on bssid hotlist [DO NOT MERGE]"

merged from partner/m-wireless-wifi-dev
d476240 Introduce onLost event on bssid hotlist [DO NOT MERGE]
fd40440cc72f538babcf55d3c1d4d3f4eaa5f1a1 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "updated number of default scan to cache"

merged from partner/m-wireless-wifi-dev
1ef80d7 updated number of default scan to cache
b67b04466e7b85e9d8150d473088a9a59784220d 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Unable to see Tethering/portable Hotspot SSID"

merged from partner/m-wireless-wifi-dev
b830d76 Unable to see Tethering/portable Hotspot SSID
26a5c2826a5a00aa4ed577b038fb34eabf767df5 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "get channel list from driver for SoftAP channel selection"

merged from partner/m-wireless-wifi-dev
8262822 get channel list from driver for SoftAP channel selection
8a93bedee523ffcf4c243db4610b90400e47a093 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Updating scan status after scan for full scan result completed"

merged from partner/m-wireless-wifi-dev
2b26ad1 Updating scan status after scan for full scan result completed
3241c8afcaaed22eb33f9f2aa9e8a6e25ddde335 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Enable DFS"

merged from partner/m-wireless-wifi-dev
0465ff5 Enable DFS
9119ee46557d638b5b560e516b6b71e0c10ac7bf 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Added a comment."

merged from partner/m-wireless-wifi-dev
e0a4f90 Added a comment.
e84f0749f40f1e795bafcbaf2fe5863399ac4a9b 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Credential/profile storage added, completed network matching and added HS20 Simulator."

merged from partner/m-wireless-wifi-dev
71a988c Credential/profile storage added, completed network matching and added HS20 Simulator.
861e86ce6da66c0bea720aaab0815b366f9e0f11 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "A few more bug fixes and addition of Icon and Home realm queries."

merged from partner/m-wireless-wifi-dev
7b2caa2 A few more bug fixes and addition of Icon and Home realm queries.
7b1242ec1a955d3f342c6739d022ac0f04529581 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Fix getScanResults API call for fetching the scan results"

merged from partner/m-wireless-wifi-dev
14aadf3 Fix getScanResults API call for fetching the scan results
ff81d730a25298a6d149a63ebf6679cec464695c 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Fixed a couple of inconsistencies around method length."

merged from partner/m-wireless-wifi-dev
3be1b3f Fixed a couple of inconsistencies around method length.
98e35a9d2944d70a593788ce57379bd4ee507ca1 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Bug fixes after test run. First pass all OK."

merged from partner/m-wireless-wifi-dev
777f4fc Bug fixes after test run. First pass all OK.
6ac188f37e4b758360222b31dc4f04ca587fb187 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Base Hotspot 2.0 code (moved from base)."

merged from partner/m-wireless-wifi-dev
6a3903f Base Hotspot 2.0 code (moved from base).
73ad1c3d81664ed0bd70d063ac8b549c26f3d187 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "set softAP on a specified band, including both 2.4 and 5 GHz band"

merged from partner/m-wireless-wifi-dev
0e8f0d8 set softAP on a specified band, including both 2.4 and 5 GHz band
019a91c131ceeafe25b2737581cef4296855a061 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "wifi: Use 'set setband' instead of private 'driver setband' [DO NOT MERGE]"

merged from partner/m-wireless-wifi-dev
03cdd62 wifi: Use 'set setband' instead of private 'driver setband' [DO NOT MERGE]
ac7e8d8178547e03cd0cec34356d95fcaa7c033a 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "Bring in passpoint code [DO NOT MERGE]"

merged from partner/m-wireless-wifi-dev
e91eb1b Bring in passpoint code [DO NOT MERGE]
f959e53fa53b108a093cfb88f545f14d2ee92fc7 07-Mar-2015 Vinit Deshpande <vinitd@google.com> am "New Additions to WifiScanner APIs [DO NOT MERGE]"

merged from partner/m-wireless-wifi-dev
83a674a New Additions to WifiScanner APIs [DO NOT MERGE]
243931f3474f6235cfcf5c1a55fa2f192ee264ae 02-Mar-2015 xinhe <xinhe@google.com> add 2 side RTT support on scan

Bug:19533713
Change-Id: I3076cba3c7c7d5f234caa7e35ab96dd3f7471aa2
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
e2434ec1d0c1c75709f55dcee5e8943c1d68e6c1 03-Mar-2015 Vinit Deshpande <vinitd@google.com> Couple of bug fixes to enable/disable wifi

It is broken, because we now try to read/write passpoint
configurations. Few null and empty checks are missing in
that code path.

Bug: 19568112

Change-Id: I4bfcbf95e19b050ba40d9df006c0f1e4880414ed
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
1e6b232eb572189f976a7813c3b770752be8e3b7 03-Mar-2015 Vinit Deshpande <vinitd@google.com> am 9dadadf7: Resolved conflicts for merge of commit \'c8d832c4\'

* commit '9dadadf7087f9226817712156ce0fe09f350196b':
EAP-SIM: handle dynamic identity request
6cf462d04c29b789f1dd9ce58f966e9a65b70f74 05-Feb-2015 Pierre Vandwalle <vandwalle@google.com> send network state changed broadcast when BSSID change

Change-Id: I1920d8656a9db0aead90787b5049106a5e7ab538
ndroid/server/wifi/WifiStateMachine.java
9dadadf7087f9226817712156ce0fe09f350196b 02-Mar-2015 Vinit Deshpande <vinitd@google.com> Resolved conflicts for merge of commit 'c8d832c4'

Change-Id: Ic887b530f9e73cc25249d9b380581712392241fb
ef1567e413c9ed5f5c4fdb9e354861632f7b2f87 25-Feb-2015 Jan Nordqvist <jannq@google.com> HS20: Selection code moved to WifiAutoJoinController

Change-Id: Ic2f713758ec20f98f63d55b4a610e4dca07742fb
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/anqp/HSConnectionCapabilityElement.java
ndroid/server/wifi/anqp/IPAddressTypeAvailabilityElement.java
ndroid/server/wifi/hotspot2/ANQPData.java
ndroid/server/wifi/hotspot2/AnqpCache.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/hotspot2/PasspointMatchInfo.java
ndroid/server/wifi/hotspot2/SelectionManager.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
ndroid/server/wifi/hotspot2/Utils.java
49bc8dd35845318cd9bc5ce9064fc1ad33bbece8 27-Feb-2015 xinhe <xinhe@google.com> Sprout device falls in a reboot loop when flashed with Master release builds

Bug:19359246
Change-Id: I1711451dbf3117e8fe0ba3bd113c18603ebf82bd
ndroid/server/wifi/WifiAutoJoinController.java
8433fd1fc75809033bdd207e80a044b1badfa7b7 26-Feb-2015 xinhe <xinhe@google.com> break missing for P2P_CONNECTION_CHANGED

Bug:19517516
Change-Id: I4368b81b8e757c7223f686070ecdbb0be312a191
ndroid/server/wifi/WifiStateMachine.java
80d14d67a956e6c69433470aaa73100898166efa 24-Feb-2015 xinhe <xinhe@google.com> country code setting broken

On branch xin_country_code_opt

Bug:19462483
Change-Id: I18ff2d4d5dc16049386d1e60b82da13a97bb887f
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
751c5a4496b6f90656eb24caa35f584d8976063d 24-Feb-2015 Jan Nordqvist <jannq@google.com> Introduce ANQP cache.

Change-Id: Id9bf948ef4aa810b0c2606bd1b0010a43ee564d7
ndroid/server/wifi/hotspot2/AnqpCache.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
ndroid/server/wifi/ScanDetail.java
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/anqp/ANQPFactory.java
ndroid/server/wifi/anqp/CapabilityListElement.java
ndroid/server/wifi/anqp/CivicLocationElement.java
ndroid/server/wifi/anqp/Constants.java
ndroid/server/wifi/anqp/DomainNameElement.java
ndroid/server/wifi/anqp/EmergencyNumberElement.java
ndroid/server/wifi/anqp/GEOLocationElement.java
ndroid/server/wifi/anqp/HSCapabilityListElement.java
ndroid/server/wifi/anqp/HSConnectionCapabilityElement.java
ndroid/server/wifi/anqp/HSFriendlyNameElement.java
ndroid/server/wifi/anqp/HSIconFileElement.java
ndroid/server/wifi/anqp/HSOsuProvidersElement.java
ndroid/server/wifi/anqp/HSWanMetricsElement.java
ndroid/server/wifi/anqp/IPAddressTypeAvailabilityElement.java
ndroid/server/wifi/anqp/NAIRealmElement.java
ndroid/server/wifi/anqp/NetworkAuthenticationTypeElement.java
ndroid/server/wifi/anqp/RoamingConsortiumElement.java
ndroid/server/wifi/anqp/ThreeGPPNetworkElement.java
ndroid/server/wifi/anqp/VenueNameElement.java
ndroid/server/wifi/anqp/eap/EAPMethod.java
ndroid/server/wifi/hotspot2/ANQPData.java
ndroid/server/wifi/hotspot2/AlarmHandler.java
ndroid/server/wifi/hotspot2/Chronograph.java
ndroid/server/wifi/hotspot2/NetworkDetail.java
ndroid/server/wifi/hotspot2/NetworkInfo.java
ndroid/server/wifi/hotspot2/PasspointMatchInfo.java
ndroid/server/wifi/hotspot2/SelectionManager.java
ndroid/server/wifi/hotspot2/SupplicantBridge.java
ndroid/server/wifi/hotspot2/Utils.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
ndroid/server/wifi/hotspot2/omadm/OMAConstructed.java
ndroid/server/wifi/hotspot2/pps/Credential.java
ndroid/server/wifi/hotspot2/pps/DomainMatcher.java
ndroid/server/wifi/hotspot2/pps/HomeSP.java
ndroid/server/wifi/hotspot2/simulate/HS20Simulator.java
03e92b925a595a1a467290a2d54ca2602cce9b9e 18-Feb-2015 Vinit Deshpande <vinitd@google.com> Passpoint API - Take 1

Added some common fields to WifiConfigurations; which
should be used with WifiEnterpriseConfig. The network
information is saved in a file.

Change-Id: Ica2069900dfc373e14792cbe81a185586e2954cc
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
ndroid/server/wifi/hotspot2/omadm/MOTree.java
ndroid/server/wifi/hotspot2/pps/Credential.java
ndroid/server/wifi/hotspot2/pps/HomeSP.java
b8cb150b17b7453d240bbbeb02a0a74353b11b23 07-Nov-2014 Honore Tricot <honorex.tricot@intel.com> EAP-SIM: handle dynamic identity request

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>
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
d4762401ec14be6bdd2d27aff2478ddbf8d6ce2a 12-Aug-2014 Vinit Deshpande <vinitd@google.com> Introduce onLost event on bssid hotlist [DO NOT MERGE]

Change-Id: I84c3174398fea9a1456fb007586c2c559dd3fe4d
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
1ef80d73f9bee7ef12d3e2d4e0aef11239bba87c 14-Feb-2015 Navtej Singh Mann <navtejsingh@google.com> updated number of default scan to cache

bug: 19354967
Change-Id: Id411529f9bb4aa98975cac64b6bd0bf886f38bdc
ndroid/server/wifi/WifiScanningServiceImpl.java
b830d76fbf5fa4077531b516066faa2fdbb92e81 12-Feb-2015 xinhe <xinhe@google.com> Unable to see Tethering/portable Hotspot SSID

Bug:19335638
Change-Id: I4b889841b341d3d9b24faab8bc5dd18b508070cd
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
2b26ad17b41b6cc7c5663aa47a66239cf698794f 05-Feb-2015 Navtej Singh Mann <navtejsingh@google.com> Updating scan status after scan for full scan result completed

Bug: 19099878
Change-Id: Ie63498995d5b92d05231a1481643ee009b47865e
ndroid/server/wifi/WifiScanningServiceImpl.java
e7c2a0e042faf1e617771d19b5055046658889a3 05-Feb-2015 Pierre Vandwalle <vandwalle@google.com> send network state changed broadcast when BSSID change

Change-Id: I1920d8656a9db0aead90787b5049106a5e7ab538
ndroid/server/wifi/WifiStateMachine.java
faa2ce7f93eef2c436796fb1ea3574e2d1412491 23-Jan-2015 Robin Lee <rgl@google.com> Remove wifi configs when secondary user is deleted

If any WiFi configs have been created for a secondary user then these
should be cleaned up when the user is deleted from Settings.

Bug: 18927999
Change-Id: If4a37085f1b82f30e5f4b44c7f597f4b2d620501
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
0465ff513cdccf7e883a505e14c5b78758e7e458 13-Oct-2014 Vinit Deshpande <vinitd@google.com> Enable DFS

Change-Id: I4a9bc8d6587063388ee763fe31e669cddcad24d0
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
e0a4f90efb6b6e42c1ece5b4a0c9831770f2f7aa 28-Jan-2015 Jan Nordqvist <jannq@google.com> Added a comment.

Change-Id: Ief2e4d0222dab3187c11a8cfdaee7d1236418fa1
ndroid/server/wifi/hotspot2/omadm/SOAPParser.java
eb11746ad0052abd576114bdef5e4fa06d17442b 31-Jan-2015 Vinit Deshpande <vinitd@google.com> Merge "Credential/profile storage added, completed network matching and added HS20 Simulator." into m-wireless-wifi-dev
71a988c8e9859244b83cd55bb6b6ee913fcaf95c 28-Jan-2015 Jan Nordqvist <jannq@google.com> Credential/profile storage added, completed network matching and added HS20 Simulator.

Change-Id: I1b27dadf3d65ed0a858dee209df975180a3b90e6
ndroid/server/wifi/anqp/CellularNetwork.java
ndroid/server/wifi/anqp/Constants.java
ndroid/server/wifi/anqp/GenericBlobElement.java
ndroid/server/wifi/anqp/NAIRealmData.java
ndroid/server/wifi/anqp/RoamingConsortiumElement.java
ndroid/server/wifi/anqp/ThreeGPPNetworkElement.java
ndroid/server/wifi/anqp/eap/Credential.java
ndroid/server/wifi/anqp/eap/EAPMethod.java
ndroid/server/wifi/anqp/eap/ExpandedEAPMethod.java
ndroid/server/wifi/anqp/eap/InnerAuthEAP.java
ndroid/server/wifi/anqp/eap/NonEAPInnerAuth.java
ndroid/server/wifi/hotspot2/ANQPData.java
ndroid/server/wifi/hotspot2/AuthMatch.java
ndroid/server/wifi/hotspot2/NetworkInfo.java
ndroid/server/wifi/hotspot2/NetworkKey.java
ndroid/server/wifi/hotspot2/PasspointMatch.java
ndroid/server/wifi/hotspot2/SelectionManager.java
ndroid/server/wifi/hotspot2/Utils.java
ndroid/server/wifi/hotspot2/omadm/MOManager.java
ndroid/server/wifi/hotspot2/omadm/MOTree.java
ndroid/server/wifi/hotspot2/omadm/NodeAttribute.java
ndroid/server/wifi/hotspot2/omadm/OMAConstants.java
ndroid/server/wifi/hotspot2/omadm/OMAConstructed.java
ndroid/server/wifi/hotspot2/omadm/OMAException.java
ndroid/server/wifi/hotspot2/omadm/OMANode.java
ndroid/server/wifi/hotspot2/omadm/OMAParser.java
ndroid/server/wifi/hotspot2/omadm/OMAScalar.java
ndroid/server/wifi/hotspot2/omadm/RequestDetail.java
ndroid/server/wifi/hotspot2/omadm/SOAPParser.java
ndroid/server/wifi/hotspot2/omadm/XMLNode.java
ndroid/server/wifi/hotspot2/pps/Credential.java
ndroid/server/wifi/hotspot2/pps/DomainMatcher.java
ndroid/server/wifi/hotspot2/pps/HomeSP.java
ndroid/server/wifi/hotspot2/simulate/HS20Simulator.java
3cc14e1d5f379d855570175840de13922ae6af60 30-Jan-2015 Vinit Deshpande <vinitd@google.com> Merge "A few more bug fixes and addition of Icon and Home realm queries." into m-wireless-wifi-dev
2bfb487edfe1efcc1d8ec21d34b0aa74e422c527 30-Jan-2015 Vinit Deshpande <vinitd@google.com> Merge changes Ia8c19509,I88c6253c,I9ae5eb0d into m-wireless-wifi-dev

* changes:
Fixed a couple of inconsistencies around method length.
Bug fixes after test run. First pass all OK.
Base Hotspot 2.0 code (moved from base).
b4536bc5963dec0b2a6ae0ece3518a62e8aff87f 29-Jan-2015 vandwalle <vandwalle@google.com> am e828e7a7: am 4fa99f57: aggressively blacklist WifiConfiguration for the purpose of switching network

* commit 'e828e7a7f186e57c7709fc30eb6e8dcb5fadab0b':
aggressively blacklist WifiConfiguration for the purpose of switching network
4fa99f57077ab287d6ed1b51cf308c44ce8bbe0b 11-Jan-2015 vandwalle <vandwalle@google.com> aggressively blacklist WifiConfiguration for the purpose of switching network

In cases where networks are not properly configured, WiFi might tries to repeatdly
switch from one network to a bad network, or might try to roam and renew DHCP which can fail.
In KK, WiFi autojoin would try other networks (by cycling to network it sees) and
end up associated to a "good" network. In L release even thought WiFi might pick
a good network it will still repeatedly try to switch to what it thinks is a better
network and fail, thus annoying the user whose connection becomes unstable.

This CL tries to remember networks that have seen multiple DHCP or auth failure in
the past and for those networks it disable roaming temporarily.
That is, if wifi is not associated to any network, it will tries to join a network
aggressively, however if wifi is currently associated to a network, it will not try
to switch to a new network if that new network has seen multiple failure in the past.

The maximum blacklist time is set to 2 days for now.
An example of such situation is:
- user has multiple SSID at home, one of which is incorrectly configured with a wrong password
- broken DHCP situation (potentially: multiple servers on home network, broken implementation incorrecting NAK'ing DHCP requests but properly serving DHCP offer...)
Bug:18792931

Change-Id: Ib09eaaea978c772f630e86696f9a49f18ad708e2
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
7b2caa25fb57f2d95e0d0421704c49d3af4b8e6f 23-Jan-2015 Jan Nordqvist <jannq@google.com> A few more bug fixes and addition of Icon and Home realm queries.

Change-Id: I31056c1c6246aafa2f4de106c805d773d67d7731
ndroid/server/wifi/anqp/ANQPFactory.java
ndroid/server/wifi/anqp/Constants.java
ndroid/server/wifi/anqp/HSIconFileElement.java
ndroid/server/wifi/anqp/HSWanMetricsElement.java
ndroid/server/wifi/anqp/NAIRealmData.java
ndroid/server/wifi/anqp/NAIRealmElement.java
ndroid/server/wifi/anqp/OSUProvider.java
ndroid/server/wifi/anqp/RoamingConsortiumElement.java
ndroid/server/wifi/anqp/TestDriver.java
ndroid/server/wifi/anqp/eap/Credential.java
ndroid/server/wifi/anqp/eap/EAPMethod.java
ndroid/server/wifi/anqp/eap/ExpandedEAPMethod.java
ndroid/server/wifi/anqp/eap/InnerAuthEAP.java
ndroid/server/wifi/anqp/eap/NonEAPInnerAuth.java
ndroid/server/wifi/anqp/eap/VendorSpecificAuth.java
14aadf3997f007f53f12e8bec3efaea1a66b44bd 23-Jan-2015 Navtej Singh Mann <navtejsingh@google.com> Fix getScanResults API call for fetching the scan results

Bug: 19110489
Change-Id: I2f31c9cebe05f322535fd1001b10782eea95dcad
ndroid/server/wifi/WifiScanningServiceImpl.java
3be1b3fc037bef7fb4448dec89aea3f2e1318853 23-Jan-2015 Jan Nordqvist <jannq@google.com> Fixed a couple of inconsistencies around method length.

Change-Id: Ia8c19509ad6c48ceeeec44e81025a2418bab2a5a
ndroid/server/wifi/anqp/eap/Credential.java
ndroid/server/wifi/anqp/eap/EAP.java
ndroid/server/wifi/anqp/eap/EAPMethod.java
ndroid/server/wifi/anqp/eap/ExpandedEAPMethod.java
ndroid/server/wifi/anqp/eap/InnerAuthEAP.java
ndroid/server/wifi/anqp/eap/NonEAPInnerAuth.java
ndroid/server/wifi/anqp/eap/VendorSpecificAuth.java
777f4fc037d3ebd555f10041f8acfb41515b2f4b 23-Jan-2015 Jan Nordqvist <jannq@google.com> Bug fixes after test run. First pass all OK.

Change-Id: I88c6253c44ecceb574b9afb57934bc492eb13c4c
ndroid/server/wifi/anqp/ANQPFactory.java
ndroid/server/wifi/anqp/Constants.java
ndroid/server/wifi/anqp/GEOLocationElement.java
ndroid/server/wifi/anqp/HSCapabilityListElement.java
ndroid/server/wifi/anqp/OSUProvider.java
ndroid/server/wifi/anqp/TestDriver.java
ndroid/server/wifi/anqp/VenueNameElement.java
ndroid/server/wifi/anqp/eap/Credential.java
ndroid/server/wifi/anqp/eap/EAPMethod.java
ndroid/server/wifi/anqp/eap/ExpandedEAPMethod.java
ndroid/server/wifi/anqp/eap/InnerAuthEAP.java
ndroid/server/wifi/anqp/eap/NonEAPInnerAuth.java
6a3903fed590e369b576bddbe1ae2d788768ddfe 23-Jan-2015 Jan Nordqvist <jannq@google.com> Base Hotspot 2.0 code (moved from base).

Change-Id: I9ae5eb0d6ff2cd15c73deaf239465353ab1ee90c
ndroid/server/wifi/anqp/ANQPElement.java
ndroid/server/wifi/anqp/ANQPFactory.java
ndroid/server/wifi/anqp/CapabilityListElement.java
ndroid/server/wifi/anqp/CivicLocationElement.java
ndroid/server/wifi/anqp/Constants.java
ndroid/server/wifi/anqp/DomainNameElement.java
ndroid/server/wifi/anqp/EmergencyNumberElement.java
ndroid/server/wifi/anqp/GEOLocationElement.java
ndroid/server/wifi/anqp/GenericBlobElement.java
ndroid/server/wifi/anqp/GenericStringElement.java
ndroid/server/wifi/anqp/HSCapabilityListElement.java
ndroid/server/wifi/anqp/HSConnectionCapabilityElement.java
ndroid/server/wifi/anqp/HSFriendlyNameElement.java
ndroid/server/wifi/anqp/HSIconFileElement.java
ndroid/server/wifi/anqp/HSOsuProvidersElement.java
ndroid/server/wifi/anqp/HSWanMetricsElement.java
ndroid/server/wifi/anqp/I18Name.java
ndroid/server/wifi/anqp/IPAddressTypeAvailabilityElement.java
ndroid/server/wifi/anqp/IconInfo.java
ndroid/server/wifi/anqp/NAIRealmData.java
ndroid/server/wifi/anqp/NAIRealmElement.java
ndroid/server/wifi/anqp/NetworkAuthenticationTypeElement.java
ndroid/server/wifi/anqp/OSUProvider.java
ndroid/server/wifi/anqp/RoamingConsortiumElement.java
ndroid/server/wifi/anqp/ThreeGPPNetworkElement.java
ndroid/server/wifi/anqp/VenueNameElement.java
ndroid/server/wifi/anqp/eap/AuthParam.java
ndroid/server/wifi/anqp/eap/Credential.java
ndroid/server/wifi/anqp/eap/EAP.java
ndroid/server/wifi/anqp/eap/EAPMethod.java
ndroid/server/wifi/anqp/eap/ExpandedEAPMethod.java
ndroid/server/wifi/anqp/eap/InnerAuthEAP.java
ndroid/server/wifi/anqp/eap/NonEAPInnerAuth.java
ndroid/server/wifi/anqp/eap/VendorSpecificAuth.java
ndroid/server/wifi/hotspot2/ANQPData.java
ndroid/server/wifi/hotspot2/NetworkInfo.java
ndroid/server/wifi/hotspot2/NetworkKey.java
ndroid/server/wifi/hotspot2/PasspointMatch.java
ndroid/server/wifi/hotspot2/SelectionManager.java
ndroid/server/wifi/hotspot2/pps/DomainMatcher.java
ndroid/server/wifi/hotspot2/pps/HomeSP.java
0e8f0d87d62589d9dda54d5a4941d0309e3ecf2a 08-Jan-2015 xinhe <xinhe@google.com> set softAP on a specified band, including both 2.4 and 5 GHz band

Bug:18929692
Change-Id: Ie51e09901fbb2c3bec3d4780d0ec49819f808b4e
ndroid/server/wifi/WifiApConfigStore.java
2e53cbdfeb11c86efea51581b8c5645eff8b1fd5 16-Jan-2015 vandwalle <vandwalle@google.com> am 2f404382: am 80aa8fb1: Merge "prevent null BSSID being inject as scan results Bug:18917134" into lmp-mr1-dev

* commit '2f404382dc1deee76b00d0d03cad2fdf74d543ce':
prevent null BSSID being inject as scan results Bug:18917134
80aa8fb1a21a6df522235287d7b6835cc46310e2 16-Jan-2015 vandwalle <vandwalle@google.com> Merge "prevent null BSSID being inject as scan results Bug:18917134" into lmp-mr1-dev
17cfedf44f00d090553db145cd9749f920096055 15-Jan-2015 Vinit Deshpande <vinitd@google.com> am c9f3c26e: am 9572797c: Merge "Fix an NPE in WifiConfigStore" into lmp-mr1-dev

* commit 'c9f3c26ea33c7f065aa9e3692330bc40befcfb56':
Fix an NPE in WifiConfigStore
9572797c3061128bc8f6654854782b61d1b8c71b 14-Jan-2015 Vinit Deshpande <vinitd@google.com> Merge "Fix an NPE in WifiConfigStore" into lmp-mr1-dev
2f05eff93e2503c9f29a0d7ede62c71c430ccf5f 12-Jan-2015 vandwalle <vandwalle@google.com> prevent null BSSID being inject as scan results
Bug:18917134

Change-Id: I0c4d0a2bd5383bac473a588af89589bf70f47c6c
ndroid/server/wifi/WifiStateMachine.java
15bdc5956c2d949e4ea549586903bae87134d8da 13-Jan-2015 Erik Kline <ek@google.com> am d593afb2: am e98d4c27: Merge "Disconnect if we had IPv4 and lost it." into lmp-mr1-dev

* commit 'd593afb2ed618cf456c53a27f18dcf68a92abd8a':
Disconnect if we had IPv4 and lost it.
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>
ndroid/server/wifi/WifiNative.java
e98d4c2729d25123d6b6063e8f1b05e9ce3ca0da 13-Jan-2015 Erik Kline <ek@google.com> Merge "Disconnect if we had IPv4 and lost it." into lmp-mr1-dev
e91eb1bc706fecb97407c00e21d32b1edb56dc88 02-Jan-2015 Vinit Deshpande <vinitd@google.com> Bring in passpoint code [DO NOT MERGE]

This change brings in all the passpoint code from master
to here - so that all development can be done with partners

Change-Id: I9185c35c69630ffb9b4313f973893996051075ed
ndroid/server/wifi/passpoint/WifiPasspointCertificate.java
ndroid/server/wifi/passpoint/WifiPasspointCertificateHelper.java
ndroid/server/wifi/passpoint/WifiPasspointClient.java
ndroid/server/wifi/passpoint/WifiPasspointDmClient.java
ndroid/server/wifi/passpoint/WifiPasspointDmTreeHelper.java
ndroid/server/wifi/passpoint/WifiPasspointHttpClient.java
ndroid/server/wifi/passpoint/WifiPasspointService.java
ndroid/server/wifi/passpoint/WifiPasspointServiceImpl.java
ndroid/server/wifi/passpoint/WifiPasspointSoapClient.java
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
537324a497615d07b67ba4582e9aaababd77afd6 09-Jan-2015 Vinit Deshpande <vinitd@google.com> Fix an NPE in WifiConfigStore

Disabling an invalid configuration causes Wifi service
to crash. This change gaurds against bad API call.

Bug: 18904771
Change-Id: I8d853b754cbd4163c17f3d53bf81dc7625c95466
ndroid/server/wifi/WifiConfigStore.java
0d5bb1b491f38f6895d99b329936e94639de9a5d 09-Jan-2015 Dmitry Shmidt <dimitrysh@google.com> Merge "wifi: Use 'set setband' instead of private 'driver setband'"
6392b2489fab57547b90443caf0da788db195155 08-Jan-2015 Dmitry Shmidt <dimitrysh@google.com> wifi: Use 'set setband' instead of private 'driver setband'

Bug: 18936523

Change-Id: Idb12feb5d7dc925f63de4ab57391f5cdd35b8719
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
ndroid/server/wifi/WifiNative.java
be4f95bf89f0e22aa6ff39f0398fbedce3ef51a6 08-Jan-2015 Jeff Davidson <jpd@google.com> am 7da9e5b9: am 2c9b6297: Fix incorrect tracking of ephemeral network statistics.

* commit '7da9e5b99176d1b4eb05b39301a625f98ec0e834':
Fix incorrect tracking of ephemeral network statistics.
2c9b6297f3cd74780a084634320d03a413a3b779 08-Jan-2015 Jeff Davidson <jpd@google.com> Fix incorrect tracking of ephemeral network statistics.

The lastUntrustedBSSID variable was being used as an SSID, not a
BSSID, and was not cleared after the untrusted network was
disconnected, causing stats not to increment on new connections if the
last connection was to the same SSID.

So, remove this unnecessary variable, and check the current
WifiConfiguration to determine which network we're currently using, if
any. Increment the connection count only when we are actually going to
associate with the SSID.

This only affects untrusted network flows and should have no impact
when connecting to saved Wi-Fi networks. The only non-statistical
change involves the boost given to the active network, which is
controlled by the NetworkScorer and can be updated dynamically
(outside of the framework).

Bug: 18908655
Change-Id: I5b712a4ff613d8199d0591e568886be0d2419645
ndroid/server/wifi/WifiAutoJoinController.java
ac9667902d52ef3efdb53125080419fbbdc7ba80 07-Jan-2015 Erik Kline <ek@google.com> Disconnect if we had IPv4 and lost it.

More specifically, the DHCP_FAILURE case is entered when a
DHCPv4 RENEW fails. Even though we would connect to a network with
no IPv4, when roaming to a "same network" and losing IPv4 it's
probably better to disconnect and start afresh.

Bug: 18867306
Change-Id: Ie667b4f0481ae0510d0dc00db819f4e5d43d98a9
ndroid/server/wifi/WifiStateMachine.java
97f6c1c10eef560abd8843282bb6de60d8b499f2 06-Jan-2015 Jeff Davidson <jpd@google.com> am 938e29e7: am 1456ea5d: Merge "Split untrusted NetworkFactory from regular one." into lmp-mr1-dev

* commit '938e29e7c973cb209904e78f2a73f503fa2984c9':
Split untrusted NetworkFactory from regular one.
1456ea5d08ed5a4e697b58ededde4b5a90809d76 06-Jan-2015 Jeff Davidson <jpd@google.com> Merge "Split untrusted NetworkFactory from regular one." into lmp-mr1-dev
e01c64d3cef3561489915a59c756b505690bb7a9 06-Jan-2015 vandwalle <vandwalle@google.com> am 84d31d03: am 104a9803: Keep AutoJoin enabled when user has manually selected a network Bug:18865214

* commit '84d31d03871672ca4ca28c5c8df33d9710d70163':
Keep AutoJoin enabled when user has manually selected a network Bug:18865214
104a9803187593ab25d3784b420077022686dbe4 29-Dec-2014 vandwalle <vandwalle@google.com> Keep AutoJoin enabled when user has manually selected a network
Bug:18865214

Change-Id: Iae9297cd50ebaf12217d12e4c5d55ae05316e917
ndroid/server/wifi/WifiStateMachine.java
ebe870ef4051da2fc307114ed3c14927f548d9d4 20-Dec-2014 Jeff Davidson <jpd@google.com> Split untrusted NetworkFactory from regular one.

This ensures that we see all requests for untrusted networks.

Bug: 18815795
Change-Id: I9aaba6095b934fee27a27b20fa3adb2a10648e80
ndroid/server/wifi/WifiStateMachine.java
40b037205b28f5a257f0f690a0c39001ffabebfb 19-Dec-2014 vandwalle <vandwalle@google.com> am e25ab227: am e0230c82: Merge "add debug logs to confirm network flapping issue is fixed Bug:18706288" into lmp-mr1-dev

* commit 'e25ab227ca1c9f660dc5b464e28dbe01545a469d':
add debug logs to confirm network flapping issue is fixed Bug:18706288
d562af2fda024c8285d9ca71a1156895b544006c 19-Dec-2014 vandwalle <vandwalle@google.com> am 32ae34b1: am 84070068: Merge "Disable legacy poor Network detection Bug:18723206 Legacy poor network detection was removed from L settings but can still be enabled during an upgrade if it had been manually enabled by user, now really disable it." into lmp-mr1-dev

* commit '32ae34b138ae205e52d16c59ad4a20091de91a66':
Disable legacy poor Network detection Bug:18723206 Legacy poor network detection was removed from L settings but can still be enabled during an upgrade if it had been manually enabled by user, now really disable it.
e0230c8236956c2098e13a0ea837f33ac3ce11ea 18-Dec-2014 vandwalle <vandwalle@google.com> Merge "add debug logs to confirm network flapping issue is fixed Bug:18706288" into lmp-mr1-dev
84070068b0aff877437f4ecbcac8b6f4fe976d32 18-Dec-2014 vandwalle <vandwalle@google.com> Merge "Disable legacy poor Network detection Bug:18723206 Legacy poor network detection was removed from L settings but can still be enabled during an upgrade if it had been manually enabled by user, now really disable it." into lmp-mr1-dev
b95dffce003c523a7b3152a4885fed693546d3e0 18-Dec-2014 Narayan Kamath <narayan@google.com> Remove apache-http use from wifi passpoint code.

Apart from the various open questions about turning of
hostname verification etc, the only big TODO here is how
we should deal with HTTP authentication. It isn't clear what
the spec or standards expect. Basic auth is already supported,
but Digest auth needs a little bit of work to support out of
the box.

bug: 18027885

Change-Id: Ia696ac4e85f8e55e3b9b12310411a7f6639f94ad
ndroid/server/wifi/passpoint/WifiPasspointCertificate.java
ndroid/server/wifi/passpoint/WifiPasspointHttpClient.java
ndroid/server/wifi/passpoint/WifiPasspointSoapClient.java
f57f8918b8c5872ff4bb141fa9e407bec8442e8d 16-Dec-2014 vandwalle <vandwalle@google.com> add debug logs to confirm network flapping issue is fixed
Bug:18706288

Change-Id: I27a86aeb650a63511b667244b0138afbc1bc059e
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
0a432eea06b32248839bd314288338f254a0c58f 17-Dec-2014 Jeff Davidson <jpd@google.com> am a4792dde: am 16fdf070: Stabilize ephemeral connections in the face of new BSSIDs.

* commit 'a4792ddeff09238c268f4685201d34a9942c3b3e':
Stabilize ephemeral connections in the face of new BSSIDs.
16fdf07021858fd116d96a5fb00ddb3c166d5ae6 05-Dec-2014 Jeff Davidson <jpd@google.com> Stabilize ephemeral connections in the face of new BSSIDs.

Currently we only check whether the most recently seen BSSID has a
score before deciding to disconnect an ephemeral network. This causes
unnecessary flapping - if multiple BSSIDs are in visible range, and
the scorer likes one of them but has no score for the other (or is
still looking up the score), we will drop the connection.

Instead, as long as we've recently seen a scored BSSID (in the last
minute), we keep the connection alive.

A scorer can still initiate an immediate disconnect from an unwanted
network by nulling scores for all BSSIDs.

The timeout (and whether we use this new behavior at all) is
controlled by a Settings.Global flag.

Bug: 18637384
Change-Id: I6bde3c9eef12caf2cc51c449abffc1c69f60c17f
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiNetworkScoreCache.java
82f9342c26900256a1bf6bef7b40a775116bf57c 12-Dec-2014 vandwalle <vandwalle@google.com> Disable legacy poor Network detection
Bug:18723206
Legacy poor network detection was removed from L settings but can still be enabled during an upgrade if it had been manually enabled by user, now really disable it.

Change-Id: I661b326c6f5dfacfcc5582cea14dc52501740367
ndroid/server/wifi/WifiWatchdogStateMachine.java
481e24957680f083af7d235a5bebd678b673b6bd 15-Dec-2014 Vinit Deshpande <vinitd@google.com> Merge changes I8a6da542,I9f51a282,I4a9bc8d6,I84c31743

* changes:
New Additions to WifiScanner APIs
WifiScanner: Fix typo that generates events too quickly
Enable DFS
Introduce onLost event on bssid hotlist
b6077d350d0f9db5b59334956f3d6d1f977a7b94 15-Dec-2014 Jeff Sharkey <jsharkey@android.com> Merge "Use better API for checking UID permission."
611048d11641d9f8136cf2a7065aedbd57095cb9 15-Dec-2014 Jeff Sharkey <jsharkey@android.com> Use better API for checking UID permission.

Avoids crashing system process.

Bug: 18757340
Change-Id: I6b4828be27842496eebb83b4ec4a5e1a25297568
ndroid/server/wifi/WifiConfigStore.java
e5cb13ea857a8e419195c5fc22b33146b26dc817 15-Dec-2014 Prem Kumar <premk@google.com> am cab41c14: am 6a0c6896: Merge changes Ieee0b91a,I0093620c into lmp-mr1-dev

* commit 'cab41c14ea42fb652b9cf03d16ee0c70744c74cf':
fix logspam Bug:18589606
Apply 5GHz band preference only when comparing configurations on different bands
f67a8303cbf58f04e0b12fea46387030892010bf 15-Dec-2014 Prem Kumar <premk@google.com> am 01b061ce: am ff8ab9f7: Merge "make sure wificonfiguration scan cache doesnt grow unbounded Bug:18703749" into lmp-mr1-dev

* commit '01b061ce1c3285c2f840673d4253f20cd34e75d8':
make sure wificonfiguration scan cache doesnt grow unbounded Bug:18703749
cb4fcdd41d22ee8733e60aa8ce96f9cbaafeae9f 15-Dec-2014 Prem Kumar <premk@google.com> am 0a9e097e: am 4ff7838d: Merge "autojoin scanning + P2P - discard autojoin scan when both infra and P2P are connected - reduce autojoin scan period when P2P is connected and infra is disconnected Bug:18692653" into lmp-mr1-dev

* commit '0a9e097e3b67bd54d1c405d93786a80031f71ec6':
autojoin scanning + P2P - discard autojoin scan when both infra and P2P are connected - reduce autojoin scan period when P2P is connected and infra is disconnected Bug:18692653
7ba3d8532fbd7e799f29f87951c39ea12e1a3262 15-Dec-2014 Prem Kumar <premk@google.com> am a8cfeb7a: am e9775238: Merge "handle beacons reported with wrong RSSI value of 0 Bug:18654243" into lmp-mr1-dev

* commit 'a8cfeb7a685aa0870aa5bb29afe1cebb3cea93fd':
handle beacons reported with wrong RSSI value of 0 Bug:18654243
6a0c6896aa7f72744f8b3d65b3dcc7ea0c063bc7 14-Dec-2014 Prem Kumar <premk@google.com> Merge changes Ieee0b91a,I0093620c into lmp-mr1-dev

* changes:
fix logspam Bug:18589606
Apply 5GHz band preference only when comparing configurations on different bands
ff8ab9f723c8ecf04aedfc3102676ab498cb14fb 14-Dec-2014 Prem Kumar <premk@google.com> Merge "make sure wificonfiguration scan cache doesnt grow unbounded Bug:18703749" into lmp-mr1-dev
4ff7838d595d2be641da1892507d3333707291e2 14-Dec-2014 Prem Kumar <premk@google.com> Merge "autojoin scanning + P2P - discard autojoin scan when both infra and P2P are connected - reduce autojoin scan period when P2P is connected and infra is disconnected Bug:18692653" into lmp-mr1-dev
e97752385ec67e72f8ae7a772eb7af3014266ace 14-Dec-2014 Prem Kumar <premk@google.com> Merge "handle beacons reported with wrong RSSI value of 0 Bug:18654243" into lmp-mr1-dev
c591ab3b5ff4ac8dade1c7eb88ec83f3572f999b 31-Oct-2014 Vinit Deshpande <vinitd@google.com> New Additions to WifiScanner APIs

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

Bug: 18087596
Bug: 17694040
Bug: 18059273

Change-Id: I8a6da5426561e22e72d1e99c5537205b893077dd
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
aa2e127372aea587530601bc9576cb935742d9bf 28-Oct-2014 Vinit Deshpande <vinitd@google.com> WifiScanner: Fix typo that generates events too quickly

Report threshhold used to be 80%, it got changed to 10% in a big
change. Which is likely why we have too early terminations of
batch scans.

This still doesn't explain the reason for long scans though.

Bug: 17905975

Change-Id: I9f51a282645a51d45906d7060093c94ad9886e6c
ndroid/server/wifi/WifiScanningServiceImpl.java
90b902d2b5c02af02edd7e60f385196af8823128 13-Oct-2014 Vinit Deshpande <vinitd@google.com> Enable DFS

This change enables DFS channels on the underlying device
if background scanning features (GScan features) are supported.

Change-Id: I4a9bc8d6587063388ee763fe31e669cddcad24d0
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
e9fa5dcd292f2b8bad2c567773c74a1568c513ad 12-Aug-2014 Vinit Deshpande <vinitd@google.com> Introduce onLost event on bssid hotlist

Change-Id: I84c3174398fea9a1456fb007586c2c559dd3fe4d
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
664e639fac1d77ac142845f8920b9478db02c0d1 12-Dec-2014 Vinit Deshpande <vinitd@google.com> am 1ed3619a: am ca98d25a: Merge "Fix an unhandled exception in WifiP2pStateMachine" into lmp-mr1-dev

* commit '1ed3619a94c42879941e714248ccd4abb3bc8b8a':
Fix an unhandled exception in WifiP2pStateMachine
acb5ebbeedbd9a206e2ed82de3a365ceedb27d0c 10-Dec-2014 vandwalle <vandwalle@google.com> fix logspam
Bug:18589606

Change-Id: Ieee0b91ab96ec9392a9b91ac1017a319605425dc
ndroid/server/wifi/WifiConfigStore.java
63105d275289943504a292de18e6516e79b15148 10-Dec-2014 vandwalle <vandwalle@google.com> make sure wificonfiguration scan cache doesnt grow unbounded
Bug:18703749

Change-Id: If6452e7dbaaabb164cf2a99b48b3964f4cb86ee5
ndroid/server/wifi/WifiConfigStore.java
815788ba7838fc54310baed3deb9b95548e0ce69 11-Dec-2014 vandwalle <vandwalle@google.com> Apply 5GHz band preference only when comparing configurations on different bands

Bug:18589301

Change-Id: I0093620c859940d993c9ea60d9d6cdc86bb2fa58
ndroid/server/wifi/WifiAutoJoinController.java
a1c02f0a73ee35e198e2652cd65b8830a163d9dd 10-Dec-2014 vandwalle <vandwalle@google.com> autojoin scanning + P2P
- discard autojoin scan when both infra and P2P are connected
- reduce autojoin scan period when P2P is connected and infra is disconnected
Bug:18692653

Change-Id: Id1891e6a9f2863d8876915cfefd158fb1712b8fe
ndroid/server/wifi/WifiStateMachine.java
ca98d25affbc5bc948bf1f9a597a346cf347f27a 11-Dec-2014 Vinit Deshpande <vinitd@google.com> Merge "Fix an unhandled exception in WifiP2pStateMachine" into lmp-mr1-dev
895761ea1de67d382964e381982e59aeea6546a7 11-Dec-2014 vandwalle <vandwalle@google.com> am abd4fa77: am 93a1fdde: adjust network switching thresholds Bug:18589301

* commit 'abd4fa7731235cc3e0df0a2f96f68ea981def0aa':
adjust network switching thresholds Bug:18589301
8ccabb81ad304b80dc8eaa162fd322643461529b 10-Dec-2014 vandwalle <vandwalle@google.com> handle beacons reported with wrong RSSI value of 0
Bug:18654243

Change-Id: Ied2fbc87c7effc23fecb68e9863153d63c0cfba4
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
93a1fddee50a244d31036cddae6b7db6630fd93d 07-Dec-2014 vandwalle <vandwalle@google.com> adjust network switching thresholds
Bug:18589301

Change-Id: Ifa2ae05620207798d24e5e196ff522a71fc0fd48
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
623351a7eb0a8df0ac50e7a8e1b57d5f31aab386 10-Dec-2014 Jason Monk <jmonk@google.com> am 9119b44c: am 88c9369c: Merge "Allow interact-users-full access to scan results" into lmp-mr1-dev

* commit '9119b44c0bc372b00b0395c585dd7dce5d674984':
Allow interact-users-full access to scan results
5ced0cedc941433da1e73e256138feba621fe7b5 10-Dec-2014 Prem Kumar <premk@google.com> am e3f48c70: am 4724608d: Merge changes I0d49fa29,I0acacd3f into lmp-mr1-dev

* commit 'e3f48c70338438ddcf9542b92032e966f84ca5a3':
rework scan logic so as to make use of delayed messages instead of scan alarm
reenable disabled config after a few minutes
03ffb1fd6ac5c8791e993b8a7864824a5660f63d 10-Dec-2014 Jeff Davidson <jpd@google.com> am d3a842ad: am a63fbdbb: Merge "- keep track of ephemeral configurations that are deleted by user - make sure we cleaned up prior ephemeral WiFiconfiguration from wpa_supplicant.conf Bug:18525241" into lmp-mr1-dev

* commit 'd3a842ad0052903fe94b745630dc20cb70ea4058':
- keep track of ephemeral configurations that are deleted by user - make sure we cleaned up prior ephemeral WiFiconfiguration from wpa_supplicant.conf Bug:18525241
84befe36af491f26ae46243017a1aca4dd5b24d5 09-Dec-2014 Vinit Deshpande <vinitd@google.com> Fix an unhandled exception in WifiP2pStateMachine

An exception is thrown when group creation is deemed failed. It is
thrown because an empty peer address is encountered. It is not clear
when the address goes empty (there are no logs); but this change
would prevent resstarting of the framework.

Bug: 18667239

Change-Id: I523646eaa1ff6c8dab9ee99b893ebc4291eee2da
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
88c9369cb6b94c30324893337aa25b1e37a15ff6 08-Dec-2014 Jason Monk <jmonk@google.com> Merge "Allow interact-users-full access to scan results" into lmp-mr1-dev
4724608dce2e37b9c0b260c2c7dcf3161f474df2 06-Dec-2014 Prem Kumar <premk@google.com> Merge changes I0d49fa29,I0acacd3f into lmp-mr1-dev

* changes:
rework scan logic so as to make use of delayed messages instead of scan alarm
reenable disabled config after a few minutes
a63fbdbba96e242280267466b170e311e1f71dc3 06-Dec-2014 Jeff Davidson <jpd@google.com> Merge "- keep track of ephemeral configurations that are deleted by user - make sure we cleaned up prior ephemeral WiFiconfiguration from wpa_supplicant.conf Bug:18525241" into lmp-mr1-dev
8242cc81341c80ab5bc057ffdad99a3a1d95be5c 01-Dec-2014 vandwalle <vandwalle@google.com> rework scan logic so as to make use of delayed messages instead of scan alarm

Bug:18594119
Change-Id: I0d49fa2908d824de6adb125cf862de47f8ba5e91
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
abd1740f753ac14e9dec8fced8d3de5059122c2a 05-Dec-2014 vandwalle <vandwalle@google.com> reenable disabled config after a few minutes

This change also loose stale user selection which prevents device to re-join potentially
reenabled configs

Bug:18571727
Change-Id: I0acacd3fb1fbb64a48d0407d7b9e4e5403a93726
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
f8704c368e0fee0c7cf7e294d109dece6b72e832 05-Dec-2014 Jason Monk <jmonk@google.com> Allow interact-users-full access to scan results

Allow callers that hold INTERACT_ACROSS_USERS_FULL access to scan
results even if they aren't on the current user.

Bug: 16559573
Change-Id: I27fae71b3cdc1c084777242f21fe4bb692ab7135
ndroid/server/wifi/WifiServiceImpl.java
2ce99b40c36ed0352b31aa85d5f9383d5f0506f5 04-Dec-2014 vandwalle <vandwalle@google.com> - keep track of ephemeral configurations that are deleted by user
- make sure we cleaned up prior ephemeral WiFiconfiguration from wpa_supplicant.conf
Bug:18525241

Change-Id: I773cb9b28fe139d1cd5df622619b4a9cf866d6ce
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
1eed8cd5b7a60d9024e2937ee2be602543e1c198 05-Dec-2014 Vinit Deshpande <vinitd@google.com> am 839a47af: am e3939cb4: Read all networks despite message limit of 4096 bytes

* commit '839a47af5b48c487a0af377456e7ceffb3899fb9':
Read all networks despite message limit of 4096 bytes
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
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
c5420c4749f00340820477ebac1bc2bd95747b52 02-Dec-2014 Vinit Deshpande <vinitd@google.com> am 66937154: am 94d2ff04: Merge "Fix an NPE in RttService" into lmp-mr1-dev

* commit '669371548653d8afadd2a727869f14692101dfbe':
Fix an NPE in RttService
94d2ff04bd5a0aaf2a761f15c958034ad54ff5a9 02-Dec-2014 Vinit Deshpande <vinitd@google.com> Merge "Fix an NPE in RttService" into lmp-mr1-dev
b7f4073305a57c4705de7a2c7518865d79f7bbc9 01-Dec-2014 Dianne Hackborn <hackbod@google.com> am 973a14c6: am 935a9c0c: Work on issue #18118255: StateMachine aggressively keeping its own logs...

* commit '973a14c6ec978860dc173225c15894fdb38cc270':
Work on issue #18118255: StateMachine aggressively keeping its own logs...
935a9c0c9e091829ac359a6d99ae3bd69fe9041b 26-Nov-2014 Dianne Hackborn <hackbod@google.com> Work on issue #18118255: StateMachine aggressively keeping its own logs...

...(512KB RAM, 10K objects)

Pull this back to 300 entries on Svelte devices... we also need to reduce
this on non-Svelte devices, but at least right now we desperately need it
fixed on Svelte.

Change-Id: I301bf8a4637c066166a5a69c178d581c072b8dc5
ndroid/server/wifi/WifiStateMachine.java
f392c0185c2bea228f89fd42fa4551fa19797e7a 22-Nov-2014 Vinit Deshpande <vinitd@google.com> Fix an NPE in RttService

Bug: 18245283
Change-Id: Ie844353bffcf40baa4db8cad2c18dcc5ffaf5a82
ndroid/server/wifi/RttService.java
48a7f5e6dc66c4aae8a12f2d745440b52a11b859 26-Nov-2014 vandwalle <vandwalle@google.com> am ebc42f07: am 0eae6501: Merge "remove dfs channel from location restricted scans" into lmp-mr1-dev

* commit 'ebc42f079714a576e302d228a7278e89bb8bb44d':
remove dfs channel from location restricted scans
304a92524235e70e52023eb9c48bbdb167ebe03f 26-Nov-2014 vandwalle <vandwalle@google.com> am 41ec35fc: am 9f2b1162: register network factory before processing scan results Bug:18512598

* commit '41ec35fc3a0a924a451a2d32b0a4695cd906fe28':
register network factory before processing scan results Bug:18512598
0eae6501fd8144806ab5598bc8e3210f2b18769f 26-Nov-2014 vandwalle <vandwalle@google.com> Merge "remove dfs channel from location restricted scans" into lmp-mr1-dev
5363eb4d62eb9da63021f5b4d07c5ee5d62353b9 26-Nov-2014 vandwalle <vandwalle@google.com> am 8ecac289: am 833dcce8: - dont loose explicitely selected bit when autojoining same network - use scorer only for untrusted networks Bug:18490330 Bug:18368125

* commit '8ecac289ffb059d419a8da62d412641684b748b5':
- dont loose explicitely selected bit when autojoining same network - use scorer only for untrusted networks Bug:18490330 Bug:18368125
9f2b11623eec3b20edc93e30f94b263f287a4ca3 26-Nov-2014 vandwalle <vandwalle@google.com> register network factory before processing scan results
Bug:18512598

Change-Id: I79aa972f686f2c4090012a36dcad13a9e53d5566
ndroid/server/wifi/WifiStateMachine.java
9086afccf6938a49eb9a2cd248917c1cb0943942 22-Nov-2014 vandwalle <vandwalle@google.com> remove dfs channel from location restricted scans

Change-Id: I387816c8682e9f595229ecbb20c35711ea1f069b
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
833dcce8f6712f7594f06ea33208e3e106c15afc 23-Nov-2014 vandwalle <vandwalle@google.com> - dont loose explicitely selected bit when autojoining same network
- use scorer only for untrusted networks
Bug:18490330
Bug:18368125

Change-Id: I13f21a2247d071d2e8edc48546c14e0a9e2bc5d6
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiStateMachine.java
faff566684a044cce0da4eab11de79eec964d9fb 21-Nov-2014 Jeff Davidson <jpd@google.com> am 983b8383: Merge "Don\'t enable ephemeral networks when bringing up Wi-Fi." into lmp-mr1-dev automerge: 1a36bf3

* commit '983b8383021303e7a17e9fe72b93b363c5efc8ce':
Don't enable ephemeral networks when bringing up Wi-Fi.
69ca60b59dcaa83a40252615dc11e3bb06f72ee0 20-Nov-2014 vandwalle <vandwalle@google.com> am 98c7b2d0: perform regular autojoin when turning wifi on Bug:18451553 automerge: 68fee36

* commit '98c7b2d0a913c281893b54a43016a66f00006ea1':
perform regular autojoin when turning wifi on Bug:18451553
1a36bf394b991d2b1e4bba0118377a7869f205df 20-Nov-2014 Jeff Davidson <jpd@google.com> Merge "Don't enable ephemeral networks when bringing up Wi-Fi." into lmp-mr1-dev
8d2fd4c1adfb5ab6466d12cbbd21cf6ce9aeddbe 19-Nov-2014 Vinit Deshpande <vinitd@google.com> am bf7ed9bb: am f5a84fcd: Trigger auto-join from WifiManager.reconnect()

* commit 'bf7ed9bbca430d1a38e345240033ad8695611239':
Trigger auto-join from WifiManager.reconnect()
68fee36dac1dda5c596c00ef33fdbc0962e9ec9f 19-Nov-2014 vandwalle <vandwalle@google.com> perform regular autojoin when turning wifi on
Bug:18451553

Change-Id: I729ae360209e852e4e64bed0c584ed076b1281b4
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiStateMachine.java
f5a84fcd66298ee6e96b781d2645422a1571ac07 18-Nov-2014 Vinit Deshpande <vinitd@google.com> Trigger auto-join from WifiManager.reconnect()

Bug: 17397676

Change-Id: I0356c363b90a40a9f9424cf9c50e0d9f1c370414
ndroid/server/wifi/WifiStateMachine.java
56686b8275c9e7ec43afdc872893594cb9503d8b 15-Nov-2014 Vinit Deshpande <vinitd@google.com> am fb26896c: Merge "Fix a crash in parsing beacon IEs" into lmp-mr1-dev automerge: fb29a19

* commit 'fb26896cb7b1a39687c5f9dbaa6a71f507c3d80b':
Fix a crash in parsing beacon IEs
4aee7baf77559f7476f21f074cecc08108893eaf 15-Nov-2014 Vinit Deshpande <vinitd@google.com> am 5c1d284b: Merge "Fix connections to unintended networks" into lmp-mr1-dev automerge: 1d1a18d

* commit '5c1d284ba7969107f0b3b6cdb2374623f2458819':
Fix connections to unintended networks
1da241d9e9330e9be2bcbed47bbfa4fbc88e205c 15-Nov-2014 Vinit Deshpande <vinitd@google.com> am ffaf3736: Merge changes I578e0d92,I248695b2 into lmp-mr1-dev automerge: 69f6bd2

* commit 'ffaf3736ec197b62e38d2b248cbed494f4ec70d4':
Handle bad WifiHAL implementation
Don't allow SCAN_REQUEST broadcast to launch apps
fb29a19d6401f75c72be6bacd9171fc974e3b07d 15-Nov-2014 Vinit Deshpande <vinitd@google.com> Merge "Fix a crash in parsing beacon IEs" into lmp-mr1-dev
1d1a18d00e2dfd8b29aee3e3ea48d188c5b630ff 15-Nov-2014 Vinit Deshpande <vinitd@google.com> Merge "Fix connections to unintended networks" into lmp-mr1-dev
69f6bd2ac21ce836de0aa728b887f74addaf8caa 15-Nov-2014 Vinit Deshpande <vinitd@google.com> Merge changes I578e0d92,I248695b2 into lmp-mr1-dev

* changes:
Handle bad WifiHAL implementation
Don't allow SCAN_REQUEST broadcast to launch apps
ebfa1b39d313e987d4bb88440ebfd043965c7dba 14-Nov-2014 Jeff Davidson <jpd@google.com> Don't enable ephemeral networks when bringing up Wi-Fi.

Connections to these networks should only be managed by auto-join. If
we enable these configs then it is possible that the supplicant brings
up an unwanted ephemeral connection that auto-join will immediately
discard, which is wasteful.

Bug: 18389875
Change-Id: I0d3a9a35542eda71401920c0b600dcd2b1e134ba
ndroid/server/wifi/WifiConfigStore.java
6defffe263ba70f966477068cb05808672fe4188 14-Nov-2014 vandwalle <vandwalle@google.com> am e7c1afb7: Merge "check for null pointers when processing CMD_START_SCAN" into lmp-mr1-dev automerge: db65f52

* commit 'e7c1afb724650c9bdfcc35e0e3f1fb886ffa49dc':
check for null pointers when processing CMD_START_SCAN
db65f5219f9664b64a9ba40e042c9283c5a4f985 14-Nov-2014 vandwalle <vandwalle@google.com> Merge "check for null pointers when processing CMD_START_SCAN" into lmp-mr1-dev
9ac6950280ea6cefb8f9f3be9cc98d00d8b91585 14-Nov-2014 vandwalle <vandwalle@google.com> fix broken build

Change-Id: I2d0cf58361b7b7b723d2e09d4c6a53c0b5d4e24b
ndroid/server/wifi/WifiStateMachine.java
26c480abf7155ea69feea08a4e2a44f481aa3a90 13-Nov-2014 Jeff Davidson <jpd@google.com> Fix call to startScan for untrusted setting change. automerge: d406991
automerge: 828be4f

* commit '828be4fca5e2f51dc481a3188f64663f4e4d05cc':
Fix call to startScan for untrusted setting change.
43f539138be53a3884ce7b97b4d961ce6edee957 13-Nov-2014 vandwalle <vandwalle@google.com> resolve merge conflicts of 75b687a to master.

Change-Id: I1647a8be129a71bef2fcf2b3cad001a2d7c183b3
12ecdb7b85152b47a5469f0942f3e9d811d6d90b 13-Nov-2014 vandwalle <vandwalle@google.com> check for null pointers when processing CMD_START_SCAN

Change-Id: Icc3bcb37d181e6f28673808d5c3239d18c6a482f
ndroid/server/wifi/WifiStateMachine.java
d406991cea796c4b75e484bd0d47a85a0f8a4dae 13-Nov-2014 Jeff Davidson <jpd@google.com> Fix call to startScan for untrusted setting change.

Bug: 18221007
Change-Id: Idb526b1f275100ab2a004e7923a032f2e98db6de
ndroid/server/wifi/WifiStateMachine.java
005c1ef113192f898499a407dd266393a8d6b076 12-Nov-2014 vandwalle <vandwalle@google.com> - better handling of deleted configurations, only keep a crc32 of deleted SSIDs
- trigger a scan when changing settings allowing use of untrusted networks
Bug:18221007
Bug:18269621

Change-Id: I7eec8913737726a1bf468a96eae562cc567ecfd3
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
cce5b9e0eded28096991578e020883484ece8c54 11-Nov-2014 Vinit Deshpande <vinitd@google.com> Fix connections to unintended networks

This change fixes a bug in Wifi state machine - it unintentionally
enables all the networks and results in connecting to a network that
may not have been chosen by AutoJoinController.

Bug: 18266514

Change-Id: I0d5d274819194c0eea4f3812d506a92899f3eb54
ndroid/server/wifi/WifiStateMachine.java
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
ndroid/server/wifi/WifiNative.java
cc9395f7b604c626e8c45021b52dad3abff9bd18 07-Nov-2014 Vinit Deshpande <vinitd@google.com> Don't allow SCAN_REQUEST broadcast to launch apps

This change sets the package to Wifi package for all the timer
broadcasts it schedules. This way, the alarm manager won't wake
up any other apps.

Bug: 17611296
Change-Id: I248695b2c4763c799b730a236945e91757dfde16
ndroid/server/wifi/WifiStateMachine.java
13672de1d2124fcfb5bd03ebc962eae1ac75816b 12-Nov-2014 vandwalle <vandwalle@google.com> am 56c30f09: Merge "dont blacklist wifi config that have had validated internet status in the past" into lmp-mr1-dev automerge: f93f774

* commit '56c30f0998360fb4690538b90393eb92bb9a8ad3':
dont blacklist wifi config that have had validated internet status in the past
f93f774c884d2fcbeadaf575a3b3fa065da2e3d0 12-Nov-2014 vandwalle <vandwalle@google.com> Merge "dont blacklist wifi config that have had validated internet status in the past" into lmp-mr1-dev
b82f44556947bd8ff6b6032fc5ffa02586ee0d7d 11-Nov-2014 Jeff Davidson <jpd@google.com> am d9666f15: Make use of scorer-specified heuristics in RssiCurve. automerge: 81c9ea6

* commit 'd9666f1578308da4b0eba040903db35ea05132eb':
Make use of scorer-specified heuristics in RssiCurve.
d30127db46224e45554f8964209221bba8ad41d9 08-Nov-2014 vandwalle <vandwalle@google.com> dont blacklist wifi config that have had validated internet status in the past

Change-Id: I4498888ffb1d3189204a553462ff4342239ed2af
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
81c9ea6c343bc7f8d87095237e59844a974d0b70 06-Nov-2014 Jeff Davidson <jpd@google.com> Make use of scorer-specified heuristics in RssiCurve.

Treat Byte#MIN_VALUE equivalently to a null score curve. This allows a
scorer to define an RSSI threshold below which a network should not be
used. Currently, any non-null score curve will result in us connecting
to a given network regardless of RSSI.

Also, instead of applying a hard-coded dBm boost to the currently
active network, make use of the boost specified in the RSSI curve
itself, allowing the scorer to fine-tune this boost.

Bug: 15432594
Change-Id: I7a8f5f68ef074827d4b1cfbbed0841448498f179
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiNetworkScoreCache.java
9dac0da5b0c6fefa7f8b4e182faac955df9ff9b3 06-Nov-2014 Jeff Davidson <jpd@google.com> resolved conflicts for merge of 67930f53 to master

Change-Id: I7ec4cd0db477678376dd0cd605bfcd529651be8d
6b7f403e4cef10029159c75bc311142a56099aef 06-Nov-2014 Jeff Davidson <jpd@google.com> Merge "Support conversion of untrusted networks to trusted." into lmp-mr1-dev
3aed1e5a7a7f2ec730c393e2c7d129e3e551a711 05-Nov-2014 Jeff Davidson <jpd@google.com> Support conversion of untrusted networks to trusted.

When the user requests to connect to a network which already has an
untrusted config, we update the existing config and clear the
ephemeral bit rather than creating a new config. We also maintain the
current connection if that ephemeral config matches the currently
connected configuration, and merely tell the system that the network
is now trusted.

The above also applies for AUTO_JOIN_DELETED networks, which are
similarly filtered out from the list of WifiConfigurations.

Bug: 18206275
Change-Id: I1dff7e3c073888c619e6a5c3a40295a44b12e403
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
d15374d956a4143ebb851f9ca4910651bd47d7a8 04-Nov-2014 vandwalle <vandwalle@google.com> am 8ae8e251: am 917a6ea4: Merge "propagate noInternetAccess flag and network status" into lmp-mr1-dev

* commit '8ae8e251bf521e8eeb5ad65467cc4e37c42a3c6f':
propagate noInternetAccess flag and network status
917a6ea431a8137e7ceba46ec9efc84c68882dc0 04-Nov-2014 vandwalle <vandwalle@google.com> Merge "propagate noInternetAccess flag and network status" into lmp-mr1-dev
cdc5b747a9c6ff40a38a66bdd8f86dbf11852a7a 04-Nov-2014 vandwalle <vandwalle@google.com> propagate noInternetAccess flag and network status

Change-Id: I7a1ac684c11c3ef93462e02cfc9d6fde3c9b81d7
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/WifiNative.java
ac06587f2505ca1db793ce2a7fc46bcc52fed5c1 03-Nov-2014 Jeff Davidson <jpd@google.com> am 6a9eea91: am 42f181ed: Propagate WifiConfiguration ephemeral bit to ScanResult.

* commit '6a9eea9102b46ca17a5431e5079a47ad1dcd10b5':
Propagate WifiConfiguration ephemeral bit to ScanResult.
42f181ed4277890489be016939209952959d5416 31-Oct-2014 Jeff Davidson <jpd@google.com> Propagate WifiConfiguration ephemeral bit to ScanResult.

Bug: 18206244
Change-Id: I82e8a359db32a84145716b43d8438767959a00b3
ndroid/server/wifi/WifiConfigStore.java
d2005e9fa1097b19857aa92dda5e658a07167cc5 31-Oct-2014 vandwalle <vandwalle@google.com> am 727b9213: am efad8ec6: read packet counters before and after DHCP

* commit '727b9213ba72cd2fc45811ef72d25966f70add9a':
read packet counters before and after DHCP
e50ba6f0a30a4e02618b3c9f9d5ad0320a5c264e 30-Oct-2014 Erik Kline <ek@google.com> am 371b6415: Merge "Make isProvisioned() use LinkProperties\' concept of same." into lmp-mr1-dev automerge: cfa3bfe

* commit '371b6415f3fca768373ec340fb6a78a21f6badb5':
Make isProvisioned() use LinkProperties' concept of same.
6d98e3970d8263f7694ad621d755e72c74c9c468 30-Oct-2014 vandwalle <vandwalle@google.com> am 9130e936: print both uptime and milli since boot in the wifi state machine logs automerge: b512032

* commit '9130e93659b974b20756145b0064623c02ed45c5':
print both uptime and milli since boot in the wifi state machine logs
500ab3844f536a8c577a0025266bafb493e4789f 30-Oct-2014 vandwalle <vandwalle@google.com> am 7a05688a: am f9715cc1: various fixes: - Carry over the IP config when self adding a configuration - fix null pointer exception in wificonfigstore, trying to read the IPConfig file Bug:18058314 Bug:18057271

* commit '7a05688a05b34ae33c0a305f3d3b3fc78ce0b00f':
various fixes: - Carry over the IP config when self adding a configuration - fix null pointer exception in wificonfigstore, trying to read the IPConfig file Bug:18058314 Bug:18057271
efad8ec6cb12e5658ee0288cc7e5aa755267aeb6 30-Oct-2014 vandwalle <vandwalle@google.com> read packet counters before and after DHCP

Change-Id: I0c1d94a6d687c2788b71523adae01cde59d34aa7
ndroid/server/wifi/WifiStateMachine.java
cfa3bfefdaebf6213a067fa2fc6e377b4f25605a 29-Oct-2014 Erik Kline <ek@google.com> Merge "Make isProvisioned() use LinkProperties' concept of same." into lmp-mr1-dev
b5120326b58f35217dcedc5f19e8cf3eb42b28d0 29-Oct-2014 vandwalle <vandwalle@google.com> print both uptime and milli since boot in the wifi state machine logs

Change-Id: I5521b59efcf1c3fb6d0e2dc62b3db92a27c49ebd
ndroid/server/wifi/WifiStateMachine.java
f9715cc118c446695b2a82211881c7d6c5e59761 23-Oct-2014 vandwalle <vandwalle@google.com> various fixes:
- Carry over the IP config when self adding a configuration
- fix null pointer exception in wificonfigstore, trying to read the IPConfig file
Bug:18058314
Bug:18057271

Change-Id: Ia1922f0cf44aa6eaf67928ac392a6ec92431f279
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
553f8e37a484fdda61281a0993da59c36de6d26c 28-Oct-2014 Lorenzo Colitti <lorenzo@google.com> am a851b6fc: Merge "Don\'t connect if the NetworkFactory has not requested it." into lmp-mr1-dev automerge: 27fec00

* commit 'a851b6fcb7601d6dd9dcc5793383faafbe8d924e':
Don't connect if the NetworkFactory has not requested it.
27fec00f5028f34adfc9d43a21ef363a33f7277e 28-Oct-2014 Lorenzo Colitti <lorenzo@google.com> Merge "Don't connect if the NetworkFactory has not requested it." into lmp-mr1-dev
0af9c80053bd2736d5bea095b363d6a0c8ce71d0 22-Oct-2014 Lorenzo Colitti <lorenzo@google.com> Don't connect if the NetworkFactory has not requested it.

This fixes persistent oscillations that occur if Ethernet is
plugged in, where wifi connects, gets torn down because its
score is too low, reconnects, ...

Bug: 17632610
Change-Id: Icfeed9b46d97a8868b64a0be3cb83ac2884f3228
ndroid/server/wifi/WifiStateMachine.java
6d66b5730446fa4df96c6dcda8612a64ed5bf383 24-Oct-2014 Erik Kline <ek@google.com> Make isProvisioned() use LinkProperties' concept of same.

Change the concept of provisioned to rely on LinkProperties#isProvisioned,
unless a static configuration (possibly incomplete) is in effect.

Bug: 17769720
Change-Id: Ie45e45016d3b33d98097727d49b9c09349fc9021
ndroid/server/wifi/WifiStateMachine.java
0babf8db92db534bf5ce274b551aa6d9b8200ced 25-Oct-2014 Vinit Deshpande <vinitd@google.com> am 7078ccd6: am 88daa7e9: Mark configuration as disabled, if it is disabled by WifiManager automerge: b407b98

* commit '7078ccd6c3e9b65ee57ca1bc4726f4db698a3680':
Mark configuration as disabled, if it is disabled by WifiManager
b407b98190bc4a80b58285bbcd4751bf2a94c9b9 25-Oct-2014 Vinit Deshpande <vinitd@google.com> am 88daa7e9: Mark configuration as disabled, if it is disabled by WifiManager

* commit '88daa7e9d975b8b6674157dd6e81d358c7d16393':
Mark configuration as disabled, if it is disabled by WifiManager
88daa7e9d975b8b6674157dd6e81d358c7d16393 24-Oct-2014 Vinit Deshpande <vinitd@google.com> Mark configuration as disabled, if it is disabled by WifiManager

Bug: 17937171

Change-Id: Ic61439868f28899cc1c641c29ebcc8b7bfab35eb
ndroid/server/wifi/WifiConfigStore.java
9e0e2c97dc7be69ebb76017e6d3846e8fff130c6 23-Oct-2014 vandwalle <vandwalle@google.com> am 749c23d2: am c1bcb778: am 1ec92c57: - detect that firmware cant stay connected to 5GHz AP and tune down 5GHz preference accordingly - use a long random string so as to obfuscate PSK of WiFiConfiguration we have deleted but keep around in the autojoin database - if

* commit '749c23d2d7dc04dcdb8076ce81a213a86499cc72':
- detect that firmware cant stay connected to 5GHz AP and tune down 5GHz preference accordingly - use a long random string so as to obfuscate PSK of WiFiConfiguration we have deleted but keep around in the autojoin database - if autojoin doesn't find a known network to join, and sees a known network that ConnectivityService never marked as UNWANTED due to bad signal, then add a boost of up to +8dB to this network's autojoin threshold, also includes the boost in the network's score that is sent to connectivity service
c1bcb77843fecb661b5733ed5813e327313ce002 22-Oct-2014 vandwalle <vandwalle@google.com> am 1ec92c57: - detect that firmware cant stay connected to 5GHz AP and tune down 5GHz preference accordingly - use a long random string so as to obfuscate PSK of WiFiConfiguration we have deleted but keep around in the autojoin database - if autojoin doesn\'t find a kn

* commit '1ec92c57244311c7fca3ab6b244a06c2b2b58902':
- detect that firmware cant stay connected to 5GHz AP and tune down 5GHz preference accordingly - use a long random string so as to obfuscate PSK of WiFiConfiguration we have deleted but keep around in the autojoin database - if autojoin doesn't find a known network to join, and sees a known network that ConnectivityService never marked as UNWANTED due to bad signal, then add a boost of up to +8dB to this network's autojoin threshold, also includes the boost in the network's score that is sent to connectivity service
1ec92c57244311c7fca3ab6b244a06c2b2b58902 21-Oct-2014 vandwalle <vandwalle@google.com> - detect that firmware cant stay connected to 5GHz AP and tune down 5GHz preference accordingly
- use a long random string so as to obfuscate PSK of WiFiConfiguration we have deleted but keep around in the autojoin database
- if autojoin doesn't find a known network to join, and sees a known network that ConnectivityService never marked as UNWANTED due to bad signal, then add a boost of up to +8dB to this network's autojoin threshold, also includes the boost in the network's score that is sent to connectivity service

b/17960587
b/18038705
b/18030088
b/17870963

Change-Id: I6cb2c6fdff799453b3d780c43f99d070117e0dc7
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
be84b5394d1aefbf408a2b52aa8cb9633d9368d9 18-Oct-2014 vandwalle <vandwalle@google.com> am 327a5a8b: am dd0c5587: Taking into account user join preference more aggressively; add debug info for roaming Bug:17669859 Big:17651877 automerge: 0fd84c2

* commit '327a5a8b601a87fb565385884146ede95b444d4f':
Taking into account user join preference more aggressively; add debug info for roaming Bug:17669859 Big:17651877
0fd84c2577121d02f0d6436c84dcb1dd311911e5 18-Oct-2014 vandwalle <vandwalle@google.com> am dd0c5587: Taking into account user join preference more aggressively; add debug info for roaming Bug:17669859 Big:17651877

* commit 'dd0c558776fcfba3f754bb0cd6533f2c9c23ec1e':
Taking into account user join preference more aggressively; add debug info for roaming Bug:17669859 Big:17651877
dd0c558776fcfba3f754bb0cd6533f2c9c23ec1e 16-Oct-2014 vandwalle <vandwalle@google.com> Taking into account user join preference more aggressively; add debug info for roaming
Bug:17669859
Big:17651877

Change-Id: I3f763f354848d2bc3863f2887bccaf0ff9af426e
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
552b5e4984e7b1331e3c0f0d262196d98e49eb3c 16-Oct-2014 vandwalle <vandwalle@google.com> am 55323f85: am 0e89e053: am 6db73827: Merge "fix bssid blacklisting Bug:17960587 Bug:17966377" into lmp-dev

* commit '55323f85677f3c6aed2188fbae68154de61b1589':
fix bssid blacklisting Bug:17960587 Bug:17966377
0e89e0535f4f7b2a48384fc0b7ae779acd0376c7 16-Oct-2014 vandwalle <vandwalle@google.com> am 6db73827: Merge "fix bssid blacklisting Bug:17960587 Bug:17966377" into lmp-dev

* commit '6db73827acdedb707dd3e0f2fa2add833380a3b6':
fix bssid blacklisting Bug:17960587 Bug:17966377
6db73827acdedb707dd3e0f2fa2add833380a3b6 16-Oct-2014 vandwalle <vandwalle@google.com> Merge "fix bssid blacklisting Bug:17960587 Bug:17966377" into lmp-dev
078a7527951b1e8fb7722ab930760730cf54e572 15-Oct-2014 vandwalle <vandwalle@google.com> fix bssid blacklisting
Bug:17960587
Bug:17966377

Change-Id: I6ead5386f961e8bd0705ceea190752dd20f7e38a
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
8a5d615e95c6e71b1db7536fb28f3142b63649cb 15-Oct-2014 Jeff Davidson <jpd@google.com> resolved conflicts for merge of fd93b4ce to master

Change-Id: I1c81c9d9a9b8d3709473ee585b5b741624babf7a
8639f6266cb70bf92d1561af43ac2d7b2b97298e 19-Aug-2014 Jeff Davidson <jpd@google.com> Allow connections to untrusted SSIDs when requested.

When at least one NetworkRequest for an untrusted network is active,
autojoin will allow connections to untrusted connections. Upon
successful connection, we tell the framework whether Wifi is currently
connected to a trusted or untrusted network. If all requests for
untrusted networks are withdrawn, and we are currently connected to an
untrusted network, that connection is dropped.

Bug: 15892711
Change-Id: I3f8625996013ee850927fc2290a24c591e3db691
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
ad9bd6cf22f910acff81b7f29e2b7ed8e6cb71b8 15-Oct-2014 vandwalle <vandwalle@google.com> am af106831: am 85f2d77b: In case of driver roaming and auth failure, allow for fast reconnect Bug:17747008

* commit 'af1068317050f861fab0c5f097cc311942c13a69':
In case of driver roaming and auth failure, allow for fast reconnect Bug:17747008
85f2d77b1b858c063471951f3a5f93c96bd5e72b 14-Oct-2014 vandwalle <vandwalle@google.com> In case of driver roaming and auth failure, allow for fast reconnect
Bug:17747008

Change-Id: I87eefc5a0952dd5f7159385aa180c02a38d92432
ndroid/server/wifi/WifiStateMachine.java
e0aacc7755f2ab48b081a1f119c05382779f306a 12-Oct-2014 vandwalle <vandwalle@google.com> am d2c137ad: am a5283c01: 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

* commit 'd2c137ad25e6e7f15570b989709b9ea9c3ff701a':
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
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
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
74edac0961220f34055e7e35750c2f5de9fe1c74 10-Oct-2014 Joe Farfel <jfarfel@google.com> am 8e599666: am f15171c1: Merge "Change access to P2pStateMachine messenger." into lmp-dev

* commit '8e599666a9fe310dab5996462f2d0298f2df41f2':
Change access to P2pStateMachine messenger.
f15171c10c8df5603c3ba7a2fa80138e151028fc 09-Oct-2014 Joe Farfel <jfarfel@google.com> Merge "Change access to P2pStateMachine messenger." into lmp-dev
6879b31beb6d899a178a3c7c10a5a37470179648 08-Oct-2014 vandwalle <vandwalle@google.com> am 7a693362: am a0708b09: various fixes: - adding debug information to bug report for Bug:16751877 - reenable networks when entering DisconnectedState - dont force MSG_INFO log level at supplicant Bug:16751877 Bug:17811889 Bug:17881399

* commit '7a6933624b11c833632f34750e454331e0b06f96':
various fixes: - adding debug information to bug report for Bug:16751877 - reenable networks when entering DisconnectedState - dont force MSG_INFO log level at supplicant Bug:16751877 Bug:17811889 Bug:17881399
07a55aa0236fc5d1b05c5d54c6ff8d42d881b4bb 07-Oct-2014 Joe Farfel <jfarfel@google.com> Change access to P2pStateMachine messenger.

Allow either LOCATION_HARDWARE (GmsCore has this) or
CONNECTIVITY_INTERNAL permission.

Bug: 17814099
Change-Id: I73aba5361f8654305d783996093e095375087f37
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
a0708b09ad17b086c008ab100aec7143d7613c80 07-Oct-2014 vandwalle <vandwalle@google.com> various fixes:
- adding debug information to bug report for Bug:16751877
- reenable networks when entering DisconnectedState
- dont force MSG_INFO log level at supplicant
Bug:16751877
Bug:17811889
Bug:17881399

Change-Id: I89b4f5c05a1f64f9d1e8c407f62036efa0265043
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
c5199fd4dc2e0a90f7c5fd0d65185e6b2f8916ef 04-Oct-2014 vandwalle <vandwalle@google.com> am da247360: am e0ba94ba: - slightly better network log - add debug option to enable/disable associated full band scans - networkHistory.txt and wpa_supplicant.conf file get out of sync regarding config.status variable Bug:17648443

* commit 'da2473601be1e8917868d16af96f3243516e2a2d':
- slightly better network log - add debug option to enable/disable associated full band scans - networkHistory.txt and wpa_supplicant.conf file get out of sync regarding config.status variable Bug:17648443
e0ba94ba9abde13173ae0de8c8939aa4eb9a9085 01-Oct-2014 vandwalle <vandwalle@google.com> - slightly better network log
- add debug option to enable/disable associated full band scans
- networkHistory.txt and wpa_supplicant.conf file get out of sync regarding config.status variable
Bug:17648443

Change-Id: Ie1c6dac9f94b7d71599734e2263b9456cf6278ee
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
3231164e4229c4ea1ea6c26ddf9d89176c84ec61 29-Sep-2014 Vinit Deshpande <vinitd@google.com> am 21478be9: am fb097411: Merge "Don\'t fire SCAN_RESULTS_AVAILABLE broadcast for partial scans" into lmp-dev

* commit '21478be94eb0ea3dacc2bd8a8c84ca190d2edb3c':
Don't fire SCAN_RESULTS_AVAILABLE broadcast for partial scans
6993e3e4292f00534056026c7f98d765cbb06803 27-Sep-2014 Vinit Deshpande <vinitd@google.com> Merge "Separate wifi AP added by applications."
e487a4648dd41881e754f1224aaedead78a0777d 23-Sep-2014 Sky Faber <skyf@google.com> Separate wifi AP added by applications.

-Add dialog before connecting to an app added network
-Remove applicationss APs on uninstall
-Ban apps from modifying networks they don't own.
-Ensure app connections don't modify user preference.

Change-Id: I12943563ef714c4287e13488578f020d136d006d
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
eb06dee93b75e2ad63a7d580c34cd90fc533cec5 27-Sep-2014 Sky Faber <skyf@google.com> Merge "Display p2p alerts for all users."
fb09741166b68bf69dbd0afb22f83a699c5f8a7e 26-Sep-2014 Vinit Deshpande <vinitd@google.com> Merge "Don't fire SCAN_RESULTS_AVAILABLE broadcast for partial scans" into lmp-dev
30165fda6725e82774dc459d006febdcda5f569a 26-Sep-2014 vandwalle <vandwalle@google.com> am 8f92aa6e: am 7736c07a: drop score more aggressively based on link speed, Bug:17514346

* commit '8f92aa6ef6a6563637ea5af4d05a00217a31f1ec':
drop score more aggressively based on link speed, Bug:17514346
765b9dc1c45bbeed87243d21cc5938bd5f1ba0d4 26-Sep-2014 Vinit Deshpande <vinitd@google.com> Don't fire SCAN_RESULTS_AVAILABLE broadcast for partial scans

This ensures that apps don't get partial scan results

Bug: 17612695

Change-Id: Id5d7b9831a54c9fc430f329b4b83b8342f5063ea
ndroid/server/wifi/WifiStateMachine.java
7736c07a4cad4e2d86e1ec2f4221c7f788c18d3a 25-Sep-2014 vandwalle <vandwalle@google.com> drop score more aggressively based on link speed, Bug:17514346

Change-Id: Ib7a09adc961d76bc5da49cfff2edd4120175562c
ndroid/server/wifi/WifiStateMachine.java
429d1663e81abb122ea8f88a4e1974215bac7e45 25-Sep-2014 vandwalle <vandwalle@google.com> am 8ddd466a: am 5b56b259: Merge "- make rssi poll and wifi scan when associated configurable - fix regression when forgeting network - fix NPE in calculateWifiScore Bug:17564108" into lmp-dev

* commit '8ddd466aaf03fb8fed3f059708ae388109fdfcc4':
- make rssi poll and wifi scan when associated configurable - fix regression when forgeting network - fix NPE in calculateWifiScore Bug:17564108
df69eb27a02b72f7040ad526deacbc7fb91fa581 25-Sep-2014 Vinit Deshpande <vinitd@google.com> am f690498d: am 099e3179: Merge "Introduce config setting for scanning mac OUI" into lmp-dev

* commit 'f690498d0e5b3ec7760b05869d71c5b062b0559d':
Introduce config setting for scanning mac OUI
fc5a12a8ec685c4de2fbb67109d881b175b10898 25-Sep-2014 Sky Faber <skyf@google.com> Merge "Defer CMD_ENABLE_ALL_NETWORKS while doing WPS"
5b56b25942679fa7a608691e70d210c1032d9e4b 25-Sep-2014 vandwalle <vandwalle@google.com> Merge "- make rssi poll and wifi scan when associated configurable - fix regression when forgeting network - fix NPE in calculateWifiScore Bug:17564108" into lmp-dev
099e31798ed1c675a9ad654debac96f975ebcc82 25-Sep-2014 Vinit Deshpande <vinitd@google.com> Merge "Introduce config setting for scanning mac OUI" into lmp-dev
70468b47454c8657e8963932f2e08a3f4d7e3881 25-Sep-2014 vandwalle <vandwalle@google.com> - make rssi poll and wifi scan when associated configurable
- fix regression when forgeting network
- fix NPE in calculateWifiScore
Bug:17564108

Change-Id: I47329b1fb0f23c72886bdd3de99b4f9242d59eec
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
65d19a33f71d729b3fab570e5f7ea49211b30cd1 24-Sep-2014 vandwalle <vandwalle@google.com> am cec01e05: am 9d082c38: inconditionally issue the reassociate command in the case of linkdebouncing, dont treat AUTO_SAVE commands coming from autojoincontroller as user triggered WifiManager.SAVE_NETWORK commands Bug:17624613

* commit 'cec01e0566bec2101f9487e7dcb67d93a051d58e':
inconditionally issue the reassociate command in the case of linkdebouncing, dont treat AUTO_SAVE commands coming from autojoincontroller as user triggered WifiManager.SAVE_NETWORK commands Bug:17624613
bbcd5def01d06d260350edaab2af5ebc38545fe3 24-Sep-2014 vandwalle <vandwalle@google.com> am 5a99c7ae: am e0aa0a00: - 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:1648

* commit '5a99c7ae08a6c8e9d74fcca19b0064145d480d24':
- 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
123e33c0fa492be4f1a8c656cc835ab05c5cda55 24-Sep-2014 Sky Faber <skyf@google.com> Display p2p alerts for all users.

Bug: 17632111
Change-Id: I2caddca5bbac01f13b157bf94c8f395e82e9519a
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
9d082c381274f27dad1e344223189e00148e2124 24-Sep-2014 vandwalle <vandwalle@google.com> inconditionally issue the reassociate command in the case of linkdebouncing, dont treat AUTO_SAVE commands coming from autojoincontroller as user triggered WifiManager.SAVE_NETWORK commands
Bug:17624613

Change-Id: I2c586646bd967cb2d699433b0c228210647f4ee3
ndroid/server/wifi/WifiStateMachine.java
eedd70ee3fa7f161ea1f4ae26543ac927e82a681 23-Sep-2014 Vinit Deshpande <vinitd@google.com> Introduce config setting for scanning mac OUI

This setting will allow an OEMs to override the default Google OUI
for scanning.

Bug: 17468465
Change-Id: I3d9a6cf6451bcc98d0cad158bc52c7b3a52cb0ea
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
566ef988c372a74f430734d51168200daa39cfde 23-Sep-2014 Vinit Deshpande <vinitd@google.com> am 73ecd8ea: am fa64c3ff: Merge "Synchronize access to supplicant from p2pGetDeviceAddress" into lmp-dev

* commit '73ecd8ea1bf35dbb31df96e18594cd3ac24a8df0':
Synchronize access to supplicant from p2pGetDeviceAddress
fa64c3ff3051dfd8a876786df70e635d3906121f 23-Sep-2014 Vinit Deshpande <vinitd@google.com> Merge "Synchronize access to supplicant from p2pGetDeviceAddress" into lmp-dev
cc04fb0dd7ec593b4731a6ad090527568d4e8312 20-Sep-2014 Robert Greenwalt <rgreenwalt@google.com> am 701b1d7f: am 328fc540: Re-add wifi change permission check.

* commit '701b1d7f23598d6dfd0561c77e5cb6c2b7fee030':
Re-add wifi change permission check.
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
ndroid/server/wifi/WifiNative.java
328fc5407927799843c11f2b767a8cf47b89f366 19-Sep-2014 Robert Greenwalt <rgreenwalt@google.com> Re-add wifi change permission check.

Recent change switched to impose the Connectivity permissions
(which were intended but being circumvented) but that removed
the wifi change permission.

bug:17435527
Change-Id: Ibc58605dee767d6a749b1fae867855fd1cb25def
ndroid/server/wifi/WifiServiceImpl.java
88e3bdb713f9805cf06beff662cd78a9f1d640aa 18-Sep-2014 vandwalle <vandwalle@google.com> am f125d5b5: am f17f8070: Merge "various fixes:" into lmp-dev

* commit 'f125d5b5918a18d11334fdd0f69cc9bbe63ecd81':
various fixes:
f17f8070a966778bf9e405ed50757ea929bbb545 18-Sep-2014 vandwalle <vandwalle@google.com> Merge "various fixes:" into lmp-dev
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
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
32e17445682028a272d0d832886648f370342cea 18-Sep-2014 Robert Greenwalt <rgreenwalt@google.com> am 9252e15f: am 7e1b891b: Merge "Use unified Tethering Permission Check" into lmp-dev

* commit '9252e15fa6c2e2931a32ba1af73f0142a118dc23':
Use unified Tethering Permission Check
7e1b891ba9d144ca026e8684ef8019cc76a53d6e 18-Sep-2014 Robert Greenwalt <rgreenwalt@google.com> Merge "Use unified Tethering Permission Check" into lmp-dev
5eea3d5ccbf3c47ce3ee72b1d42f35f55f641ae7 17-Sep-2014 David Christie <dnchrist@google.com> am 97f9c99a: am 6449b994: Merge "Fix bug where wifi scan only mode is non-functional after toggling airplane mode. Bug: 17507663" into lmp-dev

* commit '97f9c99a7e12aedf1f2991def79bccef98f461c2':
Fix bug where wifi scan only mode is non-functional after toggling airplane mode. Bug: 17507663
34f173a54307c39ffe5dfab52e7ef8166a00539e 17-Sep-2014 Robert Greenwalt <rgreenwalt@google.com> Use unified Tethering Permission Check

The BT and Wifi mechanisms for enabling Tethering did their own
permission checks. This set of changes unifies the check into
a ConnectivityManager function so they can be kept in sync.

bug:17435527
Change-Id: I8c157a5acf56ffbddd349cb6a45160ae7be8541b
ndroid/server/wifi/WifiServiceImpl.java
6449b994869c182159a108ae53160edb4f0abe10 17-Sep-2014 David Christie <dnchrist@google.com> Merge "Fix bug where wifi scan only mode is non-functional after toggling airplane mode. Bug: 17507663" into lmp-dev
07a875dc76b3f07afdc521ddf59d7a6774995ac5 17-Sep-2014 Robert Greenwalt <rgreenwalt@google.com> am 8a2fafdf: am fc797cf4: Merge "Add NetworkAgent event for ExplicitlySelected" into lmp-dev

* commit '8a2fafdf1fce098989044f432689d8c7f341bee0':
Add NetworkAgent event for ExplicitlySelected
fc797cf48feed42a76fccef73eeed535e1848702 17-Sep-2014 Robert Greenwalt <rgreenwalt@google.com> Merge "Add NetworkAgent event for ExplicitlySelected" into lmp-dev
892c69ee79493f381890010dcaacc01de51fb18a 17-Sep-2014 vandwalle <vandwalle@google.com> am 4999461c: am 99d385e3: set proper link quality thresholds

* commit '4999461cf9ac0097de22ab4032460408c4d81f76':
set proper link quality thresholds
7b160c8a00773246660caeae9e27090c83ed6ed5 16-Sep-2014 David Christie <dnchrist@google.com> Fix bug where wifi scan only mode is non-functional after toggling airplane mode.
Bug: 17507663

Change-Id: I0d77c2e29b78fdfa8e9f4be31181145cb29c1499
ndroid/server/wifi/WifiController.java
ndroid/server/wifi/WifiSettingsStore.java
99d385e3b4d34841d6efcfd7cc9bf1d5ae25de14 16-Sep-2014 vandwalle <vandwalle@google.com> set proper link quality thresholds

Bug:17514073

Change-Id: Icf4dbd81e8547bb837c8346c9af5cfc98d7b00ab
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
0ba396aa7f0382b369b89a55773c4e8289ab3f3a 16-Sep-2014 Vinit Deshpande <vinitd@google.com> am 5919271b: am 4d29f96e: Merge "Fix conditions that my leave ScanAlarm running in background" into lmp-dev

* commit '5919271ba37a0a7301c5302487936be3a8a94b93':
Fix conditions that my leave ScanAlarm running in background
6fc37f4abb2bcaa18bdb7cad3384ce637df7aedc 16-Sep-2014 Vinit Deshpande <vinitd@google.com> am 42cc98de: am de5e9a44: Merge "Fix first time notification of available open Wifi" into lmp-dev

* commit '42cc98de5333ad1530ed1e7b81d068776b0a6f6f':
Fix first time notification of available open Wifi
3c935adcb556daabd6a660991de421a9e3dfe035 16-Sep-2014 vandwalle <vandwalle@google.com> am 475b44ed: am 9e806a8d: improve debugging messages & logging

* commit '475b44ed2844754d32a539127fde00004cf6ab63':
improve debugging messages & logging
4d29f96e9085b71b01edb4c3dfd2d5b0bb621fea 16-Sep-2014 Vinit Deshpande <vinitd@google.com> Merge "Fix conditions that my leave ScanAlarm running in background" into lmp-dev
de5e9a44e76cf78d2bac0c60b7420a669393e9f5 16-Sep-2014 Vinit Deshpande <vinitd@google.com> Merge "Fix first time notification of available open Wifi" into lmp-dev
7c8a4effa2442b9d00fd421b443ea9645f8651c8 16-Sep-2014 Vinit Deshpande <vinitd@google.com> Fix conditions that my leave ScanAlarm running in background

This can happen because of race - you could get DISCONNECTED from
supplicant between CMD_SCREEN_STATE_CHANGED (for screen off) and
CMD_ENABLE_BACKGROUND_SCAN - which sets the background scan. This can
cause Disconnected state to leave a scan alarm running.

This change removes that possibility by combining processing of
CMD_ENABLE_BACKGROUND_SCAN into CMD_SCREEN_STATE_CHANGED.

RTC_WAKEUP alarm is also changed to RTC when PNO is supported; so
we shouldn't wake up the AP anymore.

Bug: 17261586

Change-Id: Ic7c3dbf6ed5e042f9ed6b96349bf5ec50e509552
ndroid/server/wifi/WifiStateMachine.java
9e806a8d9f297e4de826e65322859a89e4d95c8b 15-Sep-2014 vandwalle <vandwalle@google.com> improve debugging messages & logging

Change-Id: I7c668c24357663fff418c62d21c1fc6cb571590a
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
611e252f9d7ed68b65e3a921420489315781f149 14-Sep-2014 vandwalle <vandwalle@google.com> am c506481e: am 17e82884: make wifi cellular handover params configurable

* commit 'c506481edc3bf673ef9cee5816024860e3efe1ee':
make wifi cellular handover params configurable
17e828848eebb4eb11d27ce32d02716334dd6011 13-Sep-2014 vandwalle <vandwalle@google.com> make wifi cellular handover params configurable

Change-Id: Icc1f722d3e0293ec58027770b941fc98dc24ce44
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
f9b857e8d434bf7a48b01e283c85f6662b817b34 13-Sep-2014 vandwalle <vandwalle@google.com> am 37a82283: am 0eebae73: various fixes:

* commit '37a82283cf4e4a3e27aac9b4afa38fe23fee08e2':
various fixes:
0eebae7334d6129f7ca1344e4b20199794994358 12-Sep-2014 vandwalle <vandwalle@google.com> various fixes:

- add null pointer check to wifi watchdog state machine
- correctly parse the REQUEST IDENTIY event sent by wpa_supplicant
- make autojoining wificonfiguration more aggressive based on user input
Bug:17469863
Bug:17426395
Bug:17475816

Change-Id: I1785c917c0e570de0edaa02bd0ca6536be9d7c0b
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiWatchdogStateMachine.java
fb7268e9a14ba1620abe12fbc702bd0bd16cb9c5 12-Sep-2014 vandwalle <vandwalle@google.com> am aa5a2e6d: am 448c9536: dont accept CONNECTION_EVENT until roaming is complete

* commit 'aa5a2e6d55625e1a910b0b336721384cb5aeddd1':
dont accept CONNECTION_EVENT until roaming is complete
448c9536a302c58a79e271b1721c08b8882f800e 11-Sep-2014 vandwalle <vandwalle@google.com> dont accept CONNECTION_EVENT until roaming is complete

Change-Id: Iedde560abc9d2f4c3a3b9b9bfc5caaaa5584472e
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
98f1919232faf062f15e28dd2ec231a483b617bb 11-Sep-2014 vandwalle <vandwalle@google.com> am 9808208c: am 2f2cf216: make autojoin configurable, clean up BSSID info that may be stake in WifiConfiguration

* commit '9808208c55150f17a7540e86350d275fa68c9a3c':
make autojoin configurable, clean up BSSID info that may be stake in WifiConfiguration
c5e82ad2600416d7eafdde5d1d02400ece28e48a 10-Sep-2014 Vinit Deshpande <vinitd@google.com> Fix first time notification of available open Wifi

There is no networkInfo the first time notification controller starts,
and as a result it is dropping check to find out if open networks are
available.

Bug: 17349359
Change-Id: I09ca0b1cb44a849f2cdfafb1dcdcc943b2586562
ndroid/server/wifi/WifiNotificationController.java
2f2cf21662275a0e93d7d7a6ad3d98b4c596dcf0 10-Sep-2014 vandwalle <vandwalle@google.com> make autojoin configurable, clean up BSSID info that may be stake in WifiConfiguration

- allow scans in verifying poor link
Bug:17420929

Change-Id: I310ad60a443d648666ebac49b3eeb56c7e9a0ecc
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
ebafddb35b23d40045c8c2dd03c9a2ca4cbab1d8 10-Sep-2014 Vinit Deshpande <vinitd@google.com> am 4158aa44: am 048dd77a: Merge "Secure access to WifiScanner" into lmp-dev

* commit '4158aa4448e876256fce6c73aae9c5affd47d269':
Secure access to WifiScanner
048dd77ab0eb085f708663ee9f6298e703ccda2b 10-Sep-2014 Vinit Deshpande <vinitd@google.com> Merge "Secure access to WifiScanner" into lmp-dev
2f53f4577684ba6e5c53c7405cae3bd8fab2a323 10-Sep-2014 vandwalle <vandwalle@google.com> am 037dd0a1: am b6defc9d: Merge "various fixes:" into lmp-dev

* commit '037dd0a1507797eea3e9a2e85cecfd32d8da0c1d':
various fixes:
b6defc9d7836cb440c0cdb0d1e1031a5fc83a4da 10-Sep-2014 vandwalle <vandwalle@google.com> Merge "various fixes:" into lmp-dev
b664cfeab6f02e24376ea0a15beb83d142f0b14d 09-Sep-2014 vandwalle <vandwalle@google.com> various fixes:

- persist Wificonfiguration.ephemeral
- dont trigger attemptRoam on previous configuration
- treat ADD_OR_UPDATE_NETWORK with highest priority as a user network selection
- add associated scan period in framework/base/core/res/res/

Bug:17202406

Change-Id: Ibd92af49c6b79c6799d90d4b72b72547a4c936ca
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
05452aaf01dbb557909c075d697e3e41efc8730f 09-Sep-2014 Vinit Deshpande <vinitd@google.com> am f455e5d2: am a2cf1148: Merge "Implement getAvailableChannels" into lmp-dev

* commit 'f455e5d2c22618c16e2aa7c66c9293d53d222d08':
Implement getAvailableChannels
4c3da5cdf968f37651c40135331f7b9e9ffee4f5 09-Sep-2014 Vinit Deshpande <vinitd@google.com> am d06a7123: am 826cc083: Merge "Fix leaking of WPA2 passcode for newly added networks" into lmp-dev

* commit 'd06a7123bfc9551473f963478a48d7357c6c9ba2':
Fix leaking of WPA2 passcode for newly added networks
a2cf11484151923968065fdb25997c5032d36348 09-Sep-2014 Vinit Deshpande <vinitd@google.com> Merge "Implement getAvailableChannels" into lmp-dev
826cc083fdbef5680ff2052b02789326b44bb322 09-Sep-2014 Vinit Deshpande <vinitd@google.com> Merge "Fix leaking of WPA2 passcode for newly added networks" into lmp-dev
46d6b0ac6d466002e868627488796ce3d6a154aa 09-Sep-2014 Vinit Deshpande <vinitd@google.com> Secure access to WifiScanner

This change implements access control for WifiScanner. It is now
available to only those apps that have CONNECTIVITY_INTERNAL permissions.

Bug: 15088601
Change-Id: I6acc13079b6dac6f190644b6d1a270c271cc679f
ndroid/server/wifi/WifiScanningServiceImpl.java
2dbf6c027271518d868ae52ad90789eb2bc3c363 08-Sep-2014 Robert Greenwalt <rgreenwalt@google.com> Add NetworkAgent event for ExplicitlySelected

Lets Wifi tell us when the user selected this AP vs auto-connected.

bug:17396168
Change-Id: I6e067ab62ed49040629aa31fe07ff880d3d542f0
ndroid/server/wifi/WifiStateMachine.java
d5eb2cb8bea63e038dfe7c406e313295cba5c3aa 08-Sep-2014 vandwalle <vandwalle@google.com> Merge "adding debug logs"
7963ee6b79a83690ee44ff53d9dbd7c192f2be47 04-Sep-2014 vandwalle <vandwalle@google.com> adding debug logs

- add debug status to WifiStatemachine message handling
- tracking scan requests: add scan request counter and addl debug information
- clean wifi packet stats when we disable RSSI polling
- count home network as >=6 BSSID for the purpose of calculating wifi score

Change-Id: Ic13ef303fdcfe60c0e27f225af4e233b9a2cffaa
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
da33411be39042247b672b854688c31a5dfbdd01 08-Sep-2014 vandwalle <vandwalle@google.com> am 823c46a0: am c9b047b4: dont debounce on locally generated disconnect

* commit '823c46a08fb8617df8e5164305785ccf761dbe3f':
dont debounce on locally generated disconnect
c9b047b4cb480edbb490516746cfcbb4a4eedeea 08-Sep-2014 vandwalle <vandwalle@google.com> dont debounce on locally generated disconnect

Change-Id: Id75a866959fc99828f6143230a9ade3e6a2b81b9
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
35a127a1fefece50f8906cc534b24915efdd0660 08-Sep-2014 vandwalle <vandwalle@google.com> am ef302ff4: am 9f3349fa: various fixes:

* commit 'ef302ff47dac49276682ed0335189cf5b951962b':
various fixes:
9f3349fa2cd39d690d1e2b7c3b71ced412e24f2c 05-Sep-2014 vandwalle <vandwalle@google.com> various fixes:

- cleanup setWifiEnable transitions
- dont scan right when entering connected and Disconnected state, instead startScan() adds a 200ms delay before starting the scans, so as to let the state machiine time to process deferred message
- dont forget to send the NetworkStateChanged Broadcast when we set the network detailed state
- autojoin dont attempt to join WifiConfigurations marked as noInternetAccess, unless explicitely selected by the user
- keep stats of user triggered wifi state disabling requests
- fix bad roaming situation when BSSID is specified in network block

Bug:17193677

Change-Id: Ia103a93232f40519c7b4eef07254f32342ea5615
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
e61237672316b46d7bec960a199bfbd5bfcca257 06-Sep-2014 Vinit Deshpande <vinitd@google.com> Fix leaking of WPA2 passcode for newly added networks

WifiConfigStore is firing broadcast with incorrect object which leaks
the passcode.

Bug: 17160254
Change-Id: Ia07897778d4b7a9865b883ae2a8bc3b01c58ae6a
ndroid/server/wifi/WifiConfigStore.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
7fc502d2f1d0653e767b4c5af848f8cce45e6f40 05-Sep-2014 Wenchao Tong <tongwenchao@google.com> am 67f94f00: am 14fd4783: Merge "Fix a bug in the wpa_supplicant parsing code." into lmp-dev

* commit '67f94f00ddb558cf3e908dc31b170d586d085c62':
Fix a bug in the wpa_supplicant parsing code.
14fd4783657cc19da98d964e61de6251d6c317c8 05-Sep-2014 Wenchao Tong <tongwenchao@google.com> Merge "Fix a bug in the wpa_supplicant parsing code." into lmp-dev
f2899b9c94fd1abbd01625dfe320dd3f1bc9cc9c 03-Sep-2014 Wenchao Tong <tongwenchao@google.com> Fix a bug in the wpa_supplicant parsing code.

line.indexOf("ssid=") matches both ssid=xxx and scan_ssid=1.
Fix a typo in the regex to match the end of network block.

Bug: 17363819
Change-Id: Ib240e16988867b9610691b3bf4bcf90130797dc9
ndroid/server/wifi/WifiConfigStore.java
a696b72d45c777bc6ce5e3e7a98cd450b1c12579 18-Aug-2014 Sky Faber <skyf@google.com> Defer CMD_ENABLE_ALL_NETWORKS while doing WPS

Bug: 15003359
Change-Id: I3fa0dad30926ed02d9b3f8eff51a200bc5f95c5d
ndroid/server/wifi/WifiStateMachine.java
2ee4ecdffaf73ed7070c3b63db1f6fc6367a26a8 01-Sep-2014 vandwalle <vandwalle@google.com> AutoJoin fixes:

- Additional logs
- re-enable all network upon screen on and connection, even for blackliste networks due to auth failure
- watchdog the DisconnectingState
- remove mFrameworkAutoJoin which is not used anymore
- dont remove WPA_PSK configurations, instead mark them as AUTO_JOIN_DELETED and loose their history and keys

Bug:17261906
Bug:17330171
Bug:17339150
Bug:17063789

Change-Id: I12ea25142d0dcfc670d8970ed67624e8573d1ac2

Conflicts:
service/java/com/android/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
ebb7e0cb4572f73325a749539d589ebdefb8635c 04-Sep-2014 vandwalle <vandwalle@google.com> adding debug logs

- add debug status to WifiStatemachine message handling
- tracking scan requests: add scan request counter and addl debug information
- clean wifi packet stats when we disable RSSI polling
- count home network as >=6 BSSID for the purpose of calculating wifi score

Change-Id: Ic13ef303fdcfe60c0e27f225af4e233b9a2cffaa
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
35b1f31d5d44c2476c475483d1b89ca5c510ce31 04-Sep-2014 vandwalle <vandwalle@google.com> am 4950bc23: am 82199a28: help debugging scan issues: - adding additional logs - make handleSCreenStateChanged a message - track sender of the CMD_GET_CONFIGURED_NETWORKS message

* commit '4950bc232d787b68a490fe4e2534719f33fcb6d3':
help debugging scan issues: - adding additional logs - make handleSCreenStateChanged a message - track sender of the CMD_GET_CONFIGURED_NETWORKS message
f4c6a897fbb61e8bb31646db6fed78b579d10574 03-Sep-2014 vandwalle <vandwalle@google.com> Merge "fix processing of CMD_SAVE_NETWORK" into lmp-dev
0ff9728ea843a291b2665c705cfe6f0357e1aa44 03-Sep-2014 vandwalle <vandwalle@google.com> fix processing of CMD_SAVE_NETWORK

Change-Id: Ia42e6f3e983f69b38f899c56afd07da1e78a10b3
ndroid/server/wifi/WifiStateMachine.java
79d8f4f1e91e2315724d4d91725f865a7631b487 03-Sep-2014 Vinit Deshpande <vinitd@google.com> am 9eb8a226: am cbdd4310: Merge "Address API Council feedback for WifiAdapter/WPS APIs" into lmp-dev

* commit '9eb8a2269e1021fff345521ef980bbb4b759e186':
Address API Council feedback for WifiAdapter/WPS APIs
82199a285f4a45a46b44eb8253999aa918534753 03-Sep-2014 vandwalle <vandwalle@google.com> help debugging scan issues:
- adding additional logs
- make handleSCreenStateChanged a message
- track sender of the CMD_GET_CONFIGURED_NETWORKS message

Change-Id: I5717d07850ed563193b694a74d236bb8795fbd38
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
cbdd43105d9c12041a0b9edea714526c64542caf 03-Sep-2014 Vinit Deshpande <vinitd@google.com> Merge "Address API Council feedback for WifiAdapter/WPS APIs" into lmp-dev
be3095ed758fca076b9ccb9fdae48f7f865c078a 01-Sep-2014 vandwalle <vandwalle@google.com> AutoJoin fixes:

- Additional logs
- re-enable all network upon screen on and connection, even for blackliste networks due to auth failure
- watchdog the DisconnectingState
- remove mFrameworkAutoJoin which is not used anymore
- dont remove WPA_PSK configurations, instead mark them as AUTO_JOIN_DELETED and loose their history and keys

Bug:17261906
Bug:17330171
Bug:17339150
Bug:17063789

Change-Id: I12ea25142d0dcfc670d8970ed67624e8573d1ac2
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
048dc8df2bd9394979dbb090b0cfe8d6627d23e3 29-Aug-2014 Vinit Deshpande <vinitd@google.com> Address API Council feedback for WifiAdapter/WPS APIs

This change addresses concerns from the API review. Things that
are fixed are -

1. WifiAdapter is removed, until we have 'real' support for it
2. All the methods from WifiAdapter are moved to WifiManager
3. Changed WPSListener API names to be onFailed/onSucceeded et al

Bug: 16403303
Bug: 17115004
Change-Id: Ie886334f9381b678deb5f0248b9a5ec21f446949
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
641219d820142a9acae8348ff33fd8c3dfcf18b1 29-Aug-2014 vandwalle <vandwalle@google.com> am 321afd3f: am f143875a: Merge "autojoin fixes:" into lmp-dev

* commit '321afd3fc55247e0e10f94b058f01fd2c705e063':
autojoin fixes:
f143875ade81631bfe4c63e379d6467b1863fbc1 29-Aug-2014 vandwalle <vandwalle@google.com> Merge "autojoin fixes:" into lmp-dev
c679b664b1adf31ba5febb9af128b8e0f65900af 28-Aug-2014 Selim Cinek <cinek@google.com> am b6d5ffaa: am 0d647da4: Colored notifications

* commit 'b6d5ffaa408d285ff69eb59340a28c27e1968e48':
Colored notifications
0d647da4a502c1d3679d700144469460acab3d73 27-Aug-2014 Selim Cinek <cinek@google.com> Colored notifications

Bug: 17128331
Change-Id: I30a31d5da000e021e9891c56da91b0ff9615d4d6
ndroid/server/wifi/WifiNotificationController.java
e67ec726c07410073575473c0f50dc737629f5da 26-Aug-2014 vandwalle <vandwalle@google.com> autojoin fixes:

- Bug:17291273
- add persistent Wifi verbose logging option (/data/misc/wifi/autojoinconfig.txt)
- add config option for the associated scans period and backoff (/data/misc/wifi/autojoinconfig.txt)
- dont lock BSSID when roaming to 2.4GHz config
- issue single reassociate on roam
- make extended roaming 5GHz preference consistent with roaming 5GHz preference

Change-Id: I1525349e220cebb1b300753a707eb00fcc9d7d7b
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
10ab519ea2e4a3c5665ac047fe0239939512fa6d 26-Aug-2014 vandwalle <vandwalle@google.com> Merge "remove passpoint - DO NOT MERGE" into lmp-dev
cc0016886f5cd1afeb9fbf90b6a26e8bba3aa339 26-Aug-2014 vandwalle <vandwalle@google.com> am b92bc78f: am fdde6bf4: Merge "add radio stats to link layer" into lmp-dev

* commit 'b92bc78feb4112177f28445264a93c9479576469':
add radio stats to link layer
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>
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
dc83fc7dcba3de36dc4e5249447f1d1b28276fcd 26-Aug-2014 Vinit Deshpande <vinitd@google.com> am 9b37761d: am 28c7065e: Stop redundant attempt to remove an already removed client

* commit '9b37761d51191c19909225eeadd9cee3cab440c6':
Stop redundant attempt to remove an already removed client
4ae496d2dd90896e1f5b36546a27c0103bf5b6d8 26-Aug-2014 Vinit Deshpande <vinitd@google.com> am c803d224: am 042c54bf: Set scanning mac OUI for mac address rotation

* commit 'c803d224234af1debfe76142f3aefc5de281d8de':
Set scanning mac OUI for mac address rotation
3e883d5461ec819b7db51470e387c4bf0b09ce1f 25-Aug-2014 vandwalle <vandwalle@google.com> remove passpoint - DO NOT MERGE

Change-Id: Ia399d98fa7d1ecff5c06bf4802f70dc22c8e5713
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/passpoint/WifiPasspointService.java
ndroid/server/wifi/passpoint/WifiPasspointServiceImpl.java
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
28c7065e2af36064a230d2647782c5cdadaff2d8 15-Aug-2014 Vinit Deshpande <vinitd@google.com> Stop redundant attempt to remove an already removed client

It seems CMD_CHANNEL_DISCONNECTED can be called multiple times. This
change fixes a null derefence when removing the same client a second
time.

Bug: 17049093
Change-Id: Ic7da6a1e42cdc809cc3f6f042f2502453fee0c91
ndroid/server/wifi/WifiScanningServiceImpl.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
1a8a78bb228e4515fe57250baf75205048187824 23-Aug-2014 Robert Greenwalt <rgreenwalt@google.com> am 92a4f801: am 1d799fd8: Merge "Use new config resource for tcp buffersize" into lmp-dev

* commit '92a4f8010f048d93ffd913bc37153a39b5ed0b48':
Use new config resource for tcp buffersize
1d799fd875b604be33d2aa0a879d93b4b1f79735 23-Aug-2014 Robert Greenwalt <rgreenwalt@google.com> Merge "Use new config resource for tcp buffersize" into lmp-dev
207323e3a43e869bab25ad8451179fe7b8c10654 22-Aug-2014 Vinit Deshpande <vinitd@google.com> am a94c25d8: am 88d6ab0a: Merge "Fix a bug in setting external_sim flag" into lmp-dev

* commit 'a94c25d8f23c39bdf1422636b2a3ab24030c2564':
Fix a bug in setting external_sim flag
88d6ab0af06fa595a7c9b3abc69f1f8b5f18e9cf 22-Aug-2014 Vinit Deshpande <vinitd@google.com> Merge "Fix a bug in setting external_sim flag" into lmp-dev
84f35d45bc81b552c89ba671951242d8422516de 22-Aug-2014 vandwalle <vandwalle@google.com> am 7b3b84c0: am 56d01781: fix spurious disconnect while associating, dont set AP configuration with NULL SSID

* commit '7b3b84c05e838552433a77919b1af4a9fdeea6bd':
fix spurious disconnect while associating, dont set AP configuration with NULL SSID
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
ndroid/server/wifi/WifiNative.java
3c3c5b64726f04920109e4c8f20a1c58ea7050aa 22-Aug-2014 Robert Greenwalt <rgreenwalt@google.com> Use new config resource for tcp buffersize

bug:16549611
Change-Id: I01ecca0a2a7893c1911cead503594ce9e17fa69e
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/WifiApConfigStore.java
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
0c97b2ae7ca30b9bcb3a0ed81fff43cd87700452 21-Aug-2014 vandwalle <vandwalle@google.com> am 34142b7c: am 0d616ef3: add roam state watchdog.

* commit '34142b7cf3f65e57e674ad41fceefd6091c341c9':
add roam state watchdog.
34142b7cf3f65e57e674ad41fceefd6091c341c9 21-Aug-2014 vandwalle <vandwalle@google.com> am 0d616ef3: add roam state watchdog.

* commit '0d616ef3bf635dff8722e064c0be842676390ed8':
add roam state watchdog.
0d616ef3bf635dff8722e064c0be842676390ed8 20-Aug-2014 vandwalle <vandwalle@google.com> add roam state watchdog.

Bug: 16823537

This CL is dependent on Id9411c8097337b37ac1ce1a6ac8b28b4bda31ff3

Change-Id: Iff32fae2cd67343e63046d58d75fa1e10d9775d0
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
f923196b37dea0cc3dee2cca1bd8537ad552232e 20-Aug-2014 vandwalle <vandwalle@google.com> am 3598326d: am 1fd74be7: Merge "debug messages for link loss issues" into lmp-dev

* commit '3598326d44e37cbd0a6ddfab7117fa9e3afa2a30':
debug messages for link loss issues
622f75aff3a3c39969ef960b549b16f11388f24f 20-Aug-2014 Lorenzo Colitti <lorenzo@google.com> am 3820aff5: am 24adb818: Merge "Clear IPv4 addresses when switching from DHCP to static." into lmp-dev

* commit '3820aff51e94d70e0c0f730a710ec89ca7e6d579':
Clear IPv4 addresses when switching from DHCP to static.
3598326d44e37cbd0a6ddfab7117fa9e3afa2a30 20-Aug-2014 vandwalle <vandwalle@google.com> am 1fd74be7: Merge "debug messages for link loss issues" into lmp-dev

* commit '1fd74be7eae25d58cc068e3e2f5eb9269ef4e369':
debug messages for link loss issues
3820aff51e94d70e0c0f730a710ec89ca7e6d579 20-Aug-2014 Lorenzo Colitti <lorenzo@google.com> am 24adb818: Merge "Clear IPv4 addresses when switching from DHCP to static." into lmp-dev

* commit '24adb81839865a6f27fceb8ef709f5c23973cb47':
Clear IPv4 addresses when switching from DHCP to static.
9fdd28a93db1188cfbc207a1c48cc0ecd33590a0 20-Aug-2014 Brian Williammee <bwill@google.com> am 4a6672f9: am 0e916560: Fix copy/paste error in 5GHz connection count

* commit '4a6672f9b14da6a1f937263d88d96b7d963e85e9':
Fix copy/paste error in 5GHz connection count
4a6672f9b14da6a1f937263d88d96b7d963e85e9 20-Aug-2014 Brian Williammee <bwill@google.com> am 0e916560: Fix copy/paste error in 5GHz connection count

* commit '0e916560ab551ac44e6ce0324bdc511f66268944':
Fix copy/paste error in 5GHz connection count
7988fcae6f9cf8be0063a70b42ef58a4fa7feb84 20-Aug-2014 vandwalle <vandwalle@google.com> Merge "remove passpoint, except ANQP - DO NOT MERGE" into lmp-dev
0e916560ab551ac44e6ce0324bdc511f66268944 20-Aug-2014 Brian Williammee <bwill@google.com> Fix copy/paste error in 5GHz connection count

Change-Id: Ic377c5b4b0ab7db060b3b6ec86a3b0a862c32b28
ndroid/server/wifi/WifiStateMachine.java
1fd74be7eae25d58cc068e3e2f5eb9269ef4e369 20-Aug-2014 vandwalle <vandwalle@google.com> Merge "debug messages for link loss issues" into lmp-dev
e6574ec7b6b2e7a678da7f77bdaaf31463852b2f 19-Aug-2014 vandwalle <vandwalle@google.com> debug messages for link loss issues

Change-Id: Icbea4bac528eac8f25b8d1f9f1fa79d1ecadb7da
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
92e702658bc348fa4504eaef54833859e7413e2a 15-Aug-2014 vandwalle <vandwalle@google.com> remove passpoint, except ANQP - DO NOT MERGE

This CL is dependent on Ic533d1820c470bf2370a92452b37515ef7458f45 and should build when used with this CL


Change-Id: Ic3ae7269f0ca11cec6b7aea5143499e88ecc7149
ndroid/server/wifi/passpoint/WifiPasspointCertificate.java
ndroid/server/wifi/passpoint/WifiPasspointCertificateHelper.java
ndroid/server/wifi/passpoint/WifiPasspointClient.java
ndroid/server/wifi/passpoint/WifiPasspointDmClient.java
ndroid/server/wifi/passpoint/WifiPasspointDmTreeHelper.java
ndroid/server/wifi/passpoint/WifiPasspointHttpClient.java
ndroid/server/wifi/passpoint/WifiPasspointServiceImpl.java
ndroid/server/wifi/passpoint/WifiPasspointSoapClient.java
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
6feefc14ba05895b7107fd4029c26add98d81a1f 19-Aug-2014 Lorenzo Colitti <lorenzo@google.com> am 7c236918: am 3b26801d: Stop using LinkProperties for static configuration.

* commit '7c236918b1a9c1329f9f3b79d6fafe806cb5b1e2':
Stop using LinkProperties for static configuration.
7c236918b1a9c1329f9f3b79d6fafe806cb5b1e2 19-Aug-2014 Lorenzo Colitti <lorenzo@google.com> am 3b26801d: Stop using LinkProperties for static configuration.

* commit '3b26801d62a06475b722bbf29cba7f48f376654e':
Stop using LinkProperties for static configuration.
3b26801d62a06475b722bbf29cba7f48f376654e 31-Jul-2014 Lorenzo Colitti <lorenzo@google.com> Stop using LinkProperties for static configuration.

Bug: 16114392
Bug: 16893413
Change-Id: Ib33f35c004e30b6067bb20235ffa43c247d174df
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
f152a69a5a83eae7b3a8700f6f9257583bf916b8 19-Aug-2014 vandwalle <vandwalle@google.com> am d0c6d2f4: am 8c0a54e9: provide autojoin config threshold, fix bug16990104

* commit 'd0c6d2f436806baf3cd885d38f3f7d4846a4a44f':
provide autojoin config threshold, fix bug16990104
d0c6d2f436806baf3cd885d38f3f7d4846a4a44f 19-Aug-2014 vandwalle <vandwalle@google.com> am 8c0a54e9: provide autojoin config threshold, fix bug16990104

* commit '8c0a54e9b0d3713cab52d06ad8fd7f3a1b6f73a8':
provide autojoin config threshold, fix bug16990104
24adb81839865a6f27fceb8ef709f5c23973cb47 20-Aug-2014 Lorenzo Colitti <lorenzo@google.com> Merge "Clear IPv4 addresses when switching from DHCP to static." into lmp-dev
0ebd6d71cecb5147fad1ca7a7f807aec7ffeddd9 12-Aug-2014 Lorenzo Colitti <lorenzo@google.com> Clear IPv4 addresses when switching from DHCP to static.

This prevents the previous DHCP address from remaining assigned
to the interface, fixing a TODO.


Bug: 16893413
Change-Id: I84e09b8ac0325b839059b2d38086603bd11c7948
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
8c0a54e9b0d3713cab52d06ad8fd7f3a1b6f73a8 14-Aug-2014 vandwalle <vandwalle@google.com> provide autojoin config threshold, fix bug16990104

Change-Id: Iac9ec4fe0a721df5f08b90d631025df4d944d088
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
e778c763e2b7af0a0b6318a63a5dbb60a85ab031 18-Aug-2014 Robert Greenwalt <rgreenwalt@google.com> am a68451ed: am 0c3dfa47: Merge "Add tcp buffer size data for wifi" into lmp-dev

* commit 'a68451ed609a5b5a8df90f6427f30bd029febe0e':
Add tcp buffer size data for wifi
a68451ed609a5b5a8df90f6427f30bd029febe0e 18-Aug-2014 Robert Greenwalt <rgreenwalt@google.com> am 0c3dfa47: Merge "Add tcp buffer size data for wifi" into lmp-dev

* commit '0c3dfa471750e99231c9bf4d9a53f1e4a2d0daa4':
Add tcp buffer size data for wifi
0c3dfa471750e99231c9bf4d9a53f1e4a2d0daa4 18-Aug-2014 Robert Greenwalt <rgreenwalt@google.com> Merge "Add tcp buffer size data for wifi" into lmp-dev
e693d9490d27bcd91bb1f012bb88ef4c95cdaee3 07-Aug-2014 Robert Greenwalt <rgreenwalt@google.com> Add tcp buffer size data for wifi

bug: 16549611
Change-Id: Ia3819da9d85863a273b93e30c8a9d223ddc7d667
ndroid/server/wifi/WifiStateMachine.java
bb7d6266238c60058616fc40163685afad627337 15-Aug-2014 Zoltan Szatmary-Ban <szatmz@google.com> am c244f936: am 97f1a2ce: Merge "Revert "Revert "Revert "Update Trusted Credentials screen in settings"""" into lmp-dev

* commit 'c244f936c12bd7efb8a5860946dfb744b6db7c12':
Revert "Revert "Revert "Update Trusted Credentials screen in settings"""
c244f936c12bd7efb8a5860946dfb744b6db7c12 15-Aug-2014 Zoltan Szatmary-Ban <szatmz@google.com> am 97f1a2ce: Merge "Revert "Revert "Revert "Update Trusted Credentials screen in settings"""" into lmp-dev

* commit '97f1a2ce31c8842c0f0de4660d49233f70c2ea13':
Revert "Revert "Revert "Update Trusted Credentials screen in settings"""
3031a197e564f1d7f5a20f6842dfda487fb50df9 15-Aug-2014 Zoltan Szatmary-Ban <szatmz@google.com> am d057655d: am 71aa1728: Merge "Revert "Revert "Update Trusted Credentials screen in settings""" into lmp-dev

* commit 'd057655df11110adf1dcd0fb8b8e36e5e4c5c386':
Revert "Revert "Update Trusted Credentials screen in settings""
e2713f215ffc8674d4200f0edb681a7a7affe463 15-Aug-2014 Narayan Kamath <narayan@google.com> am 7e986f43: am ee9f7f00: Merge "Revert "Update Trusted Credentials screen in settings"" into lmp-dev

* commit '7e986f43e20789721d5e297ad2519508fed64bae':
Revert "Update Trusted Credentials screen in settings"
61268eb0ab9791e9cb81c15b5b0b7f3ac4cfe33c 15-Aug-2014 Zoltan Szatmary-Ban <szatmz@google.com> am 2224ed34: am 30e6a432: Merge "Update Trusted Credentials screen in settings" into lmp-dev

* commit '2224ed34a881fa3e2be8b5221ea444c05ca5e959':
Update Trusted Credentials screen in settings
9ac1f0a388ab3cf1b0da6a5e98803cf14ab3b5e1 15-Aug-2014 Vinit Deshpande <vinitd@google.com> am 455c3a7e: am ccd5bdb2: Merge "EAP-SIM End-To-End" into lmp-dev

* commit '455c3a7e9e4198a36f56b98f1026ee54f8c0ada4':
EAP-SIM End-To-End
d057655df11110adf1dcd0fb8b8e36e5e4c5c386 15-Aug-2014 Zoltan Szatmary-Ban <szatmz@google.com> am 71aa1728: Merge "Revert "Revert "Update Trusted Credentials screen in settings""" into lmp-dev

* commit '71aa1728f0af364b6d0a032fb615687d3bfce77e':
Revert "Revert "Update Trusted Credentials screen in settings""
7e986f43e20789721d5e297ad2519508fed64bae 15-Aug-2014 Narayan Kamath <narayan@google.com> am ee9f7f00: Merge "Revert "Update Trusted Credentials screen in settings"" into lmp-dev

* commit 'ee9f7f00b3ee67836642f70d7f3d835b9240f09f':
Revert "Update Trusted Credentials screen in settings"
2224ed34a881fa3e2be8b5221ea444c05ca5e959 15-Aug-2014 Zoltan Szatmary-Ban <szatmz@google.com> am 30e6a432: Merge "Update Trusted Credentials screen in settings" into lmp-dev

* commit '30e6a4327b049e291a1cdf19b57571644baba7a2':
Update Trusted Credentials screen in settings
455c3a7e9e4198a36f56b98f1026ee54f8c0ada4 15-Aug-2014 Vinit Deshpande <vinitd@google.com> am ccd5bdb2: Merge "EAP-SIM End-To-End" into lmp-dev

* commit 'ccd5bdb2badfb0db0732c3cd886e1bb31d9669f1':
EAP-SIM End-To-End
97f1a2ce31c8842c0f0de4660d49233f70c2ea13 15-Aug-2014 Zoltan Szatmary-Ban <szatmz@google.com> Merge "Revert "Revert "Revert "Update Trusted Credentials screen in settings"""" into lmp-dev
6e2ae81e7a5a96fe442638d9d2ce9d8d450ee742 15-Aug-2014 Zoltan Szatmary-Ban <szatmz@google.com> Revert "Revert "Revert "Update Trusted Credentials screen in settings"""

This reverts commit fac5b63c2e1ed7ec07a1253ec5b6f42a2a072f1d.

Change-Id: I06bae63f98fce98acf2c9219b54ef0f5adbdaa5b
ndroid/server/wifi/passpoint/WifiPasspointSoapClient.java
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
fac5b63c2e1ed7ec07a1253ec5b6f42a2a072f1d 15-Aug-2014 Zoltan Szatmary-Ban <szatmz@google.com> Revert "Revert "Update Trusted Credentials screen in settings""

This reverts commit 2c1923a320ed038d67bac0912cb99c9d406e96b7.

This should be fine now with all the dependency CLs +2-ed


Change-Id: Ib8348e75f8b79134a42ccfe22582b1b3d185c9c9
ndroid/server/wifi/passpoint/WifiPasspointSoapClient.java
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
2c1923a320ed038d67bac0912cb99c9d406e96b7 15-Aug-2014 Narayan Kamath <narayan@google.com> Revert "Update Trusted Credentials screen in settings"

This reverts commit f1f5c7cba10d7c625e01f5f5c148f1f8c3987eca.

Change-Id: I22ea9fb43ff4fdc5a9360a8571419e8d2e4f4214
ndroid/server/wifi/passpoint/WifiPasspointSoapClient.java
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
ee9f7f00b3ee67836642f70d7f3d835b9240f09f 15-Aug-2014 Narayan Kamath <narayan@google.com> Merge "Revert "Update Trusted Credentials screen in settings"" into lmp-dev
30e6a4327b049e291a1cdf19b57571644baba7a2 15-Aug-2014 Zoltan Szatmary-Ban <szatmz@google.com> Merge "Update Trusted Credentials screen in settings" into lmp-dev
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
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
71aa1728f0af364b6d0a032fb615687d3bfce77e 15-Aug-2014 Zoltan Szatmary-Ban <szatmz@google.com> Merge "Revert "Revert "Update Trusted Credentials screen in settings""" into lmp-dev
610685b32b831b1065449c52f5bc15cdc82d94e7 14-Aug-2014 Vinit Deshpande <vinitd@google.com> am 736c9583: am 981e9669: Fix getAdapters() hang

* commit '736c95830e263d71c9f9fcf57bbde7119aa7b876':
Fix getAdapters() hang
736c95830e263d71c9f9fcf57bbde7119aa7b876 14-Aug-2014 Vinit Deshpande <vinitd@google.com> am 981e9669: Fix getAdapters() hang

* commit '981e966999f4448a682084d6657d07bab2bbc13e':
Fix getAdapters() hang
981e966999f4448a682084d6657d07bab2bbc13e 14-Aug-2014 Vinit Deshpande <vinitd@google.com> Fix getAdapters() hang

getAdapters() hangs in certain Wifi states because there is no code
to generate a default reply. This change adds default reply so it
returns something in all states.

Bug: 16982058

Change-Id: I07cae455c6335e622fbd9a79f3837128e73e302c
ndroid/server/wifi/WifiStateMachine.java
67b2c09d788cd0ad9f4ca3daff7f6e2260e378a6 13-Aug-2014 Sky Faber <skyf@google.com> am 77ebb56c: am 2a325cd0: removeNetwork needs to perform owner check against userId not uid.

* commit '77ebb56c9bc1c93dc1ca38cf4f99b5964c43fb9a':
removeNetwork needs to perform owner check against userId not uid.
77ebb56c9bc1c93dc1ca38cf4f99b5964c43fb9a 13-Aug-2014 Sky Faber <skyf@google.com> am 2a325cd0: removeNetwork needs to perform owner check against userId not uid.

* commit '2a325cd07d40941adb93c1284abb263ba650c213':
removeNetwork needs to perform owner check against userId not uid.
2a325cd07d40941adb93c1284abb263ba650c213 12-Aug-2014 Sky Faber <skyf@google.com> removeNetwork needs to perform owner check against userId not uid.

Bug: 16952565
Change-Id: I78666c34fc919bbc96ef92b02445b93b0948f743
ndroid/server/wifi/WifiServiceImpl.java
911d6087e0e037c8f401f4c3464977f70e18621a 12-Aug-2014 vandwalle <vandwalle@google.com> am 10e28d77: am 68a6d9ba: Merge "handle supplicant disconnected state change in roaming state + make roaming less erratic" into lmp-dev

* commit '10e28d777a352e341e0734fcebf82f007e3d3465':
handle supplicant disconnected state change in roaming state + make roaming less erratic
10e28d777a352e341e0734fcebf82f007e3d3465 12-Aug-2014 vandwalle <vandwalle@google.com> am 68a6d9ba: Merge "handle supplicant disconnected state change in roaming state + make roaming less erratic" into lmp-dev

* commit '68a6d9ba04f68ec4c76edc049ac827331d10e707':
handle supplicant disconnected state change in roaming state + make roaming less erratic
68a6d9ba04f68ec4c76edc049ac827331d10e707 12-Aug-2014 vandwalle <vandwalle@google.com> Merge "handle supplicant disconnected state change in roaming state + make roaming less erratic" into lmp-dev
c773639ecf8432d1623421a5daff0a36cf1b07bd 12-Aug-2014 Vinit Deshpande <vinitd@google.com> am f78b842d: am 6c6698e2: Merge "Fix non-report of full scan results when scanning bands" into lmp-dev

* commit 'f78b842d3e91fe84be73a3bb1eed64b15fb9c653':
Fix non-report of full scan results when scanning bands
f78b842d3e91fe84be73a3bb1eed64b15fb9c653 12-Aug-2014 Vinit Deshpande <vinitd@google.com> am 6c6698e2: Merge "Fix non-report of full scan results when scanning bands" into lmp-dev

* commit '6c6698e260cbb0ca9a445e0f7122ae4c7c9cb938':
Fix non-report of full scan results when scanning bands
6c6698e260cbb0ca9a445e0f7122ae4c7c9cb938 12-Aug-2014 Vinit Deshpande <vinitd@google.com> Merge "Fix non-report of full scan results when scanning bands" into lmp-dev
63243b616f0e24d2c145d77582cedc2856456bcb 11-Aug-2014 Vinit Deshpande <vinitd@google.com> Fix non-report of full scan results when scanning bands

We use channel lists to report events, unfortunately, channel list is
empty when bands are used. This change looks up the channel list for
the band before firing events based on it.

Bug: 16907772
Change-Id: Iab317ad4ad5bc9d2e9d9c0215f8cbcfc4ea967ad
ndroid/server/wifi/WifiScanningServiceImpl.java
c4deee4ba92e100006706fdded64efc207be007d 11-Aug-2014 Vinit Deshpande <vinitd@google.com> am 331505ee: am 03015787: Merge "Fix unreliable onQuiscence event" into lmp-dev

* commit '331505ee7955a91ed5fe00af3009524637ce69d2':
Fix unreliable onQuiscence event
331505ee7955a91ed5fe00af3009524637ce69d2 11-Aug-2014 Vinit Deshpande <vinitd@google.com> am 03015787: Merge "Fix unreliable onQuiscence event" into lmp-dev

* commit '030157871d5deea64f45e4d0914e3bfbf4d94c37':
Fix unreliable onQuiscence event
574d0e02e6a3e0ad4f6544b75efff148c10d8997 11-Aug-2014 Jon Larimer <jlarimer@google.com> am b6139713: am 8e6144b4: Fix null dereference in enableTdls() and enableTdlsWithMacAddress()

* commit 'b613971395c3accdcc6bd2d85cd84fbc55706e4f':
Fix null dereference in enableTdls() and enableTdlsWithMacAddress()
b613971395c3accdcc6bd2d85cd84fbc55706e4f 11-Aug-2014 Jon Larimer <jlarimer@google.com> am 8e6144b4: Fix null dereference in enableTdls() and enableTdlsWithMacAddress()

* commit '8e6144b4059fc2117be23d7222893bc57a33f64d':
Fix null dereference in enableTdls() and enableTdlsWithMacAddress()
8e6144b4059fc2117be23d7222893bc57a33f64d 20-Jun-2014 Jon Larimer <jlarimer@google.com> Fix null dereference in enableTdls() and enableTdlsWithMacAddress()

Change-Id: I37acf88c9adefba240fb8bc8a9e633ddcd823d21
Bug: 15775601
ndroid/server/wifi/WifiServiceImpl.java
4dbfefd99e51ab1cca058026c90f8093b099198b 11-Aug-2014 Vinit Deshpande <vinitd@google.com> Fix unreliable onQuiscence event

Turns out that new bssid settings weren't always applied to the
significant wifi change state machine. Also broadened the RSSI
range to trigger events at larger distance.

Bug: 16660861
Change-Id: I02518833a4f900c380198ef47c42a0622c258fd2
ndroid/server/wifi/WifiScanningServiceImpl.java
a089077f42c27922872631ccc2c77e1e036bb3a5 10-Aug-2014 Vinit Deshpande <vinitd@google.com> Merge commit '3c3fcca5' into manualmerge

Change-Id: I045c50aa69e4f233516493f8abb31aff27ac38a6
3c3fcca514b9ea2acdd21d572cee21435fea8d79 10-Aug-2014 Vinit Deshpande <vinitd@google.com> am 33b575ca: EAP-SIM End-to-end

* commit '33b575ca6bee66183929f9474b5a161432918604':
EAP-SIM End-to-end
9c2ba85306ddad3cceb533cead8f12725e8c5e04 10-Aug-2014 Brian Carlstrom <bdc@google.com> Move from DERObjectIdentifier to ASN1ObjectIdentifier for bouncycastle 1.51

(cherry picked from commit 942910a5d1e5b72fb53d674fddaf6a1d66ca5c87)

Change-Id: I206024985e8dfde443a9b2cfc2a8b2b76f003f8a
ndroid/server/wifi/passpoint/WifiPasspointCertificate.java
942910a5d1e5b72fb53d674fddaf6a1d66ca5c87 10-Aug-2014 Brian Carlstrom <bdc@google.com> Move from DERObjectIdentifier to ASN1ObjectIdentifier for bouncycastle 1.51

Change-Id: I3e0388acc38d83d074ae2059cb3602462728d1a6
ndroid/server/wifi/passpoint/WifiPasspointCertificate.java
33b575ca6bee66183929f9474b5a161432918604 09-Aug-2014 Vinit Deshpande <vinitd@google.com> EAP-SIM End-to-end

Change-Id: I9478e6a492c469d57bb020b8f858e523ea6a92d1
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
030157871d5deea64f45e4d0914e3bfbf4d94c37 11-Aug-2014 Vinit Deshpande <vinitd@google.com> Merge "Fix unreliable onQuiscence event" into lmp-dev
97b9c4fef6e372d1f19b333c7a67ff27ef80baf0 08-Aug-2014 vandwalle <vandwalle@google.com> handle supplicant disconnected state change in roaming state + make roaming less erratic

bug: 16753407
bug: 16823537

Change-Id: I47f1073b3775880d261ec2a963732c35454173cf
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiStateMachine.java
e201fc1699b8de2b5067e9ca75bb49954df1c69d 08-Aug-2014 Robert Greenwalt <rgreenwalt@google.com> am d432374e: Merge "Fix reading wifi configurations from the config store." into lmp-dev

* commit 'd432374e5daff944bb5bb27a41d88ea49c99e14d':
Fix reading wifi configurations from the config store.
d432374e5daff944bb5bb27a41d88ea49c99e14d 08-Aug-2014 Robert Greenwalt <rgreenwalt@google.com> Merge "Fix reading wifi configurations from the config store." into lmp-dev
4d3bff566b2cd0c3fd4d118eb6aae42ab3e9b5dd 08-Aug-2014 Lorenzo Colitti <lorenzo@google.com> Fix reading wifi configurations from the config store.

IpConfiguration's readIpAndProxyConfigurations method returns a
SparseArray mapping network IDs to IpConfiguration objects.
Unfortunately WifiConfiguration's readIpAndProxyConfigurations
iterates over the array and attempts to find the network the
configuration is for by looking at the sequence number of the
configuration, not the actual key in the SparseArray.

Bug: 16382665
Change-Id: I3dfef9123382b81a2a22cf5df7a5bb77611059aa
ndroid/server/wifi/WifiConfigStore.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
ndroid/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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
663ec152411cf88dbc7b9dd50277c844761bea0d 08-Aug-2014 Chelsea Derrick <chelsead@google.com> Merge "Revert "Broadcast wifi credential change from WifiStateMachine. [DO NOT MERGE]"" into lmp-dev
0a0694d89195ac361a02bf73d5bf35b1e9050c6c 07-Aug-2014 Chelsea Derrick <chelsead@google.com> Revert "Broadcast wifi credential change from WifiStateMachine. [DO NOT MERGE]"

This reverts commit a618f986e12b0f68f7b4cdfff51c6fa8baed22d5.

Bug: 16871063
Change-Id: I93623be92f2de41789b16827867f3f95bf0480c5
ndroid/server/wifi/WifiStateMachine.java
c7af335ba2adbb95fffacf99828287f93b4b2d38 06-Aug-2014 vandwalle <vandwalle@google.com> Merge "check null pointer on mNetworkAgent" into lmp-dev
6e51388c5b7d7840644570de5bc61edbd173b203 06-Aug-2014 vandwalle <vandwalle@google.com> check null pointer on mNetworkAgent

Bug:16776614

Change-Id: I6af588a0bc7f9048174d359f41f63ac9acb98147
ndroid/server/wifi/WifiStateMachine.java
7806f8c800754da0f76d7a0c1a6a590381dac7a8 05-Aug-2014 vandwalle <vandwalle@google.com> add debouncing of the Layer 2 spurious disconnects

Change-Id: I45291d0369977c7a3bdbf65ef10632c203d359b4

Changes to be committed:
modified: service/java/com/android/server/wifi/WifiAutoJoinController.java
modified: service/java/com/android/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiStateMachine.java
487a655bd40563a1a4ba57bb66c914de8174f4f2 04-Aug-2014 Lorenzo Colitti <lorenzo@google.com> Merge "Unbreak WifiStateMachine IP provisioning logic." into lmp-dev
badd604178e757a65dcff91ab1ff818e3527c8e3 01-Aug-2014 Lorenzo Colitti <lorenzo@google.com> Unbreak WifiStateMachine IP provisioning logic.

The change from switching to CONNECTED based on DHCP to
switching to CONNECTED based on link properties, necessary to
support IPv6-only networks, broke some of WifiStateMachine's
IP provisioning logic. Among other things:

1. DHCP success when roaming would get stuck in ObtainingIpState
state because the updateLinkProperties would see that nothing
had changed and take no action.
2. DHCP timeout would not cause a disconnect. The code to handle
that was just not there. :-(
3. Wifi would notify ConnectivityService that it was ready as
soon as it had an IPv4 address, but before DHCP completed, at
which point the network was unusable because it had no
default route and no DNS server. The network was fixed
immediately afterwards, but it caused a 5-second switching
delay because NetworkMonitor immediately tried to validate,
failed, and waited 5 seconds.
3. Wifi would not reconnect to the current network after a
runtime restart, because the IP address was already there.

All these problems happened because we changed the code from
edge-triggered to level-triggered, but that doesn't work well
in IPv4, because it's not possible to tell from LinkProperties
alone whether IPv4 configuration succeeded on the interface.

This change switches IPv4 provisioning back to being
edge-triggered, which should hopefully fix all the above
problems in the right way. Testing so far includes:

1. Connecting to GoogleGuest works.
2. Connecting to a network without a DHCP server (and without
IPv6) disconnects after 30 seconds, and gives up completely
after 9 tries.
3. Connecting to an IPv6-only network works.
4. Configuring a static IP on GoogleGuest works.
5. Wifi disconnects if a DHCP renewal times out.

I'm not sure how to test roaming.

Bug: 16269674
Bug: 16631731
Bug: 16663980
Bug: 16667349
Change-Id: I8e28c630c54a5f3f66bf0feb9fd328ab452de740
ndroid/server/wifi/WifiStateMachine.java
08b2a6f380652e7836687632a10e5183fd7ac689 31-Jul-2014 Lorenzo Colitti <lorenzo@google.com> Clear IP addresses before starting the supplicant.

This is necessary because if the runtime crashes when the
interface has an IPv4 address assigned to it, and wifi reconnects
and gets the same IPv4 address, NetlinkTracker won't tell us
about the address, because nothing has changed. This causes us to
think that we have no IPv4 address, when in fact we do.

Bug: 16631731
Change-Id: I4878408d5fb4c0128657aabb7670e48c689021d8
ndroid/server/wifi/WifiStateMachine.java
a232280e191f8a3a2c825d544c6fce77914a37f5 31-Jul-2014 Vinit Deshpande <vinitd@google.com> Merge "Rename HotspotListener to BssidListener" into lmp-dev
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
7e170fe5c25a7691ac984f0fedb3939b8bec4119 30-Jul-2014 vandwalle <vandwalle@google.com> Merge "fix getNetworkScore" into lmp-dev
1db63db890fcb9051f402fdfd449eb0b80e2053c 30-Jul-2014 vandwalle <vandwalle@google.com> fix getNetworkScore

Change-Id: I60bc5c458938f662b2550e48839cb455764dc037
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiNetworkScoreCache.java
326120045502363422cf5c52a467163d4bcb703a 30-Jul-2014 vandwalle <vandwalle@google.com> add debug log for RSSI_PKTCNT_FETCH

Change-Id: I54f920e7373febf3874deb194011e98c05eb1a23
ndroid/server/wifi/WifiStateMachine.java
f1f5c7cba10d7c625e01f5f5c148f1f8c3987eca 29-Jul-2014 Zoltan Szatmary-Ban <szatmz@google.com> Update Trusted Credentials screen in settings

Trusted credentials for both the primary user and its managed profiles are shown
on the Trusted Credentials fragment. All functionalities (e.g. disabling/enabling
of certificates) remain available.

Bug: 16029580
Change-Id: I76200cca5dce8bf2c042a78dcfbf016f14c3f1ab
ndroid/server/wifi/passpoint/WifiPasspointSoapClient.java
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
c290d8dff6172d5fde7b9dfd74d3a20785dab246 29-Jul-2014 vandwalle <vandwalle@google.com> fix handling DHCP status

Change-Id: Ib4dfc9a1f84d6faaaf71adf63c8e2457e95646fd
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
ede507649471f1113e9e1919812115ca5a6bc0c8 29-Jul-2014 vandwalle <vandwalle@google.com> add logs and fix compareWifiConfigurationsWithScorer

Change-Id: I7eeb489b89519bd79d7e3df0fe3ae400debfe566
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
6b700edd56b6be91750e01c3a06032b23ac6238a 28-Jul-2014 vandwalle <vandwalle@google.com> Merge "introduce WifiConnectionstatistics" into lmp-dev
c298087de50ea56c31a4ade7ee1e83b313bb63c7 26-Jul-2014 vandwalle <vandwalle@google.com> introduce WifiConnectionstatistics

This CL is dependent on I51fbbf062feb22c5f16b438675519064cc43e160

Change-Id: I10584a447fecd977df3eefd8e2cc028bd26ec0e3
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/RttService.java
ndroid/server/wifi/WifiNative.java
c25ff5183d509e8a2ecaf1b52f83cbd7023e6a79 29-Jul-2014 vandwalle <vandwalle@google.com> Merge "add verboser logs for network scorer" into lmp-dev
e8c89583e489d451880471b7cc7659bd9fa802f4 29-Jul-2014 vandwalle <vandwalle@google.com> add verboser logs for network scorer

Change-Id: I8e461615f1ae85cd0712a627561cee329a5fb4e5
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiStateMachine.java
2f3b6d4a82bfb828ba7ce5f7cf4e54ff57821888 29-Jul-2014 vandwalle <vandwalle@google.com> treat all dhcp completion without provisioning as errors

Change-Id: I4f27e166491006a3432e73a490653c6252fbb95d
ndroid/server/wifi/WifiStateMachine.java
82d20190c3ec3a080d928a581c40311c66345cc8 24-Jul-2014 vandwalle <vandwalle@google.com> handle IP address loss if DHCP fails

Bug:16525514

Change-Id: I367a024835acf06cf4dda7f357b70494b9981e03
ndroid/server/wifi/WifiStateMachine.java
2451dbcc4f9641df188326215b204b798eb70c46 23-Jul-2014 vandwalle <vandwalle@google.com> autojoin fixes:

- make use of network scorer for autojoin
- Bug:16484607

Change-Id: If658d82bb6e3f61ed0476d41b40bb274a1931b2f
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNetworkScoreCache.java
ndroid/server/wifi/WifiStateMachine.java
6751767bfe5d3a82c594e7abba77b27b0aecb28d 18-Jul-2014 Sreeram Ramachandran <sreeram@google.com> Fix WiFi-Direct.

Send explicit commands to netd to add routes for the p2p interface. This already
happens via the tetherInterface() command when we are the group owner, so the
new command is used only when we are not a group owner.

Bug: 15413694

Change-Id: I36effc438d5ac193a77174493bf196cb68a5b97a
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
f01a9c36967a56d0d042e63984c2c17d978d50e3 22-Jul-2014 Robert Greenwalt <rgreenwalt@google.com> Merge "Clean up Verifying state so we don't churn." into lmp-dev
5a5dc2c0e256ec34e75bb5ec92c4726f9bbc918a 21-Jul-2014 vandwalle <vandwalle@google.com> Merge "a few additional logs and code standard rules" into lmp-dev
4dd46ff3cff8e4e66516600ffdac98601e8bf73d 18-Jul-2014 Robert Greenwalt <rgreenwalt@google.com> Clean up Verifying state so we don't churn.

If it goes to disconnected we will actually get unwanted and
do an L2 disconnect. Instead, rely on down scoring.

Change-Id: I87dc52957fd6515920482ba929331567cf7b8253
ndroid/server/wifi/WifiStateMachine.java
931338d1533d1bd11ba0e5aebb4e4b7b2c8ab056 18-Jul-2014 vandwalle <vandwalle@google.com> a few additional logs and code standard rules

Change-Id: I932e895fefd7b6c9d8ad58ef99312c980643f2d2
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
0821ef3917e8305ceb58c8b9c6f7bc4c6d35252b 18-Jul-2014 Lorenzo Colitti <lorenzo@google.com> Merge "Properly quote WPA enterprise config fields." into lmp-dev
7b051c83f9bb0855ba5442f0dcd471002832c62c 17-Jul-2014 vandwalle <vandwalle@google.com> Merge "fix connecting to OSU server" into lmp-dev
52e79f112225e158c5de12685e55906de5e222b9 17-Jul-2014 vandwalle <vandwalle@google.com> fix connecting to OSU server

Change-Id: I93d50dac9a052736d63300d1cdd3d72d90614e7f
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
3249e2d02cd39f6e2fee093d6d8f4833a51001d5 15-Jul-2014 Lorenzo Colitti <lorenzo@google.com> Properly quote WPA enterprise config fields.

When filling in WifiConfiguration variables based on supplicant
state, properly quote WPA enterprise keys that need to be quoted.
Otherwise, when we attempt to set these config keys, we end up
sending commands ike "SET_NETWORK 4 identity foo", which are
invalid because "foo" needs to be quoted.

The list of fields that need to be quoted was based on the code
in WifiEnterpriseConfig.java.

Bug: 15870625
Change-Id: Icf06fbaa133ac5d195791fa4cfbce5d7d1e610bf
ndroid/server/wifi/WifiConfigStore.java
baca1d162eb96c4788f25d7cceb1e77c236d231f 17-Jul-2014 Chelsea Derrick <chelsead@google.com> Merge "Broadcast wifi credential change from WifiStateMachine. [DO NOT MERGE]" into lmp-dev
a618f986e12b0f68f7b4cdfff51c6fa8baed22d5 08-Jul-2014 Chelsea Derrick <chelsead@google.com> Broadcast wifi credential change from WifiStateMachine. [DO NOT MERGE]

Bug: 15703353
Change-Id: I62f582ac8cbfd8748c35d73daa2f733665cc0fa8
(cherry picked from commit 09295c2d809d1c7f797eafe039b6b68e7a49c82f)
ndroid/server/wifi/WifiStateMachine.java
149d88f0dd42be76c573ac6beef6c25434698a0e 17-Jul-2014 Vinit Deshpande <vinitd@google.com> Merge "Introduce RTT Manager" into lmp-dev
9878c61bbd81176561991be025af44efc67332fe 17-Jun-2014 Wenchao Tong <tongwenchao@google.com> Add a new SystemApi, getPrivilegedConfiguredNetworks(). Part 2 [DO NOT MERGE]

Implements the getPrivilegedConfiguredNetworks() in WifiServiceImpl.

Bug: 15703353
Change-Id: If3eaca3286e77b780272f42a28772d1d8d39db65
(cherry picked from commit 76ddde4965b1460248eb21d0ccebed687c2b3fb3)
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
143657392bf0702a155fe688171a5abbf4c86570 01-Jul-2014 Vinit Deshpande <vinitd@google.com> Introduce RTT Manager

Change-Id: Ic9a16d587897b272f85cdb2b8c52b51bca060d18
ndroid/server/wifi/RttService.java
ndroid/server/wifi/WifiNative.java
e0e491671f348cceb6e20fdc55438d8cfd2f07f1 15-Jul-2014 Robert Greenwalt <rgreenwalt@google.com> Fix 2.4/5 wifi roaming.

The redesign of wifi ip address optaining assumed we would never
go from have-ip -> have-ip, ie we must lose our ip config before we can
gain an ip config. Unfortunately at least one condition does just this:
Our inter-band roaming
To leave OBTAINING_IP_ADDRESS we need to tweak the code to generate
the success signal even if the new address is the same.

bug:16269674
Change-Id: I340b24839565fa62fd3c7d9d373695d1d4007412
ndroid/server/wifi/WifiStateMachine.java
94edde8d382517403591bad66040cea8b00d465e 12-Jul-2014 vandwalle <vandwalle@google.com> Merge "fix null pointer dereference in log message Bug:16211167"
3a2a3d226881cce8a4e511302231d843b0def303 12-Jul-2014 vandwalle <vandwalle@google.com> fix null pointer dereference in log message
Bug:16211167

Change-Id: I1d9092b73cc7015535e0f1503364f6c592fb08c1
ndroid/server/wifi/WifiAutoJoinController.java
002ea67f42b0f69a8c9fa4719391f9476567b762 11-Jul-2014 Sky Faber <skyf@google.com> Disallow forget/remove network for secondary users.

Change-Id: I07be23c26f45a77f5998f200bc9682dedbfa7916
ndroid/server/wifi/WifiServiceImpl.java
1ecb0083490436303cdb89bc4c46b6743ea0afa8 10-Jul-2014 Sky Faber <skyf@google.com> Re-disable scan for background users.
Temporarily allow FORGET_NETWORK as secondary user.

Bug: 16190728
Bug: 15437477
Change-Id: Ib4241421bcb9d15f6aab30099f4f36aeb9dfcf72
ndroid/server/wifi/WifiServiceImpl.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
12836d34cc6c4497c1fa5adbb956684ecec7578e 27-Jun-2014 Vinit Deshpande <vinitd@google.com> Lower minimum scanning period in WifiScanner

This change also fixes reporting errors - or rather non-reporting
of errors when starting a scan fails in the driver/firmware.

Bug: 15697516

Change-Id: I4af8200a23c2b61b2505424a3832ca47d390fd80
ndroid/server/wifi/WifiScanningServiceImpl.java
9c1d6f995555aaaee60648419bc84921f26b1374 10-Jul-2014 Robert Greenwalt <rgreenwalt@google.com> Merge "Refactor wifi p2p's startDhcpServer function"
8b2bd657976c86e0909ad792f6f96ad94db45c28 24-Jun-2014 Lorenzo Colitti <lorenzo@google.com> Keep IPv6 enabled whenever L2 is connected.

Currently we only enable IPv6 (which starts IPv6 configuration)
when DHCP succeeds. This obviously will not work on networks
that don't have IPv6.

Instead, enable IPv6 when we start DHCP, so IPv4 and IPv6
configuration proceed in parallel. Also don't disable IPv6 when
verifying poor link. I believe the reason for doing so was that
the captive portal detection code was IPv4-only, but now with the
multinetwork APIs we can support captive portal detection over
IPv6.

Bug: 9180552
Change-Id: I52c8776f1c910255784981ed77a14693ad52d674
ndroid/server/wifi/WifiStateMachine.java
da2ec427a621afecd800f59b8004542d083be92b 10-Jul-2014 Robert Greenwalt <rgreenwalt@google.com> Merge "Get DNS configuration from Netlink too."
12bc7aa45700513cace98ab43f309121c39780ed 10-Jul-2014 Robert Greenwalt <rgreenwalt@google.com> Merge "Decide if IP configuration is complete independently of DHCP"
40ff222cec1bd05879edb53abc75c6deead734ca 01-Jul-2014 vandwalle <vandwalle@google.com> handle IDENTITY message and bssid blacklist

Bug:15990551
Bug:15977507

Change-Id: I78b03915781bd6d5f9f5881c80324a2788b9e837
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
c35d728a15e9270f5642ef79f5245c89d749285f 03-Jul-2014 Sky Faber <skyf@google.com> Enable ability for secondary users to scan for networks, but not forget.

Bug: 15437477
Bug: 14676589
Change-Id: I3f1956265f4877b8c3cba138628b7393c393d175
ndroid/server/wifi/WifiServiceImpl.java
c13bd2d66aee1fded082c8ce18e113fcec03cba1 03-Jul-2014 roger.chang <roger.chang@mediatek.com> Hotspot 2.0 - connect R1 used API to stateMachine(1/2)

Change-Id: Id9303af3edb24e858bb2782088cd09eb03d30f72
ndroid/server/wifi/passpoint/WifiPasspointServiceImpl.java
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
232062d1f830937cf635597698cafe17271f4f9f 01-Jul-2014 roger.chang <roger.chang@mediatek.com> Hotsopt 2.0 - code fine tune(1)

- fix AAA trust root empty create credential fail

Change-Id: I1b3df5189de1d6c222661609bc6a9b21be13a076
ndroid/server/wifi/passpoint/WifiPasspointCertificate.java
ndroid/server/wifi/passpoint/WifiPasspointHttpClient.java
ndroid/server/wifi/passpoint/WifiPasspointSoapClient.java
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
5039609c4772f26731fbf260398e2dba5d815902 30-Jun-2014 roger.chang <roger.chang@mediatek.com> Hotspot 2.0 - random port number

Change-Id: I70178590306ddd6fe79efbee8065919ec57571cd
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
a43d6d71ad51ce7fe54198d9b60d554208054eb8 24-Jun-2014 Lorenzo Colitti <lorenzo@google.com> Get DNS configuration from Netlink too.

This is required to learn IPv6 DNS servers, which come in from
netlink via RDNSS options in IPv6 Router Advertisements.

Bug: 9180552
Change-Id: I035f4c3cac6d8edd94ff1b3d586d6bd40e0889b1
ndroid/server/wifi/WifiStateMachine.java
14be3cde626bd5935f599cd6e0fca72cf1c4695d 23-Jun-2014 Lorenzo Colitti <lorenzo@google.com> Decide if IP configuration is complete independently of DHCP

Currently, WifiStateMachine assumes that IP configuration is
complete and transitions to VerifyingLinkState when it receives a
DHCP_SUCCESS message. This won't work if there no IPv4. Instead,
decide whether IP configuration is complete by examining the
actual configuration inside LinkProperties.

Bug: 9180552
Change-Id: I4499b59030e8e581cce620b57bc4e58b7b7d1ab1
ndroid/server/wifi/WifiStateMachine.java
b04dffecf71a3665b2f143c577ec2fbbd5076cdf 02-Jul-2014 Julia Reynolds <juliacr@google.com> Merge "Apply DISALLOW_CONFIG_TETHERING to wireless access points."
13cddb5337418359eb5f9bebd0504fbc5c47fc41 01-Jul-2014 Julia Reynolds <juliacr@google.com> Apply DISALLOW_CONFIG_TETHERING to wireless access points.

Bug: 15852213
Change-Id: I1f1adb8762bf7b694aa92f4b0a393d8e06c610bf
ndroid/server/wifi/WifiServiceImpl.java
2c141fc79e1e66c5b5f7dd7307ad7cb8d1e9aaac 02-Jul-2014 Robert Greenwalt <rgreenwalt@google.com> Merge "Simplify the network transition wakelock."
96d15e49bb2d9f22b307b4c9cafd5f51b87667a1 01-Jul-2014 Yuhao Zheng <yuhaozheng@google.com> Add two Passpoint fields to WifiConfiguration

We need two new fields in WifiConfiguration for Hotspot 2.0:
requirePMF & updateIdentifier

Change-Id: I46e5753d50423828f2aa531d469b49a88850e055
ndroid/server/wifi/WifiConfigStore.java
10206e44bff4f2844ff318e8be1890b08197a9ba 20-Jun-2014 roger.chang <roger.chang@mediatek.com> Hotspot 2.0 fix launch browser method

Change-Id: I7a1f668c6ddd7e2f0b0498a35dc00954d39aa0d9
ndroid/server/wifi/passpoint/WifiPasspointSoapClient.java
b57df70bdf17ba45ef4d18b11414cb24dcbe1fb9 28-Jun-2014 vandwalle <vandwalle@google.com> clean up the connect/disconnect procedure

Change-Id: Iba87591e790106b882d465dbba3ddac120f044d9
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
d31e487847b954a9e763c5dd72adbf5efd590814 26-Jun-2014 vandwalle <vandwalle@google.com> dont try to set an obfuscated password into wpa_supplicant

Bug: 15870625

Change-Id: I7d4b15cbd5d9ba6afefafe16f5ba8c0a8510cff3
ndroid/server/wifi/WifiConfigStore.java
5394340995ed67c8da3f00b7aae886aec47d6bcc 26-Jun-2014 Robert Greenwalt <rgreenwalt@google.com> Simplify the network transition wakelock.

Make it all internal to ConnectivityService - we know when a network
is lost, so grab a wakelock then.
Moves the call out of WifiStateMachine which was grabbing at bad times
like every dhcp renewal or corp-network roam. These would always
go the full 1 minute and chew up battery.

bug:15595155
Change-Id: I80157a818cc149072cc7706d78c1e79c6e679ab3
ndroid/server/wifi/WifiStateMachine.java
a2903b7c6fc2419d48fd9976fa24852370653c4a 26-Jun-2014 vandwalle <vandwalle@google.com> fix a merge issue

Change-Id: Ic1e9bab8ec6cf4b4525d2815b29db8e617960504
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
bfd24ffeada0cfc198befdbdc7139c84a9095557 26-Jun-2014 Andres Morales <anmorales@google.com> Merge "piping commands for handover from supplicant"
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
dbfe9e532b02797d08c8bdf9915659aef55fff64 25-Jun-2014 vandwalle <vandwalle@google.com> Merge "improve link flapping"
b07da189850a4bfa268f8ab9be7867935eb2ecb5 24-Jun-2014 vandwalle <vandwalle@google.com> improve link flapping

Change-Id: Ie378dde318dccaa566f660c9497bae31d4a9f1ab
ndroid/server/wifi/StateChangeResult.java
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
8c2ff3f4bfa8d5a1f8c9dd6e74aa9a404452d85d 23-Jun-2014 Robert Greenwalt <rgreenwalt@google.com> Refactor wifi p2p's startDhcpServer function

Add getTetheredDhcpRanges() interface and call it before calling
mNwService.startTethering to update dhcp ranges. This will allow
p2p apps to run well concurently with other tethering apps.

Manual import of AOSP change 81546 by jianzheng.zhou@freescale.com

Change-Id: Iebc62f95bdcedde80e2c1d3e9580d3f625c3b50b
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
51991e784c605a7432a90c9e9a91b080fb106197 20-Jun-2014 Dianne Hackborn <hackbod@google.com> Add tracking of some wifi stats to battery stats.

Change-Id: I50cbd480b8c3ddc4cc8ccbe78b1fe6de98efd9e6
ndroid/server/wifi/SupplicantStateTracker.java
ndroid/server/wifi/WifiStateMachine.java
4b50786546ce4c4fee555d66028991fe257b8811 20-Jun-2014 vandwalle <vandwalle@google.com> add home network boost, better hadling of 5GHz configurations

Change-Id: I2417844b58e1839cb22649565404d76b792cdc65
ndroid/server/wifi/WifiStateMachine.java
c6f06c628ee3583b60ff31a7da442e0ac7b26d97 19-Jun-2014 vandwalle <vandwalle@google.com> autojoin tuning, making LTE handover less aggressive

Bug: 15700122

Change-Id: I2836abf791f8c71c63a901170f247c4030e8e8f9
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
f16e4e5a57160b4355b53d4b91f9097d370546c6 12-Jun-2014 Yuhao Zheng <yuhaozheng@google.com> Passpoint OSU bug fix + API rename

- OSU bug fix
- API rename
- Soap bug fix

https://partner-android-review.googlesource.com/#/c/170602/
https://partner-android-review.googlesource.com/#/c/170809/
ndroid/server/wifi/passpoint/WifiPasspointCertificate.java
ndroid/server/wifi/passpoint/WifiPasspointSoapClient.java
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
1671350805f87a3cd05add0097690e97966213d8 17-Jun-2014 Vinit Deshpande <vinitd@google.com> Merge "Fix p2pGetDeviceAddress to work without p2p0 interface"
6bf16b3c45397bf8453b8b47438a77785acc5d9f 17-Jun-2014 Lorenzo Colitti <lorenzo@google.com> Merge "Read IPv6 routes from netlink as well."
4bc47f83a393766db792e1bf2fc81087ded00c3b 17-Jun-2014 Lorenzo Colitti <lorenzo@google.com> Merge "Move netlink updates to a new NetlinkTracker class"
ec474c010a79c12d24c34e79383b328cc53d5ece 13-Jun-2014 Lorenzo Colitti <lorenzo@google.com> Read IPv6 routes from netlink as well.

Bug: 9180552
Change-Id: I926e1ea0ff59a258da2472d8a1d8b4c80727e87e
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/WifiNative.java
d60cf2efc576f016506ebe6d8a83b4a6217b2e0e 10-Jun-2014 Lorenzo Colitti <lorenzo@google.com> Move netlink updates to a new NetlinkTracker class

This will allow us to use this logic on other link types such as
Ethernet, and will also avoid increasing the complexity of
WifiStateMachine as we get more information such as routes and
DNS servers from netlink.

Bug: 9180552
Change-Id: I79034827cb0c5f24d783d7243e04b69e12aa3cc6
ndroid/server/wifi/WifiStateMachine.java
faaededaddcc210b9f1710d2ce465cf1d2927332 09-Jun-2014 roger.chang <roger.chang@mediatek.com> Hotspot 2.0 add networkSelection fix bugs

Change-Id: I08479d06475e01d88b6ba1ff6667b5d1d5a63bdb
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
810ab83f336a6406220ef73b69377290671d6419 13-Jun-2014 vandwalle <vandwalle@google.com> Merge "auto-roam fixes, disable scanning based on traffic at interface"
b97e66604f472f67c233bb8f8d9630bb36131e2c 13-Jun-2014 vandwalle <vandwalle@google.com> auto-roam fixes, disable scanning based on traffic at interface

Bug: 15575229
Bug: 15577651

Change-Id: I1157c7c9b83c1cafd67d4d4f1d4e1e6fc8d95323
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
a0d0db0e9e39b04613e4b5c1d9cf51c488fc9af0 12-Jun-2014 Robert Greenwalt <rgreenwalt@google.com> am 1d838f7a: Merge "Make NetworkCapabilities publicly immutable." into lmp-preview-dev

* commit '1d838f7a55fa178d2ab12716b889ad4e381c852f':
Make NetworkCapabilities publicly immutable.
2895934d7762d3ba65daeeb8317f4b2081f5441a 12-Jun-2014 Yuhao Zheng <yuhaozheng@google.com> Merge "Wifi passpoint - linking APIs"
3df4c1f725919d64f0703915da39c61f728626ef 10-Jun-2014 Vinit Deshpande <vinitd@google.com> Support scanning using band specification instead of channels

This change enables scanning with band specification instead of channels,
this should ease app development.

Also includes a bug fix for parcel serialization/deserialization.

Change-Id: Idbffce4805b403bf8fe1efae999cb828e09c2420
ndroid/server/wifi/WifiScanningServiceImpl.java
7e13ab5165291aa3685eeeca762a2470e93a10bd 04-Jun-2014 Vinit Deshpande <vinitd@google.com> Fix an NPE in WifiScanner while reporting description

Change-Id: Ie9d12e19e0b8ca98c6ec4c6fa5222a2f28983e64
ndroid/server/wifi/WifiScanningServiceImpl.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
df84f5da0840f0dddfd7ffceb15687a5687890a7 12-Jun-2014 vandwalle <vandwalle@google.com> Merge "auto-roam initial implementation"
4dc6f3a322806b25d50039614cde1b94fe91ab17 11-Jun-2014 vandwalle <vandwalle@google.com> auto-roam initial implementation

Bug:15553951

Change-Id: I04ebca4a4f5a9b408893ce1e9874f08aeff50ba2
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiTrafficPoller.java
bbd06dfb417f205b3d80225a3e713fe9361c19cd 04-Jun-2014 Yuhao Zheng <yuhaozheng@google.com> Wifi passpoint - linking APIs

cherry-pick from kwd:

7801fe Wifi Passpoint - linking credential match API
https://partner-android-review.googlesource.com/#/c/59246/

6cb965 Wifi Passpoint - linking OSU API
https://partner-android-review.googlesource.com/#/c/59333/
ndroid/server/wifi/passpoint/WifiPasspointClient.java
ndroid/server/wifi/passpoint/WifiPasspointDmClient.java
ndroid/server/wifi/passpoint/WifiPasspointServiceImpl.java
ndroid/server/wifi/passpoint/WifiPasspointSoapClient.java
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
1d838f7a55fa178d2ab12716b889ad4e381c852f 12-Jun-2014 Robert Greenwalt <rgreenwalt@google.com> Merge "Make NetworkCapabilities publicly immutable." into lmp-preview-dev
937be0625eb1daa1b9d5a0991a3fe6ab2f4804c7 10-Jun-2014 Robert Greenwalt <rgreenwalt@google.com> Make NetworkCapabilities publicly immutable.

Applying API council comments.

bug: 15142362
Change-Id: Ie0bde68b72656a676d90c0343b9756fe9268d8d6
ndroid/server/wifi/WifiStateMachine.java
4b1c8e0159c021f0ae1b53b6ec7431b050d6a899 08-Jun-2014 Robert Greenwalt <rgreenwalt@google.com> Apply LinkProperties API change.

bug:15142362
Change-Id: I1457111da7d3bd09998f7e010febb8bb4c45c8bc
(cherry picked from commit 82d1c6aeadfa24797b314ae2b2a55717df064b57)
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
211737ce4cabcab0552e3453ac6e3c5a4748c158 11-Jun-2014 Sreeram Ramachandran <sreeram@google.com> Merge "Use the updated RouteInfo API."
f62893bfeaebeaa0f6a840b29f1b7f33493c8894 10-Jun-2014 vandwalle <vandwalle@google.com> Merge "remember and report network score"
27355a942653264388e909a4276196ee63e57811 03-Jun-2014 vandwalle <vandwalle@google.com> remember and report network score

Change-Id: Ie54afe724a3618ec3fd557850dbbbb8bbae49ecc
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
82d1c6aeadfa24797b314ae2b2a55717df064b57 08-Jun-2014 Robert Greenwalt <rgreenwalt@google.com> Apply LinkProperties API change.

bug:15142362
Change-Id: I1457111da7d3bd09998f7e010febb8bb4c45c8bc
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
d05472bb94ecc9b870463a843313f2d852bcf5b8 04-Jun-2014 Sreeram Ramachandran <sreeram@google.com> Use the updated RouteInfo API.

Bug: 15142362
Bug: 13885501
Change-Id: I97f1625e037c889b0cddd3db418c42c1d48b26b9
ndroid/server/wifi/WifiServiceImpl.java
a16ef45ba07b7704d84a54f8d00a40c7da7696a3 03-Jun-2014 roger.chang <roger.chang@mediatek.com> Hotspot 2.0 add networkSelection(2)

Add policy inspection, it includes
- MinBackhaulThreshold
- SPExclusionList
- RequiredProtoProtTuple
- MaximumBSSLoadValue

Change-Id: Id9525ff1d5487b027295bf9c9136b0bd22121a8e
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
cf5b8eb8a08c45bd4a82f1f4bb789c8a1b08744f 04-Jun-2014 vandwalle <vandwalle@google.com> resolved conflicts for merge of dfcb187e to master

Change-Id: I740b98b89fb25599a353abbfe919c6e5a0f1c098
83c7dd3d754551c9cf3bd76a50c45ef62a4dab75 31-May-2014 puff wen <puff.wen@mediatek.com> Add class CellularNetwork for plmn parsing and retrieve mcc and mnc.

cherry-picking 2 CLs:
https://partner-android-review.googlesource.com/#/c/58542/
https://partner-android-review.googlesource.com/#/c/59079/

Change-Id: I9e08e4edbf8d52eeda879a0309cf1eba8a7594ea
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
9e31a73a1218bd611229e672c0c82b4f7775888b 03-Jun-2014 Robert Greenwalt <rgreenwalt@google.com> Merge "Apply refactored NetworkFactory." into lmp-preview-dev
b565662ea98a244c8321afa889a07a1bab95f439 01-Jun-2014 vandwalle <vandwalle@google.com> handle removal of self added configurations

Change-Id: I53122e704d8ef682c6c326b0588649ed9b7ba121
(cherry picked from commit 0e3c67280365eb82fc15362a3b98a2c978bde766)
ndroid/server/wifi/WifiConfigStore.java
5c2d5c27293a6df796e56f57b14c2a9aced675bd 28-May-2014 Robert Greenwalt <rgreenwalt@google.com> Apply refactored NetworkFactory.

Make NetworkFactory a concrete class and divide responsibilites between it and NetworkAgent.
Factory will track requests and by default give a single connect/disconnect api for ease
of use. Then NetworkAgent is created and destroyed as needed with very simple logic.

Change-Id: I401c14a6e5466f2fc63b04219b97ff85bb9af291
(cherry picked from commit 7d6e0b86655bf9862ae81fe37c9c8dc3f70d51f9)
ndroid/server/wifi/WifiStateMachine.java
8f679e3b9db68bcd29bb33f430ed11ef21065208 03-Jun-2014 Robert Greenwalt <rgreenwalt@google.com> Merge "Apply refactored NetworkFactory."
aff01c338585f4411f61a9aa7ea35201f924ec6c 30-May-2014 vandwalle <vandwalle@google.com> add debug info to wifi configure, check auth method for real before self-adding

Bug:15111865

Change-Id: I095fff870c7871e3cb7ae4b8e99034519eb26fa1
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiTrafficPoller.java
ae84f13d7b7f34ddbf5ac380d98e8d19b3541f6c 29-May-2014 vandwalle <vandwalle@google.com> dont send SSIDs to herrevad if it cannot process them

Bug:15306345

Change-Id: I149870631b875e10ad899e81aaaf65e5f0a1eb7a
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiNative.java
511a412adce5a46c41e61f90c0df6de5fb4e491c 31-May-2014 Yuhao Zheng <yuhaozheng@google.com> WifiService and WifiPasspointService hook up

- add a reference to passpoint service in wifi state machine
- break dependency loop at boot phase

Change-Id: I0acdf02dcb4a62a4e27af8bb3640784ee2691e26
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/passpoint/WifiPasspointService.java
ndroid/server/wifi/passpoint/WifiPasspointServiceImpl.java
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
dfcb187e5608e125fe161d70226c300bd7b781ad 24-May-2014 vandwalle <vandwalle@google.com> logs improvements, fix reading back networkHistory file

Change-Id: Iec4b11a3e0d8820b558abea6cc068a905199896d
ndroid/server/wifi/SupplicantStateTracker.java
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
7d6e0b86655bf9862ae81fe37c9c8dc3f70d51f9 28-May-2014 Robert Greenwalt <rgreenwalt@google.com> Apply refactored NetworkFactory.

Make NetworkFactory a concrete class and divide responsibilites between it and NetworkAgent.
Factory will track requests and by default give a single connect/disconnect api for ease
of use. Then NetworkAgent is created and destroyed as needed with very simple logic.

Change-Id: I401c14a6e5466f2fc63b04219b97ff85bb9af291
ndroid/server/wifi/WifiStateMachine.java
0557098735094d9a6d1a1fa3f09bc5ea95c09554 02-Jun-2014 Yuhao Zheng <yuhaozheng@google.com> Merge "Hotspot 2.0 add networkSelection(1)"
950365f5e3205a7bdd1e11ff292e126a07e5a353 02-Jun-2014 vandwalle <vandwalle@google.com> Merge "handle removal of self added configurations"
ff6d33bb0e882869ed683887c167ad9445bbfa27 02-Jun-2014 Vinit Deshpande <vinitd@google.com> Merge "DO NOT MERGE: Accommodating API Review feedback for WifiScanner" into lmp-preview-dev
1a325e10086cfdb9e9f9fa7e3f0283ba7839dd37 02-Jun-2014 Vinit Deshpande <vinitd@google.com> Merge "DO NOT MERGE: Fix the stopping of scan after Wifi connection" into lmp-preview-dev
0e3c67280365eb82fc15362a3b98a2c978bde766 01-Jun-2014 vandwalle <vandwalle@google.com> handle removal of self added configurations

Change-Id: I53122e704d8ef682c6c326b0588649ed9b7ba121
ndroid/server/wifi/WifiConfigStore.java
fede6134980f4682059f1278eaa0f7629cf532ff 29-May-2014 roger.chang <roger.chang@mediatek.com> Hotspot 2.0 add networkSelection(1)

To generate WifiPasspointPolicy list for AutoJoiner making
network selection easily.
This policy list match all availabled APs information
(Realm/FQDN/HOME_OI...etc) of a device position.

Change-Id: Iad7ba7d69cdc73273e5828e26912a0fe67f2a8ed
ndroid/server/wifi/passpoint/WifiPasspointClient.java
ndroid/server/wifi/passpoint/WifiPasspointDmClient.java
ndroid/server/wifi/passpoint/WifiPasspointSoapClient.java
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
c3fdd0cb9d67541a3ff83b3643d1af769cf19396 28-May-2014 Yuhao Zheng <yuhaozheng@google.com> More ANQP parsing

Change-Id: Iddc51c1f01201b19a51981b45443cd52ce432c88
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
f07ad104ae5e538ad009f1f168c834edab016d18 01-Jun-2014 Robert Greenwalt <rgreenwalt@google.com> am 59c5355a: Don\'t tear down early wifi.

* commit '59c5355a48a3311f07d2d8d6c685bf8de734d200':
Don't tear down early wifi.
59c5355a48a3311f07d2d8d6c685bf8de734d200 01-Jun-2014 Robert Greenwalt <rgreenwalt@google.com> Don't tear down early wifi.

This was adding 10 or so seconds to getting on wifi at first boot.
Note this delay goes away with the changes to NetworkFactory later today anyway.

bug: 15363153
Change-Id: Ic764db7288696d697be0db4817fb816861984ef2
ndroid/server/wifi/WifiStateMachine.java
ad7319939c424d42fa6a3791c47f613db8ef3cd8 31-May-2014 vandwalle <vandwalle@google.com> Add supplicant debug information
992ae00f25a9cc22cf5db3261bd7e72927069cf7 30-May-2014 vandwalle <vandwalle@google.com> add debug info to wifi configure, check auth method for real before self-adding

Bug:15111865

Change-Id: I095fff870c7871e3cb7ae4b8e99034519eb26fa1
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiTrafficPoller.java
b569a63b0506e6c09875828fa4b005f69f7440e1 31-May-2014 Yuhao Zheng <yuhaozheng@google.com> Merge "Hotspot 2.0 framework - Soap client & certificate clean up"
ac216a3c000a70af47df0e7370b05e186ad1bf2a 31-May-2014 Vinit Deshpande <vinitd@google.com> DO NOT MERGE: Accommodating 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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
368b164d5511e105c95d490e250640edd61045d0 31-May-2014 Vinit Deshpande <vinitd@google.com> DO NOT MERGE: 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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
8d8b01e14f29a75407b1c6c8db2fd5540db7fbe4 27-May-2014 Ryan Yu <ryan.yu@mediatek.com> Hotspot 2.0 framework - Soap client & certificate clean up

Change-Id: I04e0580644a3ed7a06038806f4da1ed29f4caad5
ndroid/server/wifi/passpoint/WifiPasspointCertificate.java
ndroid/server/wifi/passpoint/WifiPasspointSoapClient.java
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
763dbca691cad5f83bafbe439146d97b8631df98 30-May-2014 Vinit Deshpande <vinitd@google.com> Merge "Accomoditing API Review feedback for WifiScanner"
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ac38b54fb67b308fd88c47d0c6ef1ace5ff7595a 30-May-2014 Vinit Deshpande <vinitd@google.com> Merge "Fix the stopping of scan after Wifi connection"
3aaac376c911c46074525904df2b6e9fd8d36a60 30-May-2014 Yuhao Zheng <yuhaozheng@google.com> Build fix

Change-Id: I5e07d9fab451470de2a16fd478676993d9110958
ndroid/server/wifi/passpoint/WifiPasspointService.java
76a0e5f47c189bb4b529342f0ef58a5499ae9bf1 16-May-2014 Roger Chang <roger.chang@mediatek.com> Hotspot 2.0 framework - add implementation

Change-Id: Ib3534ff24af333eae11e914ad9d09716a834c99f
ndroid/server/wifi/passpoint/DmClient.java
ndroid/server/wifi/passpoint/PasspointClient.java
ndroid/server/wifi/passpoint/PasspointService.java
ndroid/server/wifi/passpoint/PasspointServiceImpl.java
ndroid/server/wifi/passpoint/PasspointStateMachine.java
ndroid/server/wifi/passpoint/SoapClient.java
ndroid/server/wifi/passpoint/WifiPasspointCertificate.java
ndroid/server/wifi/passpoint/WifiPasspointCertificateHelper.java
ndroid/server/wifi/passpoint/WifiPasspointClient.java
ndroid/server/wifi/passpoint/WifiPasspointDmClient.java
ndroid/server/wifi/passpoint/WifiPasspointDmTreeHelper.java
ndroid/server/wifi/passpoint/WifiPasspointHttpClient.java
ndroid/server/wifi/passpoint/WifiPasspointService.java
ndroid/server/wifi/passpoint/WifiPasspointServiceImpl.java
ndroid/server/wifi/passpoint/WifiPasspointSoapClient.java
ndroid/server/wifi/passpoint/WifiPasspointStateMachine.java
ndroid/server/wifi/passpoint/WifiTreeHelper.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
c152d90b8d0a7d69f9aed5de086f2992ab4c429e 30-May-2014 vandwalle <vandwalle@google.com> Merge "dont send SSIDs to herrevad if it cannot process them"
21bc54cb37a0085b1c909cb4d55ebb12a2facefb 29-May-2014 vandwalle <vandwalle@google.com> dont send SSIDs to herrevad if it cannot process them

Bug:15306345

Change-Id: I149870631b875e10ad899e81aaaf65e5f0a1eb7a
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiNative.java
c6c2b4218d9f15b5de45a002bff7e84a7ebc99e0 29-May-2014 Andres Morales <anmorales@google.com> am f3f4029b: Change permission to acquire NFC config token

* commit 'f3f4029b3ac41da4cc6a1bc22bae47c750a47048':
Change permission to acquire NFC config token
684e5c60b103d5d8e4f5513cc54ec3965ead6e8f 29-May-2014 Pierre Vandwalle <vandwalle@google.com> Merge "Fix system fatal exception due to Invalid WiFi SSID"
1fcf3c6d2b9ed65573e1e7c55fc5a30ebd364c4f 28-May-2014 Yuhao Zheng <yuhaozheng@google.com> Fix system fatal exception due to Invalid WiFi SSID

Change-Id: I88c3573fa06d95b78897aca8be1a9763dd0b4246
ndroid/server/wifi/WifiAutoJoinController.java
f3f4029b3ac41da4cc6a1bc22bae47c750a47048 13-May-2014 Andres Morales <anmorales@google.com> Change permission to acquire NFC config token

The supplicant provides the configuration token
in the standard format for writing to an NFC
tag. Once this token is written to a tag,
tapping that tag will ask the user to confirm
and then connect them to the network referenced
on the tag.

Since this token contains the network
password, it should be accessible only through
the internal permission.

It is implemented via a "sync" call since it
does not depend on the current Wi-Fi state.
Let me know if you see a reason to add it into
the state machine flow and I will do so.

Change-Id: Id1b4624651d0d82cb48bf83fb40ea0cfe7569832
ndroid/server/wifi/WifiServiceImpl.java
abde872adced15dfb6781fb71959453d963326db 28-May-2014 Yuhao Zheng <yuhaozheng@google.com> WifiAutoJoinController verbose log fix

Change-Id: I8113292a43bb7092747434825301109ef52a1c7b
ndroid/server/wifi/WifiAutoJoinController.java
27f07726cbab1f9f3ccf33cfb7c786f9e5895d2b 28-May-2014 Dave Langemak <dlangemak@google.com> Merge "DO NOT MERGE: lose the STOP_DRIVER command" into lmp-preview-dev
6f1f2a48fe6e88179062760b1075af31ab46822b 23-May-2014 vandwalle <vandwalle@google.com> DO NOT MERGE: lose the STOP_DRIVER command

Change-Id: I8e1ff28d5b79ef53778e0b4d083156cf748a4886
(cherry picked from commit 4a21193ee63c72919e7ead45e1de0643c7abe554)
ndroid/server/wifi/WifiStateMachine.java
704a34a19d873cc806ecca44226f811e58cb870d 28-May-2014 Dave Langemak <dlangemak@google.com> Merge "DO NOT MERGE: revert change preventing NULL SSID in a WifiConfiguration" into lmp-preview-dev
89dca79510af1fbe58c831e78edeccdb7db6e4cc 22-May-2014 vandwalle <vandwalle@google.com> DO NOT MERGE: revert change preventing NULL SSID in a WifiConfiguration

Change-Id: I131c429f4897c359004d6eae09f93550b8eaf0b1
(cherry picked from commit e86c962bb99a8b126ed64ddcc6b112161549e26d)
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
627b3e071eb4b495cf91067f12eb47371fcdfe5b 22-May-2014 vandwalle <vandwalle@google.com> DO NOT MERGE :dont try autojoining networks that are too far

Change-Id: I96a0b7283819bbbd312b0838d0a18a9622d15940
(cherry picked from commit 8c9088d11880553458f09377cc60d6eb7e66747b)
ndroid/server/wifi/WifiAutoJoinController.java
a37a204ce03e0ee2da68306a1bac58fc4bb8352c 17-Apr-2014 Vinit Deshapnde <vinitd@google.com> Don't reset country code once it is persisted

This change simply ignores resetting of country code by cellular
networks to avoid disconnecting existing wifi connections. It also
defers setting newly found country code until after existing Wifi
connection is torn down.

Also removes some dead code related to resetting of country codes.

cherry-picked from klp-dev
SHA1 b5ee95edf97f83e31e44f72e1b0f95a0c71a97ed

Bug: 13894807
Change-Id: Ie2fcfdd4b3be8ba94542772c132fb1acb6a2c683
(cherry picked from commit f449336da3fc8f8f9b65de3ba359129779511199)
ndroid/server/wifi/WifiStateMachine.java
0888ce6f90bdaeee799dd8361ea4781e23a33b87 24-May-2014 vandwalle <vandwalle@google.com> logs improvements, fix reading back networkHistory file

Change-Id: Iec4b11a3e0d8820b558abea6cc068a905199896d
ndroid/server/wifi/SupplicantStateTracker.java
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
f6c6d3ccda924ad5f11883bc346b4eb4ada1bc06 24-May-2014 Jeff Davidson <jpd@google.com> Use a consistent network key format in wifi score cache.

This doesn't handle SSID which can't be encoded as UTF-8, but will
work for most SSIDs.

Bug: 15188549
Change-Id: If12e83c4d43ed1b5d686ec1dfb9c1980bb0d4697
ndroid/server/wifi/WifiNetworkScoreCache.java
4a21193ee63c72919e7ead45e1de0643c7abe554 23-May-2014 vandwalle <vandwalle@google.com> lose the STOP_DRIVER command

Change-Id: I8e1ff28d5b79ef53778e0b4d083156cf748a4886
ndroid/server/wifi/WifiStateMachine.java
ff25461e44187208f06432126ac6e7bd1d3862ea 22-May-2014 vandwalle <vandwalle@google.com> Merge "revert change preventing NULL SSID in a WifiConfiguration"
c84f2cac12c1ee9a5b2d220a620e0bf5e79987c2 22-May-2014 Vinit Deshapnde <vinitd@google.com> Merge "Don't reset country code once it is persisted"
f449336da3fc8f8f9b65de3ba359129779511199 17-Apr-2014 Vinit Deshapnde <vinitd@google.com> Don't reset country code once it is persisted

This change simply ignores resetting of country code by cellular
networks to avoid disconnecting existing wifi connections. It also
defers setting newly found country code until after existing Wifi
connection is torn down.

Also removes some dead code related to resetting of country codes.

cherry-picked from klp-dev
SHA1 b5ee95edf97f83e31e44f72e1b0f95a0c71a97ed

Bug: 13894807
Change-Id: Ie2fcfdd4b3be8ba94542772c132fb1acb6a2c683
ndroid/server/wifi/WifiStateMachine.java
e86c962bb99a8b126ed64ddcc6b112161549e26d 22-May-2014 vandwalle <vandwalle@google.com> revert change preventing NULL SSID in a WifiConfiguration

Change-Id: I131c429f4897c359004d6eae09f93550b8eaf0b1
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
f5781f4b916bef6428484ea60f808dc3653ea21f 22-May-2014 vandwalle <vandwalle@google.com> Merge "dont try autojoining networks that are too far"
2390785d4104a6c20459c5e7143c1a7a5bb2481f 22-May-2014 Jason Monk <jmonk@google.com> Merge "No longer require CONNECTIVITY_INTERNAL to set PAC"
8c9088d11880553458f09377cc60d6eb7e66747b 22-May-2014 vandwalle <vandwalle@google.com> dont try autojoining networks that are too far

Change-Id: I96a0b7283819bbbd312b0838d0a18a9622d15940
ndroid/server/wifi/WifiAutoJoinController.java
4bcdcfd19e3eaaacc54d8ec65149c6d7faa181af 22-May-2014 vandwalle <vandwalle@google.com> remember last failure and reenable networks disabled by supplicant

bug: 14834820

Change-Id: I3d9725ac7482cd8490b52239135a98dfe0f124a2
ndroid/server/wifi/WifiConfigStore.java
afbd80435faf3d3eda6e05fba3573a0ac4e762b6 22-May-2014 vandwalle <vandwalle@google.com> Merge "make verbose logging a wifimanager hidden API"
ed9938883ae2dade81c8be6cd6ceaef3febd5239 22-May-2014 vandwalle <vandwalle@google.com> make verbose logging a wifimanager hidden API

bug: 151386707

Change-Id: Ide885ce96621fe4bab6abf10291bc8441eecad4a
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
4a55fdc530854a4a0c1602d6dbe3e0c8519b1166 22-May-2014 Lorenzo Colitti <lorenzo@google.com> Merge "Properly check return value of readIpAndProxyConfigurations"
5f128f9e971b7120a776f8fafde3a0db889f847d 22-May-2014 Lorenzo Colitti <lorenzo@google.com> Properly check return value of readIpAndProxyConfigurations

On failure, it returns an empty SparseArray, not null.

Change-Id: I5d24fdcfd24eb92657bdca674b1a417508e5af56
ndroid/server/wifi/WifiConfigStore.java
04c9a7c99c2ec86636ab43edceb84a2eceaadd04 22-May-2014 vandwalle <vandwalle@google.com> Merge "various autojoin fixes"
453aee50caf7e332e77ab3d995d7c87a958e4fd4 21-May-2014 vandwalle <vandwalle@google.com> various autojoin fixes

Bug:15111865
Bug:15080778
Bug:14994925

Change-Id: I753ff62b48a87db4096fdec18b4de070656cf901
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
64c98f4afda6c7970c5d563580165a308d5e7c15 20-May-2014 Jason Monk <jmonk@google.com> No longer require CONNECTIVITY_INTERNAL to set PAC

Since we are adding UI to control/monitor this, it does not need
to be guarded by CONNECTIVITY_INTERNAL anymore.

Bug: 14885470
Change-Id: I01fcc477899e94232e9863d4e46391ad831d249c
ndroid/server/wifi/WifiServiceImpl.java
82b91fd1a87ae9000bac54fb44981d5003958de1 21-May-2014 Vinit Deshpande <vinitd@google.com> Make Wifi WPS API available on application layer

Un-hide WPS methods (and required interface classes, etc.) of WifiManager.java to
enable Apps to start/stop the WPS procedure, add a patch for WPS method KEYPAD to
avoid early failure callbacks. (Methods PBC, DISPLAY, KEYPAD tested on 4.4.2_r2.)

Change-Id: I25aafdc4b637c87d754d4fdb70e40a34a569b738
Signed-off-by: Olaf Stoyke <o.stoyke@avm.de>
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
e88f9f737f389bcac0825be2684807525a7eb5d4 21-May-2014 Yuhao Zheng <yuhaozheng@google.com> Merge "Temp fix framework/opt fix for Hotspot 2.0"
d66e62e78523abd1eb40694832d97fee7c91953b 21-May-2014 vandwalle <vandwalle@google.com> Merge "autojoin fix: only link equivalently secure configurations"
d2569dc2b19c401200fd2672acf83cfc35f1eb12 21-May-2014 vandwalle <vandwalle@google.com> autojoin fix: only link equivalently secure configurations

Change-Id: I4f3653af6bc7d641138ca41335e40bf5f6f291e4
ndroid/server/wifi/WifiConfigStore.java
2b59efa31731126223b0835de93bce22d7fd8b27 21-May-2014 Yuhao Zheng <yuhaozheng@google.com> Temp fix framework/opt fix for Hotspot 2.0

Will bring in more changes later.

Change-Id: Iaa0279e485bd5422c30edbd9867c110e9bf29044
ndroid/server/wifi/passpoint/PasspointServiceImpl.java
ndroid/server/wifi/passpoint/PasspointStateMachine.java
117be607246604e875de62aa8cdd99700b77a2b4 20-May-2014 vandwalle <vandwalle@google.com> fix enableNetwork() logic:

should not mark forgotten network as selected

Change-Id: I0ebbc3082228feb482611e0a7b40ee8c18340dee
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
a3425a631c67eaa0af5d2d378f125ba22d99c3d7 21-May-2014 Lorenzo Colitti <lorenzo@google.com> Merge "Move IP config from WifiConfiguration to IpConfiguration."
3ecf5a032e94b6538a56f94a5b33e50cbc464007 19-Mar-2014 Jaewan Kim <jaewan@google.com> Move IP config from WifiConfiguration to IpConfiguration.

Change-Id: I5d1189682b13f1088848809604690648d8d9ecca
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
9ae6b45c038fa74a9e7285ef4834551dd93da332 20-May-2014 Yuhao Zheng <yuhaozheng@google.com> Fix a boot failure due to Wifi / Wifi Passpoint

Bug: 15060373
Change-Id: I8341a39c849d4135a0549c481cb3327cfca14567
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/passpoint/PasspointStateMachine.java
911a89d6a1e8abb3c3167e9b6d23499aec1b19ef 16-May-2014 Robert Greenwalt <rgreenwalt@google.com> Add a name for the wifi NetworkFactory.

Used only for debugging purposes.
bug:15003007

Change-Id: I717d63363f25c446f8ecf38d933b1a35d744af6e
ndroid/server/wifi/WifiStateMachine.java
20104a55edf9fafa332df1a1ea11148a45c902ad 20-May-2014 vandwalle <vandwalle@google.com> Merge "fix for autojoin controller not requesting steen scores"
710b8c148ddbfd509e0e69af8d5dbb6fc8486a0c 20-May-2014 Vinit Deshpande <vinitd@google.com> Implement onPeriodChanged and multiple scans of same channels

This change fixes multiple scans of same channels; and it generates
onPeriodChanged event.

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

Bug: 15000051
Change-Id: I06a4ecc9d45eda4984de50b97b39f623dd0b26d1
ndroid/server/wifi/WifiScanningServiceImpl.java
0c8b99a3b78e458a5617cc449e2efe69c5bdd531 16-May-2014 vandwalle <vandwalle@google.com> fix for autojoin controller not requesting steen scores

Change-Id: I2546241c8b1eefe963f840c4a98a3f817694039c
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNetworkScoreCache.java
9882ff94b6e8bc218461ddb1f838f59fe181f9f7 18-May-2014 Robert Greenwalt <rgreenwalt@google.com> workaround wifi runtime crash

This is not a long term fix, but until the wifi folks fix it this should be sufficient.

bug:15060373
Change-Id: I150ba375046c48066150f3d78438efc316e4c84f
ndroid/server/wifi/WifiStateMachine.java
aabe7a9f2f32915fd1f25416a6d2034a844005d6 10-May-2014 vandwalle <vandwalle@google.com> introducing link layer
cherry-picked from klp-wireless-dev-mirror
SHA1: eb8de645540caa6076c34854d8a4e7c22341783f
Change-Id: I5c736c697d38ec17dcde81bdee638048fd688073
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningServiceImpl.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
ndroid/server/wifi/WifiNative.java
5d30d5c2e0eec4db2303da3f225f52da748e2060 12-May-2014 Yuhao Zheng <yuhaozheng@google.com> Hotspot 2.0 framework support -- more functionalities

- WifiMonitor handles more HS20 events
- Passpoint stack parses ANQP results

Bug: 5485670
Change-Id: I5f8e7c80f8024379fe7a6c4394f1faae2040cfba
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/passpoint/PasspointStateMachine.java
e65cebc4284fd320a155a274cb647f73cecabd11 13-May-2014 Navtej Singh Mann <navtejsingh@google.com> Fix NullPointerException while WPS Push button/WPS Pin Entry

Fix NullPointerException in system server while authenticating AP
through WPS Push button/WPS Pin Entry

Bug: 14659351

Change-Id: I4c0616b320c49841fbb1ef0983d170b1178bf542
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
446db2d5457456743e4476029e14d7c3bb9f5bcc 10-Apr-2014 Yuhao Zheng <yuhaozheng@google.com> Hotspot 2.0 framework support -- inital implementation

Bug: 5485670
Change-Id: I48a63f5a45e0c217f5b73b4b3c45ea1acee76034
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/hotspot/WifiHotspotService.java
ndroid/server/wifi/hotspot/WifiHotspotServiceImpl.java
ndroid/server/wifi/passpoint/DmClient.java
ndroid/server/wifi/passpoint/PasspointClient.java
ndroid/server/wifi/passpoint/PasspointService.java
ndroid/server/wifi/passpoint/PasspointServiceImpl.java
ndroid/server/wifi/passpoint/PasspointStateMachine.java
ndroid/server/wifi/passpoint/SoapClient.java
ndroid/server/wifi/passpoint/WifiTreeHelper.java
3137b27bbbaaf87267dea3bf95d1c027931b0b6a 07-May-2014 Navtej Singh Mann <navtejsingh@google.com> Fixed connection to AP with unicode emoji SSID

Fix for connection problem to wifi AP have
SSID of unicode emoji

Bug: 11690983

Change-Id: Icc6de6d49bbf42a1c26ae85bfee343a860ab3fb8
ndroid/server/wifi/WifiConfigStore.java
569b093c4afd30787308032c8259af2680a2874f 10-Apr-2014 Navtej Singh Mann <navtejsingh@google.com> Fixed bypass of ConnectivityInternal permission

Removed public function 'getWifiStateMachineMessenger' of
WifiManager to fix bypass of ConnectivityInternal permission
by application, which is security concern

Bug: 13749822

Change-Id: I3ae73e33b77ee8ae0133ca9dc8cc03c504f09e40
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiWatchdogStateMachine.java
ede1310be531a84faa08f02c3fd243448dd936dd 16-May-2014 vandwalle <vandwalle@google.com> restore correct tracking of auth failure; bring up assoc reject info to supplicant

Change-Id: I7eeb110f1f14149f560630848f26f7cc9f5cbb67
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
ecd2b88214b5d214fd1f63a9560caff9058912dd 16-May-2014 vandwalle <vandwalle@google.com> fix for devices using enableNetwork API

Change-Id: Idf886dd01892d3f7ca463a44fd76030ddadcd238
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.java
2278134a58edb57b7c9ecad6753034605e389501 15-May-2014 vandwalle <vandwalle@google.com> Merge "autojoin is to eager to black list networks due to connection failure"
647207cce53bad5ef911e16278d5a2c910cdab92 15-May-2014 Jeff Davidson <jpd@google.com> Fix package names to match directory structure.

Change-Id: Ia208a4c23fa972b4abf4d9ab17555dec71cbc075
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiParser.java
62f1d0ca8ea4466628f6ff179b1f20e1279fa7e0 13-May-2014 vandwalle <vandwalle@google.com> autojoin is to eager to black list networks due to connection failure

Bug: 14834820

Change-Id: I81c05b657b3d218bb4d5f5bf82dd6a8ad3859bd1
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
3831a926f6762a3b4c398da51cc67e9d81572458 17-Apr-2014 Robert Greenwalt <rgreenwalt@google.com> Switching to NetworkAgent API

Change-Id: I8c820a17a6b64b8376930ba85ab507e07ce38d36
ndroid/server/wifi/WifiStateMachine.java
f656eeed604bdcf2e78fb9fb97b0610a0f19ca99 13-May-2014 vandwalle <vandwalle@google.com> Merge "fix crash on null string in AUTH_FAILURE message handling"
e57857d829f670c62e8d53ffed580681271a272b 13-May-2014 vandwalle <vandwalle@google.com> fix crash on null string in AUTH_FAILURE message handling

Change-Id: I657951f8bb37af778f8d4ab2c9b9d2ab2956220c
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiStateMachine.java
66f8e08b668ebdc4c9b180f90e71cbb4f3e1c37f 13-May-2014 vandwalle <vandwalle@google.com> disable autojoin associated scanning on molly

Bug: 14696701

Autojoin associated scan can interfere with real time streaming (mpeg RTP), hence for now we want to disable those scans on a molly product.

Change-Id: If056032cca91dd47f6fab0c56b4df4c90bc42571
ndroid/server/wifi/WifiStateMachine.java
f13817203179f41620514718c8668ae7e418f8af 10-May-2014 Jeff Davidson <jpd@google.com> Add a basic dump() function to WifiNetworkScoreCache.

Will get the current cached set of scan results and dump the current
score for each one depending on the RSSI.

Change-Id: Ic524906aef2bdfe2fa9f9a9e5364c80d028ddfdb
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiNetworkScoreCache.java
952d359198cb1f04c180fc0f795dc316fe97cb5e 08-May-2014 vandwalle <vandwalle@google.com> fix for 14645794 Wifi flakiness triggering multiple crashesin volantis

Change-Id: Id2caa10964bbc02dbeff85ac6193f4be19f7bd39
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiStateMachine.java
d33eac369db516e6fc05ac930e66510e957c12d6 08-May-2014 Vinit Deshpande <vinitd@google.com> Merge "Fix un-intended exposure of P2pStateMachine messenger"
8ab8f170c4b0864b86471ee352271b7d7e12a814 08-May-2014 Vinit Deshpande <vinitd@google.com> Merge changes Ia929b1d5,I8a171201

* changes:
Build fixes for newly imported code from KWD
changes to make halutil more interactive
508198f1ccc45994b418bdc55fdd1d4d2c6e530b 08-May-2014 Vinit Deshapnde <vinitd@google.com> Merge "Initial implementation of WifiScanner"
85b91efd318813370946829e52453810d3fb35cc 08-May-2014 Vinit Deshapnde <vinitd@google.com> Merge "More HAL functionality"
1e0d2b64c03a05da87d59a5f0774e549e82080cc 08-May-2014 vandwalle <vandwalle@google.com> work around supplicant bug

There is a case where supplicant is in an inconsistent internal state:
- it will silently ignore a select/reconnect command sequence to a given network because some state thinks it is already associated to the selected network
- however wlan driver is not, in fact, associated, and the supplicant's own STATUS command will indeed return a non-associated status

This situation doesn't resolve itself until supplicant is asked to join a different network, or issue a disconnect. In the AUTO_CONNECT sequence, it is safe to issue a disconnect because autojoin already has verified that the supplicant's status was not associated or associated to a different network.

In addition, in this change list, autojoin controller should not duplicate the WifiConfiguration from WiFiConfig store if it only wants to modify then before saving back.

Change-Id: If42fb05752fce288fb993fd7b70ef94cdb1f3d25
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiStateMachine.java
f933721551d39adc4924e5f69dcc51c16c520850 12-Apr-2014 Navtej Singh Mann <navtejsingh@google.com> Fix un-intended exposure of P2pStateMachine messenger

Fix un-intended exposure of P2pStateMachine messenger in
WifiP2pServices, added ClientHandler for request from app

Bug: 13931972

Change-Id: I9ebcdfd82ab66f1b843560758b3f3da8cf7c797b
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
50e20834408a3ee55170f8a34dfaeee26e7403dd 08-May-2014 Vinit Deshapnde <vinitd@google.com> Build fixes for newly imported code from KWD

SystemServer works a bit differently in KWD; and using
libnl_2 is discouraged in master.

Change-Id: Ia929b1d500164a05101d41f6fe0ed18af3597fe9
ndroid/server/wifi/WifiScanningService.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiScanningService.java
ndroid/server/wifi/WifiScanningServiceImpl.java
ndroid/server/wifi/WifiService.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
ndroid/server/wifi/WifiNative.java
f22d23092ab37286a5ef9d257d5bb32c421d2669 06-May-2014 vandwalle <vandwalle@google.com> autojoin initial implementation

Change-Id: Iea4e5c0b8e988e410d2f9885ecaf6317d34cc1d1
ndroid/server/wifi/SupplicantStateTracker.java
ndroid/server/wifi/WifiAutoJoinController.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiNetworkScoreCache.java
ndroid/server/wifi/WifiParser.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiTrafficPoller.java
73281a1523e29b9717d0d952de1faf2b52281c7c 07-May-2014 Jason Monk <jmonk@google.com> Revert "Revert "Fix Build""

This reverts commit 439935a9ec391392a1aea323d7f18c328fea2490.

Change-Id: Idb1661d3d34461848f9812d637b173decd6ee9e7
ndroid/server/wifi/WifiConfigStore.java
439935a9ec391392a1aea323d7f18c328fea2490 07-May-2014 Jason Monk <jmonk@google.com> Revert "Fix Build"

This reverts commit 09af645cb252b60bd38747df458c6d93dad23e02.

Change-Id: I3122b7e117f022c3edb1bb439b13fe99a074e78d
ndroid/server/wifi/WifiConfigStore.java
09af645cb252b60bd38747df458c6d93dad23e02 07-May-2014 Jason Monk <jmonk@google.com> Fix Build

Change-Id: Idb7e11307f10bd9580a5b92182065c3ef237af91
ndroid/server/wifi/WifiConfigStore.java
d4d0c9ad1e3289702ec341521b9bd01b52e9c1d8 07-May-2014 Jason Monk <jmonk@google.com> Support renaming of ProxyProperties to ProxyInfo

Change-Id: Ie4ec0e94b901161af68d8979d8b3cfd0e6009798
ndroid/server/wifi/WifiConfigStore.java
97a856eb1fda1585316055bd4912f0000deccb52 26-Mar-2014 Yuhao Zheng <yuhaozheng@google.com> Fix incorrect DISABLE_P2P_TIMED_OUT handling

Likely wifi p2p disable timeout doesn't work, due to the inadvertent use of
a wrong counter. Fixed by using the correct counter.

bug: 13653433
Change-Id: I4a49c039d28c4ac742fab0fc99492f6411156b97
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
0e8c82453d5a7f328ac1edc248457581368cd8c6 07-Apr-2014 Jaewan Kim <jaewan@google.com> Merge "Revert "Refactor IpConfiguration from WifiConfiguration""
b872cd1d58e1666a9066b136e28c49ed62f825ed 07-Apr-2014 Jaewan Kim <jaewan@google.com> Revert "Refactor IpConfiguration from WifiConfiguration"

This reverts commit 9790c81b2d0fb2b8c3790e4dbe6dd9fd5b93bd4d.

Change-Id: Idba522f04dd4a6a16e4829f68f70d3cc19016a81
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
c1580601011dad221059c89c8445370c4f5d9727 07-Apr-2014 Jaewan Kim <jaewan@google.com> Merge "Refactor IpConfiguration from WifiConfiguration"
b59f69faf9e3de740bbe1e55cef70e9e22858c2a 02-Apr-2014 Kenny Guy <kennyguy@google.com> Renaming related users to profiles.

Change-Id: Ia3cb7534e34b971b1996c7b81d2d160466962afe
ndroid/server/wifi/WifiServiceImpl.java
f9dba8db09a3a74a47ef076ca0b225bb70052df1 02-Apr-2014 Wei Wang <weiwa@google.com> Merge "Fix stopBatchedScan not working. cherrypick ag/436843"
9bd0507bf45c39dcb6beca7ae885bc790352eda8 02-Apr-2014 Wei Wang <weiwa@google.com> Fix stopBatchedScan not working.
cherrypick ag/436843

Change-Id: I325ea5965bc3863f1fe1179a404c2fa39b3c998e
ndroid/server/wifi/WifiStateMachine.java
99b31a89e661626ef8b970abd9de4455fd891299 28-Mar-2014 Yuhao Zheng <yuhaozheng@google.com> Merge "Wifi hotspot service initial hook up"
3c194cb908060978f65ae168ea0ed0606127b422 27-Mar-2014 Vinit Deshapnde <vinitd@google.com> Merge "Explicitly set update_config on supplicant"
3605a4b0e606f331bcebed6ae7629dae527fcf13 25-Mar-2014 Yuhao Zheng <yuhaozheng@google.com> Wifi hotspot service initial hook up

Add a dummy wifi hotspot service for futher development use. This is to
resolve the different between master branch and kwd branch, such that future
development can go into kwd and being auto-merged to master.

bug: 5485670
Change-Id: I96a79dfe47bebd61dfcdb120f3c14028b0ba9bfe
ndroid/server/wifi/hotspot/WifiHotspotService.java
ndroid/server/wifi/hotspot/WifiHotspotServiceImpl.java
9790c81b2d0fb2b8c3790e4dbe6dd9fd5b93bd4d 19-Mar-2014 Jaewan Kim <jaewan@google.com> Refactor IpConfiguration from WifiConfiguration

Bug: 7606609, Bug: 8687763
Change-Id: Iec5d3237c823c7893fbba3b3209fe2b03a27a583
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiServiceImpl.java
a02919e73b463000769d708fd34ff62b9a866f29 18-Mar-2014 Yuhao Zheng <yuhaozheng@google.com> Fix incorrect tags in WifiP2pService

Looks like a typo, fixed.

Change-Id: Ie8c8d34688a1aa2328c115b3a37033530ff4f841
ndroid/server/wifi/p2p/WifiP2pService.java
531869afc345c1a4fb7cd3e8d1b62acdd0963947 11-Mar-2014 Alexandra Gherghina <alexgherghina@google.com> Merge "Modifying wifi service to return the list of wifi networks for related users"
785c09f2ae609a580a620d1a45529881ea958f84 11-Mar-2014 Robert Greenwalt <rgreenwalt@google.com> Merge "Debounce wifi country code info"
fd5470391e5342daa38d00b68ccbccfeacbe6d33 10-Mar-2014 Alexandra Gherghina <alexgherghina@google.com> Modifying wifi service to return the list of wifi networks for related users

Change-Id: I66dd2625d2e3e9d135bad28c6209cf243648c7a6
ndroid/server/wifi/WifiServiceImpl.java
e1b4e7479a88f987f7add2d5f9df843b16e9156b 10-Mar-2014 Vinit Deshapnde <vinitd@google.com> Merge "Fix Airplane Mode + reboot interaction for Wifi"
fbba898cf24a6969eb36238edd0f9f879029cdbd 10-Mar-2014 Vinit Deshapnde <vinitd@google.com> Merge "Wifi HAL initial implementation"
13494d0692330ed0f91e7f4e03805473773e7807 08-Mar-2014 Vinit Deshapnde <vinitd@google.com> Fix Airplane Mode + reboot interaction for Wifi

This change fixes two problems - first, if you rebooted phone after
turning on Airplane mode, Wifi controller goes to ScanOnly mode which
may end up in Wifi radio transmissions. Secondly, because of this
incorrect state, the state machine doesn't turn on Wifi once Airplane
mode is turned off.

bug: 11409692
Change-Id: I5fc23f6691bc063fda6be734103a5f11db970946
ndroid/server/wifi/WifiController.java
9c22c8ea193360f50ad490368ca6a11af0684362 06-Mar-2014 Robert Greenwalt <rgreenwalt@google.com> Debounce wifi country code info

We're getting signals from the radio and it sometimes drops out for a while.
This change will delay applying an empty country code for 15sec but apply
non-empty country codes immeditately. It uses a sequence number so we only apply
the most recent change, even if it's delayed.

bug:11062898
Change-Id: I9d3a870f3b66296d4b3cbc10c730c9a043c0da96
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ff2a397afcc14a60ed70f109318a2ee799fed692 04-Mar-2014 Vinit Deshapnde <vinitd@google.com> Merge "Fix an inadvertent change in WifiNative"
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/WifiNative.java
64e65668e36bfeb0b634e9a678020ed04434f365 27-Feb-2014 Yuhao Zheng <yuhaozheng@google.com> Merge "Implement new API to scan a given channel set"
9612c46ab647596c88cfc017f7b5e338f0717ce2 26-Feb-2014 Felipe Leme <felipeal@google.com> Merge "Rename fetchRssiAndLinkSpeedNative() into fetchRssiLinkSpeedAndFrequencyNative() and changed it to also set the WiFi frequency. Bug: 12767819"
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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
ae0b5cce21686ad00fd0a3d5aab35fe2152c4737 05-Feb-2014 Vinit Deshapnde <vinitd@google.com> Fix an inadvertent change in WifiNative

wifinative.closeSupplicantConnection() closes sockets that were opened
to talk to supplicant. It was accidentally removed when we moved to
single socket connection to supplicant.

Bug: 12344420
Change-Id: I4242aff17baa91f3cdffaffb264c3bf4f93aaca3
ndroid/server/wifi/WifiStateMachine.java
8d4d3c2834917d7725385d31b821ab5a8e35d600 11-Feb-2014 Narayan Kamath <narayan@google.com> Fix build (again).

Change WifiP2pService / WifiService to reflect changes to
the SystemService constructors.

Change-Id: Iad36810c1d3e08bbdca21e76113f9f9dfe79bbae
ndroid/server/wifi/WifiService.java
ndroid/server/wifi/p2p/WifiP2pService.java
74b0804ef846b9b4888025092dd5c75143b559dc 03-Feb-2014 Felipe Leme <felipeal@google.com> Rename fetchRssiAndLinkSpeedNative() into fetchRssiLinkSpeedAndFrequencyNative() and changed it to also set the WiFi frequency.
Bug: 12767819

Change-Id: Icc5b702475f9047311246da3440d220c67875a4c
ndroid/server/wifi/WifiStateMachine.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
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiStateMachine.java
1c28bb29cb19367d5e3bdbe6d8558d0fd4b8f33e 17-Jan-2014 Vinit Deshapnde <vinitd@google.com> Fix a race in Wifi service startup

For wifi services to function, we currently require network management
and connectivity service to be created. But those in turn require
wifi service pointers. So to resolve the circular dependency, we create
objects first, and then start them. With the refactoring, I increased
the window between creation and starting which is exposing a bug that
already exists - WifiController starts the moment service is created.

This was hidden before because WifiController's thread wouldn't get far
in the short window that existed before; but now that the window is longer
it is dispatching messages trying to setup set without references to
network management and connectivity service. Hence the NPE.

I am delaying the call to start wifi service to fix this.

Bug: 12527004
Change-Id: Ie5842444988d8e6cbcceff50e4f014d410e36ec1
ndroid/server/wifi/WifiServiceImpl.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
ndroid/server/wifi/NetworkUpdateResult.java
ndroid/server/wifi/README.txt
ndroid/server/wifi/StateChangeResult.java
ndroid/server/wifi/SupplicantStateTracker.java
ndroid/server/wifi/WifiApConfigStore.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiController.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiNotificationController.java
ndroid/server/wifi/WifiService.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiSettingsStore.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiTrafficPoller.java
ndroid/server/wifi/WifiWatchdogStateMachine.java
ndroid/server/wifi/p2p/WifiP2pService.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.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
ndroid/server/wifi/NetworkUpdateResult.java
ndroid/server/wifi/README.txt
ndroid/server/wifi/StateChangeResult.java
ndroid/server/wifi/SupplicantStateTracker.java
ndroid/server/wifi/WifiApConfigStore.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiController.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiNotificationController.java
ndroid/server/wifi/WifiService.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiSettingsStore.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiTrafficPoller.java
ndroid/server/wifi/WifiWatchdogStateMachine.java
ndroid/server/wifi/p2p/WifiP2pService.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java
a07c419913bfae2a896fbc29e8f269ee08c4d910 18-Dec-2013 Vinit Deshapnde <vinitd@google.com> Move Wifi services to a new git project

Bug: 12175455
Change-Id: I1fa07e29c6a9aae38d9e334d519a9f2445d15613
ndroid/server/wifi/NetworkUpdateResult.java
ndroid/server/wifi/README.txt
ndroid/server/wifi/StateChangeResult.java
ndroid/server/wifi/SupplicantStateTracker.java
ndroid/server/wifi/WifiApConfigStore.java
ndroid/server/wifi/WifiConfigStore.java
ndroid/server/wifi/WifiController.java
ndroid/server/wifi/WifiMonitor.java
ndroid/server/wifi/WifiNative.java
ndroid/server/wifi/WifiNotificationController.java
ndroid/server/wifi/WifiService.java
ndroid/server/wifi/WifiServiceImpl.java
ndroid/server/wifi/WifiSettingsStore.java
ndroid/server/wifi/WifiStateMachine.java
ndroid/server/wifi/WifiTrafficPoller.java
ndroid/server/wifi/WifiWatchdogStateMachine.java
ndroid/server/wifi/p2p/WifiP2pService.java
ndroid/server/wifi/p2p/WifiP2pServiceImpl.java