Disable change log; to remove in future
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / activity / FileDisplayActivity.java
index cfd9ae5..c8dbca9 100644 (file)
@@ -1,9 +1,10 @@
 /* ownCloud Android client application\r
  *   Copyright (C) 2011  Bartek Przybylski\r
+ *   Copyright (C) 2012-2013 ownCloud Inc.\r
  *\r
  *   This program is free software: you can redistribute it and/or modify\r
  *   it under the terms of the GNU General Public License as published by\r
- *   the Free Software Foundation, either version 3 of the License, or\r
+ *   the Free Software Foundation, either version 2 of the License, or\r
  *   (at your option) any later version.\r
  *\r
  *   This program is distributed in the hope that it will be useful,\r
@@ -142,10 +143,10 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements
         super.onCreate(savedInstanceState);\r
 \r
         /// Load of parameters from received intent\r
-        mCurrentDir = getIntent().getParcelableExtra(FileDetailFragment.EXTRA_FILE); // no check necessary, mCurrenDir == null if the parameter is not in the intent\r
         Account account = getIntent().getParcelableExtra(FileDetailFragment.EXTRA_ACCOUNT);\r
-        if (account != null)\r
-            AccountUtils.setCurrentOwnCloudAccount(this, account.name);\r
+        if (account != null && AccountUtils.setCurrentOwnCloudAccount(this, account.name)) {\r
+            mCurrentDir = getIntent().getParcelableExtra(FileDetailFragment.EXTRA_FILE); \r
+        }\r
         \r
         /// Load of saved instance state: keep this always before initDataFromCurrentAccount()\r
         if(savedInstanceState != null) {\r
@@ -186,7 +187,7 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements
         // Drop-down navigation \r
         mDirectories = new CustomArrayAdapter<String>(this, R.layout.sherlock_spinner_dropdown_item);\r
         OCFile currFile = mCurrentDir;\r
-        while(currFile != null && currFile.getFileName() != OCFile.PATH_SEPARATOR) {\r
+        while(mStorageManager != null && currFile != null && currFile.getFileName() != OCFile.PATH_SEPARATOR) {\r
             mDirectories.add(currFile.getFileName());\r
             currFile = mStorageManager.getFileById(currFile.getParentId());\r
         }\r
@@ -211,7 +212,7 @@ public class FileDisplayActivity extends SherlockFragmentActivity implements
         \r
         \r
         // show changelog, if needed\r
-        showChangeLog();\r
+        //showChangeLog();\r
         \r
         Log.d(getClass().toString(), "onCreate() end");\r
     }\r