Adding a new field, meteredHint, to WifiConfiguration so that it
can be passed through and eventually used to set the meteredHint
field on WifiInfo.
BUG: 27120794
Change-Id: If08966c6a5e8eab0905f3335b1c6822975b2f0b5
Instead of minting it's own hander thread, have WifiManager use
the looper from ConnectivityThread.
Bug: 27432949
Change-Id: Iddeebeb8ab506c912f526c7569f304e10b9d7ab8
Now that WifiManager instances are separate and do not depend
on a single static AsyncChannel for the entire process, all
contexts within a process will create an async channel on init.
Since creating this channel requires special permissions that
some applications do not have, it is problematic for them all
to request it in the process of getting a WifiManager instance.
This CL defers AsyncChannel initialization until it is actually
going to be used. This allows callers to create WifiManager
instances without necessarily creating an AsyncChannel.
Depending on what parts of the API will be used, some callers
will never need one. Also, this means that these apps will
not run afoul of permissions exceptions that do not apply to
them unless they actually request functionality that requires
the AsyncChannel.
While here, this CL no longer catches SecurityException while
requesting a messenger from WifiService. That hack appeared to
be an artifact of the static instance of sAsyncChannel -- it
was not clear to WifiManager which context had permissions to
successfully create the messenger, so it was necessary to
silently fail the attempt especially since that attempt was
made in the constructor. With the restructuring to keep
mAsyncChannel per-instance and now only created at the time
specific API calls require it, a SecurityException is
completely relevant to the caller and should not be discarded.
Bug: 27694933
Test: Boot full image, repro b/27694933 with com.google.android.music
Change-Id: I680bf2443bc5b057e629544a687f985261201ded
All events dispatched by default - there's no reason to ignore events.
The specific identity changed events for which there are use-cases to
get or ignore is controlled through a new configuration.
Bug: 27607613
Change-Id: I289a36157b55270c58311a016ef79f8746e0e0a0
Merge onPublishFail & onSubscribeFail into onSessionConfigFail.
Merge onPublishTerminated & onSubscribeTerminated into onSessionTerminated.
A session is either publish or subscribe (never the two) so redundant.
Bug: 27610709
Change-Id: I0282d17db88754428da25ee5f064b9a4805f9736
Controlling session callback invocation:
- Remove event registration
- Add configurations to the subset (actually just termination) which
can be configured through the HAL
Bug: 27607613
Change-Id: I608314cc2a9b077b4d5a2d2d0d315d55c6a7724b
Match style allows apps to configure getting a single notification
or continuous notifications (for all matches).
Bug: 27568256
Change-Id: I9b7bd2e4e58af5c73188267d11c1288a93cf64ed
Thanks to b/24334032, we know that there can be more than one
WifiManager object per process. Also, due to b/19159232 we know
that holding static references to contexts within WifiManager is
not okay. This CL addresses both issues by correctly implementing
Wifimanager as the per-context CachedService as it is instantiated
in SystemServiceRegistry.
To do this, all previously static object members of WifiManager
are converted to non-static. This is primarily safe since:
- In processes which only instantiated WifiManager from a single
context, the behavior is functionally identical between the
static and non-static implementation.
- In situations where multiple WifiManager objects were created,
this is not a real issue:
+ sListenerKey is okay to be tracked per-instance since it
only tracks replies for asynchronous outgoing calls for a
single WifiManager instance (replies are not multicast to
all instances within a pid, since replies from
WifiServiceImpl are addressed to the other end of the
AsyncConnection the request message came from).
+ The same is true of sListenerMap and sListenerMapLock
+ Having a per-WifiManager-instance mAsyncChannel is at worst
a small linear increase with the number of contexts that
use WifiManager, but for the vast majority of processes will
not be an increase at all.
+ Having a thread per WifiManager is something that has been
brought up in the past (b/25644527 comes to mind). I think
we should continue to track that particular problem there.
One static was added: an sServiceHandlerDispatchLock which ensures
that listeners from multiple ServiceHandler threads will be called
sequentially instead of interleaved. Since ServiceHandler was
previously static, this preserves the behavior where multiple
WifiManager objects would not deliver callbacks in parallel.
BUG=19159232
BUG=24334032
Change-Id: I24125a285f97e0c5b3ca4fd721ba8ed19aa245e9
Added EIs to InformationElement to support the parsing of Supported
Rates, Extended Supported Rates, and ERP.
BUG=25691077
Change-Id: Ie540e94f9aa0dca11c3b1d6a46c5a638ec958cff
Add the hidden networkId list in scan settings to be used for
connectivity scans.
BUG: 27503786
Change-Id: Ibe7eaccd84d03a7b48728e3ea1d98ccc974377ec
TEST: Compiles & unit-test passes
Add the public interface for starting/stopping PNO scan.
This is the internal flow that is going to be used for PNO scan:
1. Set Pno list
2. Start background scan
This flow will not work as is for supplicant, since background scan is
done manually today. So, we'll need a flag to indicate that this
background scan is targetted for PNO.
BUG: 27167559
Change-Id: I3f6921c5d03f7d9e8ad1847e57e12fb38df6c9c9
TEST: Compiles & unit-test passes
When debugging WiFi issues, it's helpful to know whether
or not a network uses a hidden SSID. Update
WifiConfiguration.toString(), to provide this information.
BUG=26836097
TEST=capture bugreport, verify "HIDDEN: false" is present for normal net
TEST=capture bugreport, verify "HIDDEN: true" is present for hidden net
Change-Id: I1f7c587fc2eda358e0868e9a7ef0bb2058e726a8
Apps making calls into the system server may end up persisting
internal state or making security decisions based on the perceived
success or failure of a call, or the default values returned.
The reality is that if the system process just died, init will be
along shortly to kill all running apps, so we should have no problem
rethrowing the RemoteException as a RuntimeException.
Bug: 27364859
Change-Id: Ife0bcb079636c88d54c44d17eb580409fd79028b
Per API guidelines - non-overlapping constants can be (should be)
named with "FLAG".
Bug: 27122760
Change-Id: If8b2c0f9b2818215a64b5635e76731c8fdfd3b8d
Changes in the android framework to use the modifed HAL API to
fetch the host wakeup reasons from the driver.
BUG: 26902794
Change-Id: I4df53c00b6b4ffd9f9ddb45577f6bccf150c43e4
The "auth=GTC" method was never valid for the TTLS outer
authentication for wpa_supplicant. Instead, to perform
GTC authentication within TTLS, we should use EAP-GTC.
This CL performs this mapping within WifiEnterpriseConfig.
It accomplishes this by making the EAP Method and Phase 2
Method parameters a part of the internal object state
instead of maintaining this value within the mFields
hashmap.
Further, the problematic "getFields" method is removed
since as this actually provided read/write access to the
entirety of the WifiEnterpriseConfig's internal state.
This was understandably suboptimal. All callers have
been updated to either use getFieldValue() or to call
a newly added getSupplicantFields() / setSupplicantFields()
methods which make the WifiEnterpriseConfig object a sole
arbiter for the mapping between its internal state and
wpa_supplicant.
In the future it might be good to change this logic to
strip WifiEnterpriseConfig of all of the string hashmap
entirely, leaving WifiEnterpriseConfig as a "struct"
and move supplicant mappings to WifiConfigStore.
Bug:26400915
Change-Id: I866e2f77ad53d9a51c5f61acb9adef522661f721
Test:runtest frameworks-wifi # New unit test in the same topic
Test:cts-tradefed run cts -d --class android.net.wifi.cts.WifiEnterpriseConfigTest