Brad Fitzpatrick
438d059512
Introduce "StrictMode"
...
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
2010-06-10 14:38:58 -07:00
..
2010-03-26 12:52:53 -07:00
2010-04-06 10:30:38 -05:00
2010-06-09 14:33:30 -07:00
2010-02-08 21:04:39 -08:00
2010-02-08 21:04:39 -08:00
2010-06-02 14:48:45 -07:00
2009-11-12 18:15:00 -08:00
2009-11-12 18:15:00 -08:00
2010-06-02 14:48:45 -07:00
2009-11-16 17:47:41 -08:00
2010-06-09 14:33:30 -07:00
2010-05-04 14:33:28 -04:00
2010-05-04 14:33:28 -04:00
2009-08-06 16:52:14 -07:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2009-03-03 19:31:44 -08:00
2010-06-10 14:38:58 -07:00
2009-11-13 14:04:03 -08:00
2009-03-24 19:55:37 -07:00
2009-11-13 14:04:03 -08:00
2009-11-13 14:04:03 -08:00
2010-05-17 11:18:04 -07:00
2009-07-22 16:25:06 -07:00
2010-06-09 22:25:58 -07:00
2009-07-22 16:25:06 -07:00
2010-05-17 11:18:04 -07:00
2009-07-22 16:25:06 -07:00
2009-07-22 16:25:06 -07:00
2009-07-22 16:25:06 -07:00
2009-07-22 16:25:06 -07:00
2010-05-17 11:18:04 -07:00
2009-07-22 16:25:06 -07:00
2009-11-13 14:04:03 -08:00
2009-11-13 14:04:03 -08:00
2009-11-13 14:04:03 -08:00
2009-11-13 14:04:03 -08:00
2009-11-13 14:04:03 -08:00
2009-11-13 14:04:03 -08:00
2009-07-22 16:25:06 -07:00
2010-03-16 10:04:41 -07:00
2009-11-13 14:04:03 -08:00
2010-05-17 11:18:04 -07:00
2009-07-22 16:25:06 -07:00
2010-05-17 11:18:04 -07:00
2009-11-13 14:04:03 -08:00
2010-05-17 11:18:04 -07:00
2009-07-22 16:25:06 -07:00
2009-07-22 16:25:06 -07:00
2009-07-22 16:25:06 -07:00
2009-07-22 16:25:06 -07:00
2009-07-22 16:25:06 -07:00
2009-11-13 14:04:03 -08:00
2009-11-13 14:04:03 -08:00
2009-11-13 14:04:03 -08:00
2009-11-13 14:04:03 -08:00
2010-05-17 11:18:04 -07:00
2009-07-22 16:25:06 -07:00
2009-07-22 16:25:06 -07:00
2010-05-17 11:18:04 -07:00
2009-07-22 16:25:06 -07:00
2010-06-09 22:25:58 -07:00
2009-07-22 16:25:06 -07:00
2010-02-08 21:04:39 -08:00
2009-11-13 14:04:03 -08:00
2009-11-13 14:04:03 -08:00
2009-03-03 19:31:44 -08:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-03-03 19:31:44 -08:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-03-03 19:31:44 -08:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-03-03 19:31:44 -08:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-03-03 19:31:44 -08:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-03-03 19:31:44 -08:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2009-09-08 16:54:05 -07:00
2010-06-09 22:25:58 -07:00
2009-07-22 16:25:06 -07:00
2010-05-17 11:18:04 -07:00
2009-07-22 16:25:06 -07:00
2009-07-22 16:25:06 -07:00
2010-05-17 11:18:04 -07:00
2009-07-22 16:25:06 -07:00
2010-04-01 19:33:03 -07:00
2010-05-17 11:18:04 -07:00
2009-07-22 16:25:06 -07:00
2010-05-17 11:18:04 -07:00
2009-11-13 14:04:03 -08:00
2010-06-09 22:25:58 -07:00
2009-07-22 16:25:06 -07:00
2009-11-13 14:04:03 -08:00
2009-11-13 14:04:03 -08:00
2009-11-13 14:04:03 -08:00
2010-05-17 11:18:04 -07:00
2009-07-22 16:25:06 -07:00
2009-11-13 14:04:03 -08:00
2009-03-24 19:55:37 -07:00
2010-05-17 11:18:04 -07:00
2009-07-22 16:25:06 -07:00
2009-11-13 14:04:03 -08:00
2009-11-13 14:04:03 -08:00
2010-05-17 11:18:04 -07:00
2010-05-17 11:18:04 -07:00
2010-02-10 14:50:58 -08:00
2009-03-03 19:31:44 -08:00
2010-02-11 17:28:29 -08:00
2010-02-18 17:32:01 -08:00