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
Merge commit '779d1778b6147ee1b57428af234d1498a26f031e'
* commit '779d1778b6147ee1b57428af234d1498a26f031e':
Include debugger connection status in error entry
Merge commit 'bd1454f5005619b69d887fee6a7a4891b3323d18' into gingerbread-plus-aosp
* commit 'bd1454f5005619b69d887fee6a7a4891b3323d18':
Include debugger connection status in error entry
Merge commit 'e89bf50261902bf263887923bf95595ec8eae069'
* commit 'e89bf50261902bf263887923bf95595ec8eae069':
Work on issue #3062691: GPS enable bypass via com.android.settings.widget.SettingsAppWidgetProvider
Merge commit 'ef083ec008a3ec69180340912e7f0137472c97d9' into gingerbread-plus-aosp
* commit 'ef083ec008a3ec69180340912e7f0137472c97d9':
Work on issue #3062691: GPS enable bypass via com.android.settings.widget.SettingsAppWidgetProvider
Merge commit 'cb9f1e4d30ab4f9203e30abe807cbe33d07db4a0'
* commit 'cb9f1e4d30ab4f9203e30abe807cbe33d07db4a0':
Make it easier to figure out whether an app can go on sd card.
Exposes an Intent I need (okay it fixes an unrelated thing in the power widget),
and fixes some dump output.
Change-Id: I51d6c93a6ac879bab64e9d5aa21129e2bbcd461b
Merge commit '6f7e10ca0aa869c4b3ed4c37e56cf9d471fd9283' into gingerbread-plus-aosp
* commit '6f7e10ca0aa869c4b3ed4c37e56cf9d471fd9283':
Make it easier to figure out whether an app can go on sd card.
Merge commit '0a69f597604254bc37721b135ab612eaacdd0cbd' into gingerbread-plus-aosp
* commit '0a69f597604254bc37721b135ab612eaacdd0cbd':
Rub in a little 'ol log-b-gone.
Merge commit 'b763a6dc41dcce76585c56657903ae72c5422ae1'
* commit 'b763a6dc41dcce76585c56657903ae72c5422ae1':
Fixes to granting URI permissions - take into account path perms.
Merge commit '08cf57d791e50ecafe2728a7617a6487aeb6d6d5' into gingerbread-plus-aosp
* commit '08cf57d791e50ecafe2728a7617a6487aeb6d6d5':
Fixes to granting URI permissions - take into account path perms.
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
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
Merge commit 'd8691d73d158acd9ffc63748126e822afd656707' into gingerbread-plus-aosp
* commit 'd8691d73d158acd9ffc63748126e822afd656707':
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
Merge commit 'ca25d2c31dc20f69597be8f34d6da9167d53b4d0'
* commit 'ca25d2c31dc20f69597be8f34d6da9167d53b4d0':
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.
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
Merge commit '982c07e908c4cb66db224ccfd0810bf8bd449835'
* commit '982c07e908c4cb66db224ccfd0810bf8bd449835':
Crash apps when they provide bad notifications instead of crashing the system process.
Merge commit 'cbb7b05e35368b104c27089f5f16640680f567c2' into gingerbread-plus-aosp
* commit 'cbb7b05e35368b104c27089f5f16640680f567c2':
Crash apps when they provide bad notifications instead of crashing the system process.
Merge commit '287952c35e148811c106bc0f5036eabf20f71562' into gingerbread-plus-aosp
* commit '287952c35e148811c106bc0f5036eabf20f71562':
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
Merge commit '045398e6243fa4e83fb6435df4e8ffc6a7487a70' into gingerbread-plus-aosp
* commit '045398e6243fa4e83fb6435df4e8ffc6a7487a70':
Fix a deadlock I ran into.
- 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
Merge commit '2d19a676860bf773c984315fe03d9568913f9314'
* commit '2d19a676860bf773c984315fe03d9568913f9314':
Fix#2999258: ANR in Settings after every reboot
Merge commit '51aaab3d6ba01263c3e1d81ca0567e0ad5cddb2d' into gingerbread-plus-aosp
* commit '51aaab3d6ba01263c3e1d81ca0567e0ad5cddb2d':
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
- 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