Merge "Downgrade fatal log on host to error" into main

This commit is contained in:
Pawan Wagh 2024-02-12 22:53:10 +00:00 committed by Android (Google) Code Review
commit e225cdd689

View file

@ -421,7 +421,7 @@ GeneralResult<SharedMemory> unvalidatedConvert(const aidl_hal::Memory& memory) {
return createSharedMemoryFromAHWB(ahwb, /*takeOwnership=*/true); return createSharedMemoryFromAHWB(ahwb, /*takeOwnership=*/true);
#else // __ANDROID__ #else // __ANDROID__
LOG(FATAL) << "GeneralResult<SharedMemory> unvalidatedConvert(const aidl_hal::Memory& " LOG(ERROR) << "GeneralResult<SharedMemory> unvalidatedConvert(const aidl_hal::Memory& "
"memory): Not Available on Host Build"; "memory): Not Available on Host Build";
return NN_ERROR() << "createFromHandle failed"; return NN_ERROR() << "createFromHandle failed";
#endif // __ANDROID__ #endif // __ANDROID__
@ -732,7 +732,7 @@ nn::GeneralResult<Memory> unvalidatedConvert(const nn::Memory::HardwareBuffer& m
}; };
return Memory::make<Memory::Tag::hardwareBuffer>(std::move(hardwareBuffer)); return Memory::make<Memory::Tag::hardwareBuffer>(std::move(hardwareBuffer));
#else // __ANDROID__ #else // __ANDROID__
LOG(FATAL) << "nn::GeneralResult<Memory> unvalidatedConvert(const nn::Memory::HardwareBuffer& " LOG(ERROR) << "nn::GeneralResult<Memory> unvalidatedConvert(const nn::Memory::HardwareBuffer& "
"memory): Not Available on Host Build"; "memory): Not Available on Host Build";
(void)memory; (void)memory;
return (NN_ERROR() << "unvalidatedConvert failed").operator nn::GeneralResult<Memory>(); return (NN_ERROR() << "unvalidatedConvert failed").operator nn::GeneralResult<Memory>();