2709 Commits

Author SHA1 Message Date
Dianne Hackborn
801700b1a2 am 57f4503e: 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
2010-06-17 18:43:31 -07:00
Dianne Hackborn
57f4503e1a 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
2010-06-17 15:49:33 -07:00
Jeff Brown
5c225b1680 Even more native input dispatch work in progress.
Added more tests.
Fixed a regression in Vector.
Fixed bugs in pointer tracking.
Fixed a starvation issue in PollLoop when setting or removing callbacks.
Fixed a couple of policy nits.

Modified the internal representation of MotionEvent to be more
efficient and more consistent.

Added code to skip/cancel virtual key processing when there are multiple
pointers down.  This helps to better disambiguate virtual key presses
from stray touches (such as cheek presses).

Change-Id: I2a7d2cce0195afb9125b23378baa94fd2fc6671c
2010-06-17 13:27:16 -07:00
Dianne Hackborn
6b7b484521 Various improvements to battery stats collection
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
2010-06-16 18:31:42 -07:00
Jeff Brown
92266a7894 Merge "More work in progress on native events." into gingerbread 2010-06-15 16:44:23 -07:00
Jeff Brown
9c3cda04d9 More work in progress on native events.
Refactored the code to eliminate potential deadlocks due to re-entrant
calls from the policy into the dispatcher.  Also added some plumbing
that will be used to notify the framework about ANRs.

Change-Id: Iba7a10de0cb3c56cd7520d6ce716db52fdcc94ff
2010-06-15 16:43:18 -07:00
Brad Fitzpatrick
143666f0ca StrictMode: implement the log-to-DropBox option
Change-Id: I51d12e264155078f953028241f8c5cbdc47262e8
2010-06-14 13:38:01 -07:00
Jeff Brown
7c8aa44f32 am 46b9ac0a: Native input dispatch rewrite work in progress.
Merge commit '46b9ac0ae2162309774a7478cd9d4e578747bfc2' into gingerbread

* commit '46b9ac0ae2162309774a7478cd9d4e578747bfc2':
  Native input dispatch rewrite work in progress.
2010-06-13 17:55:28 -07:00
Jeff Brown
46b9ac0ae2 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
2010-06-13 17:42:16 -07:00
Brad Fitzpatrick
46d4238746 More StrictMode work, handling violations in ActivityManagerService.
Also starts to do duplicate-suppression.

Change-Id: I0502f6ab6c45fa319298de4874ecfe44b7829d21
2010-06-11 16:11:26 -07:00
Irfan Sheriff
afadc8b4e1 Dont persist config on failure
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
2010-06-11 14:43:14 -07:00
Dianne Hackborn
32907cfb38 Adjust activity manager process OOM adj.
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
2010-06-11 10:39:11 -07:00
Mike Lockwood
4001120e45 am f4a502a2: Merge "Don\'t adjust lights if screen or button brightness is changed when the screen is off." into froyo
Merge commit 'f4a502a235e9f9ea0bcd2d5ca4981dc6e1a619c4' into kraken

* commit 'f4a502a235e9f9ea0bcd2d5ca4981dc6e1a619c4':
  Don't adjust lights if screen or button brightness is changed when the screen is off.
2010-06-10 15:30:41 -07:00
Mike Lockwood
f4a502a235 Merge "Don't adjust lights if screen or button brightness is changed when the screen is off." into froyo 2010-06-10 15:28:31 -07:00
Brad Fitzpatrick
438d059512 Introduce "StrictMode"
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
2010-06-10 14:38:58 -07:00
Adam Powell
8f1bfb001b am 8f2ca788: Merge "Fix bug 2757693 - Multi-touch coordinates can jump when a finger goes down." into froyo
Merge commit '8f2ca788f369892370477212cf9e7a67721a8c16' into kraken

* commit '8f2ca788f369892370477212cf9e7a67721a8c16':
  Fix bug 2757693 - Multi-touch coordinates can jump when a finger goes down.
