X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/4599553545d13dee425c7ce9610f083fa38a208e..24d67823860c34bccb1bd0ba6c127ba1bb5c6fd1:/src/com/owncloud/android/MainApp.java diff --git a/src/com/owncloud/android/MainApp.java b/src/com/owncloud/android/MainApp.java index 8a8b6c51..2d819f49 100644 --- a/src/com/owncloud/android/MainApp.java +++ b/src/com/owncloud/android/MainApp.java @@ -1,5 +1,9 @@ -/* ownCloud Android client application - * Copyright (C) 2012-2013 ownCloud Inc. +/** + * ownCloud Android client application + * + * @author masensio + * @author David A. Velasco + * Copyright (C) 2015 ownCloud Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, @@ -16,12 +20,10 @@ */ package com.owncloud.android; -import java.io.File; - import android.app.Application; import android.content.Context; -import android.os.Environment; +import com.owncloud.android.datamodel.ThumbnailsCacheManager; import com.owncloud.android.lib.common.OwnCloudClientManagerFactory; import com.owncloud.android.lib.common.OwnCloudClientManagerFactory.Policy; import com.owncloud.android.lib.common.utils.Log_OC; @@ -30,9 +32,6 @@ import com.owncloud.android.lib.common.utils.Log_OC; * * Contains methods to build the "static" strings. These strings were before constants in different * classes - * - * @author masensio - * @author David A. Velasco */ public class MainApp extends Application { @@ -57,12 +56,19 @@ public class MainApp extends Application { } else { OwnCloudClientManagerFactory.setDefaultPolicy(Policy.ALWAYS_NEW_CLIENT); } + + // initialise thumbnails cache on background thread + new ThumbnailsCacheManager.InitDiskCacheTask().execute(); if (BuildConfig.DEBUG) { - String logpath = Environment.getExternalStorageDirectory()+File.separator+"owncloud"+File.separator+"log"; + + String dataFolder = getDataFolder(); + + // Set folder for store logs + Log_OC.setLogDataFolder(dataFolder); + + Log_OC.startLogging(); Log_OC.d("Debug", "start logging"); - Log_OC.v("PATH", logpath); - Log_OC.startLogging(logpath); } }