Merge "docs: fix typo bug 16623189" into klp-modular-docs
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index d53bb74..93bf051 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -87,7 +87,7 @@
  * </pre>
  * <p>See {@link android.content.Intent} for more information.</p>
  *
- * <p>To provide a WebView in your own Activity, include a {@code <WebView>} in your layout,
+ * <p>To provide a WebView in your own Activity, include a {@code &lt;WebView&gt;} in your layout,
  * or set the entire Activity window as a WebView during {@link
  * android.app.Activity#onCreate(Bundle) onCreate()}:</p>
  * <pre class="prettyprint">
diff --git a/docs/html/guide/topics/resources/localization.jd b/docs/html/guide/topics/resources/localization.jd
index e86d4c9..1ee6606 100644
--- a/docs/html/guide/topics/resources/localization.jd
+++ b/docs/html/guide/topics/resources/localization.jd
@@ -402,8 +402,7 @@
 	resolution and density of the device screen may differ, which could affect 

 	the display of strings and drawables in your UI.</p>

 

-<p>To change the locale on a device, use  the Settings application  (Home &gt;

-Menu &gt; Settings &gt; Locale &amp; text &gt; Select locale). </p>

+<p>To change the locale or language on a device, use the Settings application.</p>

 

 <h3 id="emulator">Testing on an Emulator</h3>

 

diff --git a/docs/html/images/tools/as-allocstart.png b/docs/html/images/tools/as-allocstart.png
new file mode 100644
index 0000000..b9c770a
--- /dev/null
+++ b/docs/html/images/tools/as-allocstart.png
Binary files differ
diff --git a/docs/html/images/tools/as-allocstop.png b/docs/html/images/tools/as-allocstop.png
new file mode 100644
index 0000000..8271161
--- /dev/null
+++ b/docs/html/images/tools/as-allocstop.png
Binary files differ
diff --git a/docs/html/images/tools/as-alloctrack.png b/docs/html/images/tools/as-alloctrack.png
new file mode 100644
index 0000000..4280f02
--- /dev/null
+++ b/docs/html/images/tools/as-alloctrack.png
Binary files differ
diff --git a/docs/html/preview/material/ui-widgets.jd b/docs/html/preview/material/ui-widgets.jd
index 2d29420..69b7d2d 100644
--- a/docs/html/preview/material/ui-widgets.jd
+++ b/docs/html/preview/material/ui-widgets.jd
@@ -132,7 +132,7 @@
                                                    int viewType) {
         // create a new view
         View v = LayoutInflater.from(parent.getContext())
-                               .inflate(R.layout.my_text_view, parent);
+                               .inflate(R.layout.my_text_view, parent, false);
         // set the view's size, margins, paddings and layout parameters
         ...
         ViewHolder vh = new ViewHolder(v);
diff --git a/docs/html/sdk/installing/studio-debug.jd b/docs/html/sdk/installing/studio-debug.jd
index 7e2efe3..2e3e137 100644
--- a/docs/html/sdk/installing/studio-debug.jd
+++ b/docs/html/sdk/installing/studio-debug.jd
@@ -19,6 +19,7 @@
         <li><a href="#breakPointsDebug">Debug your app with breakpoints</a></li>
     </ol>
   </li>
+  <li><a href="#allocTracker">Track Object Allocation</a></li>
   <li><a href="#deviceMonitor">Analyze Runtime Metrics to Optimize your App</a></li>
   <li><a href="#screenCap">Capture Screenshots and Videos</a></li>
 </ol>
@@ -281,6 +282,47 @@
 <p class="img-caption"><strong>Figure 7.</strong> The Variables view in the Debug tool window.</p>
 
 
+<h2 id="allocTracker">Track Object Allocation</h2>
+
+<p>Android Studio lets you track objects that are being allocated on the Java heap and see which
+classes and threads are allocating these objects. This allows you to see the list of objects
+allocated during a period of interest. This information is valuable for assessing memory usage
+that can affect application performance.</p>
+
+<p>To track memory allocation of objects:</p>
+
+<ol>
+<li>Start your app as described in <a href="#runDebug">Run Your App in Debug Mode</a>.</li>
+<li>Click <strong>Android</strong> <img src="{@docRoot}images/tools/as-android.png" alt=""
+style="vertical-align:bottom;margin:0;height:20px"/> to open the <em>Android DDMS</em>
+tool window.</li>
+<li>On the <em>Android DDMS</em> tool window, select the <strong>Devices | logcat tab</strong>.</li>
+<li>Select your device from the dropdown list.</li>
+<li>Select your app by its package name from the list of running apps.</li>
+<li>Click <strong>Start Allocation Tracking</strong>
+<img src="{@docRoot}images/tools/as-allocstart.png" alt=""
+style="vertical-align:bottom;margin:0;height:20px"/></li>
+<li>Interact with your app on the device.</li>
+<li>Click <strong>Stop Allocation Tracking</strong>
+<img src="{@docRoot}images/tools/as-allocstop.png" alt=""
+style="vertical-align:bottom;margin:0;height:20px"/></li>
+</ol>
+
+<p>Android Studio shows the objects that the system allocated with the following information:</p>
+
+<ul>
+<li>Allocation order</li>
+<li>Allocated class</li>
+<li>Allocation size</li>
+<li>Thread ID</li>
+<li>Allocation method, class, and line number</li>
+<li>Stack trace at the point of allocation</li>
+</ul>
+
+<img src="{@docRoot}images/tools/as-alloctrack.png" alt="" width="750" height="252" />
+<p class="img-caption"><strong>Figure 8.</strong> Object allocation tracking in Android Studio.</p>
+
+
 <h2 id="deviceMonitor">Analyze Runtime Metrics to Optimize your App</h2>
 
 <p>Even if your application does not generate runtime errors, this does not mean it is free of
diff --git a/docs/html/training/wearables/apps/creating.jd b/docs/html/training/wearables/apps/creating.jd
index 09a90c8..7252ada 100644
--- a/docs/html/training/wearables/apps/creating.jd
+++ b/docs/html/training/wearables/apps/creating.jd
@@ -112,7 +112,7 @@
   name.</li>
   <li>In the <b>Form Factors</b> window:
     <ul>
-      <li>Select <b>Phone and Tablet</b> and select <b>API 8: Android 2.2 (Froyo)</b>
+      <li>Select <b>Phone and Tablet</b> and select <b>API 9: Android 2.3 (Gingerbread)</b>
       under <b>Minimum SDK</b>.</li>
       <li>Select <b>Wear</b> and select <b>API 20: Android 4.4 (KitKat Wear)</b>
       under <b>Minimum SDK</b>.</li>
diff --git a/docs/html/training/wearables/apps/voice.jd b/docs/html/training/wearables/apps/voice.jd
index 639d90a..4aa8031 100644
--- a/docs/html/training/wearables/apps/voice.jd
+++ b/docs/html/training/wearables/apps/voice.jd
@@ -119,7 +119,7 @@
     <td>
       <dl>
         <dt>Action</dt>
-        <dd><code>android.provider.AlarmClock.ACTION_SET_TIMER</code></dd>
+        <dd><code>android.intent.action.SET_TIMER</code></dd>
         <dt>Extras</dt>
         <dd><code>android.provider.AlarmClock.EXTRA_LENGTH</code> - an integer in the range of
         1 to 86400 (number of seconds in 24 hours) representing the length of the timer </dd>
@@ -244,7 +244,7 @@
 
 In your app, you call {@link android.app.Activity#startActivityForResult startActivityForResult()} using
 the {@link android.speech.RecognizerIntent#ACTION_RECOGNIZE_SPEECH} action. This starts the
- and then handle the result
+speech recognition activity, and you can then handle the result
 in {@link android.app.Activity#onActivityResult onActivityResult()}.
 <pre>
 private static final int SPEECH_REQUEST_CODE = 0;
diff --git a/docs/html/training/wearables/data-layer/events.jd b/docs/html/training/wearables/data-layer/events.jd
index a37afe0..9e8acbc 100644
--- a/docs/html/training/wearables/data-layer/events.jd
+++ b/docs/html/training/wearables/data-layer/events.jd
@@ -102,12 +102,12 @@
 <ul>
   <li><a href="{@docRoot}reference/com/google/android/gms/wearable/WearableListenerService.html#onDataChanged(com.google.android.gms.wearable.DataEventBuffer)"><code>onDataChanged()</code></a>
 - Called when data item objects are created, changed, or deleted. An event on one side of a connection
-triggers an this callback on both sides.</li>
+triggers this callback on both sides.</li>
   <li><a href="{@docRoot}reference/com/google/android/gms/wearable/WearableListenerService.html#onMessageReceived(com.google.android.gms.wearable.MessageEvent)"><code>onMessageReceived()</code></a>
 -  A message sent from one side of a connection triggers this callback on the other side of the connection.</li>
   <li><a href="{@docRoot}reference/com/google/android/gms/wearable/WearableListenerService.html#onMessageReceived(com.google.android.gms.wearable.MessageEvent)"><code>onPeerConnected()</code></a>
   and <a href="{@docRoot}reference/com/google/android/gms/wearable/WearableListenerService.html#onPeerDisconnected(com.google.android.gms.wearable.Node)"><code>onPeerDisconnected()</code></a> -
-  Called when connection with the handheld or wearable is connected or disconnected. 
+  Called when connection with the handheld or wearable is connected or disconnected.
   Changes in connection state on one side of the connection triggers these callbacks on both sides of the connection.
   </li>
 </ul>
@@ -174,7 +174,7 @@
         }
     }
 }
-</pre>  
+</pre>
 
 <p>Here's the corresponding intent filter in the Android manifest file:</p>
 
diff --git a/docs/html/training/wearables/data-layer/messages.jd b/docs/html/training/wearables/data-layer/messages.jd
index d0d5a0c..15e552d 100644
--- a/docs/html/training/wearables/data-layer/messages.jd
+++ b/docs/html/training/wearables/data-layer/messages.jd
@@ -95,5 +95,5 @@
 <p>
 This is just a snippet that requires more implementation details. Learn about
 how to implement a full listener service or activity in
-<a href="#listening">Listening for Data Layer Events</a>.
+<a href="{@docRoot}training/wearables/data-layer/events.html">Listening for Data Layer Events</a>.
 </p>
\ No newline at end of file
diff --git a/docs/html/training/wearables/notifications/creating.jd b/docs/html/training/wearables/notifications/creating.jd
index 98915b7..d6ad34a 100644
--- a/docs/html/training/wearables/notifications/creating.jd
+++ b/docs/html/training/wearables/notifications/creating.jd
@@ -33,7 +33,15 @@
 </div>
 
 <h2 id="Import">Import the necessary classes</h2>
-<p>Before you begin, import the necessary classes from the support library:</p>
+
+<p>To import the necessary packages, add this line to your <code>build.gradle</code>file:</p>
+
+<pre>
+compile "com.android.support:support-v4:20.0.+"
+</pre>
+
+<p>Now that your project has access to the necessary packages, import the necessary classes from
+the support library:</p>
 
 <pre style="clear:right">
 import android.support.v4.app.NotificationCompat;
@@ -292,4 +300,4 @@
 <p>The {@link android.support.v4.app.NotificationCompat.WearableExtender} APIs allow you to add
 additional pages to notifications, stack notifications, and more. Continue to the following lessons
 to learn about these features.
-</p>
\ No newline at end of file
+</p>