History log of /frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8ec0ba59c20b8266d735912fb71575834c991acc 09-Jun-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: check app status for startLOHS" into oc-dev
95bad763cff555fcf37442d5d3129f777bb0b978 08-Jun-2017 Roshan Pius <rpius@google.com> Merge "WifiBackupRestore: Change to |NETWORK_SETTINGS| permission" 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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
0697df2e29a3255620760667e9192d82102cd85c 31-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add support for installing Passpoint profile via overloaded API" into oc-dev
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
/frameworks/opt/net/wifi/service/java/com/android/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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/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
/frameworks/opt/net/wifi/service/java/com/android/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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/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
/frameworks/opt/net/wifi/service/java/com/android/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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
728bf64cfc9881eeb06cbe8745b1a356db980abe 12-May-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: add objects to track LOHSrequests" into oc-dev
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
42b563da5849270ba76275390ad00739ca927a35 28-Apr-2017 Erik Kline <ek@google.com> Merge "WifiServiceImpl: add updateInterfaceIpState" 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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/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
/frameworks/opt/net/wifi/service/java/com/android/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
/frameworks/opt/net/wifi/service/java/com/android/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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
a805f151c790272d2c016cf59b89b052981bb7ae 05-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Check validity of staticIpConfigurations" into oc-dev
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
27f71578063f5cf8bc500610091fdbf72cca4bae 01-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "hotspot2: track creator UID for installed providers" into oc-dev
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
ba3f5bc64ef27f2ec0d3eae3f53c633ea9e66268 24-Mar-2017 Amin Shaikh <ashaikh@google.com> Update WPS NFC token retrieval.

- Refactor getWpsNfcConfigurationToken -> getCurrentNetworkWpsNfcConfigurationToken

Bug: 35725168
Test: ./runtests.sh
Change-Id: I41782a775d6b478f92ef0d3ad48e83816eca94b6
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
23b9ad32d1b903a2527ad7ef8deae78b51eddc97 16-Mar-2017 Ningyuan Wang <nywang@google.com> Stop supporting persistent country code am: 586197ab0e am: cb937877d4
am: fda3524c35

Change-Id: I192a882351827df4be6309bf3881cf60627a7779
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
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>
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
6e482c9c1882fd32edb446aa6f2f1e080a5cda25 14-Mar-2017 Rebecca Silberstein <silberst@google.com> Merge "WifiServiceImpl: protect Settings softap config" am: e65f63b675 am: 193d9023ac
am: 838083e229

Change-Id: I22f08ab46ef10b52a9f28e7da7e9fb21f258e281
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
34a36c245f9e070f1559ef689feef36f38d1189a 07-Mar-2017 Paul Stewart <pstew@google.com> Merge "Perform null check on replyTo" am: f080a27326 am: 10e897c827
am: 71394364cc

Change-Id: I12f5b3bc3b0a009804462027fe9a2d2706188026
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
0f1d4a719339c70b2d3d7e3322964b1852df6cd5 24-Feb-2017 Glen Kuhne <kuh@google.com> Merge "Move WSM.updateWifiMetrics into WifiMetrics" am: a350867b69 am: dbcaebacde
am: 2371fcccf8

Change-Id: I59029df5841939a00d9f3812753f677ac15100cd
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
d84fd37259c6e956d0f00c261f573dfa319acb91 28-Jan-2017 Roshan Pius <rpius@google.com> WifiStateMachine: Prepare for HIDL integration

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

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

Change-Id: I8350a2e120edec4941f0e070478fa7e313a01bb3
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
fcbdc7fdb5612e82991494832a95c73bcc898f12 04-Jan-2017 Stephen Chen <stewchen@google.com> Move WifiNotificationController to NetworkRecommendation

Bug: 32981344
Test: runtests.sh
Change-Id: If11c7b5bb9e47503e22ad8fe58b5e8f23798db7a
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/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)
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
3ebf0b17fd1cdd3a0ef22d9e199c1686c01dcc9f 25-Oct-2016 Peter Qiu <zqiu@google.com> hotspot2: stub implementation of Passpoint APIs

