Merge "Better return value checking" am: 8fc16d0e33

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2377385

Change-Id: Ie4620834d7b1e8d939b89276360535243ae678a2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>