Merge "Update documentation for TV DVB devices."

This commit is contained in:
nchalko
2020-01-23 17:14:35 +00:00
committed by Gerrit Code Review
3 changed files with 23 additions and 15 deletions

View File

@@ -4052,8 +4052,8 @@ package android.media.tv {
public final class DvbDeviceInfo implements android.os.Parcelable {
ctor public DvbDeviceInfo(int, int);
method public int describeContents();
method public int getAdapterId();
method public int getDeviceId();
method @IntRange(from=0) public int getAdapterId();
method @IntRange(from=0) public int getDeviceId();
method public void writeToParcel(@NonNull android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.DvbDeviceInfo> CREATOR;
}

View File

@@ -16,6 +16,7 @@
package android.media.tv;
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Parcel;
@@ -23,9 +24,13 @@ import android.os.Parcelable;
import android.util.Log;
/**
* Simple container for information about DVB device.
* Not for third-party developers.
* A digital video broadcasting (DVB) device.
*
* <p> Simple wrapper around a <a href="https://www.linuxtv.org/docs/dvbapi/dvbapi.html">Linux DVB
* v3</a> device.
*
* @see TvInputManager#getDvbDeviceList()
* @see TvInputManager#openDvbDevice(DvbDeviceInfo, int)
* @hide
*/
@SystemApi
@@ -67,17 +72,19 @@ public final class DvbDeviceInfo implements Parcelable {
}
/**
* Returns the adapter ID of DVB device, in terms of enumerating the DVB device adapters
* installed in the system. The adapter ID counts from zero.
* Returns the adapter ID.
*
* <p>DVB Adapters contain one or more devices.
*/
@IntRange(from = 0)
public int getAdapterId() {
return mAdapterId;
}
/**
* Returns the device ID of DVB device, in terms of enumerating the DVB devices attached to
* the same device adapter. The device ID counts from zero.
* Returns the device ID.
*/
@IntRange(from = 0)
public int getDeviceId() {
return mDeviceId;
}

View File

@@ -1664,7 +1664,7 @@ public final class TvInputManager {
}
/**
* Returns the list of currently available DVB devices on the system.
* Returns the list of currently available DVB frontend devices on the system.
*
* @return the list of {@link DvbDeviceInfo} objects representing available DVB devices.
* @hide
@@ -1681,16 +1681,17 @@ public final class TvInputManager {
}
/**
* Returns a {@link ParcelFileDescriptor} of a specified DVB device for a given
* {@link DvbDeviceInfo}
* Returns a {@link ParcelFileDescriptor} of a specified DVB device of a given type for a given
* {@link DvbDeviceInfo}.
*
* @param info A {@link DvbDeviceInfo} to open a DVB device.
* @param deviceType A DVB device type. The type can be {@link #DVB_DEVICE_DEMUX},
* {@link #DVB_DEVICE_DVR} or {@link #DVB_DEVICE_FRONTEND}.
* @param deviceType A DVB device type.
* @return a {@link ParcelFileDescriptor} of a specified DVB device for a given
* {@link DvbDeviceInfo}, or {@code null} if the given {@link DvbDeviceInfo}
* failed to open.
* {@link DvbDeviceInfo}, or {@code null} if the given {@link DvbDeviceInfo}
* failed to open.
* @throws IllegalArgumentException if {@code deviceType} is invalid or the device is not found.
* @see <a href="https://www.linuxtv.org/docs/dvbapi/dvbapi.html">Linux DVB API v3</a>
* @hide
*/
@SystemApi