This adds new DevicAdmin, DevicePolicyManager, and DeviceAdminInfo classes.
See the java docs for each on documentation on them. Basically: a DeviceAdmin
is what you derive from to administer a device; DevicePolicyManager is what you
use to apply and check your policy requirements and perform other administration
tasks.
Eliminate the per-process 200ms timeout during ANR thread-dumping.
Dump all the threads at once, then wait for the file to stabilize.
Seems to work great and is much, much, much faster.
Don't dump stack traces to traces.txt on app crashes (it isn't very
useful and mostly just clutters up the file).
Tweak the formatting of the dropbox dumpsys a bit, for readability,
and avoid running out of memory when dumping large log files.
Report build & kernel version with kernel log dropbox entries.
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.
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.
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.
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.
Merge commit '3a3fd2ba1ffc6171725375396cc59711a34bb39e' into eclair-mr2-plus-aosp
* commit '3a3fd2ba1ffc6171725375396cc59711a34bb39e':
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.
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
(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.
Merge commit 'af9788a9d6c238dd97f40dc020e036739daf0811' into eclair-mr2-plus-aosp
* commit 'af9788a9d6c238dd97f40dc020e036739daf0811':
Add bindService API to not bring ot foreground.
Add a new flag for bindService that tells the system to not bring the
target service's process in to the foreground scheduling class. This is
used by the sync system to not cause the current sync adapter to come to
the foreground as it is running.
Also some small improvements to the debug output of the process list
of oom adj and scheduling info.
Merge commit 'f6683bb5592825a62e30760abb0734deaaf7bd93' into eclair-mr2-plus-aosp
* commit 'f6683bb5592825a62e30760abb0734deaaf7bd93':
move event log tags used by ActivityManager into this package
We can now locate event log tag definitions in individual packages
(and java constants for the tag numbers get auto-generated), so move
all the tags used by the system server into the package.
Merge commit 'ccbf4c282f6d27602896b812485b41b74eaf8c6d' into eclair-mr2-plus-aosp
* commit 'ccbf4c282f6d27602896b812485b41b74eaf8c6d':
If the usage stats file doesn't exist in the first place there is no need to
Merge commit '92b1880084ccfbe2ae03eec6a9656c5372c03f12' into eclair-mr2-plus-aosp
* commit '92b1880084ccfbe2ae03eec6a9656c5372c03f12':
Work on issue 2259506: camera ANRed and then device runtime restarted
Merge commit '6e0ff0c37cd293d49c3c874ee30a49b1d5902b5e' into eclair-mr2-plus-aosp
* commit '6e0ff0c37cd293d49c3c874ee30a49b1d5902b5e':
A little more on #2256270: Package manager sends bad broadcasts when components change
Merge commit '5bb200fde2306d9da1972a81c0238c26ca6f475b' into eclair-mr2-plus-aosp
* commit '5bb200fde2306d9da1972a81c0238c26ca6f475b':
Debugging for issue #2250075: Desk dock clock app sometimes doesn't
You can no longer receive CONFIGURATION_CHANGED in a manifest, which is really really
bad (launching apps every time the screen is rotated!). A new LOCALE_CHANGED broadcast
is sent that you can receive in a manifest.
Change-Id: I80022375f0716db2e672382a29db3cea1af74702
This adds a history of the last 100 broadcasts that is printed in the
debug log, to be able to see what recently happened at the time the
bug report was taken. Also does some optimization of the printing of
the broadcast records to make it feasible to print this number of
entries. (We kind-of need to do this because there are some broadcasts
like SIG_STR and SYNC_STATE_CHANGED that are being broadcast a LOT.)
Change-Id: I775e1ec0f63369c8bca8c83cee27b95ddc5ec450
Merge commit '750e82e51921428dc4ad9a75f18b02b8048734d8' into eclair-mr2-plus-aosp
* commit '750e82e51921428dc4ad9a75f18b02b8048734d8':
When tasks are moved to top or bottom, the app tokens are being rearranged.
The window token rearrangement is defered if an animation is
underway. Force a focus recomputation when the window tokens are finally
rearranged so that we have a valid focused window.
Merge commit '7b2aa74f4644979acea456e1047c96e17e09bc6d' into eclair-mr2-plus-aosp
* commit '7b2aa74f4644979acea456e1047c96e17e09bc6d':
Fix for 2221718: Hang in BatteryStatsService.noteBluetoothOn
Merge commit '8071b14680f8081019ac1b995d7c7f09a8aeeba7' into eclair-mr2-plus-aosp
* commit '8071b14680f8081019ac1b995d7c7f09a8aeeba7':
Fix a race that kept the locale picker from working under heavy CPU load.
The locale picker and the activity transition would both change the
configuration, and depending upon the timing, the activity transition
would undo what the locale picker had just done. Usually it worked right,
but would often fail if the user changed locales just after a data wipe,
when the media scanner was working hard in the background to index
the contents of the SD card.
http://b/issue?id=2216298
Merge commit 'b0f4d0cd249773927c891ab52505505b6b19347b' into eclair-mr2-plus-aosp
* commit 'b0f4d0cd249773927c891ab52505505b6b19347b':
Proper fix for zero signal strength and no_service. Fixes#2176141
Track phone service state changes and use a separate timer for out-of-service
since the hunting can timeout on some devices.
Store the timeout value in the config.xml, as it is device/network specific.
Settings App will also change to use the hunting duration to compute the cost
of zero signal.
Merge commit '2c6c5e6e49795e6e24cd089c9018377d837ba931' into eclair-plus-aosp
* commit '2c6c5e6e49795e6e24cd089c9018377d837ba931':
Fix issue #2176944: Need API so browser, others can determine memory size of device
- Don't crash if the service's app process doesn't have a thread (this
can happen if we are currently starting the process and then try to
start the service again).
- Be more robust about deciding to start a service's process: try each
time it is started; the startProcess call will take care of ignoring
it if the process is already started.
- Fix some issues where we would leave dead processes on the low memory
list.
Change-Id: I490e01ba7b45adc191bab7ace377b6873e284897
Merge commit '68d881cf2d2b252f6f795cd64d43e316a1d736e5' into eclair-plus-aosp
* commit '68d881cf2d2b252f6f795cd64d43e316a1d736e5':
Fix issue #2166755: BroadcastReceiver trying to return result during a non-ordered broadcast
Merge commit '48e6725c828a8d420d43925b0c9a9a915a8c4e2f' into eclair-plus-aosp
* commit '48e6725c828a8d420d43925b0c9a9a915a8c4e2f':
Work on issue #2163789: Way too much logging
Don't hold a lock when the activity thread is telling the activity manager
to release a provider.
This requires that the activity manager now keep a reference count on the
providers, because without the lock it is possible for activity thread to
call in to request the provider again before it has finished telling
about the release.
Change-Id: I5f912903891f4edae85e28819d4e6f14b8f2e688
Tell the broadcast receiver whether it is getting an initial sticky value,
so it will be quiet about attempts to do ordered broadcast stuff.
Note that the original bug being reported was not actually a crash, just
an error log. So all we are doing here is making the log quieter.
Change-Id: Iaf1b718d82093ec1197142410a64feff47eb3859
Merge commit 'e88846eeaf70f9f4299af9e3d54ba5dacede42b6' into eclair-plus-aosp
* commit 'e88846eeaf70f9f4299af9e3d54ba5dacede42b6':
Semi-workaround for #2027266: app drawer showing up on the side of the screen