am e525eef4: merge from open-source master

Merge commit 'e525eef4b8e284ac8eb023bd0df4eeed37916d4b'

* commit 'e525eef4b8e284ac8eb023bd0df4eeed37916d4b':
  Update comment in mediaplayer.h.
  Update documentation for getVideoWidth and getVideoHeight.
  Make Uri.parseUserPart, parseHost, and parsePort symmetric
  Javadoc used startApplication() which doesnt exists, changed to createApplication()
This commit is contained in:
Jean-Baptiste Queru
2009-09-17 12:10:47 -07:00
committed by Android Git Automerger
5 changed files with 21 additions and 10 deletions

View File

@@ -1028,7 +1028,7 @@ public abstract class Uri implements Parcelable, Comparable<Uri> {
}
private String parseHost() {
String authority = getAuthority();
String authority = getEncodedAuthority();
if (authority == null) {
return null;
}
@@ -1037,9 +1037,11 @@ public abstract class Uri implements Parcelable, Comparable<Uri> {
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 @@ public abstract class Uri implements Parcelable, Comparable<Uri> {
}
private int parsePort() {
String authority = getAuthority();
String authority = getEncodedAuthority();
if (authority == null) {
return -1;
}
@@ -1065,7 +1067,7 @@ public abstract class Uri implements Parcelable, Comparable<Uri> {
return -1;
}
String portString = authority.substring(portSeparator + 1);
String portString = decode(authority.substring(portSeparator + 1));
try {
return Integer.parseInt(portString);
} catch (NumberFormatException e) {