From 438d0595121a7a2cdf19741e76e3c0e21a5c173d Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 10 Jun 2010 12:19:19 -0700 Subject: 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 --- api/current.xml | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 112 insertions(+), 2 deletions(-) (limited to 'api') diff --git a/api/current.xml b/api/current.xml index d002534..9930f44 100644 --- a/api/current.xml +++ b/api/current.xml @@ -77980,7 +77980,7 @@ type="float" transient="false" volatile="false" - value="0.0010f" + value="0.001f" static="true" final="true" deprecated="not deprecated" @@ -124950,6 +124950,116 @@ + + + + + + + + + + + + + + + + + + + + + + - + -- cgit v1.1