Skip to content

Commit

Permalink
fix:优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
JYangkai committed Oct 31, 2021
1 parent 07eae3c commit 51aa737
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ public void add(String key, Bitmap bitmap) {
}
try {
DiskLruCache.Editor editor = cache.edit(key);
if (editor == null) {
return;
}
boolean success = bitmap.compress(Bitmap.CompressFormat.JPEG, 100, editor.newOutputStream(0));
if (success) {
editor.commit();
Expand Down

0 comments on commit 51aa737

Please sign in to comment.