projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[tx-robot] updated from transifex
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
ui
/
activity
/
FileDetailActivity.java
diff --git
a/src/com/owncloud/android/ui/activity/FileDetailActivity.java
b/src/com/owncloud/android/ui/activity/FileDetailActivity.java
index
2ab8bcc
..
1933735
100644
(file)
--- a/
src/com/owncloud/android/ui/activity/FileDetailActivity.java
+++ b/
src/com/owncloud/android/ui/activity/FileDetailActivity.java
@@
-1,9
+1,10
@@
/* ownCloud Android client application
\r
* Copyright (C) 2011 Bartek Przybylski
\r
/* 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
*
\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
* (at your option) any later version.
\r
*
\r
* This program is distributed in the hope that it will be useful,
\r
@@
-115,7
+116,7
@@
public class FileDetailActivity extends SherlockFragmentActivity implements File
\r
\r
} else {
\r
\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
\r
\r
@@
-243,7
+244,7
@@
public class FileDetailActivity extends SherlockFragmentActivity implements File
\r
switch(item.getItemId()){
\r
case android.R.id.home:
\r
\r
switch(item.getItemId()){
\r
case android.R.id.home:
\r
- backToDisplayActivity();
\r
+ backToDisplayActivity(
true
);
\r
returnValue = true;
\r
break;
\r
default:
\r
returnValue = true;
\r
break;
\r
default:
\r
@@
-255,10
+256,14
@@
public class FileDetailActivity extends SherlockFragmentActivity implements File
\r
\r
\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
Intent intent = new Intent(this, FileDisplayActivity.class);
\r
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
\r
- intent.putExtra(FileDetailFragment.EXTRA_FILE, mFile);
\r
+ OCFile targetFile = null;
\r
+ if (mFile != null) {
\r
+ targetFile = moveToParent ? mStorageManager.getFileById(mFile.getParentId()) : mFile;
\r
+ }
\r
+ intent.putExtra(FileDetailFragment.EXTRA_FILE, targetFile);
\r
intent.putExtra(FileDetailFragment.EXTRA_ACCOUNT, mAccount);
\r
startActivity(intent);
\r
finish();
\r
intent.putExtra(FileDetailFragment.EXTRA_ACCOUNT, mAccount);
\r
startActivity(intent);
\r
finish();
\r