mirror of
https://github.com/nextcloud/android.git
synced 2024-12-18 06:51:55 +03:00
Merge branch 'master' into crashDueToEmptyString
This commit is contained in:
commit
a2ff44a77e
7 changed files with 10 additions and 26 deletions
|
@ -179,7 +179,7 @@ dependencies {
|
|||
compile name: 'touch-image-view'
|
||||
compile 'com.android.support:multidex:1.0.1'
|
||||
|
||||
compile 'com.github.nextcloud:android-library:1.0.17'
|
||||
compile 'com.github.nextcloud:android-library:logFolder-SNAPSHOT'
|
||||
compile "com.android.support:support-v4:${supportLibraryVersion}"
|
||||
compile "com.android.support:design:${supportLibraryVersion}"
|
||||
compile 'com.jakewharton:disklrucache:2.0.2'
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
DO NOT TOUCH; GENERATED BY DRONE
|
||||
<span class="mdl-layout-title">Lint Report: 73 errors and 849 warnings</span>
|
||||
<span class="mdl-layout-title">Lint Report: 73 errors and 849 warnings</span>
|
|
@ -112,13 +112,8 @@ public class MainApp extends MultiDexApplication {
|
|||
new ThumbnailsCacheManager.InitDiskCacheTask().execute();
|
||||
|
||||
if (BuildConfig.DEBUG) {
|
||||
|
||||
String dataFolder = getDataFolder();
|
||||
|
||||
// Set folder for store logs
|
||||
Log_OC.setLogDataFolder(dataFolder);
|
||||
|
||||
Log_OC.startLogging(MainApp.storagePath);
|
||||
// use app writable dir, no permissions needed
|
||||
Log_OC.startLogging(getAppContext());
|
||||
Log_OC.d("Debug", "start logging");
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,6 @@ import com.owncloud.android.R;
|
|||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
import com.owncloud.android.ui.dialog.LoadingDialog;
|
||||
import com.owncloud.android.utils.AnalyticsUtils;
|
||||
import com.owncloud.android.utils.FileStorageUtils;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
|
@ -64,7 +63,7 @@ public class LogHistoryActivity extends ToolbarActivity {
|
|||
|
||||
private static final String SCREEN_NAME = "Logs";
|
||||
|
||||
private String mLogPath = FileStorageUtils.getLogPath();
|
||||
private String mLogPath = Log_OC.getLogPath();
|
||||
private File logDIR = null;
|
||||
private String mLogText;
|
||||
|
||||
|
@ -166,11 +165,7 @@ public class LogHistoryActivity extends ToolbarActivity {
|
|||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
|
||||
uris.add(Uri.fromFile(logFile));
|
||||
} else {
|
||||
uris.add(FileProvider.getUriForFile(
|
||||
this,
|
||||
getString(R.string.file_provider_authority),
|
||||
logFile
|
||||
));
|
||||
uris.add(FileProvider.getUriForFile(this, getString(R.string.file_provider_authority), logFile));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -296,7 +296,6 @@ public class StorageMigration {
|
|||
protected Integer doInBackground(Void... voids) {
|
||||
publishProgress(R.string.file_migration_preparing);
|
||||
|
||||
Log_OC.stopLogging();
|
||||
boolean[] syncStates = null;
|
||||
try {
|
||||
publishProgress(R.string.file_migration_saving_accounts_configuration);
|
||||
|
@ -309,7 +308,6 @@ public class StorageMigration {
|
|||
publishProgress(R.string.file_migration_restoring_accounts_configuration);
|
||||
restoreAccountsSyncStatus(syncStates);
|
||||
}
|
||||
Log_OC.startLogging(mStorageTarget);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -338,7 +336,6 @@ public class StorageMigration {
|
|||
@Override
|
||||
protected Integer doInBackground(Void... args) {
|
||||
publishProgress(R.string.file_migration_preparing);
|
||||
Log_OC.stopLogging();
|
||||
|
||||
boolean[] syncState = null;
|
||||
|
||||
|
@ -372,14 +369,12 @@ public class StorageMigration {
|
|||
|
||||
} catch (MigrationException e) {
|
||||
rollback();
|
||||
Log_OC.startLogging(mStorageSource);
|
||||
return e.getResId();
|
||||
} finally {
|
||||
publishProgress(R.string.file_migration_restoring_accounts_configuration);
|
||||
restoreAccountsSyncStatus(syncState);
|
||||
}
|
||||
|
||||
Log_OC.startLogging(mStorageTarget);
|
||||
publishProgress(R.string.file_migration_ok_finished);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -115,10 +115,6 @@ public class FileStorageUtils {
|
|||
return savePath.getUsableSpace();
|
||||
}
|
||||
|
||||
public static String getLogPath() {
|
||||
return MainApp.getStoragePath() + File.separator + MainApp.getDataFolder() + File.separator + "log";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the a string like 2016/08/ for the passed date. If date is 0 an empty
|
||||
* string is returned
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<paths>
|
||||
<files-path
|
||||
path="log/"
|
||||
name="log"/>
|
||||
<external-path name="external_files" path="."/>
|
||||
<root-path name="external_files" path="/storage/" />
|
||||
<!-- yes, valid for ALL external storage and not only our app folder, since we can't use @string/data_folder
|
||||
|
|
Loading…
Reference in a new issue