Unhide scan methods and classes.
Bug: 139308734 Test: m framework-all system-api-stubs-docs-update-current-api Change-Id: I4b68a50b1b880091da70a455f5c58364d27b5283
This commit is contained in:
@@ -4728,7 +4728,9 @@ package android.media.tv.tuner {
|
||||
method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public android.media.tv.tuner.Lnb openLnb(@Nullable java.util.concurrent.Executor, @Nullable android.media.tv.tuner.LnbCallback);
|
||||
method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public android.media.tv.tuner.Lnb openLnbByName(@Nullable String, @Nullable java.util.concurrent.Executor, @NonNull android.media.tv.tuner.LnbCallback);
|
||||
method @Nullable public android.media.tv.tuner.filter.TimeFilter openTimeFilter();
|
||||
method @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public int scan(@NonNull android.media.tv.tuner.frontend.FrontendSettings, int, @NonNull java.util.concurrent.Executor, @NonNull android.media.tv.tuner.frontend.ScanCallback);
|
||||
method @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public void setOnTuneEventListener(@NonNull java.util.concurrent.Executor, @NonNull android.media.tv.tuner.frontend.OnTuneEventListener);
|
||||
method @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public int stopScan();
|
||||
method @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public int stopTune();
|
||||
method @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public int tune(@NonNull android.media.tv.tuner.frontend.FrontendSettings);
|
||||
}
|
||||
@@ -4744,6 +4746,9 @@ package android.media.tv.tuner {
|
||||
field public static final int RESULT_SUCCESS = 0; // 0x0
|
||||
field public static final int RESULT_UNAVAILABLE = 1; // 0x1
|
||||
field public static final int RESULT_UNKNOWN_ERROR = 6; // 0x6
|
||||
field public static final int SCAN_TYPE_AUTO = 1; // 0x1
|
||||
field public static final int SCAN_TYPE_BLIND = 2; // 0x2
|
||||
field public static final int SCAN_TYPE_UNDEFINED = 0; // 0x0
|
||||
field public static final int SC_HEVC_INDEX_AUD = 2; // 0x2
|
||||
field public static final int SC_HEVC_INDEX_SLICE_BLA_N_LP = 16; // 0x10
|
||||
field public static final int SC_HEVC_INDEX_SLICE_BLA_W_RADL = 8; // 0x8
|
||||
@@ -5170,6 +5175,11 @@ package android.media.tv.tuner.frontend {
|
||||
method @NonNull public android.media.tv.tuner.frontend.AnalogFrontendSettings.Builder setSifStandard(int);
|
||||
}
|
||||
|
||||
public class Atsc3PlpInfo {
|
||||
method public boolean getLlsFlag();
|
||||
method public int getPlpId();
|
||||
}
|
||||
|
||||
public abstract class FrontendSettings {
|
||||
method public int getFrequency();
|
||||
method public abstract int getType();
|
||||
@@ -5196,6 +5206,23 @@ package android.media.tv.tuner.frontend {
|
||||
field public static final int SIGNAL_NO_SIGNAL = 1; // 0x1
|
||||
}
|
||||
|
||||
public interface ScanCallback {
|
||||
method public void onAnalogSifStandard(int);
|
||||
method public void onAtsc3PlpInfos(@NonNull android.media.tv.tuner.frontend.Atsc3PlpInfo[]);
|
||||
method public void onDvbsStandard(int);
|
||||
method public void onDvbtStandard(int);
|
||||
method public void onFrequenciesReport(@NonNull int[]);
|
||||
method public void onGroupIds(@NonNull int[]);
|
||||
method public void onHierarchy(int);
|
||||
method public void onInputStreamIds(@NonNull int[]);
|
||||
method public void onLocked();
|
||||
method public void onPlpIds(@NonNull int[]);
|
||||
method public void onProgress(@IntRange(from=0, to=100) int);
|
||||
method public void onScanStopped();
|
||||
method public void onSignalType(int);
|
||||
method public void onSymbolRates(@NonNull int[]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
package android.metrics {
|
||||
|
||||
@@ -311,10 +311,10 @@ public final class Tuner implements AutoCloseable {
|
||||
* @throws SecurityException if the caller does not have appropriate permissions.
|
||||
* @throws IllegalStateException if {@code scan} is called again before {@link #stopScan()} is
|
||||
* called.
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER)
|
||||
public int scan(@NonNull FrontendSettings settings, @ScanCallback.ScanType int scanType,
|
||||
@Result
|
||||
public int scan(@NonNull FrontendSettings settings, @TunerConstants.ScanType int scanType,
|
||||
@NonNull @CallbackExecutor Executor executor, @NonNull ScanCallback scanCallback) {
|
||||
TunerUtils.checkTunerPermission(mContext);
|
||||
if (mScanCallback != null || mScanCallbackExecutor != null) {
|
||||
@@ -337,7 +337,6 @@ public final class Tuner implements AutoCloseable {
|
||||
* If the method completes successfully, the frontend stopped previous scanning.
|
||||
*
|
||||
* @throws SecurityException if the caller does not have appropriate permissions.
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER)
|
||||
@Result
|
||||
|
||||
@@ -47,6 +47,27 @@ public final class TunerConstants {
|
||||
*/
|
||||
public static final int INVALID_STREAM_ID = Constants.Constant.INVALID_STREAM_ID;
|
||||
|
||||
/** @hide */
|
||||
@IntDef(prefix = "SCAN_TYPE_", value = {SCAN_TYPE_UNDEFINED, SCAN_TYPE_AUTO, SCAN_TYPE_BLIND})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface ScanType {}
|
||||
/**
|
||||
* Scan type undefined.
|
||||
*/
|
||||
public static final int SCAN_TYPE_UNDEFINED = Constants.FrontendScanType.SCAN_UNDEFINED;
|
||||
/**
|
||||
* Scan type auto.
|
||||
*
|
||||
* <p> Tuner will send {@link #onLocked}
|
||||
*/
|
||||
public static final int SCAN_TYPE_AUTO = Constants.FrontendScanType.SCAN_AUTO;
|
||||
/**
|
||||
* Blind scan.
|
||||
*
|
||||
* <p>Frequency range is not specified. The {@link android.media.tv.tuner.Tuner} will scan an
|
||||
* implementation specific range.
|
||||
*/
|
||||
public static final int SCAN_TYPE_BLIND = Constants.FrontendScanType.SCAN_BLIND;
|
||||
|
||||
/** @hide */
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
|
||||
43
media/java/android/media/tv/tuner/frontend/Atsc3PlpInfo.java
Normal file
43
media/java/android/media/tv/tuner/frontend/Atsc3PlpInfo.java
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.media.tv.tuner.frontend;
|
||||
|
||||
import android.annotation.SystemApi;
|
||||
|
||||
/** PLP information for ATSC3.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public class Atsc3PlpInfo {
|
||||
private final int mPlpId;
|
||||
private final boolean mLlsFlag;
|
||||
|
||||
private Atsc3PlpInfo(int plpId, boolean llsFlag) {
|
||||
mPlpId = plpId;
|
||||
mLlsFlag = llsFlag;
|
||||
}
|
||||
|
||||
/** Gets PLP IDs. */
|
||||
public int getPlpId() {
|
||||
return mPlpId;
|
||||
}
|
||||
|
||||
/** Gets LLS flag. */
|
||||
public boolean getLlsFlag() {
|
||||
return mLlsFlag;
|
||||
}
|
||||
}
|
||||
@@ -16,41 +16,18 @@
|
||||
|
||||
package android.media.tv.tuner.frontend;
|
||||
|
||||
import android.annotation.IntDef;
|
||||
import android.hardware.tv.tuner.V1_0.Constants;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import android.annotation.IntRange;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.SystemApi;
|
||||
|
||||
/**
|
||||
* Scan callback.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public interface ScanCallback {
|
||||
|
||||
/** @hide */
|
||||
@IntDef(prefix = "SCAN_TYPE_", value = {SCAN_TYPE_UNDEFINED, SCAN_TYPE_AUTO, SCAN_TYPE_BLIND})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@interface ScanType {}
|
||||
/**
|
||||
* Scan type undefined.
|
||||
*/
|
||||
int SCAN_TYPE_UNDEFINED = Constants.FrontendScanType.SCAN_UNDEFINED;
|
||||
/**
|
||||
* Scan type auto.
|
||||
*
|
||||
* <p> Tuner will send {@link #onLocked}
|
||||
*/
|
||||
int SCAN_TYPE_AUTO = Constants.FrontendScanType.SCAN_AUTO;
|
||||
/**
|
||||
* Blind scan.
|
||||
*
|
||||
* <p>Frequency range is not specified. The {@link android.media.tv.tuner.Tuner} will scan an
|
||||
* implementation specific range.
|
||||
*/
|
||||
int SCAN_TYPE_BLIND = Constants.FrontendScanType.SCAN_BLIND;
|
||||
|
||||
/** Scan locked the signal. */
|
||||
void onLocked();
|
||||
|
||||
@@ -58,22 +35,22 @@ public interface ScanCallback {
|
||||
void onScanStopped();
|
||||
|
||||
/** scan progress percent (0..100) */
|
||||
void onProgress(int percent);
|
||||
void onProgress(@IntRange(from = 0, to = 100) int percent);
|
||||
|
||||
/** Signal frequencies in Hertz */
|
||||
void onFrequenciesReport(int[] frequency);
|
||||
void onFrequenciesReport(@NonNull int[] frequency);
|
||||
|
||||
/** Symbols per second */
|
||||
void onSymbolRates(int[] rate);
|
||||
void onSymbolRates(@NonNull int[] rate);
|
||||
|
||||
/** Locked Plp Ids for DVBT2 frontend. */
|
||||
void onPlpIds(int[] plpIds);
|
||||
void onPlpIds(@NonNull int[] plpIds);
|
||||
|
||||
/** Locked group Ids for DVBT2 frontend. */
|
||||
void onGroupIds(int[] groupIds);
|
||||
void onGroupIds(@NonNull int[] groupIds);
|
||||
|
||||
/** Stream Ids. */
|
||||
void onInputStreamIds(int[] inputStreamIds);
|
||||
void onInputStreamIds(@NonNull int[] inputStreamIds);
|
||||
|
||||
/** Locked signal standard for DVBS. */
|
||||
void onDvbsStandard(@DvbsFrontendSettings.Standard int dvbsStandandard);
|
||||
@@ -85,7 +62,7 @@ public interface ScanCallback {
|
||||
void onAnalogSifStandard(@AnalogFrontendSettings.SifStandard int sif);
|
||||
|
||||
/** PLP status in a tuned frequency band for ATSC3 frontend. */
|
||||
void onAtsc3PlpInfos(Atsc3PlpInfo[] atsc3PlpInfos);
|
||||
void onAtsc3PlpInfos(@NonNull Atsc3PlpInfo[] atsc3PlpInfos);
|
||||
|
||||
/** Frontend hierarchy. */
|
||||
void onHierarchy(@DvbtFrontendSettings.Hierarchy int hierarchy);
|
||||
@@ -93,24 +70,4 @@ public interface ScanCallback {
|
||||
/** Frontend hierarchy. */
|
||||
void onSignalType(@AnalogFrontendSettings.SignalType int signalType);
|
||||
|
||||
/** PLP information for ATSC3. */
|
||||
class Atsc3PlpInfo {
|
||||
private final int mPlpId;
|
||||
private final boolean mLlsFlag;
|
||||
|
||||
private Atsc3PlpInfo(int plpId, boolean llsFlag) {
|
||||
mPlpId = plpId;
|
||||
mLlsFlag = llsFlag;
|
||||
}
|
||||
|
||||
/** Gets PLP IDs. */
|
||||
public int getPlpId() {
|
||||
return mPlpId;
|
||||
}
|
||||
|
||||
/** Gets LLS flag. */
|
||||
public boolean getLlsFlag() {
|
||||
return mLlsFlag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user