projects
/
pub
/
Android
/
ownCloud.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
47e74b6
)
enabled all occurrences.
author
tobiasKaminsky
<tobias@kaminsky.me>
Sun, 18 Oct 2015 13:44:23 +0000
(15:44 +0200)
committer
tobiasKaminsky
<tobias@kaminsky.me>
Sun, 18 Oct 2015 13:44:23 +0000
(15:44 +0200)
16 files changed:
res/values/drawer_resources.xml
patch
|
blob
|
blame
|
history
res/values/strings.xml
patch
|
blob
|
blame
|
history
src/com/owncloud/android/MainApp.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/datamodel/FileDataStorageManager.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/operations/RefreshFolderOperation.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/operations/SynchronizeFolderOperation.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/activity/FileActivity.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/activity/FolderPickerActivity.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/activity/UploadPathActivity.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/activity/Uploader.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/adapter/FileListListAdapter.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/dialog/RemoveFileDialogFragment.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/fragment/OCFileListFragment.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/preview/PreviewImageActivity.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/preview/PreviewImagePagerAdapter.java
patch
|
blob
|
blame
|
history
diff --git
a/res/values/drawer_resources.xml
b/res/values/drawer_resources.xml
index
287eb69
..
f47df78
100644
(file)
--- a/
res/values/drawer_resources.xml
+++ b/
res/values/drawer_resources.xml
@@
-23,7
+23,7
@@
<!--TODO re-enable when "Accounts" is available in Navigation Drawer-->
<!--<item>@string/prefs_accounts</item>-->
<item>@string/drawer_item_all_files</item>
<!--TODO re-enable when "Accounts" is available in Navigation Drawer-->
<!--<item>@string/prefs_accounts</item>-->
<item>@string/drawer_item_all_files</item>
- <
!--<item>@string/drawer_item_on_device</item>--
>
+ <
item>@string/drawer_item_on_device</item
>
<item>@string/actionbar_settings</item>
<item>@string/actionbar_logger</item>
</string-array>
<item>@string/actionbar_settings</item>
<item>@string/actionbar_logger</item>
</string-array>
@@
-33,7
+33,7
@@
<!-- TODO re-enable when "Accounts" is available in Navigation Drawer-->
<!--<item>@string/drawer_item_accounts</item>-->
<item>@string/drawer_item_all_files</item>
<!-- TODO re-enable when "Accounts" is available in Navigation Drawer-->
<!--<item>@string/drawer_item_accounts</item>-->
<item>@string/drawer_item_all_files</item>
- <
!--<item>@string/drawer_item_on_device</item>--
>
+ <
item>@string/drawer_item_on_device</item
>
<item>@string/drawer_item_settings</item>
<item>@string/drawer_item_logs</item>
</string-array>
<item>@string/drawer_item_settings</item>
<item>@string/drawer_item_logs</item>
</string-array>
diff --git
a/res/values/strings.xml
b/res/values/strings.xml
index
267d713
..
c35fd99
100644
(file)
--- a/
res/values/strings.xml
+++ b/
res/values/strings.xml
@@
-23,8
+23,7
@@
<!-- TODO re-enable when "Accounts" is available in Navigation Drawer -->
<!--<string name="drawer_item_accounts">Accounts</string>-->
<string name="drawer_item_all_files">All files</string>
<!-- TODO re-enable when "Accounts" is available in Navigation Drawer -->
<!--<string name="drawer_item_accounts">Accounts</string>-->
<string name="drawer_item_all_files">All files</string>
- <!-- TODO re-enable when "On Device" is available
- <string name="drawer_item_on_device">On device</string>-->
+ <string name="drawer_item_on_device">On device</string>
<string name="drawer_item_settings">Settings</string>
<string name="drawer_item_logs">Logs</string>
<string name="drawer_close">Close</string>
<string name="drawer_item_settings">Settings</string>
<string name="drawer_item_logs">Logs</string>
<string name="drawer_close">Close</string>
diff --git
a/src/com/owncloud/android/MainApp.java
b/src/com/owncloud/android/MainApp.java
index
c805f9f
..
250b7ae
100644
(file)
--- a/
src/com/owncloud/android/MainApp.java
+++ b/
src/com/owncloud/android/MainApp.java
@@
-54,9
+54,7
@@
public class MainApp extends Application {
private static Context mContext;
private static Context mContext;
- // TODO Enable when "On Device" is recovered?
- // TODO better place
- // private static boolean mOnlyOnDevice = false;
+ private static boolean mOnlyOnDevice = false;
public void onCreate(){
public void onCreate(){
@@
-176,14
+174,13
@@
public class MainApp extends Application {
return getAppContext().getResources().getString(R.string.log_name);
}
return getAppContext().getResources().getString(R.string.log_name);
}
- // TODO Enable when "On Device" is recovered ?
-// public static void showOnlyFilesOnDevice(boolean state){
-// mOnlyOnDevice = state;
-// }
-//
-// public static boolean getOnlyOnDevice(){
-// return mOnlyOnDevice;
-// }
+ public static void showOnlyFilesOnDevice(boolean state){
+ mOnlyOnDevice = state;
+ }
+
+ public static boolean getOnlyOnDevice(){
+ return mOnlyOnDevice;
+ }
// user agent
public static String getUserAgent() {
// user agent
public static String getUserAgent() {
diff --git
a/src/com/owncloud/android/datamodel/FileDataStorageManager.java
b/src/com/owncloud/android/datamodel/FileDataStorageManager.java
index
29a11c4
..
f2223d4
100644
(file)
--- a/
src/com/owncloud/android/datamodel/FileDataStorageManager.java
+++ b/
src/com/owncloud/android/datamodel/FileDataStorageManager.java
@@
-148,10
+148,9
@@
public class FileDataStorageManager {
}
}
- public Vector<OCFile> getFolderContent(OCFile f
/*, boolean onlyOnDevice*/
) {
+ public Vector<OCFile> getFolderContent(OCFile f
, boolean onlyOnDevice
) {
if (f != null && f.isFolder() && f.getFileId() != -1) {
if (f != null && f.isFolder() && f.getFileId() != -1) {
- // TODO Enable when "On Device" is recovered ?
- return getFolderContent(f.getFileId()/*, onlyOnDevice*/);
+ return getFolderContent(f.getFileId(), onlyOnDevice);
} else {
return new Vector<OCFile>();
} else {
return new Vector<OCFile>();
@@
-159,12
+158,11
@@
public class FileDataStorageManager {
}
}
- public Vector<OCFile> getFolderImages(OCFile folder
/*, boolean onlyOnDevice*/
) {
+ public Vector<OCFile> getFolderImages(OCFile folder
, boolean onlyOnDevice
) {
Vector<OCFile> ret = new Vector<OCFile>();
if (folder != null) {
// TODO better implementation, filtering in the access to database instead of here
Vector<OCFile> ret = new Vector<OCFile>();
if (folder != null) {
// TODO better implementation, filtering in the access to database instead of here
- // TODO Enable when "On Device" is recovered ?
- Vector<OCFile> tmp = getFolderContent(folder/*, onlyOnDevice*/);
+ Vector<OCFile> tmp = getFolderContent(folder, onlyOnDevice);
OCFile current = null;
for (int i=0; i<tmp.size(); i++) {
current = tmp.get(i);
OCFile current = null;
for (int i=0; i<tmp.size(); i++) {
current = tmp.get(i);
@@
-551,8
+549,7
@@
public class FileDataStorageManager {
File localFolder = new File(localFolderPath);
if (localFolder.exists()) {
// stage 1: remove the local files already registered in the files database
File localFolder = new File(localFolderPath);
if (localFolder.exists()) {
// stage 1: remove the local files already registered in the files database
- // TODO Enable when "On Device" is recovered ?
- Vector<OCFile> files = getFolderContent(folder.getFileId()/*, false*/);
+ Vector<OCFile> files = getFolderContent(folder.getFileId(), false);
if (files != null) {
for (OCFile file : files) {
if (file.isFolder()) {
if (files != null) {
for (OCFile file : files) {
if (file.isFolder()) {
@@
-787,7
+784,7
@@
public class FileDataStorageManager {
}
}
- private Vector<OCFile> getFolderContent(long parentId
/*, boolean onlyOnDevice*/
) {
+ private Vector<OCFile> getFolderContent(long parentId
, boolean onlyOnDevice
) {
Vector<OCFile> ret = new Vector<OCFile>();
Vector<OCFile> ret = new Vector<OCFile>();
@@
-814,10
+811,9
@@
public class FileDataStorageManager {
if (c.moveToFirst()) {
do {
OCFile child = createFileInstance(c);
if (c.moveToFirst()) {
do {
OCFile child = createFileInstance(c);
- // TODO Enable when "On Device" is recovered ?
- // if (child.isFolder() || !onlyOnDevice || onlyOnDevice && child.isDown()){
+ if (child.isFolder() || !onlyOnDevice || onlyOnDevice && child.isDown()){
ret.add(child);
ret.add(child);
-
//
}
+ }
} while (c.moveToNext());
}
} while (c.moveToNext());
}
@@
-1477,8
+1473,7
@@
public class FileDataStorageManager {
+ ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?";
String [] whereArgs = new String[]{ "", mAccount.name };
+ ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?";
String [] whereArgs = new String[]{ "", mAccount.name };
- // TODO Enable when "On Device" is recovered ?
- Vector<OCFile> files = getFolderContent(folder /*, false*/);
+ Vector<OCFile> files = getFolderContent(folder, false);
for (OCFile file : files) {
whereArgs[0] = file.getRemotePath();
for (OCFile file : files) {
whereArgs[0] = file.getRemotePath();
diff --git
a/src/com/owncloud/android/operations/RefreshFolderOperation.java
b/src/com/owncloud/android/operations/RefreshFolderOperation.java
index
977f72a
..
dade4d9
100644
(file)
--- a/
src/com/owncloud/android/operations/RefreshFolderOperation.java
+++ b/
src/com/owncloud/android/operations/RefreshFolderOperation.java
@@
-201,8
+201,7
@@
public class RefreshFolderOperation extends RemoteOperation {
if (mRemoteFolderChanged) {
result = fetchAndSyncRemoteFolder(client);
} else {
if (mRemoteFolderChanged) {
result = fetchAndSyncRemoteFolder(client);
} else {
- // TODO Enable when "On Device" is recovered ?
- mChildren = mStorageManager.getFolderContent(mLocalFolder/*, false*/);
+ mChildren = mStorageManager.getFolderContent(mLocalFolder, false);
}
}
}
}
@@
-348,8
+347,7
@@
public class RefreshFolderOperation extends RemoteOperation {
List<SynchronizeFileOperation> filesToSyncContents = new Vector<SynchronizeFileOperation>();
// get current data about local contents of the folder to synchronize
List<SynchronizeFileOperation> filesToSyncContents = new Vector<SynchronizeFileOperation>();
// get current data about local contents of the folder to synchronize
- // TODO Enable when "On Device" is recovered ?
- List<OCFile> localFiles = mStorageManager.getFolderContent(mLocalFolder/*, false*/);
+ List<OCFile> localFiles = mStorageManager.getFolderContent(mLocalFolder, false);
Map<String, OCFile> localFilesMap = new HashMap<String, OCFile>(localFiles.size());
for (OCFile file : localFiles) {
localFilesMap.put(file.getRemotePath(), file);
Map<String, OCFile> localFilesMap = new HashMap<String, OCFile>(localFiles.size());
for (OCFile file : localFiles) {
localFilesMap.put(file.getRemotePath(), file);
diff --git
a/src/com/owncloud/android/operations/SynchronizeFolderOperation.java
b/src/com/owncloud/android/operations/SynchronizeFolderOperation.java
index
78b6a7b
..
d2d6c37
100644
(file)
--- a/
src/com/owncloud/android/operations/SynchronizeFolderOperation.java
+++ b/
src/com/owncloud/android/operations/SynchronizeFolderOperation.java
@@
-298,8
+298,7
@@
public class SynchronizeFolderOperation extends SyncOperation {
}
// get current data about local contents of the folder to synchronize
}
// get current data about local contents of the folder to synchronize
- // TODO Enable when "On Device" is recovered ?
- List<OCFile> localFiles = storageManager.getFolderContent(mLocalFolder/*, false*/);
+ List<OCFile> localFiles = storageManager.getFolderContent(mLocalFolder, false);
Map<String, OCFile> localFilesMap = new HashMap<String, OCFile>(localFiles.size());
for (OCFile file : localFiles) {
localFilesMap.put(file.getRemotePath(), file);
Map<String, OCFile> localFilesMap = new HashMap<String, OCFile>(localFiles.size());
for (OCFile file : localFiles) {
localFilesMap.put(file.getRemotePath(), file);
@@
-394,8
+393,7
@@
public class SynchronizeFolderOperation extends SyncOperation {
private void prepareOpsFromLocalKnowledge() throws OperationCancelledException {
private void prepareOpsFromLocalKnowledge() throws OperationCancelledException {
- // TODO Enable when "On Device" is recovered ?
- List<OCFile> children = getStorageManager().getFolderContent(mLocalFolder/*, false*/);
+ List<OCFile> children = getStorageManager().getFolderContent(mLocalFolder, false);
for (OCFile child : children) {
/// classify file to sync/download contents later
if (child.isFolder()) {
for (OCFile child : children) {
/// classify file to sync/download contents later
if (child.isFolder()) {
diff --git
a/src/com/owncloud/android/ui/activity/FileActivity.java
b/src/com/owncloud/android/ui/activity/FileActivity.java
index
1c21cab
..
5bd6bc3
100644
(file)
--- a/
src/com/owncloud/android/ui/activity/FileActivity.java
+++ b/
src/com/owncloud/android/ui/activity/FileActivity.java
@@
-388,18
+388,17
@@
public class FileActivity extends AppCompatActivity
mDrawerItems.add(new NavigationDrawerItem(mDrawerTitles[0], mDrawerContentDescriptions[0],
R.drawable.ic_folder_open));
mDrawerItems.add(new NavigationDrawerItem(mDrawerTitles[0], mDrawerContentDescriptions[0],
R.drawable.ic_folder_open));
- // TODO Enable when "On Device" is recovered
// On Device
// On Device
-
//mDrawerItems.add(new NavigationDrawerItem(mDrawerTitles[2
],
-
// mDrawerContentDescriptions[2]
));
+
mDrawerItems.add(new NavigationDrawerItem(mDrawerTitles[1], mDrawerContentDescriptions[1
],
+
R.drawable.ic_action_download_grey
));
// Settings
// Settings
- mDrawerItems.add(new NavigationDrawerItem(mDrawerTitles[
1], mDrawerContentDescriptions[1
],
+ mDrawerItems.add(new NavigationDrawerItem(mDrawerTitles[
2], mDrawerContentDescriptions[2
],
R.drawable.ic_settings));
// Logs
if (BuildConfig.DEBUG) {
R.drawable.ic_settings));
// Logs
if (BuildConfig.DEBUG) {
- mDrawerItems.add(new NavigationDrawerItem(mDrawerTitles[
2
],
- mDrawerContentDescriptions[
2
],R.drawable.ic_log));
+ mDrawerItems.add(new NavigationDrawerItem(mDrawerTitles[
3
],
+ mDrawerContentDescriptions[
3
],R.drawable.ic_log));
}
// setting the nav drawer list adapter
}
// setting the nav drawer list adapter
@@
-955,24
+954,25
@@
public class FileActivity extends AppCompatActivity
// break;
case 0: // All Files
// break;
case 0: // All Files
- allFilesOption();
+ // allFilesOption();
+ MainApp.showOnlyFilesOnDevice(false);
mDrawerLayout.closeDrawers();
break;
mDrawerLayout.closeDrawers();
break;
- // TODO Enable when "On Device" is recovered ?
-// case 2:
-
//
MainApp.showOnlyFilesOnDevice(true);
-
//
mDrawerLayout.closeDrawers();
-
//
break;
+ case 1: // On Device
+ // TODO Tobi: refresh
+ MainApp.showOnlyFilesOnDevice(true);
+ mDrawerLayout.closeDrawers();
+ break;
- case
1
: // Settings
+ case
2
: // Settings
Intent settingsIntent = new Intent(getApplicationContext(),
Preferences.class);
startActivity(settingsIntent);
mDrawerLayout.closeDrawers();
break;
Intent settingsIntent = new Intent(getApplicationContext(),
Preferences.class);
startActivity(settingsIntent);
mDrawerLayout.closeDrawers();
break;
- case
2
: // Logs
+ case
3
: // Logs
Intent loggerIntent = new Intent(getApplicationContext(),
LogHistoryActivity.class);
startActivity(loggerIntent);
Intent loggerIntent = new Intent(getApplicationContext(),
LogHistoryActivity.class);
startActivity(loggerIntent);
diff --git
a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java
b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java
index
240d146
..
1e9317d
100644
(file)
--- a/
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
+++ b/
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
@@
-299,10
+299,7
@@
public class FileDisplayActivity extends HookActivity
/// First fragment
OCFileListFragment listOfFiles = getListOfFilesFragment();
if (listOfFiles != null) {
/// First fragment
OCFileListFragment listOfFiles = getListOfFilesFragment();
if (listOfFiles != null) {
- listOfFiles.listDirectory(getCurrentDir());
- // TODO Enable when "On Device" is recovered
- // listOfFiles.listDirectory(getCurrentDir(), MainApp.getOnlyOnDevice());
-
+ listOfFiles.listDirectory(getCurrentDir(), MainApp.getOnlyOnDevice());
} else {
Log_OC.e(TAG, "Still have a chance to lose the initializacion of list fragment >(");
}
} else {
Log_OC.e(TAG, "Still have a chance to lose the initializacion of list fragment >(");
}
@@
-431,9
+428,7
@@
public class FileDisplayActivity extends HookActivity
protected void refreshListOfFilesFragment() {
OCFileListFragment fileListFragment = getListOfFilesFragment();
if (fileListFragment != null) {
protected void refreshListOfFilesFragment() {
OCFileListFragment fileListFragment = getListOfFilesFragment();
if (fileListFragment != null) {
- fileListFragment.listDirectory();
- // TODO Enable when "On Device" is recovered ?
- // fileListFragment.listDirectory(MainApp.getOnlyOnDevice());
+ fileListFragment.listDirectory(MainApp.getOnlyOnDevice());
}
}
}
}
@@
-933,10
+928,8
@@
public class FileDisplayActivity extends HookActivity
currentDir.getRemotePath().equals(synchFolderRemotePath)) {
OCFileListFragment fileListFragment = getListOfFilesFragment();
if (fileListFragment != null) {
currentDir.getRemotePath().equals(synchFolderRemotePath)) {
OCFileListFragment fileListFragment = getListOfFilesFragment();
if (fileListFragment != null) {
- fileListFragment.listDirectory();
- // TODO Enable when "On Device" is recovered ?
- // fileListFragment.listDirectory(currentDir,
- // MainApp.getOnlyOnDevice());
+ fileListFragment.listDirectory(currentDir,
+ MainApp.getOnlyOnDevice());
}
}
setFile(currentFile);
}
}
setFile(currentFile);
@@
-1179,9
+1172,7
@@
public class FileDisplayActivity extends HookActivity
OCFileListFragment listOfFiles = getListOfFilesFragment();
if (listOfFiles != null) { // should never be null, indeed
OCFile root = getStorageManager().getFileByPath(OCFile.ROOT_PATH);
OCFileListFragment listOfFiles = getListOfFilesFragment();
if (listOfFiles != null) { // should never be null, indeed
OCFile root = getStorageManager().getFileByPath(OCFile.ROOT_PATH);
- listOfFiles.listDirectory(root);
- // TODO Enable when "On Device" is recovered ?
- // listOfFiles.listDirectory(root, MainApp.getOnlyOnDevice());
+ listOfFiles.listDirectory(root, MainApp.getOnlyOnDevice());
setFile(listOfFiles.getCurrentFile());
startSyncFolderOperation(root, false);
}
setFile(listOfFiles.getCurrentFile());
startSyncFolderOperation(root, false);
}
@@
-1266,9
+1257,7
@@
public class FileDisplayActivity extends HookActivity
// getFileDownloadBinder() - THIS IS A MESS
OCFileListFragment listOfFiles = getListOfFilesFragment();
if (listOfFiles != null) {
// getFileDownloadBinder() - THIS IS A MESS
OCFileListFragment listOfFiles = getListOfFilesFragment();
if (listOfFiles != null) {
- listOfFiles.listDirectory();
- // TODO Enable when "On Device" is recovered ?
- // listOfFiles.listDirectory(MainApp.getOnlyOnDevice());
+ listOfFiles.listDirectory(MainApp.getOnlyOnDevice());
}
FileFragment secondFragment = getSecondFragment();
if (secondFragment != null && secondFragment instanceof FileDetailFragment) {
}
FileFragment secondFragment = getSecondFragment();
if (secondFragment != null && secondFragment instanceof FileDetailFragment) {
diff --git
a/src/com/owncloud/android/ui/activity/FolderPickerActivity.java
b/src/com/owncloud/android/ui/activity/FolderPickerActivity.java
index
4b558f0
..
5828a14
100644
(file)
--- a/
src/com/owncloud/android/ui/activity/FolderPickerActivity.java
+++ b/
src/com/owncloud/android/ui/activity/FolderPickerActivity.java
@@
-141,7
+141,7
@@
public class FolderPickerActivity extends FileActivity implements FileFragment.C
if (!stateWasRecovered) {
OCFileListFragment listOfFolders = getListOfFilesFragment();
if (!stateWasRecovered) {
OCFileListFragment listOfFolders = getListOfFilesFragment();
- listOfFolders.listDirectory(folder
/*, false*/
);
+ listOfFolders.listDirectory(folder
, false
);
startSyncFolderOperation(folder, false);
}
startSyncFolderOperation(folder, false);
}
@@
-310,9
+310,7
@@
public class FolderPickerActivity extends FileActivity implements FileFragment.C
protected void refreshListOfFilesFragment() {
OCFileListFragment fileListFragment = getListOfFilesFragment();
if (fileListFragment != null) {
protected void refreshListOfFilesFragment() {
OCFileListFragment fileListFragment = getListOfFilesFragment();
if (fileListFragment != null) {
- fileListFragment.listDirectory();
- // TODO Enable when "On Device" is recovered ?
- // fileListFragment.listDirectory(false);
+ fileListFragment.listDirectory(false);
}
}
}
}
@@
-320,9
+318,7
@@
public class FolderPickerActivity extends FileActivity implements FileFragment.C
OCFileListFragment listOfFiles = getListOfFilesFragment();
if (listOfFiles != null) { // should never be null, indeed
OCFile root = getStorageManager().getFileByPath(OCFile.ROOT_PATH);
OCFileListFragment listOfFiles = getListOfFilesFragment();
if (listOfFiles != null) { // should never be null, indeed
OCFile root = getStorageManager().getFileByPath(OCFile.ROOT_PATH);
- listOfFiles.listDirectory(root);
- // TODO Enable when "On Device" is recovered ?
- // listOfFiles.listDirectory(root, false);
+ listOfFiles.listDirectory(root, false);
setFile(listOfFiles.getCurrentFile());
updateNavigationElementsInActionBar();
startSyncFolderOperation(root, false);
setFile(listOfFiles.getCurrentFile());
updateNavigationElementsInActionBar();
startSyncFolderOperation(root, false);
@@
-474,9
+470,7
@@
public class FolderPickerActivity extends FileActivity implements FileFragment.C
equals(synchFolderRemotePath)) {
OCFileListFragment fileListFragment = getListOfFilesFragment();
if (fileListFragment != null) {
equals(synchFolderRemotePath)) {
OCFileListFragment fileListFragment = getListOfFilesFragment();
if (fileListFragment != null) {
- fileListFragment.listDirectory(currentDir);
- // TODO Enable when "On Device" is recovered ?
- // fileListFragment.listDirectory(currentDir, false);
+ fileListFragment.listDirectory(currentDir, false);
}
}
setFile(currentFile);
}
}
setFile(currentFile);
diff --git
a/src/com/owncloud/android/ui/activity/UploadPathActivity.java
b/src/com/owncloud/android/ui/activity/UploadPathActivity.java
index
db704d1
..
a4e9cb7
100644
(file)
--- a/
src/com/owncloud/android/ui/activity/UploadPathActivity.java
+++ b/
src/com/owncloud/android/ui/activity/UploadPathActivity.java
@@
-67,8
+67,7
@@
public class UploadPathActivity extends FolderPickerActivity implements FileFrag
if (!stateWasRecovered) {
OCFileListFragment listOfFolders = getListOfFilesFragment();
if (!stateWasRecovered) {
OCFileListFragment listOfFolders = getListOfFilesFragment();
- // TODO Enable when "On Device" is recovered ?
- listOfFolders.listDirectory(folder/*, false*/);
+ listOfFolders.listDirectory(folder, false);
startSyncFolderOperation(folder, false);
}
startSyncFolderOperation(folder, false);
}
diff --git
a/src/com/owncloud/android/ui/activity/Uploader.java
b/src/com/owncloud/android/ui/activity/Uploader.java
index
d221bc9
..
0549f7d
100644
(file)
--- a/
src/com/owncloud/android/ui/activity/Uploader.java
+++ b/
src/com/owncloud/android/ui/activity/Uploader.java
@@
-333,8
+333,7
@@
public class Uploader extends FileActivity
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// click on folder in the list
Log_OC.d(TAG, "on item click");
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// click on folder in the list
Log_OC.d(TAG, "on item click");
- // TODO Enable when "On Device" is recovered ?
- Vector<OCFile> tmpfiles = getStorageManager().getFolderContent(mFile /*, false*/);
+ Vector<OCFile> tmpfiles = getStorageManager().getFolderContent(mFile, false);
if (tmpfiles.size() <= 0) return;
// filter on dirtype
Vector<OCFile> files = new Vector<OCFile>();
if (tmpfiles.size() <= 0) return;
// filter on dirtype
Vector<OCFile> files = new Vector<OCFile>();
@@
-418,8
+417,7
@@
public class Uploader extends FileActivity
mFile = getStorageManager().getFileByPath(full_path);
if (mFile != null) {
mFile = getStorageManager().getFileByPath(full_path);
if (mFile != null) {
- // TODO Enable when "On Device" is recovered ?
- Vector<OCFile> files = getStorageManager().getFolderContent(mFile/*, false*/);
+ Vector<OCFile> files = getStorageManager().getFolderContent(mFile, false);
List<HashMap<String, Object>> data = new LinkedList<HashMap<String,Object>>();
for (OCFile f : files) {
HashMap<String, Object> h = new HashMap<String, Object>();
List<HashMap<String, Object>> data = new LinkedList<HashMap<String,Object>>();
for (OCFile f : files) {
HashMap<String, Object> h = new HashMap<String, Object>();
diff --git
a/src/com/owncloud/android/ui/adapter/FileListListAdapter.java
b/src/com/owncloud/android/ui/adapter/FileListListAdapter.java
index
5e94e0f
..
ef1ec12
100644
(file)
--- a/
src/com/owncloud/android/ui/adapter/FileListListAdapter.java
+++ b/
src/com/owncloud/android/ui/adapter/FileListListAdapter.java
@@
-408,15
+408,14
@@
public class FileListListAdapter extends BaseAdapter implements ListAdapter {
* mStorageManager if is different (and not NULL)
\r
*/
\r
public void swapDirectory(OCFile directory, FileDataStorageManager updatedStorageManager
\r
* mStorageManager if is different (and not NULL)
\r
*/
\r
public void swapDirectory(OCFile directory, FileDataStorageManager updatedStorageManager
\r
-
/*, boolean onlyOnDevice*/
) {
\r
+
, boolean onlyOnDevice
) {
\r
mFile = directory;
\r
if (updatedStorageManager != null && updatedStorageManager != mStorageManager) {
\r
mStorageManager = updatedStorageManager;
\r
mAccount = AccountUtils.getCurrentOwnCloudAccount(mContext);
\r
}
\r
if (mStorageManager != null) {
\r
mFile = directory;
\r
if (updatedStorageManager != null && updatedStorageManager != mStorageManager) {
\r
mStorageManager = updatedStorageManager;
\r
mAccount = AccountUtils.getCurrentOwnCloudAccount(mContext);
\r
}
\r
if (mStorageManager != null) {
\r
- // TODO Enable when "On Device" is recovered ?
\r
- mFiles = mStorageManager.getFolderContent(mFile/*, onlyOnDevice*/);
\r
+ mFiles = mStorageManager.getFolderContent(mFile, onlyOnDevice);
\r
mFilesOrig.clear();
\r
mFilesOrig.addAll(mFiles);
\r
\r
mFilesOrig.clear();
\r
mFilesOrig.addAll(mFiles);
\r
\r
diff --git
a/src/com/owncloud/android/ui/dialog/RemoveFileDialogFragment.java
b/src/com/owncloud/android/ui/dialog/RemoveFileDialogFragment.java
index
28419e6
..
4f34b07
100644
(file)
--- a/
src/com/owncloud/android/ui/dialog/RemoveFileDialogFragment.java
+++ b/
src/com/owncloud/android/ui/dialog/RemoveFileDialogFragment.java
@@
-111,8
+111,7
@@
implements ConfirmationDialogFragmentListener {
boolean containsFavorite = false;
if (mTargetFile.isFolder()) {
boolean containsFavorite = false;
if (mTargetFile.isFolder()) {
- // TODO Enable when "On Device" is recovered ?
- Vector<OCFile> files = storageManager.getFolderContent(mTargetFile/*, false*/);
+ Vector<OCFile> files = storageManager.getFolderContent(mTargetFile, false);
for(OCFile file: files) {
containsFavorite = file.isFavorite() || containsFavorite;
for(OCFile file: files) {
containsFavorite = file.isFavorite() || containsFavorite;
diff --git
a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java
b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java
index
02bd845
..
7b082ea
100644
(file)
--- a/
src/com/owncloud/android/ui/fragment/OCFileListFragment.java
+++ b/
src/com/owncloud/android/ui/fragment/OCFileListFragment.java
@@
-35,6
+35,7
@@
import android.widget.AdapterView;
import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.PopupMenu;
import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.PopupMenu;
+import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.datamodel.FileDataStorageManager;
@@
-242,8
+243,7
@@
public class OCFileListFragment extends ExtendedListFragment implements FileActi
} // exit is granted because storageManager.getFileByPath("/") never returns null
mFile = parentDir;
} // exit is granted because storageManager.getFileByPath("/") never returns null
mFile = parentDir;
- // TODO Enable when "On Device" is recovered ?
- listDirectory(mFile /*, MainApp.getOnlyOnDevice()*/);
+ listDirectory(mFile, MainApp.getOnlyOnDevice());
onRefresh(false);
onRefresh(false);
@@
-261,8
+261,7
@@
public class OCFileListFragment extends ExtendedListFragment implements FileActi
if (file != null) {
if (file.isFolder()) {
// update state and view of this fragment
if (file != null) {
if (file.isFolder()) {
// update state and view of this fragment
- // TODO Enable when "On Device" is recovered ?
- listDirectory(file/*, MainApp.getOnlyOnDevice()*/);
+ listDirectory(file, MainApp.getOnlyOnDevice());
// then, notify parent activity to let it update its state and view
mContainerActivity.onBrowsedDownTo(file);
// save index and top position
// then, notify parent activity to let it update its state and view
mContainerActivity.onBrowsedDownTo(file);
// save index and top position
@@
-442,17
+441,14
@@
public class OCFileListFragment extends ExtendedListFragment implements FileActi
}
/**
}
/**
- * Calls {@link OCFileListFragment#listDirectory(OCFile)} with a null parameter
+ * Calls {@link OCFileListFragment#listDirectory(OCFile
, boolean
)} with a null parameter
*/
*/
- public void listDirectory(/*boolean onlyOnDevice*/){
- listDirectory(null);
- // TODO Enable when "On Device" is recovered ?
- // listDirectory(null, onlyOnDevice);
+ public void listDirectory(boolean onlyOnDevice){
+ listDirectory(null, onlyOnDevice);
}
public void refreshDirectory(){
}
public void refreshDirectory(){
- // TODO Enable when "On Device" is recovered ?
- listDirectory(getCurrentFile()/*, MainApp.getOnlyOnDevice()*/);
+ listDirectory(getCurrentFile(), MainApp.getOnlyOnDevice());
}
/**
}
/**
@@
-462,7
+458,7
@@
public class OCFileListFragment extends ExtendedListFragment implements FileActi
*
* @param directory File to be listed
*/
*
* @param directory File to be listed
*/
- public void listDirectory(OCFile directory
/*, boolean onlyOnDevice*/
) {
+ public void listDirectory(OCFile directory
, boolean onlyOnDevice
) {
FileDataStorageManager storageManager = mContainerActivity.getStorageManager();
if (storageManager != null) {
FileDataStorageManager storageManager = mContainerActivity.getStorageManager();
if (storageManager != null) {
@@
-483,8
+479,7
@@
public class OCFileListFragment extends ExtendedListFragment implements FileActi
directory = storageManager.getFileById(directory.getParentId());
}
directory = storageManager.getFileById(directory.getParentId());
}
- // TODO Enable when "On Device" is recovered ?
- mAdapter.swapDirectory(directory, storageManager/*, onlyOnDevice*/);
+ mAdapter.swapDirectory(directory, storageManager, onlyOnDevice);
if (mFile == null || !mFile.equals(directory)) {
mCurrentListView.setSelection(0);
}
if (mFile == null || !mFile.equals(directory)) {
mCurrentListView.setSelection(0);
}
diff --git
a/src/com/owncloud/android/ui/preview/PreviewImageActivity.java
b/src/com/owncloud/android/ui/preview/PreviewImageActivity.java
index
5cbacfc
..
3dafb9d
100644
(file)
--- a/
src/com/owncloud/android/ui/preview/PreviewImageActivity.java
+++ b/
src/com/owncloud/android/ui/preview/PreviewImageActivity.java
@@
-41,6
+41,7
@@
import android.view.View;
import android.view.Window;
import com.ortiz.touch.ExtendedViewPager;
import android.view.Window;
import com.ortiz.touch.ExtendedViewPager;
+import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.datamodel.FileDataStorageManager;
@@
-156,9
+157,8
@@
public class PreviewImageActivity extends FileActivity implements
parentFolder = getStorageManager().getFileByPath(OCFile.ROOT_PATH);
}
parentFolder = getStorageManager().getFileByPath(OCFile.ROOT_PATH);
}
- // TODO Enable when "On Device" is recovered ?
mPreviewImagePagerAdapter = new PreviewImagePagerAdapter(getSupportFragmentManager(),
mPreviewImagePagerAdapter = new PreviewImagePagerAdapter(getSupportFragmentManager(),
- parentFolder, getAccount(), getStorageManager()
/*, MainApp.getOnlyOnDevice()*/
);
+ parentFolder, getAccount(), getStorageManager()
, MainApp.getOnlyOnDevice()
);
mViewPager = (ExtendedViewPager) findViewById(R.id.fragmentPager);
int position = mHasSavedPosition ? mSavedPosition :
mViewPager = (ExtendedViewPager) findViewById(R.id.fragmentPager);
int position = mHasSavedPosition ? mSavedPosition :
diff --git
a/src/com/owncloud/android/ui/preview/PreviewImagePagerAdapter.java
b/src/com/owncloud/android/ui/preview/PreviewImagePagerAdapter.java
index
dda7dda
..
9f44901
100644
(file)
--- a/
src/com/owncloud/android/ui/preview/PreviewImagePagerAdapter.java
+++ b/
src/com/owncloud/android/ui/preview/PreviewImagePagerAdapter.java
@@
-61,8
+61,8
@@
public class PreviewImagePagerAdapter extends FragmentStatePagerAdapter {
* @param storageManager Bridge to database.
*/
public PreviewImagePagerAdapter(FragmentManager fragmentManager, OCFile parentFolder,
* @param storageManager Bridge to database.
*/
public PreviewImagePagerAdapter(FragmentManager fragmentManager, OCFile parentFolder,
- Account account, FileDataStorageManager storageManager
/*
,
- boolean onlyOnDevice
*/
) {
+ Account account, FileDataStorageManager storageManager,
+ boolean onlyOnDevice) {
super(fragmentManager);
if (fragmentManager == null) {
super(fragmentManager);
if (fragmentManager == null) {
@@
-77,8
+77,7
@@
public class PreviewImagePagerAdapter extends FragmentStatePagerAdapter {
mAccount = account;
mStorageManager = storageManager;
mAccount = account;
mStorageManager = storageManager;
- // TODO Enable when "On Device" is recovered ?
- mImageFiles = mStorageManager.getFolderImages(parentFolder/*, false*/);
+ mImageFiles = mStorageManager.getFolderImages(parentFolder, false);
mImageFiles = FileStorageUtils.sortFolder(mImageFiles);
mImageFiles = FileStorageUtils.sortFolder(mImageFiles);