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;
} // 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);
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
}
/**
- * 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());
}
/**
*
* @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) {
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);
}