Bug: 32282711
Change-Id: If1b9801c0fe021b7b5817f51455dd5e0f7404b2c
Test: None
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
86c849795d49fd407f6b68443c246550a0efd62c 21-Oct-2016 Sohani Rao <sohanirao@google.com> Revert "Wifi Permissions Utility to check scan permissions"

This reverts commit 5bb7281f66dd79fb8c818f3b5594a69a339cb299.

Change-Id: I584141157a3c531b9ae7f2a737468060462f8972
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
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
026cb51837e4cf3aea30b903320b992a3f5d0d7b 20-Sep-2016 Christopher Wiley <wiley@google.com> Remove implementation of user selected WiFi bands

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

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

Bug: 31148223
Test: builds, unit tests pass

Change-Id: I8ae1f9d2b7217d404557fb69eccb2dd42799d4df
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
738af581a729e2b67564dbfe94a1211f256dd7f6 08-Sep-2016 Roshan Pius <rpius@google.com> WifiServiceImpl: Remove unused methods am: b1fa71f05e am: e65e45fa1c am: c97b6860dd
am: d6459bffd7

Change-Id: I6f403b9452ae5c2aa97d6db9df291aaf3df9dcbf
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
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
/frameworks/opt/net/wifi/service/java/com/android/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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
432214f7b1643c25ace740e12f9e24793d018d2e 27-Jul-2016 Nathan Harold <nharold@google.com> solve merge conflicts of 66b5e76 to master

Change-Id: I0a9ed024caaab1d1df6687882491e40896e647e7
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
cb2802ed836c1d4d7d08be4bc8a35ba2b7efc4d4 28-Jun-2016 Rebecca Silberstein <silberst@google.com> Merge "WifiInjector: add WifiServiceImpl objects"
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
bef58daefbccf81df1a6b7a9a2d103cee7819d69 27-Jun-2016 Mitchell Wills <mwills@google.com> resolve merge conflicts of cebad71 to master

Change-Id: I9d7656a52838045aa770bb47c2b72076057e5045
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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"
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
e3831b70d4a8a967fe8df5496d542a432692c434 02-Jun-2016 Roshan Pius <rpius@google.com> WifiBackupRestore: Parse older backup data

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

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

BUG: 29075035
TEST: Compiles & unit-test passes
Change-Id: If099af59811aa80f63eb5fd20ddf234e8089fd27
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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.
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
c48fd721a9a3273f0faa927d93caad4c9832af7d 11-Apr-2016 Adam Lesinski <adamlesinski@google.com> Implement new async response for controller activity info

Bug:26842468
Change-Id: Ic031dd6b5781c11aaec97f9c2b943dbd3f9317bf
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
4cd91e207897c250c7fc0e6ed3176698dce29093 11-Apr-2016 Samuel Tan <samueltan@google.com> Merge "Rename enableAutoJoinWhenAssociated()" 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.
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
48444cb4214a48a3a0bf4bbb93945c2aa68c9980 01-Apr-2016 Mitchell Wills <mwills@google.com> Move single scan blaming from WifiStateMachine to WifiScanningService

Bug: 27247460
Change-Id: Id855329450659b8b762fcb0bf9dba5a0b551604e
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
78b8d2feb70093e8717e924ed41176d6d8417e60 05-Apr-2016 Paul Jensen <pauljensen@google.com> Merge "Plumb WiFi multicast filter through to ApfFilter" into nyc-dev
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
ef7480f78d994c786248a1ee8a601abf39aec696 11-Mar-2016 Glen Kuhne <kuh@google.com> resolve merge conflicts of ea91131081 to nyc-dev

Change-Id: I0662ccf4f80c3b0b48314aef3a5807ce27a13659
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
2af03130d7f85823223b8591dc52858d851b301d 24-Feb-2016 Mitchell Wills <mwills@google.com> Remove a bunch of dead wifi code

Bug: 26907933

Change-Id: I3398b9bc9a2c915319ac4533b402ba400588f6e8
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
17445b7996487f059114a1ab6a0efa5f95fb86be 12-Feb-2016 Bartosz Fabianowski <bartfab@google.com> resolve merge conflicts of b2f519476e to nyc-dev

