api-review: add @Nullable for getFriendlyNames() and getServerUri()
Bug: 126701512 Test: unitTest Change-Id: Ia09bcc4c34e0915b2add89f5851be6e732402ac0 Signed-off-by: Ecco Park <eccopark@google.com>
This commit is contained in:
@@ -4965,8 +4965,8 @@ package android.net.wifi.hotspot2 {
|
||||
|
||||
public final class OsuProvider implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public String getFriendlyName();
|
||||
method public android.net.Uri getServerUri();
|
||||
method @Nullable public String getFriendlyName();
|
||||
method @Nullable public android.net.Uri getServerUri();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.OsuProvider> CREATOR;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.net.wifi.hotspot2;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.annotation.SystemApi;
|
||||
import android.graphics.drawable.Icon;
|
||||
import android.net.Uri;
|
||||
@@ -156,7 +157,7 @@ public final class OsuProvider implements Parcelable {
|
||||
*
|
||||
* @return String matching the default locale, null otherwise
|
||||
*/
|
||||
public String getFriendlyName() {
|
||||
public @Nullable String getFriendlyName() {
|
||||
if (mFriendlyNames == null || mFriendlyNames.isEmpty()) return null;
|
||||
String lang = Locale.getDefault().getLanguage();
|
||||
String friendlyName = mFriendlyNames.get(lang);
|
||||
@@ -180,7 +181,7 @@ public final class OsuProvider implements Parcelable {
|
||||
return mServiceDescription;
|
||||
}
|
||||
|
||||
public Uri getServerUri() {
|
||||
public @Nullable Uri getServerUri() {
|
||||
return mServerUri;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user