am 4e483ed3: Merge "docs: misc bug fixes. including important versioning fixes for first app class" into jb-mr1-dev

* commit '4e483ed30697472aceb05bb1555f14b066ee8502':
  docs: misc bug fixes. including important versioning fixes for first app class
diff --git a/docs/html/google/play/licensing/adding-licensing.jd b/docs/html/google/play/licensing/adding-licensing.jd
index 15d1e92..8ecbe9e 100644
--- a/docs/html/google/play/licensing/adding-licensing.jd
+++ b/docs/html/google/play/licensing/adding-licensing.jd
@@ -93,7 +93,7 @@
 element as a child of <code>&lt;manifest&gt;</code>, as follows: </p>
 
 <p style="margin-left:2em;"><code>&lt;uses-permission
-android:name="com.android.vending.CHECK_LICENSE"&gt;</code></p>
+android:name="com.android.vending.CHECK_LICENSE" /&gt;</code></p>
 
 <p>For example, here's how the LVL sample application declares the permission:
 </p>
diff --git a/docs/html/google/play/licensing/setting-up.jd b/docs/html/google/play/licensing/setting-up.jd
index 77e9d09..1d4e775 100644
--- a/docs/html/google/play/licensing/setting-up.jd
+++ b/docs/html/google/play/licensing/setting-up.jd
@@ -290,7 +290,7 @@
 system, add and track the sources that are in the working location rather
 than those in default location in the SDK. </p>
 
-<p>Moving the library sources is important is because, when you later update the
+<p>Moving the library sources is important because when you later update the
 Licensing package, the SDK installs the new files to the same location as
 the older files. Moving your working library files to a safe location ensures
 that your work won't be inadvertently overwritten should you download a new
diff --git a/docs/html/guide/components/aidl.jd b/docs/html/guide/components/aidl.jd
index 805b7ec..0be6e6f 100644
--- a/docs/html/guide/components/aidl.jd
+++ b/docs/html/guide/components/aidl.jd
@@ -208,7 +208,7 @@
 defines a few helper methods, most notably {@code asInterface()}, which takes an {@link
 android.os.IBinder} (usually the one passed to a client's {@link
 android.content.ServiceConnection#onServiceConnected onServiceConnected()} callback method) and
-returns an instance of the stub interface. See the section <a href="#calling">Calling an IPC
+returns an instance of the stub interface. See the section <a href="#Calling">Calling an IPC
 Method</a> for more details on how to make this cast.</p>
 
 <p>To implement the interface generated from the {@code .aidl}, extend the generated {@link
diff --git a/docs/html/training/basics/data-storage/databases.jd b/docs/html/training/basics/data-storage/databases.jd
index 3a717dd..8b11983 100644
--- a/docs/html/training/basics/data-storage/databases.jd
+++ b/docs/html/training/basics/data-storage/databases.jd
@@ -288,7 +288,7 @@
 // Specify arguments in placeholder order.
 String[] selelectionArgs = { String.valueOf(rowId) };
 // Issue SQL statement.
-db.delete(table_name, mySelection, selectionArgs);
+db.delete(table_name, selection, selectionArgs);
 </pre>
 
 
diff --git a/docs/html/training/basics/firstapp/running-app.jd b/docs/html/training/basics/firstapp/running-app.jd
index 7866083..999d399 100644
--- a/docs/html/training/basics/firstapp/running-app.jd
+++ b/docs/html/training/basics/firstapp/running-app.jd
@@ -52,7 +52,27 @@
   <dd>The <a href="{@docRoot}guide/topics/manifest/manifest-intro.html">manifest file</a> describes
 the fundamental characteristics of the app and defines each of
 its components. You'll learn about various declarations in this file as you read more training
-classes.</dd>
+classes.
+  <p>One of the most important elements your manifest should include is the <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code &lt;uses-sdk>}</a>
+element. This declares your app's compatibility with different Android versions using the <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code android:minSdkVersion}</a>
+and <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code android:targetSdkVersion}</a>
+attributes. For your first app, it should look like this:</p>
+<pre>
+&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" ... >
+    &lt;uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" />
+    ...
+&lt;/manifest>
+</pre>
+<p>You should always set the <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code android:targetSdkVersion}</a>
+as high as possible and test your app on the corresponding platform version. For more information,
+read <a href="{@docRoot}training/basics/supporting-devices/platforms.html">Supporting Different
+Platform Versions</a>.</p>
+
+  </dd>
   <dt><code>src/</code></dt>
   <dd>Directory for your app's main source files. By default, it includes an {@link
 android.app.Activity} class that runs when your app is launched using the app icon.</dd>
