X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/dacc14a882be8b499c00ad2f75b68e10a42dee9e..24d67823860c34bccb1bd0ba6c127ba1bb5c6fd1:/src/com/owncloud/android/MainApp.java diff --git a/src/com/owncloud/android/MainApp.java b/src/com/owncloud/android/MainApp.java index 08efe342..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,19 +20,18 @@ */ package com.owncloud.android; -import com.owncloud.android.lib.common.OwnCloudClientManagerFactory; -import com.owncloud.android.lib.common.OwnCloudClientManagerFactory.Policy; - import android.app.Application; import android.content.Context; + +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; /** * Main Application of the project * * 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 { @@ -53,7 +56,20 @@ 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 dataFolder = getDataFolder(); + + // Set folder for store logs + Log_OC.setLogDataFolder(dataFolder); + + Log_OC.startLogging(); + Log_OC.d("Debug", "start logging"); + } } public static Context getAppContext() { @@ -66,7 +82,7 @@ public class MainApp extends Application { public static String getAccountType() { return getAppContext().getResources().getString(R.string.account_type); } - + // From AccountAuthenticator // public static final String AUTHORITY = "org.owncloud"; public static String getAuthority() {