diff options
Diffstat (limited to 'docs/html/training/articles')
| -rw-r--r-- | docs/html/training/articles/perf-anr.jd | 22 | ||||
| -rw-r--r-- | docs/html/training/articles/perf-jni.jd | 4 | ||||
| -rw-r--r-- | docs/html/training/articles/smp.jd | 2 | ||||
| -rw-r--r-- | docs/html/training/articles/user-data-overview.jd | 2 | ||||
| -rw-r--r-- | docs/html/training/articles/user-data-permissions.jd | 2 |
5 files changed, 16 insertions, 16 deletions
diff --git a/docs/html/training/articles/perf-anr.jd b/docs/html/training/articles/perf-anr.jd index bbebec5a83e1..2eda4fa679ca 100644 --- a/docs/html/training/articles/perf-anr.jd +++ b/docs/html/training/articles/perf-anr.jd @@ -64,10 +64,10 @@ concern.)</p> and Window Manager system services. Android will display the ANR dialog for a particular application when it detects one of the following conditions:</p> -<ul> - <li>No response to an input event (such as key press or screen touch events) +<ul> + <li>No response to an input event (such as key press or screen touch events) within 5 seconds.</li> - <li>A {@link android.content.BroadcastReceiver BroadcastReceiver} + <li>A {@link android.content.BroadcastReceiver BroadcastReceiver} hasn't finished executing within 10 seconds.</li> </ul> @@ -100,7 +100,7 @@ To post progress changes to the user, you can call {@link android.os.AsyncTask#onProgressUpdate onProgressUpdate()} callback method. From your implementation of {@link android.os.AsyncTask#onProgressUpdate onProgressUpdate()} (which runs on the UI thread), you can notify the user. For example:</p> - + <pre> private class DownloadFilesTask extends AsyncTask<URL, Integer, Long> { // Do the long-running work in here @@ -127,14 +127,14 @@ private class DownloadFilesTask extends AsyncTask<URL, Integer, Long> { } } </pre> - + <p>To execute this worker thread, simply create an instance and call {@link android.os.AsyncTask#execute execute()}:</p> - + <pre> new DownloadFilesTask().execute(url1, url2, url3); </pre> - + <p>Although it's more complicated than {@link android.os.AsyncTask}, you might want to instead create your own {@link java.lang.Thread} or {@link android.os.HandlerThread} class. If you do, @@ -143,7 +143,7 @@ android.os.Process#setThreadPriority Process.setThreadPriority()} and passing {@ android.os.Process#THREAD_PRIORITY_BACKGROUND}. If you don't set the thread to a lower priority this way, then the thread could still slow down your app because it operates at the same priority as the UI thread by default.</p> - + <p>If you implement {@link java.lang.Thread} or {@link android.os.HandlerThread}, be sure that your UI thread does not block while waiting for the worker thread to complete—do not call {@link java.lang.Thread#wait Thread.wait()} or @@ -183,16 +183,16 @@ make your application seem responsive to users:</p> <li>If your application is doing work in the background in response to user input, show that progress is being made (such as with a {@link android.widget.ProgressBar} in your UI).</li> - + <li>For games specifically, do calculations for moves in a worker thread.</li> - + <li>If your application has a time-consuming initial setup phase, consider showing a splash screen or rendering the main view as quickly as possible, indicate that loading is in progress and fill the information asynchronously. In either case, you should indicate somehow that progress is being made, lest the user perceive that the application is frozen.</li> - + <li>Use performance tools such as <a href="{@docRoot}tools/help/systrace.html">Systrace</a> and <a href="{@docRoot}tools/help/traceview.html">Traceview</a> to determine bottlenecks in your app's responsiveness.</li> diff --git a/docs/html/training/articles/perf-jni.jd b/docs/html/training/articles/perf-jni.jd index 5a9fa1e04b46..8d2fd9b2ebb6 100644 --- a/docs/html/training/articles/perf-jni.jd +++ b/docs/html/training/articles/perf-jni.jd @@ -564,9 +564,9 @@ be aware of:</p> that looked through the weak globals table, the arguments, the locals table, and the globals table in that order. The first time it found your direct pointer, it would report that your reference was of the type it - happened to be examining. This meant, for example, that if + happened to be examining. This meant, for example, that if you called <code>GetObjectRefType</code> on a global jclass that happened - to be the same as the jclass passed as an implicit argument to your static + to be the same as the jclass passed as an implicit argument to your static native method, you'd get <code>JNILocalRefType</code> rather than <code>JNIGlobalRefType</code>. </ul> diff --git a/docs/html/training/articles/smp.jd b/docs/html/training/articles/smp.jd index 0b45987558d6..a95931b536a9 100644 --- a/docs/html/training/articles/smp.jd +++ b/docs/html/training/articles/smp.jd @@ -75,7 +75,7 @@ page.article=true multiprocessor architectures. This document introduces issues that can arise when writing code for symmetric multiprocessor systems in C, C++, and the Java programming language (hereafter referred to simply as “Java” for the sake of -brevity). It's intended as a primer for Android app developers, not as a complete +brevity). It's intended as a primer for Android app developers, not as a complete discussion on the subject. The focus is on the ARM CPU architecture.</p> <p>If you’re in a hurry, you can skip the <a href="#theory">Theory</a> section diff --git a/docs/html/training/articles/user-data-overview.jd b/docs/html/training/articles/user-data-overview.jd index 8715d36cb76c..dc0df20fc06c 100644 --- a/docs/html/training/articles/user-data-overview.jd +++ b/docs/html/training/articles/user-data-overview.jd @@ -266,4 +266,4 @@ href="#references" style="color:#777;padding-left:.1em;">1</a></em></sup></span> href="http://stackoverflow.com/questions/24374701/alternative-to-read-phone-state-permission-for-getting-notified-of-call">source</a>)</em></p> <p>[2] <em>Using Personal Examples to Improve Risk Communication for Security and Privacy Decisions</em>, by M. Harbach, M. Hettig, S. Weber, and M. Smith. In Proceedings of ACM CHI 2014.</p> <p>[3] <em>Modeling Users’ Mobile App Privacy Preferences: Restoring Usability in a Sea of Permission Settings</em>, by J. Lin B. Liu, N. Sadeh and J. Hong. In Proceedings of SOUPS 2014.</p> -<p>[4] <em>Teens and Mobile Apps Privacy. (<a href="http://www.pewinternet.org/files/old-media/Files/Reports/2013/PIP_Teens%20and%20Mobile%20Apps%20Privacy.pdf">source</a>)</em></p> +<p>[4] <em>Teens and Mobile Apps Privacy. (<a href="http://www.pewinternet.org/files/old-media/Files/Reports/2013/PIP_Teens%20and%20Mobile%20Apps%20Privacy.pdf">source</a>)</em></p> diff --git a/docs/html/training/articles/user-data-permissions.jd b/docs/html/training/articles/user-data-permissions.jd index edc755884e53..ace5f7ff0d35 100644 --- a/docs/html/training/articles/user-data-permissions.jd +++ b/docs/html/training/articles/user-data-permissions.jd @@ -56,7 +56,7 @@ Working With</a></li> see <a href="{@docRoot}training/permissions/index.html">Working with System Permissions</a>. For best practices for working with unique identifiers, please see <a href= "{@docRoot}training/articles/user-data-ids.html">Best Practices for - Unique Identifiers</a>. + Unique Identifiers</a>. </p> <h2 id="tenets_of_working_with_android_permissions">Tenets of Working |
