Make Uri.toSafeString() also handle 'rtsp'

Bug: 123669012
Test: atest CtsNetTestCases:android.net.cts.UriTest
Change-Id: I082bdbd55589f6b99a8cf5fc68c897477f2fa792
Signed-off-by: Eunyoung Moon <eunyoung.moon@lge.com>
This commit is contained in:
eunyoung.moon
2019-02-14 15:02:59 +09:00
committed by Dongwon Kang
parent 00a4170c0c
commit 9c0038ebd3

View File

@@ -402,7 +402,7 @@ public abstract class Uri implements Parcelable, Comparable<Uri> {
}
return builder.toString();
} else if (scheme.equalsIgnoreCase("http") || scheme.equalsIgnoreCase("https")
|| scheme.equalsIgnoreCase("ftp")) {
|| scheme.equalsIgnoreCase("ftp") || scheme.equalsIgnoreCase("rtsp")) {
ssp = "//" + ((getHost() != null) ? getHost() : "")
+ ((getPort() != -1) ? (":" + getPort()) : "")
+ "/...";