资源泄漏: ImageAssetManager#bitmapForId 中未关闭 InputStream

作者: CyberSecurity-NCC创建于 2026年6月4日更新于 2026年6月4日

摘要

ImageAssetManager.bitmapForId(String) 方法通过 context.getAssets().open(...) 从应用程序的资源管理器中打开一个输入流,但却没有在使用 BitmapFactory.decodeStream() 解码位图后关闭该输入流。这导致每次执行此方法时,都会泄露底层的本机资源。

内容来源: airbnb/lottie-android