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.
Merge commit 'f4a502a235e9f9ea0bcd2d5ca4981dc6e1a619c4' into froyo-plus-aosp
* 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
Merge commit 'a2c6d5bf308181c019ade0aac6d25fe33dc3d76c' into froyo-plus-aosp
* commit 'a2c6d5bf308181c019ade0aac6d25fe33dc3d76c':
do not merge: cherry-picked 929b4855b8208d36272769e8eeaa6cd2823b94c0 from master branch
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
Merge commit '75b6a6b972e6b18143fd629d3d9c824c442c5f4c' into kraken
* commit '75b6a6b972e6b18143fd629d3d9c824c442c5f4c':
Fix 2737842: Disable KeguardManager API if device policy is enabled
Merge commit '75b6a6b972e6b18143fd629d3d9c824c442c5f4c' into froyo-plus-aosp
* commit '75b6a6b972e6b18143fd629d3d9c824c442c5f4c':
Fix 2737842: Disable KeguardManager API if device policy is enabled
This change adds notification to find out when the device policy
has changed. When an admin adds or changes a policy, we get notified
and reset the state of keyguard to be enabled.
It also moves disabling keyguard into the TokenWatcher.acquired()
method to avoid disabling keyguard when a policy doesn't permit it.
This avoids reference counting issues in TokenWatcher and hence relieves
the ordering issue.
There is one remaining caveat. An application that uses KeyguardManager
to disable keyguard will need to disable keyguard again after any
policy change.
Tested:
Install and run app that disables keyguard with no admin. Result: keyguard is enabled/disabled as expected.
Enable admin and set quality = "something" after installing & running app. Result: keyguard is enabled.
Change admin password quality to "unspecified" and re-run app (per caveat). Result: keyguard is disabled.
Change admin password quality to "something" again. Result: keyguard is enabled.
Disable admin : Result: keyguard is enabled until app runs again (per caveat).
Added minor cosmetic changes after review.
Change-Id: I302f2b01446bf031f746b0f3e8b5fd7a6cc0e648
Merge commit 'bde25c207731783a62e3611586fe05cd35add0d9' into froyo-plus-aosp
* commit 'bde25c207731783a62e3611586fe05cd35add0d9':
Fix 2737842: disable keyguard API when device policy is enabled.
Merge commit 'bde25c207731783a62e3611586fe05cd35add0d9' into kraken
* commit 'bde25c207731783a62e3611586fe05cd35add0d9':
Fix 2737842: disable keyguard API when device policy is enabled.
This fix disables KeyguardManager's enable/disable API when any
device policy admin requests a policy that enforces a password.
Change-Id: Idb1da16b14ed8963142f7b1f62d2b060d84ffa65
Merge commit 'ac24d23cd4a96f38b4e9cb0318a7c298794b9b6a' into froyo-plus-aosp
* commit 'ac24d23cd4a96f38b4e9cb0318a7c298794b9b6a':
Don't bring up Launcher until after boot complete
Merge commit 'ac24d23cd4a96f38b4e9cb0318a7c298794b9b6a' into kraken
* commit 'ac24d23cd4a96f38b4e9cb0318a7c298794b9b6a':
Don't bring up Launcher until after boot complete
The preboot upgrade handling was bringing up the acore process with a default
application object, then the normal "start the HOME app" code was bringing up
Launcher2 [hosted in acore] in anticipation of boot completion... but then it
saw that the host process was alive and continued with Launcher2's init.
Launcher2 depends on a custom application object, however, so it crashed
immediately.
This change ensures that the HOME app is not actually initted at that level
until after boot has completed, at which point its proper application class
can be instantiated.
Fixes bug #2732250
Change-Id: I1a15384e2c0d50e14300df0c0db236bd7b1a187c
Merge commit 'df2e2eff9446c0220515fa7aab7857135e04e12e' into kraken
* commit 'df2e2eff9446c0220515fa7aab7857135e04e12e':
Watchdog now records kernel stacks when it fires
Merge commit 'df2e2eff9446c0220515fa7aab7857135e04e12e' into froyo-plus-aosp
* commit 'df2e2eff9446c0220515fa7aab7857135e04e12e':
Watchdog now records kernel stacks when it fires
The previous implementation fails to work properly when the .apk
and installed versions of the binaries have the same size and date.
Change-Id: I296e34505ab4f0af028de5bcff7a83969f160ec1
Merge commit 'f9610b3842e030138c1dc327a3a467aaea02c227' into froyo-plus-aosp
* commit 'f9610b3842e030138c1dc327a3a467aaea02c227':
Make the DUN apn data secure.