From 9fe3296ace9b20b0033261c4e247b35e8bf24a14 Mon Sep 17 00:00:00 2001 From: zzq <2455676683@qq.com> Date: Tue, 1 Aug 2017 17:52:58 +0800 Subject: [PATCH] yoyiyi --- .../java/com/yoyiyi/soleil/network/helper/OkHttpHelper.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/yoyiyi/soleil/network/helper/OkHttpHelper.java b/app/src/main/java/com/yoyiyi/soleil/network/helper/OkHttpHelper.java index 384d1c7..ccdebd8 100644 --- a/app/src/main/java/com/yoyiyi/soleil/network/helper/OkHttpHelper.java +++ b/app/src/main/java/com/yoyiyi/soleil/network/helper/OkHttpHelper.java @@ -109,10 +109,8 @@ public Cache getCache(Context context) { Cache cache = null; String path = FileUtils.createRootPath(context); final File baseDir = new File(path); - if (baseDir != null) { - final File cacheDir = new File(baseDir, "CopyCache"); - cache = new Cache(cacheDir, HTTP_RESPONSE_DISK_CACHE_MAX_SIZE); - } + final File cacheDir = new File(baseDir, "CopyCache"); + cache = new Cache(cacheDir, HTTP_RESPONSE_DISK_CACHE_MAX_SIZE); return cache; }