-/* ownCloud Android client application
- * Copyright (C) 2012-2014 ownCloud Inc.
+/**
+ * ownCloud Android client application
+ *
+ * Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
package com.owncloud.android.ui.activity;
import android.accounts.Account;
-import android.content.Intent;
-
import android.os.Bundle;
-import android.view.View;
import android.view.View.OnClickListener;
import com.owncloud.android.datamodel.OCFile;
public static final String KEY_INSTANT_UPLOAD_PATH = "INSTANT_UPLOAD_PATH";
- public static final int RESULT_OK_SET_UPLOAD_PATH = 1;
@Override
protected void onCreate(Bundle savedInstanceState) {
String instantUploadPath = getIntent().getStringExtra(KEY_INSTANT_UPLOAD_PATH);
+ // The caller activity (Preferences) is not a FileActivity, so it has no OCFile, only a path.
OCFile folder = new OCFile(instantUploadPath);
setFile(folder);
if (!stateWasRecovered) {
OCFileListFragment listOfFolders = getListOfFilesFragment();
- listOfFolders.listDirectory(folder);
+ // TODO Enable when "On Device" is recovered ?
+ listOfFolders.listDirectory(folder/*, false*/);
startSyncFolderOperation(folder, false);
}
updateNavigationElementsInActionBar();
}
}
-
- @Override
- public void onClick(View v) {
- if (v == mCancelBtn) {
- finish();
- } else if (v == mChooseBtn) {
- Intent i = getIntent();
- OCFile targetFile = (OCFile) i.getParcelableExtra(UploadPathActivity.EXTRA_TARGET_FILE);
-
- Intent data = new Intent();
- data.putExtra(EXTRA_CURRENT_FOLDER, getCurrentFolder());
- data.putExtra(EXTRA_TARGET_FILE, targetFile);
- setResult(RESULT_OK_SET_UPLOAD_PATH, data);
- finish();
- }
- }
}