Rename getFrontendInfoList to getAvailableFrontendInfo and improve the

java doc

Test: atest TunerFrontendTests
Bug: 173053458
Change-Id: I18b0a45c57536188d500febe58026e72a3152637
This commit is contained in:
Amy Zhang
2020-12-02 16:10:48 -08:00
parent 59fa0874c7
commit e1e4241f89
2 changed files with 16 additions and 7 deletions

View File

@@ -5041,9 +5041,9 @@ package android.media.tv.tuner {
method public int disconnectFrontendToCiCam(int);
method public int getAvSyncHwId(@NonNull android.media.tv.tuner.filter.Filter);
method public long getAvSyncTime(int);
method @Nullable public java.util.List<android.media.tv.tuner.frontend.FrontendInfo> getAvailableFrontendInfos();
method @Nullable public android.media.tv.tuner.DemuxCapabilities getDemuxCapabilities();
method @Nullable public android.media.tv.tuner.frontend.FrontendInfo getFrontendInfo();
method @Nullable public java.util.List<android.media.tv.tuner.frontend.FrontendInfo> getFrontendInfoList();
method @Nullable public android.media.tv.tuner.frontend.FrontendStatus getFrontendStatus(@NonNull int[]);
method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_TV_DESCRAMBLER) public android.media.tv.tuner.Descrambler openDescrambler();
method @Nullable public android.media.tv.tuner.dvr.DvrPlayback openDvrPlayback(long, @NonNull java.util.concurrent.Executor, @NonNull android.media.tv.tuner.dvr.OnPlaybackStatusChangedListener);

View File

@@ -977,9 +977,11 @@ public class Tuner implements AutoCloseable {
}
/**
* Gets the initialized frontend information.
* Gets the currently initialized and activated frontend information. To get all the available
* frontend info on the device, use {@link getAvailableFrontendInfos()}.
*
* @return The frontend information. {@code null} if the operation failed.
* @return The active frontend information. {@code null} if the operation failed.
* @throws IllegalStateException if there is no active frontend currently.
*/
@Nullable
public FrontendInfo getFrontendInfo() {
@@ -996,13 +998,20 @@ public class Tuner implements AutoCloseable {
}
/**
* Get a list all the existed frontend information.
* Gets a list of all the available frontend information on the device. To get the information
* of the currently active frontend, use {@link getFrontendInfo()}. The active frontend
* information is also included in the list of the available frontend information.
*
* @return The list of all the frontend information. {@code null} if the operation failed.
* @return The list of all the available frontend information. {@code null} if the operation
* failed.
*/
@Nullable
public List<FrontendInfo> getFrontendInfoList() {
return Arrays.asList(getFrontendInfoListInternal());
public List<FrontendInfo> getAvailableFrontendInfos() {
FrontendInfo[] feInfoList = getFrontendInfoListInternal();
if (feInfoList == null) {
return null;
}
return Arrays.asList(feInfoList);
}
/** @hide */