451 Commits

Author SHA1 Message Date
Jeff Brown
3b2b354ec1 Add support for secure system overlays.
Manual merge from Gingerbread.

This change adds a new window type for secure system overlays
created by the system itself from non-secure system overlays that
might be created by applications that have the system alert permission.
Secure views ignore the presence of secure system overlays.

Bug: 3098519
Change-Id: Id876736fd8bf332ff9a5428bde59f5268aa49c3a
2010-10-15 17:10:55 -07:00
Dianne Hackborn
912932c2d9 am 4ce930da: am 259c8499: Merge "Fix issue #3089800: adb shell am -W causes ActivityManager crash" into gingerbread
Merge commit '4ce930da993c778c8b75da61a9ee3793f9aa84ea'

* commit '4ce930da993c778c8b75da61a9ee3793f9aa84ea':
  Fix issue #3089800: adb shell am -W causes ActivityManager crash
2010-10-14 21:19:20 -07:00
Dianne Hackborn
4ce930da99 am 259c8499: Merge "Fix issue #3089800: adb shell am -W causes ActivityManager crash" into gingerbread
Merge commit '259c849989ccd30b0bb4569d11f125ed2c0c1911' into gingerbread-plus-aosp

* commit '259c849989ccd30b0bb4569d11f125ed2c0c1911':
  Fix issue #3089800: adb shell am -W causes ActivityManager crash
2010-10-12 19:08:49 -07:00
Dianne Hackborn
ba0492d5ed Fix issue #3089800: adb shell am -W causes ActivityManager crash
Change-Id: I5508afeb523d84e552117f94c8b70e2bae2c33fa
2010-10-12 19:01:46 -07:00
Jean-Baptiste Queru
76f8688e9b am 779d1778: am bd1454f5: Merge "Include debugger connection status in error entry"
Merge commit '779d1778b6147ee1b57428af234d1498a26f031e'

* commit '779d1778b6147ee1b57428af234d1498a26f031e':
  Include debugger connection status in error entry
2010-10-11 17:49:28 -07:00
Jean-Baptiste Queru
779d1778b6 am bd1454f5: Merge "Include debugger connection status in error entry"
Merge commit 'bd1454f5005619b69d887fee6a7a4891b3323d18' into gingerbread-plus-aosp

* commit 'bd1454f5005619b69d887fee6a7a4891b3323d18':
  Include debugger connection status in error entry
2010-10-10 17:00:59 -07:00
Dianne Hackborn
fa9921e4bc am e89bf502: am ef083ec0: Merge "Work on issue #3062691: GPS enable bypass via com.android.settings.widget.SettingsAppWidgetProvider" into gingerbread
Merge commit 'e89bf50261902bf263887923bf95595ec8eae069'

* commit 'e89bf50261902bf263887923bf95595ec8eae069':
  Work on issue #3062691: GPS enable bypass via com.android.settings.widget.SettingsAppWidgetProvider
2010-10-08 17:57:35 -07:00
Dianne Hackborn
a1b0d6966e resolved conflicts for merge of efa4f7f8 to master
Change-Id: I00dff76594326a6f6e69515a9cba673602ed269d
2010-10-08 11:09:38 -07:00
Dianne Hackborn
e89bf50261 am ef083ec0: Merge "Work on issue #3062691: GPS enable bypass via com.android.settings.widget.SettingsAppWidgetProvider" into gingerbread
Merge commit 'ef083ec008a3ec69180340912e7f0137472c97d9' into gingerbread-plus-aosp

* commit 'ef083ec008a3ec69180340912e7f0137472c97d9':
  Work on issue #3062691: GPS enable bypass via com.android.settings.widget.SettingsAppWidgetProvider
2010-10-07 07:15:57 -07:00
Dianne Hackborn
72b526a13c am cb9f1e4d: am 6f7e10ca: Merge "Make it easier to figure out whether an app can go on sd card." into gingerbread
Merge commit 'cb9f1e4d30ab4f9203e30abe807cbe33d07db4a0'

* commit 'cb9f1e4d30ab4f9203e30abe807cbe33d07db4a0':
  Make it easier to figure out whether an app can go on sd card.
