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

Commit d107eae5 authored by Michal Belusiak's avatar Michal Belusiak
Browse files

BASS: Change some UNKNOWN errors to more rationale descriptions

Bug: 349172716
Test: atest BassClientServiceTest
Flag: Exempt, trivial change
Change-Id: I4016fd8af2a513f39f3d6cb356edabb722d4e733
parent 68247bbc
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -1665,7 +1665,8 @@ public class BassClientService extends ProfileService {
            }
            if (mSearchScanCallback != null) {
                Log.e(TAG, "LE Scan has already started");
                mCallbacks.notifySearchStartFailed(BluetoothStatusCodes.ERROR_UNKNOWN);
                mCallbacks.notifySearchStartFailed(
                        BluetoothStatusCodes.ERROR_ALREADY_IN_TARGET_STATE);
                return;
            }
            mSearchScanCallback =
@@ -1803,7 +1804,8 @@ public class BassClientService extends ProfileService {
            synchronized (mSearchScanCallbackLock) {
                if (mSearchScanCallback == null) {
                    Log.e(TAG, "Scan not started yet");
                    mCallbacks.notifySearchStopFailed(BluetoothStatusCodes.ERROR_UNKNOWN);
                    mCallbacks.notifySearchStopFailed(
                            BluetoothStatusCodes.ERROR_ALREADY_IN_TARGET_STATE);
                    return;
                }
                informConnectedDeviceAboutScanOffloadStop();
@@ -1816,7 +1818,8 @@ public class BassClientService extends ProfileService {
            synchronized (mSearchScanCallbackLock) {
                if (mBluetoothLeScannerWrapper == null || mSearchScanCallback == null) {
                    Log.e(TAG, "Scan not started yet");
                    mCallbacks.notifySearchStopFailed(BluetoothStatusCodes.ERROR_UNKNOWN);
                    mCallbacks.notifySearchStopFailed(
                            BluetoothStatusCodes.ERROR_ALREADY_IN_TARGET_STATE);
                    return;
                }
                mBluetoothLeScannerWrapper.stopScan(mSearchScanCallback);
@@ -2514,7 +2517,7 @@ public class BassClientService extends ProfileService {
                } else {
                    log("AddSource: broadcast not cached or invalid, broadcastId: " + broadcastId);
                    mCallbacks.notifySourceAddFailed(
                            sink, sourceMetadata, BluetoothStatusCodes.ERROR_UNKNOWN);
                            sink, sourceMetadata, BluetoothStatusCodes.ERROR_BAD_PARAMETERS);
                }
                return;
            }