1705 Commits

Author SHA1 Message Date
Dianne Hackborn
03abb8179f Kill the task killers.
The ActivityManager.restartPackage() API is now deprecated, and no longer
allows applications to mess up the state of other applications.  This was
being abused by task killers, causing users to think their other applications
had bugs.

A new API is introduced for task killers,
ActivityManager.killBackgroundProcesses(), which allows these applications
to kill processes but only the same amount that the out of memory
killer does, thus causing no permanent damage.  The old restartPackage()
API is now a wrapper for calling this new API.

There is also a new private forceStopPackage() API that is used for the
system's force stop UI which does what the old restartPackage() API did.
2010-01-05 15:47:05 -08:00
San Mehat
7fd0fee968 services: MountService: Refactor MountService for vold2
Squash of the following:
services: MountService: Rework the way volume states are handled
MountService: Add new API for directly getting volume state via a mount point
Environment: Switch from using system property for external storage state.
MountService: Add support for UMS
MountService: Fix a few bugs
services: MountService: Add support for mount-on-insertion
services: MountService: Add some debugging around UMS
services: MountService: Fix some UMS bugs and clean-up startup mount code

Signed-off-by: San Mehat <san@google.com>
2010-01-02 07:24:07 -08:00
Brad Larson
8eb3ea6597 Use isLocationProviderEnabled to test for enabled providers
LocationManagerService was just checking if the string of (comma-separated)
Location Providers contained the provider we were interested in.  This works
fine in normal cases, but breaks if we add a provider such as test_network.
Enabling test_network causes LocationManagerService to think that the network
provider is also enabled.

The code in Settings.Secure.isLocationProviderEnabled() checks for the commas
in the string as well, to make sure that a provider name which is a substring
of another provider name won't cause problems.  It also centralizes the code
which reads the string.

Signed-off-by: Brad Larson <brad.larson@garmin.com>
2009-12-30 10:22:35 -05:00
Android (Google) Code Review
76032b7f16 Merge change I92a824fe
* changes:
  Immediately close the shade when the status bar is disabled.
2009-12-26 20:39:44 -08:00
Daniel Sandler
af5e9de9fd Immediately close the shade when the status bar is disabled.
This provides a quick fix for http://b/2298803 (if the
in-call UI comes up while the user is holding the
windowshade, the shade sticks in place and the display
becomes unresponsive).

(NB: The shade disappears immediately when the status bar is
disabled. It might be better for the shade to animate
closed; indeed, this seems to be what the code was trying to
do, but an unfortunate interaction of the animation and
touch-handling code is what caused this bug in the first
place.)

Change-Id: I92a824fe385c8d6e51993be1657b492e580f1e7b
2009-12-23 14:47:18 -06:00
Christopher Tate
dfa47b56e1 Don't crash the system process when a backup transport unregisters
Bug: 2342503
2009-12-22 16:01:32 -08:00
Android (Google) Code Review
233d316553 Merge change Ib9285359
* changes:
  Add bugreport info about network feature use.
2009-12-22 10:51:51 -08:00
Tom Taylor
f0108cda21 resolved conflicts for merge of ad2fa35d to master
Change-Id: Ia4362cd48ac0689b91003943a4cd9660da72ff90
2009-12-22 10:11:55 -08:00
Dianne Hackborn
c59411b176 Rework activity manager debug dumps.
Change how we do debug dumps from the activity manager to make
everything go through the activity manager interface (no more
secondary interfaces), and use the command line arguments to
control what gets dumped.

The output from dumpsys without args still dumps everything.

When just dumping the activity service, we now dump a subset
of all of the am state that is interesting without being
overwhelming.

You can use "dumpsys activity -h" to get help with other things
that can be dumped.
2009-12-21 20:20:59 -08:00
Robert Greenwalt
b928535902 Add bugreport info about network feature use.
We've had a couple bug reports showing the effects of a left-live feature request.
We need a bit more bugreport-time logging.

