diff --git a/core/java/android/net/Uri.java b/core/java/android/net/Uri.java
index 298be3b..9a1b65d 100644
--- a/core/java/android/net/Uri.java
+++ b/core/java/android/net/Uri.java
@@ -1028,7 +1028,7 @@
         }
 
         private String parseHost() {
-            String authority = getAuthority();
+            String authority = getEncodedAuthority();
             if (authority == null) {
                 return null;
             }
@@ -1037,9 +1037,11 @@
             int userInfoSeparator = authority.indexOf('@');
             int portSeparator = authority.indexOf(':', userInfoSeparator);
 
-            return portSeparator == NOT_FOUND
+            String encodedHost = portSeparator == NOT_FOUND
                     ? authority.substring(userInfoSeparator + 1)
                     : authority.substring(userInfoSeparator + 1, portSeparator);
+
+            return decode(encodedHost);
         }
 
         private volatile int port = NOT_CALCULATED;
@@ -1051,7 +1053,7 @@
         }
 
         private int parsePort() {
-            String authority = getAuthority();
+            String authority = getEncodedAuthority();
             if (authority == null) {
                 return -1;
             }
@@ -1065,7 +1067,7 @@
                 return -1;
             }
 
-            String portString = authority.substring(portSeparator + 1);
+            String portString = decode(authority.substring(portSeparator + 1));
             try {
                 return Integer.parseInt(portString);
             } catch (NumberFormatException e) {
diff --git a/core/java/android/text/InputType.java b/core/java/android/text/InputType.java
index 14b8308..8592221 100644
--- a/core/java/android/text/InputType.java
+++ b/core/java/android/text/InputType.java
@@ -20,7 +20,25 @@
 
 /**
  * Bit definitions for an integer defining the basic content type of text
- * held in an {@link Editable} object.
+ * held in an {@link Editable} object. Supported classes may be combined
+ * with variations and flags to indicate desired behaviors.
+ *
+ * <h3>Examples</h3>
+ *
+ * <dl>
+ * <dt>A password field with with the password visible to the user:
+ * <dd>inputType = TYPE_CLASS_TEXT |
+ *     TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
+ *
+ * <dt>A multi-line postal address with automatic capitalization:
+ * <dd>inputType = TYPE_CLASS_TEXT |
+ *     TYPE_TEXT_VARIATION_POSTAL_ADDRESS |
+ *     TYPE_TEXT_FLAG_MULTI_LINE
+ *
+ * <dt>A time field:
+ * <dd>inputType = TYPE_CLASS_DATETIME |
+ *     TYPE_DATETIME_VARIATION_TIME
+ * </dl>
  */
 public interface InputType {
     /**
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 596fd98..f55ca3f 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -5197,7 +5197,7 @@
             mDesiredHeightAtMeasure = desired;
 
             if (heightMode == MeasureSpec.AT_MOST) {
-                height = Math.min(desired, height);
+                height = Math.min(desired, heightSize);
             }
         }
 
diff --git a/docs/html/guide/publishing/versioning.jd b/docs/html/guide/publishing/versioning.jd
index 0bec658..90fb185 100644
--- a/docs/html/guide/publishing/versioning.jd
+++ b/docs/html/guide/publishing/versioning.jd
@@ -117,7 +117,7 @@
 <p>In this example, note that <code>android:versionCode</code> value indicates
 that the current .apk contains the second release of the application code, which
 corresponds to a minor follow-on release, as shown by the
-<code>android:codeName</code> string. </p>
+<code>android:versionName</code> string. </p>
 
 <p>The Android framework provides an API to let applications query the system
 for version information about your application. To obtain version information,
diff --git a/docs/html/guide/topics/fundamentals.jd b/docs/html/guide/topics/fundamentals.jd
index 71705d3..640e44b 100644
--- a/docs/html/guide/topics/fundamentals.jd
+++ b/docs/html/guide/topics/fundamentals.jd
@@ -72,8 +72,8 @@
 runs in isolation from the code of all other applications.</li>
 
 <li>By default, each application is assigned a unique Linux user ID.  
-Permissions are set so that the application's files are visible only 
-that user, only to the application itself &mdash; although there are ways 
+Permissions are set so that the application's files are visible only to
+that user and only to the application itself &mdash; although there are ways
 to export them to other applications as well.</li>
 </ul>
 
diff --git a/docs/html/guide/tutorials/views/hello-mapview.jd b/docs/html/guide/tutorials/views/hello-mapview.jd
index 531300f..7a21485 100644
--- a/docs/html/guide/tutorials/views/hello-mapview.jd
+++ b/docs/html/guide/tutorials/views/hello-mapview.jd
@@ -93,28 +93,6 @@
 }
 </pre>
 <p>You can actually run this now, but all it does is allow you to pan around the map.</p>
-<p>Android provides a handy {@link android.widget.ZoomControls} widget for zooming in and out of a View. 
-MapView can automatically hook one for us by requesting it with the <code>getZoomControls()</code>
-method. Let's do this.</p>
-
-<li>Go back to the layout file. We need a new ViewGroup element, in which we'll 
-   place the ZoomControls. Just below the MapView element (but inside the RelativeLayout), add this element:
-<pre>
-&lt;LinearLayout
-    android:id="@+id/zoomview"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content"
-    android:layout_alignBottom="@id/mapview"
-    android:layout_centerHorizontal="true"
-/></pre>
-
-      <p>It doesn't really matter what kind of ViewGroup we use, because we just want a 
-      container that we can position within our root RelativeLayout.</p>
-
-      <p>The last two attributes are available only to an element that's a child of a 
-      RelativeLayout. <code>layout_alignBottom</code> aligns the bottom of this element to the bottom of 
-      the element identified with a resource tag (which must be a sibling to this element). 
-      <code>layout_centerHorizontal</code> centers this on the horizontal plane.</p></li>
 
    <li>Now go back to the HelloMapView class. We'll now retrieve the ZoomControls object from 
    the MapView and add it to our new layout element. First, at the top of the HelloMapView, 
@@ -122,24 +100,18 @@
 <pre>
 LinearLayout linearLayout;
 MapView mapView;
-ZoomControls mZoom;</pre></li>
+</pre>
 
    <li>Then initialize each of these in <code>onCreate()</code>. We'll capture the LinearLayout and 
    MapView through their layout resources. Then get the ZoomControls from the MapView::
 <pre>
-linearLayout = (LinearLayout) findViewById(R.id.zoomview);
 mapView = (MapView) findViewById(R.id.mapview);
-mZoom = (ZoomControls) mapView.getZoomControls();</pre>
+mapView.setBuiltInZoomControls(true);
+</pre>
 
-      <p>By using the ZoomControls object provided by MapView, we don't have to do any of the work
-      required to actually perform the zoom operations. The ZoomControls widget that MapView 
-      returns for us is already hooked into the MapView and works as soon as we add it to the 
-      layout. The controls will appear whenever the user touches the map, then dissapear after 
-      a few moments of inactivity.</p></li>
-
-   <li>Now just plug our ZoomControls into the LinearLayout we added:
-
-      <pre>linearLayout.addView(mZoom);</pre></li>
+      <p>By using the built-in zoom control provided by MapView, we don't have to do any of the work
+      required to actually perform the zoom operations. The controls will appear whenever the user
+      touches the map, then disappear after a few moments of inactivity.</p></li>
 
    <li>Run it.</li>
 </ol>
diff --git a/include/media/mediaplayer.h b/include/media/mediaplayer.h
index b91b47e..7132b18 100644
--- a/include/media/mediaplayer.h
+++ b/include/media/mediaplayer.h
@@ -75,7 +75,7 @@
 // 'notify' is invoked with the following:
 //   'msg' is set to MEDIA_INFO.
 //   'ext1' should be a value from the enum media_info_type.
-//   'ext2' contains an implementation dependant error code to provide
+//   'ext2' contains an implementation dependant info code to provide
 //          more details. Should default to 0 when not used.
 //
 // The codes are distributed as follow:
diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java
index a676782..07542ed7 100644
--- a/media/java/android/media/MediaPlayer.java
+++ b/media/java/android/media/MediaPlayer.java
@@ -722,7 +722,8 @@
     }
 
     /**
-     * Sets the data source (FileDescriptor) to use.  It is the caller's responsibility
+     * Sets the data source (FileDescriptor) to use.  The FileDescriptor must be
+     * seekable (N.B. a LocalSocket is not seekable). It is the caller's responsibility
      * to close the file descriptor. It is safe to do so as soon as this call returns.
      *
      * @param fd the FileDescriptor for the file you want to play
@@ -871,8 +872,10 @@
      * Returns the width of the video.
      *
      * @return the width of the video, or 0 if there is no video,
-     * no display surface was set, or prepare()/prepareAsync()
-     * have not completed yet
+     * no display surface was set, or the width has not been determined
+     * yet. The OnVideoSizeChangedListener can be registered via
+     * {@link #setOnVideoSizeChangedListener(OnVideoSizeChangedListener)}
+     * to provide a notification when the width is available.
      */
     public native int getVideoWidth();
 
@@ -880,8 +883,10 @@
      * Returns the height of the video.
      *
      * @return the height of the video, or 0 if there is no video,
-     * no display surface was set, or prepare()/prepareAsync()
-     * have not completed yet
+     * no display surface was set, or the height has not been determined
+     * yet. The OnVideoSizeChangedListener can be registered via
+     * {@link #setOnVideoSizeChangedListener(OnVideoSizeChangedListener)}
+     * to provide a notification when the height is available.
      */
     public native int getVideoHeight();
 
diff --git a/media/java/android/media/Ringtone.java b/media/java/android/media/Ringtone.java
index e80d8aa..1713324 100644
--- a/media/java/android/media/Ringtone.java
+++ b/media/java/android/media/Ringtone.java
@@ -137,11 +137,17 @@
                     cursor = res.query(uri, MEDIA_COLUMNS, null, null, null);
                 }
                 
-                if (cursor != null && cursor.getCount() == 1) {
-                    cursor.moveToFirst();
-                    return cursor.getString(2);
-                } else {
-                    title = uri.getLastPathSegment();
+                try {
+                    if (cursor != null && cursor.getCount() == 1) {
+                        cursor.moveToFirst();
+                        return cursor.getString(2);
+                    } else {
+                        title = uri.getLastPathSegment();
+                    }
+                } finally {
+                    if (cursor != null) {
+                        cursor.close();
+                    }
                 }
             }
         }
diff --git a/opengl/java/android/opengl/GLLogWrapper.java b/opengl/java/android/opengl/GLLogWrapper.java
index 4119bf8..f332448 100644
--- a/opengl/java/android/opengl/GLLogWrapper.java
+++ b/opengl/java/android/opengl/GLLogWrapper.java
@@ -1517,7 +1517,7 @@
         arg("count", count);
         startLogIndices();
         for (int i = 0; i < count; i++) {
-            doElement(mStringBuilder, i, first + count);
+            doElement(mStringBuilder, i, first + i);
         }
         endLogIndices();
         end();
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index c3aeca4..40283a8 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -4132,7 +4132,7 @@
      * @param resultCode Result code, if any, from this Activity.
      * @param resultData Result data (Intent), if any, from this Activity.
      * 
-     * @result Returns true if the activity successfully finished, or false if it is still running.
+     * @return Returns true if the activity successfully finished, or false if it is still running.
      */
     public final boolean finishActivity(IBinder token, int resultCode, Intent resultData) {
         // Refuse possible leaked file descriptors
@@ -6050,6 +6050,7 @@
         }
         // If the target requires a specific UID, always fail for others.
         if (reqUid >= 0 && uid != reqUid) {
+            Log.w(TAG, "Permission denied: checkComponentPermission() reqUid=" + reqUid);
             return PackageManager.PERMISSION_DENIED;
         }
         if (permission == null) {
diff --git a/test-runner/android/test/ApplicationTestCase.java b/test-runner/android/test/ApplicationTestCase.java
index 31b226a..ae5fa4d 100644
--- a/test-runner/android/test/ApplicationTestCase.java
+++ b/test-runner/android/test/ApplicationTestCase.java
@@ -53,7 +53,7 @@
  * Context.
  * You can create and inject alternative types of Contexts by calling 
  * {@link AndroidTestCase#setContext(Context) setContext()}.  You must do this <i>before</i> calling
- * startApplication().  The test framework provides a
+ * {@link #createApplication()}.  The test framework provides a
  * number of alternatives for Context, including {@link android.test.mock.MockContext MockContext}, 
  * {@link android.test.RenamingDelegatingContext RenamingDelegatingContext}, and 
  * {@link android.content.ContextWrapper ContextWrapper}.
diff --git a/tests/AndroidTests/src/com/android/unit_tests/UriTest.java b/tests/AndroidTests/src/com/android/unit_tests/UriTest.java
index 0abbc9a..d17e2c3 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/UriTest.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/UriTest.java
@@ -171,6 +171,11 @@
         assertEquals("bob lee", uri.getUserInfo());
         assertEquals("bob%20lee", uri.getEncodedUserInfo());
 
+        uri = Uri.parse("http://bob%40lee%3ajr@local%68ost:4%32");
+        assertEquals("bob@lee:jr", uri.getUserInfo());
+        assertEquals("localhost", uri.getHost());
+        assertEquals(42, uri.getPort());
+
         uri = Uri.parse("http://localhost");
         assertEquals("localhost", uri.getHost());
         assertEquals(-1, uri.getPort());
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index 1a536d6..4067735 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -401,7 +401,7 @@
             ResXMLTree tree;
             asset = assets.openNonAsset(resname, Asset::ACCESS_BUFFER);
             if (asset == NULL) {
-                fprintf(stderr, "ERROR: dump failed because resource %p found\n", resname);
+                fprintf(stderr, "ERROR: dump failed because resource %s found\n", resname);
                 goto bail;
             }
 
@@ -427,7 +427,7 @@
             ResXMLTree tree;
             asset = assets.openNonAsset(resname, Asset::ACCESS_BUFFER);
             if (asset == NULL) {
-                fprintf(stderr, "ERROR: dump failed because resource %p found\n", resname);
+                fprintf(stderr, "ERROR: dump failed because resource %s found\n", resname);
                 goto bail;
             }
 
diff --git a/tools/aapt/StringPool.cpp b/tools/aapt/StringPool.cpp
index 878d3b1..715170a 100644
--- a/tools/aapt/StringPool.cpp
+++ b/tools/aapt/StringPool.cpp
@@ -228,7 +228,7 @@
         }
         dat += (preSize+strPos)/sizeof(uint16_t);
         if (lenSize > sizeof(uint16_t)) {
-            *dat = htods(0x8000 | ((strSize>>16)&0x7ffff));
+            *dat = htods(0x8000 | ((strSize>>16)&0x7fff));
             dat++;
         }
         *dat++ = htods(strSize);
