|
@@ -1,4 +1,4 @@
|
|
-/**
|
|
|
|
|
|
+/*
|
|
* ownCloud Android client application
|
|
* ownCloud Android client application
|
|
*
|
|
*
|
|
* Copyright (C) 2015 ownCloud Inc.
|
|
* Copyright (C) 2015 ownCloud Inc.
|
|
@@ -76,7 +76,9 @@ public class LogHistoryActivity extends ToolbarActivity {
|
|
setupToolbar();
|
|
setupToolbar();
|
|
|
|
|
|
setTitle(getText(R.string.actionbar_logger));
|
|
setTitle(getText(R.string.actionbar_logger));
|
|
- getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
|
|
|
|
+ if (getSupportActionBar() != null) {
|
|
|
|
+ getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
|
|
+ }
|
|
Button deleteHistoryButton = (Button) findViewById(R.id.deleteLogHistoryButton);
|
|
Button deleteHistoryButton = (Button) findViewById(R.id.deleteLogHistoryButton);
|
|
Button sendHistoryButton = (Button) findViewById(R.id.sendLogHistoryButton);
|
|
Button sendHistoryButton = (Button) findViewById(R.id.sendLogHistoryButton);
|
|
TextView logTV = (TextView) findViewById(R.id.logTV);
|
|
TextView logTV = (TextView) findViewById(R.id.logTV);
|
|
@@ -195,7 +197,7 @@ public class LogHistoryActivity extends ToolbarActivity {
|
|
private class LoadingLogTask extends AsyncTask<String, Void, String> {
|
|
private class LoadingLogTask extends AsyncTask<String, Void, String> {
|
|
private final WeakReference<TextView> textViewReference;
|
|
private final WeakReference<TextView> textViewReference;
|
|
|
|
|
|
- public LoadingLogTask(TextView logTV){
|
|
|
|
|
|
+ LoadingLogTask(TextView logTV) {
|
|
// Use of a WeakReference to ensure the TextView can be garbage collected
|
|
// Use of a WeakReference to ensure the TextView can be garbage collected
|
|
textViewReference = new WeakReference<>(logTV);
|
|
textViewReference = new WeakReference<>(logTV);
|
|
}
|
|
}
|
|
@@ -290,7 +292,9 @@ public class LogHistoryActivity extends ToolbarActivity {
|
|
protected void onSaveInstanceState(Bundle outState) {
|
|
protected void onSaveInstanceState(Bundle outState) {
|
|
super.onSaveInstanceState(outState);
|
|
super.onSaveInstanceState(outState);
|
|
|
|
|
|
- /// global state
|
|
|
|
- outState.putString(KEY_LOG_TEXT, mLogText);
|
|
|
|
|
|
+ if (isChangingConfigurations()) {
|
|
|
|
+ // global state
|
|
|
|
+ outState.putString(KEY_LOG_TEXT, mLogText);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|