Merge commit '58e0eefeb5e2e270e2b04369bbf29fc22abda8d5' into gingerbread-plus-aosp
* commit '58e0eefeb5e2e270e2b04369bbf29fc22abda8d5':
Improve power tracking of WIFI use.
We now distribute "wifi started" time across all apps that are
holding WIFI locks that cause it to be started. But only when
WIFI would not normally be running. Also have a mechanism to
distribute other WIFI work that has happened across those processes
based on their use.
Also fixed a bug where we were not retaining the CPU speed step
stats across boots...!
Change-Id: I00e3153b98429166273750512cc37e7975211ab9
This fixes a problem where applications could ask the location
manager to do very heavy-weight things (like... say... update
location every minute), which would get accounted against the
system instead of the application because ultimately it is the
system making the heavy calls (wake locks, etc).
To solve this, we introduce a new class WorkSource representing
the source of some work. Wake locks and Wifi locks allow you
to set the source to use (but only if you are system code and thus
can get the permission to do so), which is what will be reported
to the battery stats until the actual caller.
For the initial implementation, the location manager keeps track
of all clients requesting periodic updates, and tells its providers
about them as a WorkSource param when setting their min update time.
The network location provider uses this to set the source on the
wake and wifi locks it acquires, when doing work because of the
update period.
This should also be used elsewhere, such as in the GPS provider,
but this is a good start.
Change-Id: I2b6ffafad9e90ecf15d7c502e2db675fd52ae3cf
Add support for set and get band and set the default
to 2GHz for now till we get a fix on issues
with 11A
Change-Id: Icb9bddc353e4bf013bdb8a08d9b4ee3451c282f4
Split configuration management into a seperate class,
next to come is per configuration ip management as part
of WifiConfigStore.
Bug: 2876746
Change-Id: I44b85fb0e23a83d97a5052ba6beafe06f2027f5a
1. if we try to use the api for an already connected network
we could end up in disabling other networks since we dont
get events back in that scenario. fix to ignore connect.
2. force transition to mDisconnectingState since we expect
a disconnection when we connect to a network. If we
are in the other child states in ConnectModeState and dont
transition, we could ignore the connection/disconnection
which would cause other networks to get disabled.
Change-Id: I603d504af21c5ba09411d5e2515b8031b9f8a97a
We dont plan to have asynchronous versions of the existing
synchronous calls since we have added more powerful
asynchronous calls. Remove functionality to check for
synchronous calls.
Also, remove unused sync call for fetching status
Change-Id: I2982cb7b2aabc88a63289d49686a6e3645085263
Merge commit '80db4381c010c4dec74c2bf1e02380759e4ff97b' into gingerbread-plus-aosp
* commit '80db4381c010c4dec74c2bf1e02380759e4ff97b':
DO NOT MERGE Enable all networks on screen on
Connectivity to a disabled network never happens.
An old dhcp issue for example prevents
connectivity again in future. Allow connectivity
on all networks on screen on.
Bug: 2129037
Change-Id: I42afc17ddb5cd238e46d7e50f1b6e708e107b35d
Make some of the common driver commands scan/disconnect/reconnect/reassociate
asynchronous. We already have broadcasts to indicate results.
Change-Id: I343c6be077fb11a3d488e586ab10ab2373b269d8
Add extension to WifiLock to allow apps to operate
in high performance mode (high power & disable suspend
optimizations for battery consumption).
Bug: 2834260
Change-Id: I8b33d307f3d569bc92ba2139b9ed224ffc147547
Also, removed some unused NetworkStateTracker event codes.
The API change was to add context and target to startMonitor, this makes
it easier to document what the actual interface contract is.
Change-Id: If9b52486c3c281fe4794bc78417c8b03888414b1
Merge commit 'e300b8c10c306b575bbbec29d5572ba92a97785e' into gingerbread-plus-aosp
* commit 'e300b8c10c306b575bbbec29d5572ba92a97785e':
DO NOT MERGE Always set/remove default routes.
Must clean up default route if a default 3g connection is replaced
by a non-default (ie, mms) connection on teh same interface.
Also stop mucking with all connections dns and routes - do it only
for the connection that has changed.
bug:2865974
Change-Id: Ifdf49080fa0413a4d826813706c809975a562dfa
When the driver was configured to run with power save mode disabled the
power save mode incorrectly got reverted back to AUTO mode right after
DHCP response. The power save mode value is now saved so that the device
properly reverts back to a previous mode after DHCP response.
Change-Id: Ie68cd107872d233bf422e24130a1eb9f6432db91
Bug: 2834260
Add asynchronous API for simplified connect, save
and remove.
Add a SUPPLICANT_CONFIG_CHANGED_ACTION broadcast to
notifiy a supplicant configuration change.
Change-Id: I69ae116246094de4a469cb2af5baf37e5ad4d6dd
If the supplicant events are lost even before connection,
we stay stuck without doing IP address.
The earlier implementation used polling at connection to handle
this case.
A disconnect after connection handles this cleanly.
Bug: 2876987
Change-Id: I7509c5f332f87b91e1ff8438cf859a0e49df2e6d
Fix an issue where checking for system ready status
for sticky broadcasts can lead to boot up with wifi
turned on and settings showing incorrect status.
Bug: 2876746
Change-Id: Iae39855c255513e28a13bd819b3d14d81fbaba43
Used as a bag to hold ipaddr, gateway, dns, proxy info.
addr's are InetAddresses for v4/v6 use. Cleaning up some old v4-only code
bug:2655015
Change-Id: I7ac886fe5c519e8bab42f49cd82a5189d9c9ab59