bug: 2323226
2009-12-21 18:24:07 -08:00
Dianne Hackborn
6cf67faf3b Fix issue #2329765: Activities are not being immediately stopped.
This was caused by the launchers new hidden surface on top.  The
algorithm for determining whether an activity was visible assumed
that all windows would want to be visible.  Now it ignores ones that
have explicitly requested to be hidden.
2009-12-21 16:57:11 -08:00
Android (Google) Code Review
33b13e34e3 Merge change Ide2606dc
* changes:
  Don't perform app transition of the app is not currently visible.
2009-12-21 16:51:08 -08:00
Dan Egnor
60d8762413 DropBox logging of app & system server crashes.
The crashes are also reported to the event log (and of course the
main logcat, like they always have been).  Ordinary Log.e(t,m,e) isn't dropboxed
but there's a new Log.wtf() which always is.  (Still @pending in this change.)

Add a hook to IPowerManager to crash the system server on demand
(only for apps with REBOOT permission, since it's basically a restart).
This is not exposed in PowerManager, must be invoked directly -- mostly
this is there so "Bad Behavior" in dev tools can do it.
2009-12-21 16:03:19 -08:00
Tom Taylor
ad2fa35d88 am d4a4729c: Update imports to android-common
Merge commit 'd4a4729c0cac582a2dcec7c8cfb316b81885a0f0' into eclair-mr2-plus-aosp

* commit 'd4a4729c0cac582a2dcec7c8cfb316b81885a0f0':
  Update imports to android-common
2009-12-21 15:44:34 -08:00
Dianne Hackborn
de2606dcd3 Don't perform app transition of the app is not currently visible.
Yet more special casing for the window manager...  try really hard,
if we are performing an activity transition that is behind an
opaque window (like say the lock screen or status bar) to just not
do it.  And, just as important, do a reasonable transition away from
whatever is on top.

Examples:

- If the lock screen is up, and you get a call or press the
  emergency dialer button, we fade from the lock screen to the
  new UI, instead of fading to the animation going on between
  the old and new.

- If you are in something hiding the lock screen, like the
  in-call screen, and that is hidden, then fade back to the
  lock screen.

- If you select an item from the status bar, then have the
  new item displayed behind it as the status bar rolls up
  rather than seeing a second animation.  (In fact this can't
  always be done because we may not start the transition to
  the new thing until the status bar is already going away.
  But for most cases we can do this with just one anim.)
2009-12-21 15:26:51 -08:00
Tom Taylor
d4a4729c0c Update imports to android-common
Several files were moved to android-common. Update all the references
to import those files from the new location.
2009-12-21 13:59:18 -08:00
Dianne Hackborn
c4c450c379 am 47c38f00: am 558947c9: Issue #2335763: Cant dial emergency number on my device
Merge commit '47c38f00ab464a8fdb6ae2d819ae189c17b72410'

* commit '47c38f00ab464a8fdb6ae2d819ae189c17b72410':
  Issue #2335763: Cant dial emergency number on my device
2009-12-18 16:14:34 -08:00
Dianne Hackborn
47c38f00ab am 558947c9: Issue #2335763: Cant dial emergency number on my device
Merge commit '558947c9899627067d632e8a6365f77a35f433e1' into eclair-plus-aosp

* commit '558947c9899627067d632e8a6365f77a35f433e1':
  Issue #2335763: Cant dial emergency number on my device
2009-12-18 16:11:08 -08:00
Dianne Hackborn
558947c989 Issue #2335763: Cant dial emergency number on my device
This may fix the issue, but we have no repro steps so no way to
make sure.

What appeared to be going on was that the emergency dialer was
created, but still had the starting preview window above it.  We
were stuck in this state because the preview window didn't have
the "hide lock screen" flag set, so the lock screen would never
be removed, and thus we would never take care of finishing the
show of the emergency dialer (because it was not visible) and
thus not remove the starting window.

The solution here is to simply propagate the lock flags up to the
starting window.

Change-Id: I6da9f6494537f0661d9d230664ebf745c293ea7d
2009-12-18 16:05:57 -08:00
Robert Greenwalt
41c5617813 am 24317443: am 421c72b6: Cleanup of process-specific DNS.
Merge commit '24317443fde973c762afbea1a3f6f2c830dfe3dd'

* commit '24317443fde973c762afbea1a3f6f2c830dfe3dd':
  Cleanup of process-specific DNS.
2009-12-18 14:37:28 -08:00
Robert Greenwalt
24317443fd am 421c72b6: Cleanup of process-specific DNS.
Merge commit '421c72b6773582dd1473ace44c42d4e0ee1287e3' into eclair-mr2-plus-aosp

* commit '421c72b6773582dd1473ace44c42d4e0ee1287e3':
  Cleanup of process-specific DNS.
2009-12-18 14:33:55 -08:00
Robert Greenwalt
421c72b677 Cleanup of process-specific DNS.
Removes entries sooner.  A bug.
Doesn't add one for phone process at all.  This was intended to be removed long ago.

bug: 2329900
2009-12-18 11:57:52 -08:00
Dianne Hackborn
dd71fc8bae Rework the LRU list for hidden and empty processes.
This is intended to solve a problem on devices with more memory
where we can fill up that memory with processes that contain activities
(hidden processes), leaving no room for empty processes.  Thus if a
process is receiving broadcasts regularly, or starting and stopping
a service, or such, we will continually create its process only to
have it immediately killed when done.

There is certainly some tuning that should be done on this as we
look at the actually behavior.  The implementation here puts all of
the hidden and empty processes into one list, trying to make some
preferences for the very most recently used activity's processes to
stay at the top and not get pushed out by other processes being
started in the background.
2009-12-17 16:03:49 -08:00
Christopher Tate
e3ab4d0f18 Restore live wallpapers if specified in the restore data 2009-12-16 14:03:31 -08:00
Romain Guy
089e36f96e Bump ViewServer version number from 2 to 3 2009-12-14 18:54:33 -08:00
Romain Guy
236092a362 Fixes crash in HierarchyViewer when windows hash code exceed int capacity.
Bug: 2321018
2009-12-14 16:20:01 -08:00
Dianne Hackborn
74a76d5e07 am 83652ebf: am 3a3fd2ba: Merge change Iaf1f0918 into eclair-mr2
Merge commit '83652ebfe1963bcecdcf24383165904223baca6e'

* commit '83652ebfe1963bcecdcf24383165904223baca6e':
  Implement API to have new broadcasts replace existing broadcasts.
2009-12-14 16:15:03 -08:00
Dianne Hackborn
83652ebfe1 am 3a3fd2ba: Merge change Iaf1f0918 into eclair-mr2
Merge commit '3a3fd2ba1ffc6171725375396cc59711a34bb39e' into eclair-mr2-plus-aosp

* commit '3a3fd2ba1ffc6171725375396cc59711a34bb39e':
  Implement API to have new broadcasts replace existing broadcasts.
2009-12-14 16:10:13 -08:00
Eric Laurent
64c6902c1b am 2cb1fe2f: am 59e03a0a: am da4cc343: Fix issue 2324029: In-call (and other) audio screwed up after using Pandora (ERD72).
Merge commit '2cb1fe2f407d438544efd497e2cfbda1f6d58d75'

* commit '2cb1fe2f407d438544efd497e2cfbda1f6d58d75':
  Fix issue 2324029: In-call (and other) audio screwed up after using Pandora (ERD72).
2009-12-14 15:34:28 -08:00
Eric Laurent
2cb1fe2f40 am 59e03a0a: am da4cc343: Fix issue 2324029: In-call (and other) audio screwed up after using Pandora (ERD72).
Merge commit '59e03a0a4d62f214cf5cfab49f16223f89670f2a' into eclair-mr2-plus-aosp

* commit '59e03a0a4d62f214cf5cfab49f16223f89670f2a':
  Fix issue 2324029: In-call (and other) audio screwed up after using Pandora (ERD72).
2009-12-14 15:26:41 -08:00
Dianne Hackborn
1c633fc89b Implement API to have new broadcasts replace existing broadcasts.
Use this in various places where it should serve no purpose to deliver
both broadcasts.  This is intended to reduce somewhat the flurry of
broadcasts that we churn through during boot.
2009-12-14 15:03:35 -08:00
Eric Laurent
2685607d59 am da4cc343: Fix issue 2324029: In-call (and other) audio screwed up after using Pandora (ERD72).
Merge commit 'da4cc34308d65730c404b669926a92e37b378555' into eclair-plus-aosp

* commit 'da4cc34308d65730c404b669926a92e37b378555':
  Fix issue 2324029: In-call (and other) audio screwed up after using Pandora (ERD72).
2009-12-14 11:57:42 -08:00
Eric Laurent
59e03a0a4d am da4cc343: Fix issue 2324029: In-call (and other) audio screwed up after using Pandora (ERD72).
Merge commit 'da4cc34308d65730c404b669926a92e37b378555' into eclair-mr2

* commit 'da4cc34308d65730c404b669926a92e37b378555':
  Fix issue 2324029: In-call (and other) audio screwed up after using Pandora (ERD72).
2009-12-14 11:57:24 -08:00
Eric Laurent
da4cc34308 Fix issue 2324029: In-call (and other) audio screwed up after using Pandora (ERD72).
The problem is due to spurious headset connection indications received from event observer when a 3.5mm headset w/o mic is connected.
In this particular case, The HeadsetObserver first received a valid indication of headset with mic connection, followed by a headset with mic disconnection and finally a headset w/o mic connection.
The HeadsetObserver delays the headset disconnection intent to leave time to music app to pause music before the output path is switched.
As the last headset w/o mic connection indication is received from the event observer before the intent corresponding to the spurious headset with mic disconnection is broadcast, the later is discarded. Results a state where the headset with mic is always considered as connected.

The fix consists in not canceling pending intents when a new headset state is received and carrying the HeadsetObserver state with the delayed message triggering the broacast of the disconnection intent.
2009-12-14 03:45:41 -08:00
Dianne Hackborn
b672b6b991 am 6a6f43f5: am 8091424e: am 9b52a218: Fix #2269582 Sometimes camera preview screen is truncated
Merge commit '6a6f43f577c6cb22202ee86fb3c6d1601f36c3b5'

* commit '6a6f43f577c6cb22202ee86fb3c6d1601f36c3b5':
  Fix #2269582 Sometimes camera preview screen is truncated
2009-12-13 12:41:53 -08:00
Dianne Hackborn
bd2e6de7e3 am c1e6b91d: am c9ca93fb: am 474731d5: Merge change I2ffe306f into eclair
Merge commit 'c1e6b91d75ce1dd5e8cc23aaf49c84d32f1bf673'

* commit 'c1e6b91d75ce1dd5e8cc23aaf49c84d32f1bf673':
  Fix issue #2304284: contacts/dialer/recentcalls constantly flashing
2009-12-13 12:41:43 -08:00
Dianne Hackborn
6a6f43f577 am 8091424e: am 9b52a218: Fix #2269582 Sometimes camera preview screen is truncated
Merge commit '8091424ea332f754e6f1c712a9e28bfa7d02741e' into eclair-mr2-plus-aosp

* commit '8091424ea332f754e6f1c712a9e28bfa7d02741e':
  Fix #2269582 Sometimes camera preview screen is truncated
2009-12-13 12:34:18 -08:00
Dianne Hackborn
c1e6b91d75 am c9ca93fb: am 474731d5: Merge change I2ffe306f into eclair
Merge commit 'c9ca93fbf9ff49ca4b74c4ec72d3f7580b3b7659' into eclair-mr2-plus-aosp

* commit 'c9ca93fbf9ff49ca4b74c4ec72d3f7580b3b7659':
  Fix issue #2304284: contacts/dialer/recentcalls constantly flashing
2009-12-13 12:34:09 -08:00
Dianne Hackborn
8091424ea3 am 9b52a218: Fix #2269582 Sometimes camera preview screen is truncated
Merge commit '9b52a2184e99565bcd7f77effb321c95a2a4837e' into eclair-mr2

* commit '9b52a2184e99565bcd7f77effb321c95a2a4837e':
  Fix #2269582 Sometimes camera preview screen is truncated
2009-12-13 12:25:10 -08:00
Dianne Hackborn
c9ca93fbf9 am 474731d5: Merge change I2ffe306f into eclair
Merge commit '474731d5efb30c1e9184f998610054747eb8e764' into eclair-mr2

* commit '474731d5efb30c1e9184f998610054747eb8e764':
  Fix issue #2304284: contacts/dialer/recentcalls constantly flashing
2009-12-13 12:25:00 -08:00
Dianne Hackborn
7a7c95ea25 am 9b52a218: Fix #2269582 Sometimes camera preview screen is truncated
Merge commit '9b52a2184e99565bcd7f77effb321c95a2a4837e' into eclair-plus-aosp

* commit '9b52a2184e99565bcd7f77effb321c95a2a4837e':
  Fix #2269582 Sometimes camera preview screen is truncated
2009-12-11 18:56:47 -08:00
Dianne Hackborn
9b52a2184e Fix #2269582 Sometimes camera preview screen is truncated
There were a few places in the window manager where we wouldn't cause
a layout after making a window visible.  This would leave it using
whatever size and position it last have since we don't layout windows
when they are not visible.

Also includes a little part I missed in the security issue that
allowed wallpapers to see input on the lock screen.

Change-Id: Icd7e037ad9a67ac936bc7039d87ed68f49502d73
2009-12-11 18:35:07 -08:00
Dianne Hackborn
e9b86b5421 am 474731d5: Merge change I2ffe306f into eclair
Merge commit '474731d5efb30c1e9184f998610054747eb8e764' into eclair-plus-aosp

* commit '474731d5efb30c1e9184f998610054747eb8e764':
  Fix issue #2304284: contacts/dialer/recentcalls constantly flashing
2009-12-11 18:28:45 -08:00
Android (Google) Code Review
474731d5ef Merge change I2ffe306f into eclair
* changes:
  Fix issue #2304284: contacts/dialer/recentcalls constantly flashing
2009-12-11 18:25:21 -08:00
Dianne Hackborn
871ecdce67 Fix issue #2304284: contacts/dialer/recentcalls constantly flashing
Make sure the application is always given the most recent configuration
when launcher.  Use the current configuration, instead of whatever happens
to be set by the app, for reporting what it was launched with.

Change-Id: I2ffe306f56cc9092b640546dd0a28d2c29b9c0b3
2009-12-11 15:24:33 -08:00
Dan Egnor
d021302134 resolved conflicts for merge of f6bb01b0 to master 2009-12-11 14:55:24 -08:00
Dan Egnor
f6bb01b0d8 am b7f0367c: Eliminate CrashData and friends.
Merge commit 'b7f0367cec1c744aa66ef397b0244e25d507491c' into eclair-mr2-plus-aosp

* commit 'b7f0367cec1c744aa66ef397b0244e25d507491c':
  Eliminate CrashData and friends.
2009-12-11 14:32:40 -08:00
Dan Egnor
b7f0367cec Eliminate CrashData and friends.
(CrashData was a custom-marshalled crash-info class used for a server crash
reporting system I am deprecating).  Use ApplicationErrorReport.CrashInfo
instead to report crash details (mostly the stack trace) from RuntimeInfo to
ActivityManagerService, since we're likely to need the crash information in
that form anyway.

Remove the (long-disabled) flags and support for the "Debug" button
in the crash dialog.

Further gut the ICheckinService interface by removing the crash-reporting
APIs (and everything that calls them), plus the synchronous checkin()
method (which has been stubbed out for a while now).

A new dropbox-based crash reporting system is in the works, but not part
of this change.
2009-12-11 13:27:04 -08:00
Christopher Tate
07c71147dd am 09f82ec6: am af1255da: resolved conflicts for merge of 2624fbca to eclair-mr2
Merge commit '09f82ec61cca00bd8b08529a94139dd6ac5cec73'

* commit '09f82ec61cca00bd8b08529a94139dd6ac5cec73':
  Fix #2320798: Device hang then runtime restart
2009-12-11 13:26:05 -08:00
Christopher Tate
09f82ec61c am af1255da: resolved conflicts for merge of 2624fbca to eclair-mr2
Merge commit 'af1255dab8fa3eab1caf9bae799f80de14a74470' into eclair-mr2-plus-aosp

* commit 'af1255dab8fa3eab1caf9bae799f80de14a74470':
  Fix #2320798: Device hang then runtime restart
2009-12-11 13:20:15 -08:00