2010-10-06 17:08:15 -07:00
Dianne Hackborn
043fcd9847 Work on issue #3062691: GPS enable bypass via com.android.settings.widget.SettingsAppWidgetProvider
Exposes an Intent I need (okay it fixes an unrelated thing in the power widget),
and fixes some dump output.

Change-Id: I51d6c93a6ac879bab64e9d5aa21129e2bbcd461b
2010-10-06 14:27:34 -07:00
Dianne Hackborn
efa4f7f87d am 4e6baf24: Merge "Fix issue #3001368: API REVIEW: android.app.Activity" into gingerbread
Merge commit '4e6baf2473e522e6d53afa01348c564148bfbad7' into gingerbread-plus-aosp

* commit '4e6baf2473e522e6d53afa01348c564148bfbad7':
  Fix issue #3001368: API REVIEW: android.app.Activity
2010-10-05 18:59:57 -07:00
Dianne Hackborn
3c4c2b7e6f Fix issue #3001368: API REVIEW: android.app.Activity
Bye bye, lots of junk.

Change-Id: Idd72fc525851277362b2a1ff3bb0f7865fe655fd
2010-10-05 18:07:54 -07:00
Dianne Hackborn
90f4aafa33 Implement permission granting in clipboard.
Change-Id: I9a7a949d1aaf4b3beabceaf807fb7d3b040e4ea8
2010-10-05 14:09:08 -07:00
Dianne Hackborn
cb9f1e4d30 am 6f7e10ca: Merge "Make it easier to figure out whether an app can go on sd card." into gingerbread
Merge commit '6f7e10ca0aa869c4b3ed4c37e56cf9d471fd9283' into gingerbread-plus-aosp

* commit '6f7e10ca0aa869c4b3ed4c37e56cf9d471fd9283':
  Make it easier to figure out whether an app can go on sd card.
2010-10-04 23:04:53 -07:00
Dianne Hackborn
54e570f78b Make it easier to figure out whether an app can go on sd card.
Change-Id: I9195a0881b2c435b138f39c2ab1505dc820caf10
2010-10-04 18:35:10 -07:00
Dianne Hackborn
dc71b9e4d6 resolved conflicts for merge of 6a3eddb4 to master
Change-Id: I1ca1d100274d4a733ef2bf58b0d5d7217b4f858e
2010-09-30 20:34:34 -07:00
Dianne Hackborn
6a3eddb469 am 0a69f597: Merge "Rub in a little \'ol log-b-gone." into gingerbread
Merge commit '0a69f597604254bc37721b135ab612eaacdd0cbd' into gingerbread-plus-aosp

* commit '0a69f597604254bc37721b135ab612eaacdd0cbd':
  Rub in a little 'ol log-b-gone.
2010-09-30 19:12:11 -07:00
Dianne Hackborn
cef65eeb03 Rub in a little 'ol log-b-gone.
Mmmmmm...  great fresh scent!

Change-Id: I050e70b31b5d4a9c6731f15a4b51a3620a33a78d
2010-09-30 18:27:22 -07:00
Jaikumar Ganesh
3f03496ad9 Update code for new BT APIs.
Change-Id: I53aa17b6c2a5ee50d47df91960a7f997eb7b1107
2010-09-28 20:02:12 -07:00
Dianne Hackborn
e8fd195208 am b763a6dc: am 08cf57d7: Merge "Fixes to granting URI permissions - take into account path perms." into gingerbread
Merge commit 'b763a6dc41dcce76585c56657903ae72c5422ae1'

* commit 'b763a6dc41dcce76585c56657903ae72c5422ae1':
  Fixes to granting URI permissions - take into account path perms.
2010-09-28 13:58:12 -07:00
Dianne Hackborn
b763a6dc41 am 08cf57d7: Merge "Fixes to granting URI permissions - take into account path perms." into gingerbread
Merge commit '08cf57d791e50ecafe2728a7617a6487aeb6d6d5' into gingerbread-plus-aosp

* commit '08cf57d791e50ecafe2728a7617a6487aeb6d6d5':
  Fixes to granting URI permissions - take into account path perms.
2010-09-28 11:32:38 -07:00
Dianne Hackborn
48058e8536 Fixes to granting URI permissions - take into account path perms.
Change-Id: I8073061a578eda90dadd3b0b909047aae0d64f2d
2010-09-28 11:20:21 -07:00
Christian Lindeberg
03d2ca6ee0 Include debugger connection status in error entry
Include the debugger connection status when adding error entry
to DropBox if debugger is connected, "Debugger: Connected".

