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

Commit 0a9f4b4f authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Support blink scan" am: 1d4bf166 am: c067dc99

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1538201

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ieb3e92354bb34dc4503e69628e338dd0e61ea152
parents c97bc467 c067dc99
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -627,10 +627,14 @@ public class Tuner implements AutoCloseable {
    @Result
    public int scan(@NonNull FrontendSettings settings, @ScanType int scanType,
            @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(
                    "Scan already in progress.  stopScan must be called before a new scan can be "
                            + "started.");
                    "Different Scan session already in progress.  stopScan must be called "
                        + "before a new scan session can be " + "started.");
        }
        mFrontendType = settings.getType();
        if (checkResource(TunerResourceManager.TUNER_RESOURCE_TYPE_FRONTEND)) {