Change-Id: I28da4aee94bf4f80347481da396ca40bb7d107d9
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
8a8f89708a14547b79df1774b254f7252c64ad4d 11-Feb-2016 Mitchell Wills <mwills@google.com> resolve merge conflicts of 4086badffe to nyc-dev.

Change-Id: Idcabbfc19669aff2a99d6a39fd12a2be25dca058
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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.
2e814680f4dd27a5f825afab189843582235cedc 24-Jan-2016 Jan Nordqvist <jannq@google.com> New System APIs for Passpoint r2 app.

Change-Id: If23e6ab432e871a407cbff94292673524c6d72bd
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
030e15024e75322ba27650be2a05d15ac06026dc 29-Jan-2016 Bartosz Fabianowski <bartfab@google.com> resolve merge conflicts of aae3592ef5 to master.

Change-Id: I24cf4c223dc384861e807493637bef4da4bb5ad2
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
68ae7112ce5c8d7f871c816cba1f41b2da395ef2 22-Jan-2016 Peter Qiu <zqiu@google.com> Remove WifiWatchdogStateMachine
am: cb8c60a24d

* commit 'cb8c60a24d9e89f3b1aa601e76e38e05f8db6fae':
Remove WifiWatchdogStateMachine
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
79a4204d12f32d2f6a4dfc8500f5e74718cabb8d 14-Jan-2016 Vinit Deshpande <vinitd@google.com> Unit test for WifiController's emergency mode behaviors

Change-Id: Ic3d8618501632d449bbd3432b95542ac92f336e4
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
090aa74f2d36010abba6563a39c87ab7ba8a7473 14-Jan-2016 Vinit Deshpande <vinitd@google.com> Allow turning off Wi-Fi when emergency call is made

Bug: 24147407

Change-Id: I52db1b34df318d0754b1c316806712a61fc3a1f5
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
4e210ea1c7eb7d3a70792571651181e429b39582 29-Sep-2015 Mitchell Wills <mwills@google.com> Make WifiMonitor a singleton and add explicit event registration

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

Change-Id: Ida8225c1c8434f5cffbdfd2ebbc4a7b240976a15
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
9a069cba2e5ae31ee00d9ec9a3c25bdb7052aa78 25-Nov-2015 Jan Nordqvist <jannq@google.com> Applied changes from comments.

Bug: 25869687
Change-Id: I79a4ae543e7c3797620bf4492f4794523fac8c4d
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
8383c1b0fbdf3eb64653849ba65e0b0f9739f190 31-Oct-2015 Mitchell Wills <mwills@google.com> Merge "Remove old API implementations"
814230f58f5cb96db2a75c95a44c3d5890586486 24-Oct-2015 Mitchell Wills <mwills@google.com> Merge "Check if link stats are supported when reporting activity info"
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
016284c9e9fd219429c230e373d914f98db6a9a1 19-Oct-2015 Xiaohui Chen <xiaohuic@google.com> Merge "fix wifi forget acl"
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
5fc890105154949a0754dd00786bae280a9c8693 25-Sep-2015 Vinit Deshpande <vinitd@google.com> resolved conflicts for 0b17544f to master

Change-Id: I6676066fc97d6959abaa2eb3bce15b551ce66685
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
d3629ea845f3e49cdba20255a83068dced281d09 23-Sep-2015 Vinit Deshpande <vinitd@google.com> Honor country code change in wifi disabled state

Bug: 22937052

Change-Id: I8394531e50c4c6b41c6f376a4eb2d8205bd10af7
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
1f8f2971309aee4de9c35723f6fbca6fcab9a3be 18-Aug-2015 Mitchell Wills <mwills@google.com> Check if link stats are supported when reporting activity info

Bug: 23286362
Change-Id: Ib5629d2547957ae1f6215f719377fad96f4e10f8
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
d76cdd8e08476ad5025f07a5d77a8d8f920a0721 04-Aug-2015 Adam Lesinski <adamlesinski@google.com> Log error when energy info is negative

