فهرست منبع

Merge pull request #1102 from nextcloud/transactionTooLarge

Transaction too large
Mario Đanić 8 سال پیش
والد
کامیت
2fe0a9bb9c
1فایلهای تغییر یافته به همراه9 افزوده شده و 5 حذف شده
  1. 9 5
      src/main/java/com/owncloud/android/ui/activity/LogHistoryActivity.java

+ 9 - 5
src/main/java/com/owncloud/android/ui/activity/LogHistoryActivity.java

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