This can be useful to sort out crashes comming from developers
vs from regular usage.

Change-Id: Ic309066c63778af1577f2b91a95ffca0bd40338c
2010-09-28 14:52:20 +02:00
Dianne Hackborn
cca1f0e347 Allow all apps to call ContentResolver.getType().
I can't find the bug number for this, but it is needed for some things
we are doing where the app building an intent may not have access to the
URI in the data field.  This is for HC, but doing in GB to avoid introducing
integration issues.

Change-Id: I0cac971854198b18775d2a73deb80f23431bfbe2
2010-09-27 18:05:44 -07:00
Dianne Hackborn
a8bce7c8ac am d8691d73: Merge "Allow all apps to call ContentResolver.getType()." into gingerbread
Merge commit 'd8691d73d158acd9ffc63748126e822afd656707' into gingerbread-plus-aosp

* commit 'd8691d73d158acd9ffc63748126e822afd656707':
  Allow all apps to call ContentResolver.getType().
2010-09-27 12:45:31 -07:00
Dianne Hackborn
8313fc7e94 Allow all apps to call ContentResolver.getType().
I can't find the bug number for this, but it is needed for some things
we are doing where the app building an intent may not have access to the
URI in the data field.  This is for HC, but doing in GB to avoid introducing
integration issues.

Change-Id: I0cac971854198b18775d2a73deb80f23431bfbe2
2010-09-26 21:31:47 -07:00
Jeff Brown
22ba86cfaf am ca25d2c3: am 4d94a766: Fixed some timeout and lock reentrance issues with broadcasts.
Merge commit 'ca25d2c31dc20f69597be8f34d6da9167d53b4d0'

* commit 'ca25d2c31dc20f69597be8f34d6da9167d53b4d0':
  Fixed some timeout and lock reentrance issues with broadcasts.
2010-09-24 16:14:08 -07:00
Jeff Brown
ca25d2c31d am 4d94a766: Fixed some timeout and lock reentrance issues with broadcasts.
Merge commit '4d94a766c3f7cf32dd3f5d543048fa801ad22813' into gingerbread-plus-aosp

* commit '4d94a766c3f7cf32dd3f5d543048fa801ad22813':
  Fixed some timeout and lock reentrance issues with broadcasts.
2010-09-24 16:07:24 -07:00
Jeff Brown
4d94a766c3 Fixed some timeout and lock reentrance issues with broadcasts.
When starting a broadcast, the ActivityManagerService posts a delayed
BROADCAST_TIMEOUT_MSG to handle timeouts.  If a premature timeout occurs,
we post a new BROADCAST_TIMEOUT_MSG to extend the timeout time for the
current receiver.  However, if the current receiver does timeout, the
message is consumed and no replacement is ever posted.

To fix the dropped timeouts, we track whether we have a pending broadcast
timeout message and setup a new one when we begin working on the next receiver.

As a last resort, performNextBroadcast contains code to detect whether
a broadcast appears to be hung (timeout handling failed).  If so, it
calls broadcastTimeout to cause it to timeout immediately.
However, performNextBroadcast is holding on to the ActivityManagerService
lock while doing this but broadcastTimout expected to be called
while the lock was not held since after updating the broadcast record state,
it calls appNotResponding.

To fix the unintentended lock reentrance, changed broadcastTimeout to
assume the lock is already held (and the callers ensure this) then
added code to perform the ANR asynchronously.

Renamed a few methods to add "Locked" suffixes where appropriate and added
a few comments for tricky areas uncovered during review.

Change-Id: I3cb5b06d6b6a4a338f32c0998db721f6acf3b082
2010-09-24 16:00:25 -07:00
Joe Onorato
77cf6f29f9 am 982c07e9: am cbb7b05e: Merge "Crash apps when they provide bad notifications instead of crashing the system process." into gingerbread
Merge commit '982c07e908c4cb66db224ccfd0810bf8bd449835'

* commit '982c07e908c4cb66db224ccfd0810bf8bd449835':
  Crash apps when they provide bad notifications instead of crashing the system process.
