Add onDvbcAnnexReported ScanCallback
Test: atest android.media.tv.tuner.cts Bug: 169868608 Change-Id: I7204d1f9aa9282ce05b3fe1ccda72b883e528fca
This commit is contained in:
@@ -6346,6 +6346,7 @@ package android.media.tv.tuner.frontend {
|
||||
public interface ScanCallback {
|
||||
method public void onAnalogSifStandardReported(int);
|
||||
method public void onAtsc3PlpInfosReported(@NonNull android.media.tv.tuner.frontend.Atsc3PlpInfo[]);
|
||||
method public default void onDvbcAnnexReported(int);
|
||||
method public void onDvbsStandardReported(int);
|
||||
method public void onDvbtStandardReported(int);
|
||||
method public void onFrequenciesReported(@NonNull int[]);
|
||||
|
||||
@@ -6286,6 +6286,7 @@ package android.media.tv.tuner.frontend {
|
||||
public interface ScanCallback {
|
||||
method public void onAnalogSifStandardReported(int);
|
||||
method public void onAtsc3PlpInfosReported(@NonNull android.media.tv.tuner.frontend.Atsc3PlpInfo[]);
|
||||
method public default void onDvbcAnnexReported(int);
|
||||
method public void onDvbsStandardReported(int);
|
||||
method public void onDvbtStandardReported(int);
|
||||
method public void onFrequenciesReported(@NonNull int[]);
|
||||
|
||||
@@ -1062,6 +1062,13 @@ public class Tuner implements AutoCloseable {
|
||||
}
|
||||
}
|
||||
|
||||
private void onDvbcAnnexReported(int dvbcAnnex) {
|
||||
if (mScanCallbackExecutor != null && mScanCallback != null) {
|
||||
mScanCallbackExecutor.execute(
|
||||
() -> mScanCallback.onDvbcAnnexReported(dvbcAnnex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a filter object based on the given types and buffer size.
|
||||
*
|
||||
|
||||
@@ -75,4 +75,7 @@ public interface ScanCallback {
|
||||
|
||||
/** Frontend scan message priority reported. */
|
||||
default void onPriorityReported(boolean isHighPriority) {}
|
||||
|
||||
/** DVBC Frontend Annex reported. */
|
||||
default void onDvbcAnnexReported(@DvbcFrontendSettings.Annex int dvbcAnnex) {}
|
||||
}
|
||||
|
||||
@@ -1057,10 +1057,18 @@ Return<void> FrontendCallback::onScanMessageExt1_1(FrontendScanMessageTypeExt1_1
|
||||
bool isHighPriority = message.isHighPriority();
|
||||
env->CallVoidMethod(
|
||||
mObject,
|
||||
env->GetMethodID(clazz, "onPriorityReported", "([B)V"),
|
||||
env->GetMethodID(clazz, "onPriorityReported", "(B)V"),
|
||||
isHighPriority);
|
||||
break;
|
||||
}
|
||||
case FrontendScanMessageTypeExt1_1::DVBC_ANNEX: {
|
||||
jint dvbcAnnex = (jint) message.annex();
|
||||
env->CallVoidMethod(
|
||||
mObject,
|
||||
env->GetMethodID(clazz, "onDvbcAnnexReported", "(I)V"),
|
||||
dvbcAnnex);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user