diff --git a/starboard/android/shared/file_internal.cc b/starboard/android/shared/file_internal.cc index efad16f25bf..7434ef57770 100644 --- a/starboard/android/shared/file_internal.cc +++ b/starboard/android/shared/file_internal.cc @@ -112,10 +112,17 @@ bool IsAndroidAssetPath(const char* path) { AAsset* OpenAndroidAsset(const char* path) { if (!IsAndroidAssetPath(path) || g_asset_manager == NULL) { + SB_LOG(WARNING) << "Unable to open from Android Asset Manager: " << path; + errno = ENOENT; return NULL; } const char* asset_path = path + strlen(g_app_assets_dir) + 1; - return AAssetManager_open(g_asset_manager, asset_path, AASSET_MODE_RANDOM); + AAsset* result = AAssetManager_open(g_asset_manager, asset_path, AASSET_MODE_RANDOM); + if (!result) { + SB_LOG(WARNING) << "Unable to open from Android Asset Manager: " << path; + errno = ENOENT; + } + return result; } AAssetDir* OpenAndroidAssetDir(const char* path) {