Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1e4241f authored by Amy Zhang's avatar Amy Zhang
Browse files

Rename getFrontendInfoList to getAvailableFrontendInfo and improve the

java doc

Test: atest TunerFrontendTests
Bug: 173053458
Change-Id: I18b0a45c57536188d500febe58026e72a3152637
parent 59fa0874
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
+15 −6
Original line number Diff line number Diff line
@@ -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 */