Browse Source

saving log size only if screen orientation and not if closing fragment as otherwise "TransactionTooLargeException"

tobiasKaminsky 8 năm trước cách đây
mục cha
commit
f60ae80e53

+ 4 - 2
src/main/java/com/owncloud/android/ui/activity/LogHistoryActivity.java

@@ -290,7 +290,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);
+        }
     }
 }