The WifiManager.isXxxSupported() only functions if HAL is enabled
and seems to be a duplicate of:
PackageManager.hasSystemFeature(PackageManager.FEATURE_WIFI_NAN)
Bug: 28251988
Change-Id: I8f410def6f0bd3d3fc0926072ab66acce52a0e14
(cherry picked from commit a3264c4e3d08d38b08ab0c1c92341cb9cc8f29f8)
Use CloseGuard to check that disconnect() is called to free the resources
allocated by connect(). finalize() will still call disconnect() but now
also print out errors (if StrictMode enabled for feature).
Bug: 28068773
Change-Id: I5f5847c0261ef9f79a21fdb935509a85761591cc
(cherry picked from commit 9d55649613f6ea9926c6e6222965178e91cb501b)
Added 'throw' to the 'e.rethrowXXX()'. Not needed but seems
to be the accepted style.
Change-Id: I75e42d68ee6092699a55e26ee05151373139606d
(cherry picked from commit cb34ec8f3a8dd40f7c49181b008de7314735ca66)
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: I020601e208c0736005bcabc7b7b77b96eee45b03
(cherry picked from commit d3663c04a721e0848dd3e9179c84ba585d91839d)
Make the status/disable reason string arrays public to be used in
XmlUtil for restoring of data.
BUG: 30448209
Change-Id: If8201df9397edcc4251e5b6aa4d613212fb576ad
TEST: Unit tests
(cherry picked from commit 23173a2efa45e5159a9b958e31cf345f8f0c2347)
NAN uses LV (not TLV). Expose an LV variant of TLV to make API
cleaner.
Bug: 30096512
Change-Id: I74b4c514d50f1df5750b521bd68a5e2d832d92c3
(cherry picked from commit 009b1fcb85ab8f8eb4ab5f3e125127b449df77cb)
Make sure that iterator.next() validates that next element exists -
otherwise throw the exception specified by the interface.
Bug: 30096512
Change-Id: I327da433e3f1181e272c81ee503cbe8aab323f7e
(cherry picked from commit 3e5ac12302a78216e706be239dceb5175646bea0)
Arrays carry their own lengths. There's no need to provide mechanism
to 'shave' the array - could be done explicitly by caller if needed.
Bug: 29617160
Change-Id: Ib135aa04145f400163cd1a8908dfca4590b4480d
(cherry picked from commit 0a5b7efcb20d2a57c990f11469580edb41a976d6)
Modify visibility of startRanging [NAN RTT] to SystemApi. Matches the
visibliity of the RttManager API.
Change-Id: Ia92de9885d0b38dfce74484f437bd122dd53cbf6
(cherry picked from commit ab9ef45971fc41bc078ad1362845309ef02f62f9)
Expose NAN discovery interface MAC address to app. Required
to enable OOB discovery with other NAN functionality
(e.g. data-path).
Bug: 30000035
Change-Id: Id3c336a61a36522d7011557c805bc3c5307747a1
(cherry picked from commit d097f8a4e520378b9e15f294e773b033ea920268)
Test for validity of a (T)LV. Used in construction of publish and
subscribe configuration (both Tx and Rx filters).
Bug: 30007730
Change-Id: Ibf2179121d45c582bb054c06ec2a765ed0927040
(cherry picked from commit c13b9f6b7d132e06e09b8604b095bdf59ec42307)
Add checks that the service name is valid per spec (see bug for
details). Stores internally as a byte[] for further propagation.
Bug: 30000106
Change-Id: Iab413aba6755c97bfca0332d6eaa21f636e47f3f
(cherry picked from commit adfbfb3a939f5662cb62cdd6b5d7cce5494a159e)
Code assumed that each character was represented by a single byte.
Change-Id: I92ea63f7273379ed1035f10c207d41e3e352bf38
(cherry picked from commit 9a6161c61cb99460afa2c575f39c046391fa1c97)
Adds network specifier API. These are used in creating a connectivity
request through ConnectivityManager. The network specifier provides
mechanism to pass information to the network factory.
Bug: 26564277
Change-Id: Ib5b88685e033a2957644f2e9cff39a70712ac7b5
(cherry picked from commit 15849dc463278b44b191cd39aa7d31b0de9ee825)
wpa_supplicant can update this value when authenticating so if the
framework writes it back the new value can be overwritten.
TEST: Patch was validated by original reporter
Enterprise tests pass (b/29608435)
Change-Id: If359b4ca625371fbdb68177c7cdb6498c3a519a1
Fixes: 28161335
(cherry picked from commit a464a9fce8d160d2bbac3aeea3b23ecc7bb179a0)
When the device received the second invitation request
from GC of the same PersistentGroup, the wifi framework
processes "sa" as mOwner of WifiP2pGroup. At this point,
if an invited group is persistent group, WifiP2pGroup can't
know whether "sa" is GC or GO yet. So the framework shouldn't
process mOwner in the constructor.
Bug: 28715251
Change-Id: Ie7065da0d6c978c3747ecbd6f728de87d9567009
(cherry picked from commit af1eafd7b14f4cafd150d01d1d9d87470a4f3777)
Expose a public constructor for |NetworkSelectionStatus| class and add a
setter in WifiConfiguration to set the |NetworkSelectionStatus| object.
Needed for config store persistence of this object.
BUG: 29273147
Change-Id: I9d9036928137760c4832567dd2b9d0fabc874940
TEST: Unit tests
(cherry picked from commit 6a89ee2d908add0d418995420b2d5eaebd90882f)
Add a new API to restore the old backups containing the raw data from
wpa_supplicant.conf & ipconfig.txt files.
This helps clean up all the existing wifi configuration parsing
logic from SettingsBackupAgent.
BUG: 29075035
Change-Id: I8c7b93ef7c9e2decc8e4f9e5d7038939cf0ef196
(cherry picked from commit 08131593a864c23b8465d7ce05bf6c04564f7ba1)
Expose new API's to retrieve data to be backed up for Wifi
configurations and to restore configurations from the data.
BackupSettingsAgent will invoke these API's to backup/restore wifi
settings.
BUG: 28967335
Change-Id: I64e2f37a29d538d976bcc53dd2165653073b5862
(cherry picked from commit 7bc0adbcedb758ea8e829a7a6c4df39dc5f4db49)
Add a WifiLock mode representing that no locks are held (@hide).
Bug: 28669096
Change-Id: I774d5ff226e7c639812f9735555c8ea1ed6444af
Test: compiles and runtest frameworks-wifi
(cherry picked from commit df547e04c332e51fff159efe8bf612053a80cf75)
Add some missing @Override annotations, and mark some constants
as unused.
Bug: 28799169
Change-Id: I1ddef87ecb089b62e299544ae94a21d10ef42d98
Test: Compiles.
(cherry picked from commit b41e74f41ea78a30b03f3a37a0f4afb0aa1e05b5)
Provide API for NAN RTT through WifiNanManager. While NAN RTT could be executed
directly through RttManager the peer information is hidden by WifiNanManager (no
MAC address is exposed). Using WifiNanManager keeps the information hidden.
Bug: 26564277
Change-Id: I8deeb3f9e360dc05f2ea175d115f287590d50322
(cherry picked from commit fb8021c8371357dbb2b73135c89de57ef27e0131)
Duplicates the WIFI_NAN_STATE_CHANGED_ACTION broadcast. Remove
all state information from manager.
Bug: 28622807
Change-Id: I00632b216edb2dd74412861c4b46f01adec5a271
(cherry picked from commit cbf37593325f48168aa1aa49b12d30fe43345cc1)
1. Add a new "permanently" disabled network selection status for disabling
networks after a user switch.
2. Add a new "temporarily" disabled network selection status for disabling
networks when WPS is enabled.
BUG: 28219928
Change-Id: I4ab7333ebaa830dadf73f317fd6bb81a02054235
(cherry picked from commit a6fac3eb6b29c7d370b56889cb53f6bebeeee04f)
Additional annotations on (what are planned to be) public APIs.
Fixed exposed API: @hide to a few new methods.
Bug: 27122760
Change-Id: Iea91de1b1c3c32a93378b5d90c1e88d994a10526
(cherry picked from commit d775a164c37294ee97f902792aa75da41d3ccf82)
Add master switch to enable/disable usage of NAN. Tie into Wi-Fi
state machine (to enable/disable based on Wi-Fi enable/disable).
Dispatch broadcasts when NAN status changes.
Bug: 27698011
Change-Id: Iea36388443ff8d0dc26a280220022c6bdba6a0c8
(cherry picked from commit d3137af10291ff888125de747d9ee05f73f3fd8e)
Simplify flow: configure and connect in a single call.
Prevent info leak: no longer provide configuration back to caller.
Update error status codes
Bug: 27617910
Bug: 27553226
Bug: 27579450
Bug: 27674927
Change-Id: Id7aba816a074dbbe0cb188cfe498c97dccbdcb27
(cherry picked from commit 52b3a24a029e3c5d9436a09b4175f6c49e02d92e)
All events dispatched by default - there's no reason to ignore events.
The specific identity changed events for which there are use-cases to
get or ignore is controlled through a new configuration.
(cherry-pick of a5ed693788ea64408ccf18850ee38905218ec4f4)
Bug: 27607613
Change-Id: I289a36157b55270c58311a016ef79f8746e0e0a0
(cherry picked from commit 574b3fb810f462bdcfced379b6223de9a9d15375)
Merge onPublishFail & onSubscribeFail into onSessionConfigFail.
Merge onPublishTerminated & onSubscribeTerminated into onSessionTerminated.
A session is either publish or subscribe (never the two) so redundant.
(cherry-pick of 8414f5cf2bd86dcbaea1976590e838e41af554b3)
Bug: 27610709
Change-Id: I0282d17db88754428da25ee5f064b9a4805f9736
(cherry picked from commit 776ba56e53f8aab37b8a5a718fbf3bf84de65001)
Controlling session callback invocation:
- Remove event registration
- Add configurations to the subset (actually just termination) which
can be configured through the HAL
(cherry-pick of e393f57d0de5a27d1cfd04a8c83a61559430539c)
Bug: 27607613
Change-Id: I608314cc2a9b077b4d5a2d2d0d315d55c6a7724b
(cherry picked from commit f6062eef209ae79a8a353125287aecdaa027fbea)
Match style allows apps to configure getting a single notification
or continuous notifications (for all matches).
(cherry-pick of 8ef74534169bd3f3296e2ee42c0fda95c8518383)
Bug: 27568256
Change-Id: I9b7bd2e4e58af5c73188267d11c1288a93cf64ed
(cherry picked from commit 12213fb12d6c9af72a6244644a8253159cc62825)
Per API guidelines - non-overlapping constants can be (should be)
named with "FLAG".
(cherry-pick of ad3693d59b990f4994f96f6d3ca98cdbfe26723c,
Change-Id: If8b2c0f9b2818215a64b5635e76731c8fdfd3b8d)
Bug: 27122760
Change-Id: I973d24f4f318471286087e6ae13b77cb119f01e7
(cherry picked from commit e698fab45cd0544ba63a89a03ff8f32de49e8f1c)
The interfaces had multiple functions and are hence callback
and not a listener.
Note: purely a rename operation.
(cherry-pick of 0d0f0c7faf530a0fa5595dd539c3f56afeb6603a,
Change-Id: Ib12711f56a64052455843859125d72268c465fc0)
Bug: 27122760
Change-Id: Ie1905a5d907e5b09d449af52814b1aacb6426477
(cherry picked from commit 4e1af1b80735f5d61f089432a63a23937c994546)
Add the concept of a client ID which is used to identify a specific
(one of several) clients in all API calls.
(cherry-pick of aa36f07194b29adee881e684b63f8bbdee6097bc,
Change-Id: I43f13d51bee8b57c6d0ba1174168288b8d6c21c5)
Bug: 26962024
Change-Id: I0e0ddf37ea9800ae97115d6af384b54b49a40d74
(cherry picked from commit 5155990c09e7212709c8e154f05960f633f21a49)
(cherry-pick from master)
Add a WifiLock mode representing that no locks are held (@hide).
Bug: 28669096
Change-Id: I774d5ff226e7c639812f9735555c8ea1ed6444af
Test: compiles and runtest frameworks-wifi
wpa_supplicant can update this value when authenticating so if the
framework writes it back the new value can be overwritten.
TEST: Patch was validated by original reporter
Enterprise tests pass (b/29608435)
Change-Id: If359b4ca625371fbdb68177c7cdb6498c3a519a1
Fixes: 28161335
When the device received the second invitation request
from GC of the same PersistentGroup, the wifi framework
processes "sa" as mOwner of WifiP2pGroup. At this point,
if an invited group is persistent group, WifiP2pGroup can't
know whether "sa" is GC or GO yet. So the framework shouldn't
process mOwner in the constructor.
Bug: 28715251
Change-Id: Ie7065da0d6c978c3747ecbd6f728de87d9567009