actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);\r
actionBar.setListNavigationCallbacks(mDirectories, this);\r
setSupportProgressBarIndeterminateVisibility(false); // always AFTER setContentView(...) ; to workaround bug in its implementation\r
- \r
+ \r
Log.d(getClass().toString(), "onCreate() end");\r
}\r
\r
-\r
+ \r
/**\r
* Launches the account creation activity. To use when no ownCloud account is available\r
*/\r
mCurrentDir = mStorageManager.getFileByPath(mCurrentDir.getRemotePath()); // mCurrentDir == null if it is not in the current account\r
}\r
if (mCurrentFile != null) {\r
- mCurrentFile = mStorageManager.getFileByPath(mCurrentFile.getRemotePath()); // mCurrentFile == null if it is not in the current account\r
+ if (mCurrentFile.fileExists()) {\r
+ mCurrentFile = mStorageManager.getFileByPath(mCurrentFile.getRemotePath()); // mCurrentFile == null if it is not in the current account\r
+ } // else : keep mCurrentFile with the received value; this is currently the case of an upload in progress, when the user presses the status notification in a landscape tablet\r
}\r
\r
/// Default to root if mCurrentDir was not found\r
outState.putParcelable(FileDetailFragment.EXTRA_FILE, mCurrentDir);\r
if (mDualPane) {\r
FileDetailFragment fragment = (FileDetailFragment) getSupportFragmentManager().findFragmentByTag(FileDetailFragment.FTAG);\r
- OCFile file = fragment.getDisplayedFile();\r
- if (file != null) {\r
- outState.putParcelable(FileDetailFragment.EXTRA_FILE, file);\r
+ if (fragment != null) {\r
+ OCFile file = fragment.getDisplayedFile();\r
+ if (file != null) {\r
+ outState.putParcelable(FileDetailFragment.EXTRA_FILE, file);\r
+ }\r
}\r
}\r
Log.d(getClass().toString(), "onSaveInstanceState() end");\r
registerReceiver(mDownloadFinishReceiver, downloadIntentFilter);\r
\r
// List current directory\r
- mFileList.listDirectory(mCurrentDir); // we should find the way to avoid the need of this\r
+ mFileList.listDirectory(mCurrentDir); // TODO we should find the way to avoid the need of this (maybe it's not necessary yet; to check)\r
\r
} else {\r
\r
PackageInfo pkg;\r
try {\r
pkg = getPackageManager().getPackageInfo(getPackageName(), 0);\r
- builder.setMessage("ownCloud android client\n\nversion: " + pkg.versionName );\r
+ builder.setMessage(String.format(getString(R.string.about_message), pkg.versionName));\r
builder.setIcon(android.R.drawable.ic_menu_info_details);\r
dialog = builder.create();\r
} catch (NameNotFoundException e) {\r
mStorageManager.saveFile(newDir);\r
\r
// Display the new folder right away\r
- mFileList.listDirectory(mCurrentDir);\r
+ mFileList.listDirectory();\r
}\r
});\r
\r
OCFileListFragment fileListFragment = (OCFileListFragment) getSupportFragmentManager()\r
.findFragmentById(R.id.fileList);\r
if (fileListFragment != null) {\r
- fileListFragment.listDirectory(mCurrentDir); \r
+ fileListFragment.listDirectory(mCurrentDir);\r
}\r
}\r
\r
return;\r
}\r
// a new chance to get the mDownloadBinder through getFileDownloadBinder() - THIS IS A MESS\r
- mFileList.listDirectory();\r
+ if (mFileList != null)\r
+ mFileList.listDirectory();\r
if (mDualPane) {\r
FileDetailFragment fragment = (FileDetailFragment) getSupportFragmentManager().findFragmentByTag(FileDetailFragment.FTAG);\r
if (fragment != null)\r
fragment.updateFileDetails();\r
}\r
- \r
}\r
\r
@Override\r