Merge "Add two extended Frontend Scan Message in Tuner 1.1"
This commit is contained in:
@@ -6309,7 +6309,9 @@ package android.media.tv.tuner.frontend {
|
||||
method public void onHierarchyReported(int);
|
||||
method public void onInputStreamIdsReported(@NonNull int[]);
|
||||
method public void onLocked();
|
||||
method public default void onModulationReported(int);
|
||||
method public void onPlpIdsReported(@NonNull int[]);
|
||||
method public default void onPriorityReported(boolean);
|
||||
method public void onProgress(@IntRange(from=0, to=100) int);
|
||||
method public void onScanStopped();
|
||||
method public void onSignalTypeReported(int);
|
||||
|
||||
@@ -1048,6 +1048,20 @@ public class Tuner implements AutoCloseable {
|
||||
}
|
||||
}
|
||||
|
||||
private void onModulationReported(int modulation) {
|
||||
if (mScanCallbackExecutor != null && mScanCallback != null) {
|
||||
mScanCallbackExecutor.execute(
|
||||
() -> mScanCallback.onModulationReported(modulation));
|
||||
}
|
||||
}
|
||||
|
||||
private void onPriorityReported(boolean isHighPriority) {
|
||||
if (mScanCallbackExecutor != null && mScanCallback != null) {
|
||||
mScanCallbackExecutor.execute(
|
||||
() -> mScanCallback.onPriorityReported(isHighPriority));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a filter object based on the given types and buffer size.
|
||||
*
|
||||
|
||||
@@ -19,6 +19,7 @@ package android.media.tv.tuner.frontend;
|
||||
import android.annotation.IntRange;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.SystemApi;
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* Scan callback.
|
||||
@@ -27,6 +28,8 @@ import android.annotation.SystemApi;
|
||||
*/
|
||||
@SystemApi
|
||||
public interface ScanCallback {
|
||||
/** @hide **/
|
||||
String TAG = "ScanCallback";
|
||||
|
||||
/** Scan locked the signal. */
|
||||
void onLocked();
|
||||
@@ -70,4 +73,13 @@ public interface ScanCallback {
|
||||
/** Frontend signal type. */
|
||||
void onSignalTypeReported(@AnalogFrontendSettings.SignalType int signalType);
|
||||
|
||||
/** Frontend modulation reported. */
|
||||
default void onModulationReported(@FrontendStatus.FrontendModulation int modulation) {
|
||||
Log.d(TAG, "Received modulation scan message");
|
||||
}
|
||||
|
||||
/** Frontend scan message priority reported. */
|
||||
default void onPriorityReported(boolean isHighPriority) {
|
||||
Log.d(TAG, "Received priority scan message: isHighPriority=" + isHighPriority);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6249,7 +6249,9 @@ package android.media.tv.tuner.frontend {
|
||||
method public void onHierarchyReported(int);
|
||||
method public void onInputStreamIdsReported(@NonNull int[]);
|
||||
method public void onLocked();
|
||||
method public default void onModulationReported(int);
|
||||
method public void onPlpIdsReported(@NonNull int[]);
|
||||
method public default void onPriorityReported(boolean);
|
||||
method public void onProgress(@IntRange(from=0, to=100) int);
|
||||
method public void onScanStopped();
|
||||
method public void onSignalTypeReported(int);
|
||||
|
||||
Reference in New Issue
Block a user