Loading core/java/android/os/StrictMode.java +4 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,10 @@ import java.util.HashMap; * network access on the application's main thread, where UI * operations are received and animations take place. Keeping disk * and network operations off the main thread makes for much smoother, * more responsive applications. * more responsive applications. By keeping your application's main thread * responsive, you also prevent * <a href="{@docRoot}guide/practices/design/responsiveness.html">ANR dialogs</a> * from being shown to users. * * <p class="note">Note that even though an Android device's disk is * often on flash memory, many devices run a filesystem on top of that Loading docs/html/guide/practices/design/responsiveness.jd +4 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,10 @@ responsive to input and thus avoid ANR dialogs caused by the 5 second input event timeout. These same practices should be followed for any other threads that display UI, as they are also subject to the same timeouts.</p> <p>You can use {@link android.os.StrictMode} to help find potentially long running operations such as network or database operations that you might accidentally be doing your main thread.</p> <p>The specific constraint on IntentReceiver execution time emphasizes what they were meant to do: small, discrete amounts of work in the background such as saving a setting or registering a Notification. So as with other methods Loading Loading
core/java/android/os/StrictMode.java +4 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,10 @@ import java.util.HashMap; * network access on the application's main thread, where UI * operations are received and animations take place. Keeping disk * and network operations off the main thread makes for much smoother, * more responsive applications. * more responsive applications. By keeping your application's main thread * responsive, you also prevent * <a href="{@docRoot}guide/practices/design/responsiveness.html">ANR dialogs</a> * from being shown to users. * * <p class="note">Note that even though an Android device's disk is * often on flash memory, many devices run a filesystem on top of that Loading
docs/html/guide/practices/design/responsiveness.jd +4 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,10 @@ responsive to input and thus avoid ANR dialogs caused by the 5 second input event timeout. These same practices should be followed for any other threads that display UI, as they are also subject to the same timeouts.</p> <p>You can use {@link android.os.StrictMode} to help find potentially long running operations such as network or database operations that you might accidentally be doing your main thread.</p> <p>The specific constraint on IntentReceiver execution time emphasizes what they were meant to do: small, discrete amounts of work in the background such as saving a setting or registering a Notification. So as with other methods Loading