Merge "[Nearby Devices] Minor updates to API based on API review." into tm-dev

This commit is contained in:
Caitlin Cassidy
2022-03-02 16:19:15 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 3 deletions

View File

@@ -6329,7 +6329,6 @@ package android.media {
method public int describeContents();
method @NonNull public String getMediaRoute2Id();
method public int getRangeZone();
method @NonNull public static String rangeZoneToString(int);
method public void writeToParcel(@NonNull android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.media.NearbyDevice> CREATOR;
field public static final int RANGE_CLOSE = 3; // 0x3

View File

@@ -81,6 +81,8 @@ public final class NearbyDevice implements Parcelable {
/**
* Gets a human-readable string of the range zone.
*
* @hide
*/
@NonNull
public static String rangeZoneToString(@RangeZone int rangeZone) {
@@ -103,13 +105,14 @@ public final class NearbyDevice implements Parcelable {
@NonNull private final String mMediaRoute2Id;
@RangeZone private final int mRangeZone;
public NearbyDevice(@NonNull String mediaRoute2Id, int rangeZone) {
/** Creates a device object with the given ID and range zone. */
public NearbyDevice(@NonNull String mediaRoute2Id, @RangeZone int rangeZone) {
mMediaRoute2Id = mediaRoute2Id;
mRangeZone = rangeZone;
}
private NearbyDevice(@NonNull Parcel in) {
mMediaRoute2Id = in.readString();
mMediaRoute2Id = in.readString8();
mRangeZone = in.readInt();
}