OSDN Git Service

Update nullability of api
authorTony Huang <tonyychuang@google.com>
Wed, 6 Mar 2019 07:04:37 +0000 (15:04 +0800)
committerTony Huang <tonyychuang@google.com>
Wed, 6 Mar 2019 07:06:21 +0000 (15:06 +0800)
Update nullability of toSafeString api in Uri class.

Fix: 126701632
Test: make
Change-Id: I58f60259296fb1f638222887c67b5d85c7997a13

api/current.txt
core/java/android/net/Uri.java

index 513d3a4..e7d5df9 100755 (executable)
@@ -27723,7 +27723,7 @@ package android.net {
     method public abstract boolean isRelative();
     method public android.net.Uri normalizeScheme();
     method public static android.net.Uri parse(String);
-    method public String toSafeString();
+    method @NonNull public String toSafeString();
     method public abstract String toString();
     method public static android.net.Uri withAppendedPath(android.net.Uri, String);
     method public static void writeToParcel(android.os.Parcel, android.net.Uri);
index 28b2707..9125cfb 100644 (file)
@@ -16,6 +16,7 @@
 
 package android.net;
 
+import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.UnsupportedAppUsage;
 import android.content.Intent;
@@ -380,6 +381,7 @@ public abstract class Uri implements Parcelable, Comparable<Uri> {
      * returned as {@code http://example.com/...}.
      * @return the common forms PII redacted string of this URI
      */
+    @NonNull
     public String toSafeString() {
         String scheme = getScheme();
         String ssp = getSchemeSpecificPart();