2010-06-10 14:13:51 -07:00
Adam Powell
8f2ca788f3 Merge "Fix bug 2757693 - Multi-touch coordinates can jump when a finger goes down." into froyo 2010-06-10 14:09:50 -07:00
Mike Lockwood
f527c715d7 Don't adjust lights if screen or button brightness is changed when the screen is off.
Change-Id: I798a240374c3a739e1f1eaf36fa9fdef8416f2a2
BUG: 2758292

Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-10 14:14:00 -04:00
Nick Kralevich
a2c6d5bf30 do not merge: cherry-picked 929b4855b8208d36272769e8eeaa6cd2823b94c0 from master branch
Change-Id: Ie20371234a531f65f523682a0d0c27394dc30afa
2010-06-10 10:39:42 -07:00
Adam Powell
5cd88cfd23 Fix bug 2757693 - Multi-touch coordinates can jump when a finger goes down.
Change-Id: I26bd54cec739ca8d91d2c2b18b90134f20dbd907
2010-06-09 17:10:04 -07:00
Nick Kralevich
2feafeffb8 Merge "Fix a problem with leaking UDP sockets." into kraken 2010-06-09 14:49:10 -07:00
Joe Onorato
75144ea38e Move the status bar icon list, hopefully for the last time.
Change-Id: Ie495a41dac03e1fe5ddccefcbd2a0673090a6db1
2010-06-09 14:33:31 -07:00
Joe Onorato
f1f259165f Call into the notification manager when the panel is revealed.
This lets it turn off the LED.  However, it seems like somebody broke
the notification LEDs.  GRRR.

Change-Id: I3f7066c2b2e1673dc0144a34cf59946351a647be
2010-06-09 14:33:30 -07:00
Joe Onorato
7a0f36bd93 Move status_bar_latest_event and LatestItemView into SystemUI.apk.
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
2010-06-09 14:33:30 -07:00
Joe Onorato
9e875fcb55 Start the status bar service based on a configuration option, instead of trampolining through
a braodcast receiver.

Change-Id: I6ae0740fea07350b80c35c0ee2d938e0364d773e
2010-06-09 14:33:29 -07:00
Joe Onorato
8bc6c51419 Require the STATUS_BAR_SERVICE permission for something to be the status bar.
Change-Id: I57b2d296e0d0cef0d256ae6697fffc47188d14df
2010-06-09 14:33:23 -07:00
Nick Kralevich
929b4855b8 Fix a problem with leaking UDP sockets.
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
2010-06-09 14:27:43 -07:00
Joe Onorato
005847b03b Handle errors inflating notifications (and their icons).
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
2010-06-09 09:15:25 -07:00
Joe Onorato
bd73d01a9c Cap the number of notifications that a given package can post.
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
2010-06-09 09:15:25 -07:00
Joe Onorato
fe4f3ae33c Move the usb mass storage notification & activity into SystemUI.apk.
Also fix the notification to show properly when the runtime is restarted.

Change-Id: Id0c7ef9f9dc9c9df18428cbaa7db1703f085137e
2010-06-09 09:15:25 -07:00
Jim Miller
3b68548da6 am 75b6a6b9: Merge "Fix 2737842: Disable KeguardManager API if device policy is enabled" into froyo
Merge commit '75b6a6b972e6b18143fd629d3d9c824c442c5f4c' into kraken

* commit '75b6a6b972e6b18143fd629d3d9c824c442c5f4c':
  Fix 2737842: Disable KeguardManager API if device policy is enabled
2010-06-08 16:33:26 -07:00
Jim Miller
284b62e1b8 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
2010-06-08 15:47:52 -07:00
Jim Miller
7d70358a03 am bde25c20: Merge "Fix 2737842: disable keyguard API when device policy is enabled." into froyo
Merge commit 'bde25c207731783a62e3611586fe05cd35add0d9' into kraken

* commit 'bde25c207731783a62e3611586fe05cd35add0d9':
  Fix 2737842: disable keyguard API when device policy is enabled.
