mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Merge pull request #4545 from nextcloud/ezaquarii/speculative-fix-for-npe-in-log-d
Fix for NPE caused by Log.d in ThumbnailsCacheManager
This commit is contained in:
commit
8954aafb5f
1 changed files with 2 additions and 1 deletions
|
@ -74,6 +74,7 @@ import java.io.InputStream;
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||||
|
|
||||||
|
@ -142,7 +143,7 @@ public final class ThumbnailsCacheManager {
|
||||||
mThumbnailCache = new DiskLruImageCache(diskCacheDir, DISK_CACHE_SIZE, mCompressFormat,
|
mThumbnailCache = new DiskLruImageCache(diskCacheDir, DISK_CACHE_SIZE, mCompressFormat,
|
||||||
mCompressQuality);
|
mCompressQuality);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log_OC.d(TAG, e.getMessage());
|
Log_OC.d(TAG, String.format(Locale.US, "Disk cache init failed: %s", e.getMessage()));
|
||||||
mThumbnailCache = null;
|
mThumbnailCache = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue