Merge "CaptivePortalData: use CharSequence in VenueFriendlyName API"

This commit is contained in:
Treehugger Robot
2021-03-19 04:13:36 +00:00
committed by Gerrit Code Review
2 changed files with 9 additions and 9 deletions

View File

@@ -18,7 +18,7 @@ package android.net {
method public long getRefreshTimeMillis(); method public long getRefreshTimeMillis();
method @Nullable public android.net.Uri getUserPortalUrl(); method @Nullable public android.net.Uri getUserPortalUrl();
method public int getUserPortalUrlSource(); method public int getUserPortalUrlSource();
method @Nullable public String getVenueFriendlyName(); method @Nullable public CharSequence getVenueFriendlyName();
method @Nullable public android.net.Uri getVenueInfoUrl(); method @Nullable public android.net.Uri getVenueInfoUrl();
method public int getVenueInfoUrlSource(); method public int getVenueInfoUrlSource();
method public boolean isCaptive(); method public boolean isCaptive();
@@ -40,7 +40,7 @@ package android.net {
method @NonNull public android.net.CaptivePortalData.Builder setSessionExtendable(boolean); method @NonNull public android.net.CaptivePortalData.Builder setSessionExtendable(boolean);
method @NonNull public android.net.CaptivePortalData.Builder setUserPortalUrl(@Nullable android.net.Uri); method @NonNull public android.net.CaptivePortalData.Builder setUserPortalUrl(@Nullable android.net.Uri);
method @NonNull public android.net.CaptivePortalData.Builder setUserPortalUrl(@Nullable android.net.Uri, int); method @NonNull public android.net.CaptivePortalData.Builder setUserPortalUrl(@Nullable android.net.Uri, int);
method @NonNull public android.net.CaptivePortalData.Builder setVenueFriendlyName(@Nullable String); method @NonNull public android.net.CaptivePortalData.Builder setVenueFriendlyName(@Nullable CharSequence);
method @NonNull public android.net.CaptivePortalData.Builder setVenueInfoUrl(@Nullable android.net.Uri); method @NonNull public android.net.CaptivePortalData.Builder setVenueInfoUrl(@Nullable android.net.Uri);
method @NonNull public android.net.CaptivePortalData.Builder setVenueInfoUrl(@Nullable android.net.Uri, int); method @NonNull public android.net.CaptivePortalData.Builder setVenueInfoUrl(@Nullable android.net.Uri, int);
} }

View File

@@ -42,7 +42,7 @@ public final class CaptivePortalData implements Parcelable {
private final long mByteLimit; private final long mByteLimit;
private final long mExpiryTimeMillis; private final long mExpiryTimeMillis;
private final boolean mCaptive; private final boolean mCaptive;
private final String mVenueFriendlyName; private final CharSequence mVenueFriendlyName;
private final int mVenueInfoUrlSource; private final int mVenueInfoUrlSource;
private final int mUserPortalUrlSource; private final int mUserPortalUrlSource;
@@ -65,7 +65,7 @@ public final class CaptivePortalData implements Parcelable {
private CaptivePortalData(long refreshTimeMillis, Uri userPortalUrl, Uri venueInfoUrl, private CaptivePortalData(long refreshTimeMillis, Uri userPortalUrl, Uri venueInfoUrl,
boolean isSessionExtendable, long byteLimit, long expiryTimeMillis, boolean captive, boolean isSessionExtendable, long byteLimit, long expiryTimeMillis, boolean captive,
String venueFriendlyName, int venueInfoUrlSource, int userPortalUrlSource) { CharSequence venueFriendlyName, int venueInfoUrlSource, int userPortalUrlSource) {
mRefreshTimeMillis = refreshTimeMillis; mRefreshTimeMillis = refreshTimeMillis;
mUserPortalUrl = userPortalUrl; mUserPortalUrl = userPortalUrl;
mVenueInfoUrl = venueInfoUrl; mVenueInfoUrl = venueInfoUrl;
@@ -80,7 +80,7 @@ public final class CaptivePortalData implements Parcelable {
private CaptivePortalData(Parcel p) { private CaptivePortalData(Parcel p) {
this(p.readLong(), p.readParcelable(null), p.readParcelable(null), p.readBoolean(), this(p.readLong(), p.readParcelable(null), p.readParcelable(null), p.readBoolean(),
p.readLong(), p.readLong(), p.readBoolean(), p.readString(), p.readInt(), p.readLong(), p.readLong(), p.readBoolean(), p.readCharSequence(), p.readInt(),
p.readInt()); p.readInt());
} }
@@ -98,7 +98,7 @@ public final class CaptivePortalData implements Parcelable {
dest.writeLong(mByteLimit); dest.writeLong(mByteLimit);
dest.writeLong(mExpiryTimeMillis); dest.writeLong(mExpiryTimeMillis);
dest.writeBoolean(mCaptive); dest.writeBoolean(mCaptive);
dest.writeString(mVenueFriendlyName); dest.writeCharSequence(mVenueFriendlyName);
dest.writeInt(mVenueInfoUrlSource); dest.writeInt(mVenueInfoUrlSource);
dest.writeInt(mUserPortalUrlSource); dest.writeInt(mUserPortalUrlSource);
} }
@@ -114,7 +114,7 @@ public final class CaptivePortalData implements Parcelable {
private long mBytesRemaining = -1; private long mBytesRemaining = -1;
private long mExpiryTime = -1; private long mExpiryTime = -1;
private boolean mCaptive; private boolean mCaptive;
private String mVenueFriendlyName; private CharSequence mVenueFriendlyName;
private @CaptivePortalDataSource int mVenueInfoUrlSource = CAPTIVE_PORTAL_DATA_SOURCE_OTHER; private @CaptivePortalDataSource int mVenueInfoUrlSource = CAPTIVE_PORTAL_DATA_SOURCE_OTHER;
private @CaptivePortalDataSource int mUserPortalUrlSource = private @CaptivePortalDataSource int mUserPortalUrlSource =
CAPTIVE_PORTAL_DATA_SOURCE_OTHER; CAPTIVE_PORTAL_DATA_SOURCE_OTHER;
@@ -228,7 +228,7 @@ public final class CaptivePortalData implements Parcelable {
* Set the venue friendly name. * Set the venue friendly name.
*/ */
@NonNull @NonNull
public Builder setVenueFriendlyName(@Nullable String venueFriendlyName) { public Builder setVenueFriendlyName(@Nullable CharSequence venueFriendlyName) {
mVenueFriendlyName = venueFriendlyName; mVenueFriendlyName = venueFriendlyName;
return this; return this;
} }
@@ -321,7 +321,7 @@ public final class CaptivePortalData implements Parcelable {
* Get the venue friendly name * Get the venue friendly name
*/ */
@Nullable @Nullable
public String getVenueFriendlyName() { public CharSequence getVenueFriendlyName() {
return mVenueFriendlyName; return mVenueFriendlyName;
} }