2010-06-07 19:25:49 -07:00
Jim Miller
bde25c2077 Merge "Fix 2737842: disable keyguard API when device policy is enabled." into froyo 2010-06-07 19:24:45 -07:00
Jim Miller
d6b5705e18 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
2010-06-07 19:19:29 -07:00
Christopher Tate
8a7fa44fdc am ac24d23c: Merge "Don\'t bring up Launcher until after boot complete" into froyo
Merge commit 'ac24d23cd4a96f38b4e9cb0318a7c298794b9b6a' into kraken

* commit 'ac24d23cd4a96f38b4e9cb0318a7c298794b9b6a':
  Don't bring up Launcher until after boot complete
2010-06-07 18:48:27 -07:00
Christopher Tate
ac24d23cd4 Merge "Don't bring up Launcher until after boot complete" into froyo 2010-06-07 18:46:46 -07:00
Christopher Tate
04c0af8f55 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
2010-06-07 18:35:20 -07:00
Dianne Hackborn
0bc0a46ae8 am d1d9047d: Merge "Fix issue #2749322: addPackageToPreferred throws SecurityException" into froyo
Merge commit 'd1d9047d5c34fb05be08099fa8cd73e4301ee0ff' into kraken

* commit 'd1d9047d5c34fb05be08099fa8cd73e4301ee0ff':
  Fix issue #2749322: addPackageToPreferred throws SecurityException
2010-06-07 18:32:04 -07:00
Dianne Hackborn
d1d9047d5c Merge "Fix issue #2749322: addPackageToPreferred throws SecurityException" into froyo 2010-06-07 17:32:02 -07:00
Dianne Hackborn
8377fc0f36 Fix issue #2749322: addPackageToPreferred throws SecurityException
Change-Id: I96cdc110fd9acca4b6c95d281e819bad1e4557f8
2010-06-07 17:30:57 -07:00
Robert Greenwalt
7db534fac4 am 5a671d03: Cut logging, boost efficiency of ThrottleService
Merge commit '5a671d03e3abe522a761a43b0460f9f3816b14ed' into kraken

* commit '5a671d03e3abe522a761a43b0460f9f3816b14ed':
  Cut logging, boost efficiency of ThrottleService
2010-06-07 16:59:01 -07:00
Robert Greenwalt
5a671d03e3 Cut logging, boost efficiency of ThrottleService
Changed the Alarms to be non-waking.

bug:2748959
bug:2747862
Change-Id: I9e4294162a4fc2f90aed36393b858edcf82aa307
2010-06-07 16:43:16 -07:00
David 'Digit' Turner
e0cbd72b33 Merge "PackageManagerService: always install native binaries from .apk" into kraken 2010-06-07 14:02:38 -07:00
Dianne Hackborn
b7bb3b3df6 Fix bug in reporting a processes's dependent component.
Also add new action to show an app's details.

Change-Id: I6ad3b3ac8462f5acf726ce76130882a262adff92
2010-06-07 11:01:29 -07:00
Christopher Tate
a8ebe8b3f5 am df2e2eff: Merge "Watchdog now records kernel stacks when it fires" into froyo
Merge commit 'df2e2eff9446c0220515fa7aab7857135e04e12e' into kraken

* commit 'df2e2eff9446c0220515fa7aab7857135e04e12e':
  Watchdog now records kernel stacks when it fires
2010-06-06 12:10:08 -07:00
Robert Greenwalt
9c4ed1394b am f9610b38: Merge "Make the DUN apn data secure." into froyo
Merge commit 'f9610b3842e030138c1dc327a3a467aaea02c227' into kraken

* commit 'f9610b3842e030138c1dc327a3a467aaea02c227':
  Make the DUN apn data secure.
2010-06-06 12:10:00 -07:00
Christopher Tate
df2e2eff94 Merge "Watchdog now records kernel stacks when it fires" into froyo 2010-06-04 18:06:07 -07:00
David 'Digit' Turner
6390929174 PackageManagerService: always install native binaries from .apk
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
2010-06-04 16:32:27 -07:00
Robert Greenwalt
f9610b3842 Merge "Make the DUN apn data secure." into froyo 2010-06-04 15:55:09 -07:00