mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Merge "Remove never-reached 'return' statements" am: 2a91bd7331 am: 9dfd7f1589 am: 4dae354720 am: bc2d8a12b8
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1959367 Change-Id: I043a1e25872d3ff9857dc5315f48652fffc847ae
This commit is contained in:
@@ -42,24 +42,21 @@ void OnDeath(void* cookie) {
|
||||
LOG(INFO) << "Nfc::open null callback";
|
||||
return ndk::ScopedAStatus::fromServiceSpecificError(
|
||||
static_cast<int32_t>(NfcStatus::FAILED));
|
||||
} else {
|
||||
Nfc::mCallback = clientCallback;
|
||||
|
||||
clientDeathRecipient = AIBinder_DeathRecipient_new(OnDeath);
|
||||
auto linkRet = AIBinder_linkToDeath(clientCallback->asBinder().get(), clientDeathRecipient,
|
||||
this /* cookie */);
|
||||
if (linkRet != STATUS_OK) {
|
||||
LOG(ERROR) << __func__ << ": linkToDeath failed: " << linkRet;
|
||||
// Just ignore the error.
|
||||
}
|
||||
|
||||
int ret = Vendor_hal_open(eventCallback, dataCallback);
|
||||
return ret == 0 ? ndk::ScopedAStatus::ok()
|
||||
: ndk::ScopedAStatus::fromServiceSpecificError(
|
||||
static_cast<int32_t>(NfcStatus::FAILED));
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
return ndk::ScopedAStatus::ok();
|
||||
Nfc::mCallback = clientCallback;
|
||||
|
||||
clientDeathRecipient = AIBinder_DeathRecipient_new(OnDeath);
|
||||
auto linkRet = AIBinder_linkToDeath(clientCallback->asBinder().get(), clientDeathRecipient,
|
||||
this /* cookie */);
|
||||
if (linkRet != STATUS_OK) {
|
||||
LOG(ERROR) << __func__ << ": linkToDeath failed: " << linkRet;
|
||||
// Just ignore the error.
|
||||
}
|
||||
|
||||
int ret = Vendor_hal_open(eventCallback, dataCallback);
|
||||
return ret == 0 ? ndk::ScopedAStatus::ok()
|
||||
: ndk::ScopedAStatus::fromServiceSpecificError(
|
||||
static_cast<int32_t>(NfcStatus::FAILED));
|
||||
}
|
||||
|
||||
::ndk::ScopedAStatus Nfc::close(NfcCloseType type) {
|
||||
|
||||
Reference in New Issue
Block a user