Merge "Support blink scan" am: 1d4bf166d4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1538201 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I409e7c04cd71439f8356a270b5bb9adfe55cca1a
This commit is contained in:
@@ -627,10 +627,14 @@ public class Tuner implements AutoCloseable {
|
|||||||
@Result
|
@Result
|
||||||
public int scan(@NonNull FrontendSettings settings, @ScanType int scanType,
|
public int scan(@NonNull FrontendSettings settings, @ScanType int scanType,
|
||||||
@NonNull @CallbackExecutor Executor executor, @NonNull ScanCallback scanCallback) {
|
@NonNull @CallbackExecutor Executor executor, @NonNull ScanCallback scanCallback) {
|
||||||
if (mScanCallback != null || mScanCallbackExecutor != null) {
|
/**
|
||||||
|
* Scan can be called again for blink scan if scanCallback and executor are same as before.
|
||||||
|
*/
|
||||||
|
if (((mScanCallback != null) && (mScanCallback != scanCallback))
|
||||||
|
|| ((mScanCallbackExecutor != null) && (mScanCallbackExecutor != executor))) {
|
||||||
throw new IllegalStateException(
|
throw new IllegalStateException(
|
||||||
"Scan already in progress. stopScan must be called before a new scan can be "
|
"Different Scan session already in progress. stopScan must be called "
|
||||||
+ "started.");
|
+ "before a new scan session can be " + "started.");
|
||||||
}
|
}
|
||||||
mFrontendType = settings.getType();
|
mFrontendType = settings.getType();
|
||||||
if (checkResource(TunerResourceManager.TUNER_RESOURCE_TYPE_FRONTEND)) {
|
if (checkResource(TunerResourceManager.TUNER_RESOURCE_TYPE_FRONTEND)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user