2010-09-23 21:40:24 -07:00
Dianne Hackborn
846df9f517 resolved conflicts for merge of 8952a448 to master
Change-Id: I9c752a5d10ae8d8e5ead1243b6abd4795204fc0b
2010-09-23 20:33:19 -07:00
Joe Onorato
982c07e908 am cbb7b05e: Merge "Crash apps when they provide bad notifications instead of crashing the system process." into gingerbread
Merge commit 'cbb7b05e35368b104c27089f5f16640680f567c2' into gingerbread-plus-aosp

* commit 'cbb7b05e35368b104c27089f5f16640680f567c2':
  Crash apps when they provide bad notifications instead of crashing the system process.
2010-09-23 16:55:22 -07:00
Joe Onorato
cbb7b05e35 Merge "Crash apps when they provide bad notifications instead of crashing the system process." into gingerbread 2010-09-23 16:52:28 -07:00
Joe Onorato
eaa0718780 Crash apps when they provide bad notifications instead of crashing the system process.
Bug: 2958415
Change-Id: I9cbef340fb20a64eca8493950b814399c26ce197
2010-09-23 16:49:20 -07:00
Dianne Hackborn
8952a4488e am 287952c3: Fix issue #3022508: Crash during media scan
Merge commit '287952c35e148811c106bc0f5036eabf20f71562' into gingerbread-plus-aosp

* commit '287952c35e148811c106bc0f5036eabf20f71562':
  Fix issue #3022508: Crash during media scan
2010-09-23 16:04:23 -07:00
Dianne Hackborn
287952c35e Fix issue #3022508: Crash during media scan
Don't kill processes for excessive wake lock use, even if they
are in the background, as long as they have running services.

Also fix some problems with this, such as not noting the kill
in battery stats.

And add killing of processes for cpu usage as well, along with
some optimizations to computing CPU usage.

And fix BatteryWaster to be better behaving for testing these
cases.

Add new "monitor" command to am to watch as the activity manager
does stuff (so we can catch things at the point of ANR).

Finally some miscellaneous debug output for the stuff here, as
well as in progress debugging of an ANR.

Change-Id: Ib32f55ca50fb7486b4be4eb5e695f8f60c882cd1
2010-09-23 15:59:28 -07:00
Dianne Hackborn
eecb5b9873 am 2983e038: am 045398e6: Merge "Fix a deadlock I ran into." into gingerbread
Merge commit '2983e038d189a257f1e5abb9c120bd1feb253773'

* commit '2983e038d189a257f1e5abb9c120bd1feb253773':
  Fix a deadlock I ran into.
2010-09-23 14:20:48 -07:00
Dianne Hackborn
2983e038d1 am 045398e6: Merge "Fix a deadlock I ran into." into gingerbread
Merge commit '045398e6243fa4e83fb6435df4e8ffc6a7487a70' into gingerbread-plus-aosp

* commit '045398e6243fa4e83fb6435df4e8ffc6a7487a70':
  Fix a deadlock I ran into.
2010-09-23 14:17:54 -07:00
Dianne Hackborn
0674069aa4 Fix a deadlock I ran into.
Activity manager was calling into the backup service (and other
things) with its lock held.

Change-Id: Id55093e09cc5fe81b73b85968184816d956e0ae8
2010-09-22 22:46:21 -07:00
Dianne Hackborn
625ac271f8 Work on fragments in layouts.
- Change semantics if IDs associated with these fragments, to
  work correctly when placed in a container.  If the container
  has an ID or you have supplied a tag, the fragment's ID is
  optional.

- To do this, there is a new LayoutInflater API that allows code
  creating views to access the parent container that view will
  be in.

- Fix issues with state management around these fragments.  Now
  correctly retains state when switching to a layout that doesn't
  include the fragment.

Also:

- Add new simple list layouts for items that want to show an
  activated state.
- Add new Activity.dump() that can be invoked with adb shell
  dumpsys; the default implementation dumps fragment state.

Change-Id: I192f35e3ea8c53fbd26cf909095f2a994abfc1b6
2010-09-21 22:08:50 -07:00
Dianne Hackborn
5e6ec0aeea am e665698f: am 6f33b65f: Merge "Fix issue #2999757: "Application Redirected" dialogue showing up erratically" into gingerbread
Merge commit 'e665698ffe539bdb99122dcf83e19844ebea92b8'

* commit 'e665698ffe539bdb99122dcf83e19844ebea92b8':
  Fix issue #2999757: "Application Redirected" dialogue showing up erratically