Bug:22822659
Change-Id: Iadab004b8dcdccbfae435990357426ec0e197dc2
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
017fabff2169403c27e551b39e87d3b2cd837409 30-Jul-2015 Dianne Hackborn <hackbod@google.com> Change MNC codename to just M.

Change-Id: I04b95d96032bfca6cce5d957ee937d34128121cd
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
266f3111427002d10ffd85fcea828a2725e540de 18-Jul-2015 xinhe <xinhe@google.com> Merge "Add API to turn OFF "best network selection" feature" into mnc-dev
4aef3283bf78e233a11fa34af2c7c38362879625 16-Jul-2015 Jan Nordqvist <jannq@google.com> Fixed incorrect network validation.

Bug: 22490051
Change-Id: I2d9a39502a10170bb452766fb9078939225dba2e
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
a8647b8cb29de22765062714cb265247234c3d32 10-Jul-2015 xinhe <xinhe@google.com> Add API to turn OFF "best network selection" feature

b/14990268

Change-Id: Ifa96a08f4bf9868afc8ddc88e178fc6375e70f8b
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
2812e1e19291d4f0dbabf7fe23d031d8cd641830 10-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Block results if location is disabled in Settings

Bug: 21852542, 22389679
Change-Id: Ia84b209167308b65387153d37c5e51fb71083fb2
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
aca3b874dfcf503a7de41d13be449557369116ef 09-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Merge "Check location permission/appop in getScanResults" into mnc-dev
07f11f6f2ee7ec17cb08180035dfb5002aaaf5df 18-Jun-2015 Jan Nordqvist <jannq@google.com> Reworked code to allow wildcard prefix IMSIs.

Change-Id: I08b7addb8dd407d9fc4f8a32a1fd2f86edde0e7a
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
7e6573a1866812a302c1bfd224a2ed2d5633259f 01-Jul-2015 Vinit Deshpande <vinitd@google.com> Dump multicast lock holders in bugreport

Change-Id: I8108b05e0728cfa468d36002c2a1fe578e537c34
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
70b75cda33a05e8b6e6724ed08e4e72f6fee0471 03-Jun-2015 Pierre Vandwalle <vandwalle@google.com> fix overflow bug in WifiManager reportActivityInfo
Bug:20232188

Change-Id: I2613ead34398d03ce631974cc1ee3f340ffec55e
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
d03a9283285bb7adef6c687eb3a91fa4a8c4b502 02-Jun-2015 Vinit Deshpande <vinitd@google.com> Fix build breaks from last merge

Change-Id: I6ef088cfd3a796b7455df025b37a017c3a4da483
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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)
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
6a95e83c7e411a21cf6f6d912ab8498d2de858c9 18-May-2015 xinhe <xinhe@google.com> Merge remote-tracking branch 'goog/mirror-m-wireless-internal-release' into merging

Change-Id: Iec12d73f244bc58e7fcf1154ea8047a03925c241
b0b0cc202b7d7aaad7b3f69d73e9b58ea2968b05 06-May-2015 Pierre Vandwalle <vandwalle@google.com> hal based Pno and lazy roam implementation

Change-Id: Ib814ff6d29c8d7f1b579f7c088cd4eb104e5b637
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
1227b49a94f33844ad0606b48b591bea4d27b08e 14-May-2015 Vinit Deshpande <vinitd@google.com> Build Fixes after the merge

Change-Id: I6f9d28051b6f4d6688c4b76c1923e57febe31145
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
ad9984607c007b15b9eb6601facf821cb57e1555 11-May-2015 Vinit Deshpande <vinitd@google.com> Remove old (KK based) batched scan API support

Bug: 18000475

Change-Id: I0b6054f291cadefb1d153692b61f1c3d2ddab0c1
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
fa0502b4e2171143f133bb46e03143328c15e995 24-Apr-2015 Etan Cohen <etancohen@google.com> Merge commit 'baa9bdf' into merge2
4075f980d4f526723d88b6ae3c1c6af14fdfa355 23-Apr-2015 Dianne Hackborn <hackbod@google.com> Merge "Don't allow scans while device is idle."
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
4e940bb499f65b4305dbeb2e01237c43c2b0b42d 15-Apr-2015 Jan Nordqvist <jannq@google.com> Various minor fixes.

