mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-21 07:51:46 +02:00
Don't set summary explicit
and close file after removing it from Timber.
This commit is contained in:
@@ -122,9 +122,8 @@ public class AboutPreferences extends PreferenceFragment {
|
|||||||
FileDebugTree tree = getEnabledFileDebugTree();
|
FileDebugTree tree = getEnabledFileDebugTree();
|
||||||
if (tree != null) {
|
if (tree != null) {
|
||||||
Timber.d("Debug log disabled");
|
Timber.d("Debug log disabled");
|
||||||
tree.close();
|
|
||||||
Timber.uproot(tree);
|
Timber.uproot(tree);
|
||||||
preference.setSummary(R.string.info_is_not_enable);
|
tree.close();
|
||||||
OpenScale.DEBUG_MODE = false;
|
OpenScale.DEBUG_MODE = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -138,7 +137,6 @@ public class AboutPreferences extends PreferenceFragment {
|
|||||||
try {
|
try {
|
||||||
OutputStream output = getActivity().getContentResolver().openOutputStream(uri);
|
OutputStream output = getActivity().getContentResolver().openOutputStream(uri);
|
||||||
Timber.plant(new FileDebugTree(output));
|
Timber.plant(new FileDebugTree(output));
|
||||||
findPreference(KEY_DEBUG_LOG).setSummary(R.string.info_is_enable);
|
|
||||||
OpenScale.DEBUG_MODE = true;
|
OpenScale.DEBUG_MODE = true;
|
||||||
Timber.d("Debug log enabled, %s v%s (%d), SDK %d, %s %s",
|
Timber.d("Debug log enabled, %s v%s (%d), SDK %d, %s %s",
|
||||||
getResources().getString(R.string.app_name),
|
getResources().getString(R.string.app_name),
|
||||||
|
Reference in New Issue
Block a user