Skip to content

Commit

Permalink
yoyiyi
Browse files Browse the repository at this point in the history
  • Loading branch information
yoyiyi committed Aug 7, 2017
1 parent 62ce81b commit d289e95
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion app/src/main/java/com/yoyiyi/soleil/base/BaseActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ protected void onSaveInstanceState(Bundle outState) {
* 初始化Presenter
*/
private void initPresenter() {
if (mPresenter != null) mPresenter.attachView(this);
if (mPresenter != null) {
mPresenter.attachView(this);
}
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
*/
public class OkHttpHelper {
//读取时间
public static final long DEFAULT_READ_TIMEOUT_MILLIS = 20 * 1000;
private static final long DEFAULT_READ_TIMEOUT_MILLIS = 20 * 1000;
//写入时间
public static final long DEFAULT_WRITE_TIMEOUT_MILLIS = 20 * 1000;
private static final long DEFAULT_WRITE_TIMEOUT_MILLIS = 20 * 1000;
//超时时间
public static final long DEFAULT_CONNECT_TIMEOUT_MILLIS = 20 * 1000;
private static final long DEFAULT_CONNECT_TIMEOUT_MILLIS = 20 * 1000;
//最大缓存
private static final long HTTP_RESPONSE_DISK_CACHE_MAX_SIZE = 20 * 1024 * 1024;//设置20M
//长缓存有效期为7天
public static final int CACHE_STALE_LONG = 60 * 60 * 24 * 7;
private static final int CACHE_STALE_LONG = 60 * 60 * 24 * 7;

private static volatile OkHttpHelper sInstance;

Expand Down Expand Up @@ -105,7 +105,7 @@ public void setCache(Context context) {
*
* @return cache
*/
public Cache getCache(Context context) {
private Cache getCache(Context context) {
Cache cache = null;
String path = FileUtils.createRootPath(context);
final File baseDir = new File(path);
Expand Down

0 comments on commit d289e95

Please sign in to comment.