\r
\r
} else {\r
- backToDisplayActivity(); // the 'back' won't be effective until this.onStart() and this.onResume() are completed;\r
+ backToDisplayActivity(false); // the 'back' won't be effective until this.onStart() and this.onResume() are completed;\r
}\r
\r
\r
\r
switch(item.getItemId()){\r
case android.R.id.home:\r
- backToDisplayActivity();\r
+ backToDisplayActivity(true);\r
returnValue = true;\r
break;\r
default:\r
\r
\r
\r
- private void backToDisplayActivity() {\r
+ private void backToDisplayActivity(boolean moveToParent) {\r
Intent intent = new Intent(this, FileDisplayActivity.class);\r
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r
OCFile targetFile = null;\r
if (mFile != null) {\r
- targetFile = mStorageManager.getFileById(mFile.getParentId());\r
+ targetFile = moveToParent ? mStorageManager.getFileById(mFile.getParentId()) : mFile;\r
}\r
intent.putExtra(FileDetailFragment.EXTRA_FILE, targetFile);\r
intent.putExtra(FileDetailFragment.EXTRA_ACCOUNT, mAccount);\r