Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1041d3f authored by Ecco Park's avatar Ecco Park
Browse files

api-review: add @Nullable for getFriendlyNames() and getServerUri()



Bug: 126701512
Test: unitTest
Change-Id: Ia09bcc4c34e0915b2add89f5851be6e732402ac0
Signed-off-by: default avatarEcco Park <eccopark@google.com>
parent a2c829c1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
  }
+3 −2
Original line number Diff line number Diff line
@@ -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;
    }