[Nearby Devices] Minor updates to API based on API review.

Fixes: 220153391
Test: compiles
Change-Id: I0bb50f04af041f79413e8f1fbc4be78901e5dd88
This commit is contained in:
Caitlin Cassidy
2022-02-23 19:46:01 +00:00
parent e31ec794dc
commit e6da154c51
2 changed files with 5 additions and 3 deletions

View File

@@ -6325,7 +6325,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();
}