import com.owncloud.android.ui.preview.PreviewImageActivity;
import com.owncloud.android.ui.preview.PreviewMediaFragment;
import com.owncloud.android.ui.preview.PreviewVideoActivity;
+import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.Log_OC;
// PIN CODE request ; best location is to decide, let's try this first
if (getIntent().getAction() != null && getIntent().getAction().equals(Intent.ACTION_MAIN) && savedInstanceState == null) {
requestPinCode();
+ } else if (getIntent().getAction() == null) {
+ requestPinCode();
}
/// file observer
// Action bar setup
mDirectories = new CustomArrayAdapter<String>(this, R.layout.sherlock_spinner_dropdown_item);
getSupportActionBar().setHomeButtonEnabled(true); // mandatory since Android ICS, according to the official documentation
- setSupportProgressBarIndeterminateVisibility(mSyncInProgress); // always AFTER setContentView(...) ; to work around bug in its implementation
-
-
+ setSupportProgressBarIndeterminateVisibility(mSyncInProgress); // always AFTER setContentView(...) ; to work around bug in its implementation
Log_OC.d(TAG, "onCreate() end");
}
-
+
+ @Override
+ protected void onStart() {
+ super.onStart();
+ getSupportActionBar().setIcon(DisplayUtils.getSeasonalIconId());
+ }
@Override
protected void onDestroy() {
}
-// private void updateDisplayHomeAtSync(){
-// ActionBar actionBar = getSupportActionBar();
-// OCFile currentDir = getCurrentDir();
-// if (currentDir.getParentId() != DataStorageManager.ROOT_PARENT_ID) {
-// actionBar.setHomeButtonEnabled(!mSyncInProgress);
-// actionBar.setDisplayHomeAsUpEnabled(!mSyncInProgress);
-// }
-// else {
-// actionBar.setHomeButtonEnabled(true);
-// actionBar.setDisplayHomeAsUpEnabled(false);
-// }
-// }
-//
/**
* {@inheritDoc}
*/
} else {
dismissLoadingDialog();
if (result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME) {
- Toast.makeText(FileDisplayActivity.this, R.string.create_dir_fail_msg_invalid_characters, Toast.LENGTH_LONG).show();
+ Toast.makeText(FileDisplayActivity.this, R.string.filename_forbidden_characters, Toast.LENGTH_LONG).show();
} else {
try {
Toast msg = Toast.makeText(FileDisplayActivity.this, R.string.create_dir_fail_msg, Toast.LENGTH_LONG);
msg.show();
// TODO throw again the new rename dialog
} if (result.getCode().equals(ResultCode.INVALID_CHARACTER_IN_NAME)) {
- Toast msg = Toast.makeText(this, R.string.create_dir_fail_msg_invalid_characters, Toast.LENGTH_LONG);
+ Toast msg = Toast.makeText(this, R.string.filename_forbidden_characters, Toast.LENGTH_LONG);
msg.show();
} else {
Toast msg = Toast.makeText(this, R.string.rename_server_fail_msg, Toast.LENGTH_LONG);
// Create directory
path += newDirectoryName + OCFile.PATH_SEPARATOR;
- RemoteOperation operation = new CreateFolderOperation(newDirectoryName, path, false, mStorageManager);
+ RemoteOperation operation = new CreateFolderOperation(path, false, mStorageManager);
operation.execute( getAccount(),
FileDisplayActivity.this,
FileDisplayActivity.this,