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
Merge commit 'a2c6d5bf308181c019ade0aac6d25fe33dc3d76c' into kraken
* commit 'a2c6d5bf308181c019ade0aac6d25fe33dc3d76c':
do not merge: cherry-picked 929b4855b8 from master branch
* changes:
update EGL headers to the latest
update GL ES stub libraries with the new GL ES headers
fix OpenGL ES extension headers from khronos
update the OpenGL ES headers to the latest
* changes:
Add a test item the turns on a bunch of extra icons.
Move the status bar icon list, hopefully for the last time.
Call into the notification manager when the panel is revealed.
Move status_bar_latest_event and LatestItemView into SystemUI.apk.
Start the status bar service based on a configuration option, instead of trampolining through a braodcast receiver.
Require the STATUS_BAR_SERVICE permission for something to be the status bar.
Handle errors inflating notifications (and their icons).
* changes:
dead code removal
Cap the number of notifications that a given package can post.
Move the usb mass storage notification & activity into SystemUI.apk.
Add some disabled logging and another test case for reapplying the notification views.
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
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