diff --git a/docs/html/training/basics/firstapp/starting-activity.jd b/docs/html/training/basics/firstapp/starting-activity.jd
index 8943c9d..65f22901 100644
--- a/docs/html/training/basics/firstapp/starting-activity.jd
+++ b/docs/html/training/basics/firstapp/starting-activity.jd
@@ -249,16 +249,29 @@
   Keep this one the way it is.</li>
 </ul>
 
-<p>The class should look like this:</p>
+<p>Because the {@link android.app.ActionBar} APIs are available only on {@link
+android.os.Build.VERSION_CODES#HONEYCOMB} (API level 11) and higher, you must add a condition
+around the {@link android.app.Activity#getActionBar()} method to check the current platform version.
+Additionally, you must add the {@code &#64;SuppressLint("NewApi")} tag to the
+{@link android.app.Activity#onCreate onCreate()} method to avoid <a
+href="{@docRoot}tools/help/lint.html">lint</a> errors.</p>
+
+<p>The {@code DisplayMessageActivity} class should now look like this:</p>
 
 <pre>
 public class DisplayMessageActivity extends Activity {
+
+    &#64;SuppressLint("NewApi")
     &#64;Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_display_message);
-        // Show the Up button in the action bar.
-        getActionBar().setDisplayHomeAsUpEnabled(true);
+
+        // Make sure we're running on Honeycomb or higher to use ActionBar APIs
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
+            // Show the Up button in the action bar.
+            getActionBar().setDisplayHomeAsUpEnabled(true);
+        }
     }
 
     &#64;Override
diff --git a/docs/html/training/connect-devices-wirelessly/wifi-direct.jd b/docs/html/training/connect-devices-wirelessly/wifi-direct.jd
index 99bb243..b8ed664 100644
--- a/docs/html/training/connect-devices-wirelessly/wifi-direct.jd
+++ b/docs/html/training/connect-devices-wirelessly/wifi-direct.jd
@@ -263,7 +263,7 @@
         // asynchronous call and the calling activity is notified with a
         // callback on PeerListListener.onPeersAvailable()
         if (mManager != null) {
-            mManager.requestPeers(mChannel, peerListener);
+            mManager.requestPeers(mChannel, peerListListener);
         }
         Log.d(WiFiDirectActivity.TAG, "P2P peers changed");
     }...
diff --git a/docs/html/training/custom-views/create-view.jd b/docs/html/training/custom-views/create-view.jd
index 674bcc9..b849cb3 100644
--- a/docs/html/training/custom-views/create-view.jd
+++ b/docs/html/training/custom-views/create-view.jd
@@ -68,8 +68,8 @@
 
 <pre class="prettyprint">
 class PieChart extends View {
-    public PieChart(Context ctx, AttributeSet attrs) {
-        super(ctx, attrs);
+    public PieChart(Context context, AttributeSet attrs) {
+        super(context, attrs);
     }
 }
 </pre>
@@ -104,7 +104,7 @@
 </p>
 
 <pre>
-&lt;resources>;
+&lt;resources>
    &lt;declare-styleable name="PieChart">
        &lt;attr name="showText" format="boolean" />
        &lt;attr name="labelPosition" format="enum">
@@ -189,8 +189,8 @@
             reads its attributes:</p>
 
 <pre>
-public PieChart(Context ctx, AttributeSet attrs) {
-   super(ctx, attrs);
+public PieChart(Context context, AttributeSet attrs) {
+   super(context, attrs);
    TypedArray a = context.getTheme().obtainStyledAttributes(
         attrs,
         R.styleable.PieChart,