Change-Id: I227c67740f7c18f059e37b3c41fd18225365c7d1
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
03b70b37a8a20cb92d860b5015f6762dcb5e75cc 14-Apr-2015 Dianne Hackborn <hackbod@google.com> Don't allow scans while device is idle.

Change-Id: If682daba7948c64872fc07e539e957cbf9f3d31f
/frameworks/opt/net/wifi/service/java/com/android/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
6aef95a3cfa0b825ff93c45e95f89cc8c5c85164 11-Apr-2015 Prerepa Viswanadham <dham@google.com> Merge commit '70deeca' into merge_work

Change-Id: I77fdf057818f0bc2742e923e71b248648e152e1a
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
05d04f448d8e2d44f9eae8e54f17a7bdf57ca1f7 02-Apr-2015 Etan Cohen <etancohen@google.com> Merge commit 'b151395' into merge_yet_again
2740001002132ed305034de64a58b0805fa4e392 25-Mar-2015 Pierre Vandwalle <vandwalle@google.com> fix typo in wifi power caldulation API

Change-Id: Ie8493ef98a20d1b36fa4dfd582e56c8db04d07a9
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
84a11a3d54b7c6f043dcf7a874b7c0d45709677a 24-Mar-2015 Pierre Vandwalle <vandwalle@google.com> add WiFi energy calculation

Change-Id: Ic368558be45eed7c1c49096966917166b641d1ac
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
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
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
e2614ba1b774529ee68cc4ac189f7492cff89db3 13-Mar-2015 Pierre Vandwalle <vandwalle@google.com> export API to disable autojoin scan initial implementation

Change-Id: I504f135ab91c5e483a92306a9b96d70b80f11362
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
186f7513a080eb1a419b6d83286d62961168a5fe 27-Feb-2015 Adam Lesinski <adamlesinski@google.com> Change to use new Structure

Change-Id: I5c6b23b8e1441d4de9056aa959ddedf297823bec
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
80d14d67a956e6c69433470aaa73100898166efa 24-Feb-2015 xinhe <xinhe@google.com> country code setting broken

On branch xin_country_code_opt

Bug:19462483
Change-Id: I18ff2d4d5dc16049386d1e60b82da13a97bb887f
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
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
88c9369cb6b94c30324893337aa25b1e37a15ff6 08-Dec-2014 Jason Monk <jmonk@google.com> Merge "Allow interact-users-full access to scan results" into lmp-mr1-dev
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
/frameworks/opt/net/wifi/service/java/com/android/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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
9086afccf6938a49eb9a2cd248917c1cb0943942 22-Nov-2014 vandwalle <vandwalle@google.com> remove dfs channel from location restricted scans

Change-Id: I387816c8682e9f595229ecbb20c35711ea1f069b
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
200e8ee5097134010a6edee8d031bb02ff7eeb5a 19-Jul-2014 vandwalle <vandwalle@google.com> add radio stats to link layer

This CL is dependent on I3d2a230b0362520b9f1b2bc3792260116971e106

Change-Id: If7e73ae9813ea79a98744d7f0096316d241998fd

halutil updates for link layer statistics

Change-Id: I00ea13b1a932f40891a0d65026a1c87f01f09587
Signed-off-by: Chilam Ng <chilam@broadcom.com>
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
3b26801d62a06475b722bbf29cba7f48f376654e 31-Jul-2014 Lorenzo Colitti <lorenzo@google.com> Stop using LinkProperties for static configuration.

Bug: 16114392
Bug: 16893413
Change-Id: Ib33f35c004e30b6067bb20235ffa43c247d174df
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
2a325cd07d40941adb93c1284abb263ba650c213 12-Aug-2014 Sky Faber <skyf@google.com> removeNetwork needs to perform owner check against userId not uid.

Bug: 16952565
Change-Id: I78666c34fc919bbc96ef92b02445b93b0948f743
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
8e6144b4059fc2117be23d7222893bc57a33f64d 20-Jun-2014 Jon Larimer <jlarimer@google.com> Fix null dereference in enableTdls() and enableTdlsWithMacAddress()

