mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "Fix bluetooth AIDL restart fail when open HCI Fail" am: 0e55fec5c3 am: 288283d9c5 am: f9a467a874 am: 9cde8d7582 am: 528a48ec81
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2643490 Change-Id: If80e467b050d4a22c263d9d5d186376ef5da61b7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -224,6 +224,7 @@ ndk::ScopedAStatus BluetoothHci::initialize(
|
||||
ALOGI("Unable to open Linux interface, trying default path.");
|
||||
mFd = getFdFromDevPath();
|
||||
if (mFd < 0) {
|
||||
mState = HalState::READY;
|
||||
cb->initializationComplete(Status::UNABLE_TO_OPEN_INTERFACE);
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
@@ -281,6 +282,7 @@ ndk::ScopedAStatus BluetoothHci::close() {
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(mStateMutex);
|
||||
if (mState != HalState::ONE_CLIENT) {
|
||||
ASSERT(mState != HalState::INITIALIZING);
|
||||
ALOGI("Already closed");
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user