Merge commit '3f704e983e36c668a3a13690655ab809666dfc3e'
* commit '3f704e983e36c668a3a13690655ab809666dfc3e':
Work on issue # 2778549: Idle FRF72 is awake 18 mins more than ERE27 in 13hr test
Merge commit '57f4503e1a129d6a648f2378d36a060998a577a0' into gingerbread
* commit '57f4503e1a129d6a648f2378d36a060998a577a0':
Work on issue # 2778549: Idle FRF72 is awake 18 mins more than ERE27 in 13hr test
Modify UIModeManager to not get location updates every thirty minutes.
Instead it gets one once a day, and requests a new update when airplane
mode is turned off or the time zone changes.
Change-Id: I8044c27b5cd77709e4b872e2e8edd352f23e4af1
We now clear the battery stats when unplugging after the
battery is full. This allows us to use the "total" stats as
a new "since last charged" stat. Total is gone. I never used
it, it was worthless. Since last charged is a lot more
interesting.
The battery history now collects a lot more stats, and keeps
control over how much it can collect. Printing is now more
descriptive.
The kinds of stats have been renamed to SINCE_UNPLUGGED and
SINCE_DISCHARGED. The other two stats are still there, but
no longer printed; a future change will eliminate them
completely along with all of their state.
Change-Id: I4e9fcfcf8c30510092c76a8594f6021e9502fbc1
When the default network goes down we lose the wake-on-incoming-data capability
until the new net is brought up and apps rebuild their connections. We fixed this
in Wifi, but it's a general connectivity issue, not a wifi issue so moving the
mechanism to connecitivty so other networks can use it.
bug:2734419
Change-Id: I39b5d825eb6b548bd9bb8f179b89254f4db53147
When system property "persist.sys.profiler_hz" > 0, SamplingProfilerService is
loaded to SystemServer. It creates a FileObserver, watching any new file in the snapshot
directory. When a snapshot is found, it is put in dropbox and deleted after that.
SamplingProfilerIntegration writes snapshots with headers. Headers are <name, value> pairs,
instantiated by caller.
Currently header format is (also in source comment):
Version: <version number of profiler>\n
Process: <process name>\n
Package: <package name, if exists>\n
Package-Version: <version number of the package, if exists>\n
Build: <fingerprint>\n
\n
<the actual snapshot content begins here...>
BUG=2732642
Change-Id: I2c1699f1728e603de13dbd38f9d8443cd3eecc06
Merge commit '46b9ac0ae2162309774a7478cd9d4e578747bfc2' into gingerbread
* commit '46b9ac0ae2162309774a7478cd9d4e578747bfc2':
Native input dispatch rewrite work in progress.
The old dispatch mechanism has been left in place and continues to
be used by default for now. To enable native input dispatch,
edit the ENABLE_NATIVE_DISPATCH constant in WindowManagerPolicy.
Includes part of the new input event NDK API. Some details TBD.
To wire up input dispatch, as the ViewRoot adds a window to the
window session it receives an InputChannel object as an output
argument. The InputChannel encapsulates the file descriptors for a
shared memory region and two pipe end-points. The ViewRoot then
provides the InputChannel to the InputQueue. Behind the
scenes, InputQueue simply attaches handlers to the native PollLoop object
that underlies the MessageQueue. This way MessageQueue doesn't need
to know anything about input dispatch per-se, it just exposes (in native
code) a PollLoop that other components can use to monitor file descriptor
state changes.
There can be zero or more targets for any given input event. Each
input target is specified by its input channel and some parameters
including flags, an X/Y coordinate offset, and the dispatch timeout.
An input target can request either synchronous dispatch (for foreground apps)
or asynchronous dispatch (fire-and-forget for wallpapers and "outside"
targets). Currently, finding the appropriate input targets for an event
requires a call back into the WindowManagerServer from native code.
In the future this will be refactored to avoid most of these callbacks
except as required to handle pending focus transitions.
End-to-end event dispatch mostly works!
To do: event injection, rate limiting, ANRs, testing, optimization, etc.
Change-Id: I8c36b2b9e0a2d27392040ecda0f51b636456de25
If soft AP bring up does not go through successfully,
dont persist the config. This has the benefit of recovering
from the case where things fail on "=" and "," for SSID since
the IOCTL parsing in driver on broadcom cannot handle it
at this time.
Change-Id: Iaa60fd05972db434500753dcb59092995dab07b1
Modify OOM adj classes a bit, to take into account the new
heavy weight app type, and give "foreground services" their
own category to have a bettery chance to manager them when
things go wrong.
Also add some new code to battery stats to keep a history
of changes to the battery level.
Change-Id: I29f5ab6938777e1a7eafd7d8c38b5e564cc9f96a
Merge commit 'f4a502a235e9f9ea0bcd2d5ca4981dc6e1a619c4' into kraken
* commit 'f4a502a235e9f9ea0bcd2d5ca4981dc6e1a619c4':
Don't adjust lights if screen or button brightness is changed when the screen is off.
This is a new public API for developers to opt-in to strict rules
about what they're allowed to do on certain threads. (this is the
public face of the @hide dalvik.system.BlockGuard, added recently...)
In practice this will be used for developers to opt-in to declaring
that they don't want to be allowed to do various operations (such as
disk I/O or network operations) on their main UI threads. (these
operations are often accidental, or even when they are fast come with
a good chance of being slow or very slow in some cases....)
Implementation wise, this is just a thread-local integer that has a
bitmask of the things that aren't allowed, and more bits for saying
what the violation penalty is. The penalties, of which multiple can
be chosen, include:
* logging
* dropbox uploading for analysis/reporting
* annoying dialog
* full-on crashing
These are all only very roughly implemented at this point, but all
parts now minimally work end-to-end now, so this is a good checkpoint
commit before this gets too large.
Future CLs will polish all the above 4 penalties, including
checksumming of stacktraces and minimizing penalties for duplicate
violations.
Change-Id: Icbe61a2e950119519e7364030b10c3c28d243abe
Add APNType info to notifications so you can tell what's happening. Now, even if a new APN
shares a connection with an already-connected-to- apn type, the new type will get all
the connecting and connected messages on connect and disconnecting/disconnected on disconnect
even though the shared connection remains connected.
Cleaning out the hacks MobileDataStateTracker needed to deal with the old situation.
bug:2226092
Change-Id: Iddd7421d6b91cda7c8405f9c3d5404ac04ef8e42
Then, now that StatusBarManagerService is the only thing in that package,
move it up to the regular services package. (I've been waiting for 4 years
to delete that package!)
Change-Id: If5faf44641319fd19e486d1f4e5bc1c6dfcff3ad
When dealing with any kind of limited operating system resource,
we should ensure that we properly close everything that we
open, rather than relying on the system garbage collector.
Change-Id: Ic71f710eb85ac71a91b7a1215647c75010d37643
On an inflation error, the StatusBarService cleans up, removes / doesn't add
the views, and calls into the StatusBarManagerService, which tells the
NotificationManagerService to remove the notification.
That then calls all the way back into the StatusBarService, but I think being
extra careful is okay. Throughout the status bar, it's all keyed off of the
IBinder key, so if the app comes in with a good notification while we're
cleaning up, we won't lose the new notification or anything like that.
Change-Id: Iea78a637495a8b67810c214b951d5ddb93becacb
Right now the number is 50, just to prevent apps that have gone completely bonkers. I think the limit should be lower.
Change-Id: Ib2c4abf669c8b0250e5421b6d5aeb81aeb2f82ce