Change-Id: I37acf88c9adefba240fb8bc8a9e633ddcd823d21
Bug: 15775601
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
c298087de50ea56c31a4ade7ee1e83b313bb63c7 26-Jul-2014 vandwalle <vandwalle@google.com> introduce WifiConnectionstatistics

This CL is dependent on I51fbbf062feb22c5f16b438675519064cc43e160

Change-Id: I10584a447fecd977df3eefd8e2cc028bd26ec0e3
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
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)
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
002ea67f42b0f69a8c9fa4719391f9476567b762 11-Jul-2014 Sky Faber <skyf@google.com> Disallow forget/remove network for secondary users.

Change-Id: I07be23c26f45a77f5998f200bc9682dedbfa7916
/frameworks/opt/net/wifi/service/java/com/android/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
/frameworks/opt/net/wifi/service/java/com/android/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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
13cddb5337418359eb5f9bebd0504fbc5c47fc41 01-Jul-2014 Julia Reynolds <juliacr@google.com> Apply DISALLOW_CONFIG_TETHERING to wireless access points.

Bug: 15852213
Change-Id: I1f1adb8762bf7b694aa92f4b0a393d8e06c610bf
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
c6f06c628ee3583b60ff31a7da442e0ac7b26d97 19-Jun-2014 vandwalle <vandwalle@google.com> autojoin tuning, making LTE handover less aggressive

Bug: 15700122

Change-Id: I2836abf791f8c71c63a901170f247c4030e8e8f9
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
211737ce4cabcab0552e3453ac6e3c5a4748c158 11-Jun-2014 Sreeram Ramachandran <sreeram@google.com> Merge "Use the updated RouteInfo API."
82d1c6aeadfa24797b314ae2b2a55717df064b57 08-Jun-2014 Robert Greenwalt <rgreenwalt@google.com> Apply LinkProperties API change.

bug:15142362
Change-Id: I1457111da7d3bd09998f7e010febb8bb4c45c8bc
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
d05472bb94ecc9b870463a843313f2d852bcf5b8 04-Jun-2014 Sreeram Ramachandran <sreeram@google.com> Use the updated RouteInfo API.

Bug: 15142362
Bug: 13885501
Change-Id: I97f1625e037c889b0cddd3db418c42c1d48b26b9
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
a6b7a402041bd4bc0749331b92c3c1e5225927a0 31-May-2014 vandwalle <vandwalle@google.com> Merge "add debug info to wifi configure, check auth method for real before self-adding"
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
2390785d4104a6c20459c5e7143c1a7a5bb2481f 22-May-2014 Jason Monk <jmonk@google.com> Merge "No longer require CONNECTIVITY_INTERNAL to set PAC"
ed9938883ae2dade81c8be6cd6ceaef3febd5239 22-May-2014 vandwalle <vandwalle@google.com> make verbose logging a wifimanager hidden API

bug: 151386707

Change-Id: Ide885ce96621fe4bab6abf10291bc8441eecad4a
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
f22d23092ab37286a5ef9d257d5bb32c421d2669 06-May-2014 vandwalle <vandwalle@google.com> autojoin initial implementation

Change-Id: Iea4e5c0b8e988e410d2f9885ecaf6317d34cc1d1
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
9790c81b2d0fb2b8c3790e4dbe6dd9fd5b93bd4d 19-Mar-2014 Jaewan Kim <jaewan@google.com> Refactor IpConfiguration from WifiConfiguration

Bug: 7606609, Bug: 8687763
Change-Id: Iec5d3237c823c7893fbba3b3209fe2b03a27a583
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
531869afc345c1a4fb7cd3e8d1b62acdd0963947 11-Mar-2014 Alexandra Gherghina <alexgherghina@google.com> Merge "Modifying wifi service to return the list of wifi networks for related users"
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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.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
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiServiceImpl.java
a0009d14075b5345b8f916c3fb3f2260c938cb9d 06-Feb-2014 Yuhao Zheng <yuhaozheng@google.com> Implement new API to scan a given channel set

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

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

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

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

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

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

This reverts commit a07c419913bfae2a896fbc29e8f269ee08c4d910.

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

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