2010-09-21 10:44:13 -07:00
Dianne Hackborn
1bbef40e40 am 2d19a676: am 51aaab3d: Merge "Fix #2999258: ANR in Settings after every reboot" into gingerbread
Merge commit '2d19a676860bf773c984315fe03d9568913f9314'

* commit '2d19a676860bf773c984315fe03d9568913f9314':
  Fix #2999258: ANR in Settings after every reboot
2010-09-21 10:43:36 -07:00
Dianne Hackborn
e665698ffe am 6f33b65f: Merge "Fix issue #2999757: "Application Redirected" dialogue showing up erratically" into gingerbread
Merge commit '6f33b65f8033cf8644eb4ba727421b90bd4c0ae9' into gingerbread-plus-aosp

* commit '6f33b65f8033cf8644eb4ba727421b90bd4c0ae9':
  Fix issue #2999757: "Application Redirected" dialogue showing up erratically
2010-09-21 00:27:06 -07:00
Dianne Hackborn
034093a4ae Fix issue #2999757: "Application Redirected" dialogue showing up erratically
Give up on this for now.

Change-Id: Ic66a36d468f8bcb313d9bde2809124cdfd74adb3
2010-09-20 22:24:38 -07:00
Dianne Hackborn
2d19a67686 am 51aaab3d: Merge "Fix #2999258: ANR in Settings after every reboot" into gingerbread
Merge commit '51aaab3d6ba01263c3e1d81ca0567e0ad5cddb2d' into gingerbread-plus-aosp

* commit '51aaab3d6ba01263c3e1d81ca0567e0ad5cddb2d':
  Fix #2999258: ANR in Settings after every reboot
2010-09-20 22:22:54 -07:00
Dianne Hackborn
8891fdc1da Fix #2999258: ANR in Settings after every reboot
The main problem here was in the error recovery when we are waiting
for a process to start but it has failed for some reason.  The code
was just setting mPendingBroadcast to null, but this would cause
an eventual ANR because the state was not set back to IDLE so we
would continue waiting for the broadcast without trying to restart
its process.

Now we set it to idle.  We also need to reset the "nextReceiver"
index, so there is a new mPendingBroadcastRecvIndex variable holding
what it should be set back to.

While digging into this, I found a number of other lesser problems:

- There is a race when booting the system where we set mSystemReady
to true before restarting the upgrade processes.  This could allow
a broadcast to happen between those two and its process to immediately
be removed.  To fix this, there is a new mProcessesReady that is set
once we are truly ready to start launching processes.

- There were various places where we were calling sendBroadcastLocked()
without the flag to send only to receivers...  if this is called before
mProcessesReady is set, then we would end up sticking any process for
the broadcast on the holding list to not get launched until later
(and hang up all broadcasts as they want for it).  Now we always make
sure to set this appropriately.

- sendBroadcastInPackage() was not doing all of the validation that
sendBroadcast() does.

And of course a bunch of new debugging logs that were done in the
course of tracking this down.

Change-Id: I6134bbd94fdb73db8b693507b29499eae012d543
2010-09-20 20:52:51 -07:00
Dianne Hackborn
48a781a0a5 am 4b187e80: am 8e1b84e7: Merge "Some battery improvements:" into gingerbread
Merge commit '4b187e804fdfdbc825e17646e82e0218e316a339'

* commit '4b187e804fdfdbc825e17646e82e0218e316a339':
  Some battery improvements:
2010-09-20 19:33:06 -07:00
Dianne Hackborn
4b187e804f am 8e1b84e7: Merge "Some battery improvements:" into gingerbread
Merge commit '8e1b84e7654ddeeb77a03f5eca10c6669b1cb42b' into gingerbread-plus-aosp

* commit '8e1b84e7654ddeeb77a03f5eca10c6669b1cb42b':
  Some battery improvements:
2010-09-20 16:34:45 -07:00
Dianne Hackborn
ce2ef766ca Some battery improvements:
- New API for iterating over history that will allow a better implementation
  in the future.
- Now do writes asynchronously.

Also improve the documentation for Activity.onRetainNonInstanceState().

Change-Id: Idf67f2796a8868eb62f288bcbb2bad29876c8554
2010-09-20 16:25:01 -07:00