|
@@ -43,6 +43,7 @@ import android.widget.PopupMenu;
|
|
|
import android.widget.TextView;
|
|
|
import android.widget.Toast;
|
|
|
|
|
|
+import com.owncloud.android.MainApp;
|
|
|
import com.owncloud.android.R;
|
|
|
import com.owncloud.android.authentication.AccountUtils;
|
|
|
import com.owncloud.android.datamodel.FileDataStorageManager;
|
|
@@ -436,8 +437,7 @@ public class OCFileListFragment extends ExtendedListFragment
|
|
|
} // 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);
|
|
|
|
|
@@ -455,8 +455,7 @@ public class OCFileListFragment extends ExtendedListFragment
|
|
|
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
|
|
@@ -636,17 +635,14 @@ public class OCFileListFragment extends ExtendedListFragment
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 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(){
|
|
|
- // TODO Enable when "On Device" is recovered ?
|
|
|
- listDirectory(getCurrentFile()/*, MainApp.getOnlyOnDevice()*/);
|
|
|
+ listDirectory(getCurrentFile(), MainApp.getOnlyOnDevice());
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -656,7 +652,7 @@ public class OCFileListFragment extends ExtendedListFragment
|
|
|
*
|
|
|
* @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) {
|
|
|
|
|
@@ -677,8 +673,7 @@ public class OCFileListFragment extends ExtendedListFragment
|
|
|
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);
|
|
|
}
|