private OCFileListFragment mFileList;
private boolean mDualPane;
- private boolean mBackFromCreatingFirstAccount;
public static final int DIALOG_SHORT_WAIT = 0;
private static final int DIALOG_CHOOSE_UPLOAD_SOURCE = 1;
private boolean mStarted;
@Override
- public void onCreate(Bundle savedInstanceState) {
+ protected void onCreate(Bundle savedInstanceState) {
Log_OC.d(TAG, "onCreate() start");
super.onCreate(savedInstanceState);
actionBar.setListNavigationCallbacks(mDirectories, this);
setSupportProgressBarIndeterminateVisibility(false); // always AFTER setContentView(...) ; to workaround bug in its implementation
- mBackFromCreatingFirstAccount = false;
-
Log_OC.d(TAG, "onCreate() end");
}
@Override
- public void onStart() {
+ protected void onStart() {
super.onStart();
if (mNewConfigurationChangeToApplyOnStart != null) {
checkConfigurationChange(mNewConfigurationChangeToApplyOnStart);
}
@Override
- public void onStop() {
+ protected void onStop() {
super.onStop();
mStarted = false;
}
} else {
finish();
Intent intent = new Intent(this, FileDisplayActivity.class);
- intent.putExtra(FileDetailFragment.EXTRA_FILE, getFile());
- intent.putExtra(FileDetailFragment.EXTRA_ACCOUNT, getAccount());
+ intent.putExtra(EXTRA_FILE, getFile());
+ intent.putExtra(EXTRA_ACCOUNT, getAccount());
startActivity(intent);
}
}
@Override
- public void onDestroy() {
+ protected void onDestroy() {
super.onDestroy();
if (mDownloadConnection != null)
unbindService(mDownloadConnection);
/**
* Called, when the user selected something for uploading
*/
- public void onActivityResult(int requestCode, int resultCode, Intent data) {
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == ACTION_SELECT_CONTENT_FROM_APPS && (resultCode == RESULT_OK || resultCode == UploadFilesActivity.RESULT_OK_AND_MOVE)) {
if (fragment != null) {
OCFile file = fragment.getFile();
if (file != null) {
- outState.putParcelable(FileActivity.EXTRA_FILE, file);
+ outState.putParcelable(EXTRA_FILE, file);
}
}
}
setFile(currentDir);
setSupportProgressBarIndeterminateVisibility(inProgress);
- if (mBackFromCreatingFirstAccount) {
- // awful patch to fix problem with visibility of progress circle with the first refresh of the first account
- // TODO - kill this Activity when the first account has to be created instead of stack the account creation on it
- getSupportActionBar().hide();
- getSupportActionBar().show();
- mBackFromCreatingFirstAccount = false;
- }
removeStickyBroadcast(intent);
}
private void startPreviewImage(OCFile file) {
Intent showDetailsIntent = new Intent(this, PreviewImageActivity.class);
- showDetailsIntent.putExtra(FileDetailFragment.EXTRA_FILE, file);
- showDetailsIntent.putExtra(FileDetailFragment.EXTRA_ACCOUNT, getAccount());
+ showDetailsIntent.putExtra(EXTRA_FILE, file);
+ showDetailsIntent.putExtra(EXTRA_ACCOUNT, getAccount());
startActivity(showDetailsIntent);
}
} else {
Intent showDetailsIntent = new Intent(this, FileDetailActivity.class);
- showDetailsIntent.putExtra(FileDetailFragment.EXTRA_FILE, file);
- showDetailsIntent.putExtra(FileDetailFragment.EXTRA_ACCOUNT, getAccount());
+ showDetailsIntent.putExtra(EXTRA_FILE, file);
+ showDetailsIntent.putExtra(EXTRA_ACCOUNT, getAccount());
showDetailsIntent.putExtra(PreviewVideoActivity.EXTRA_START_POSITION, startPlaybackPosition);
showDetailsIntent.putExtra(PreviewVideoActivity.EXTRA_AUTOPLAY, autoplay);
startActivity(showDetailsIntent);
} else {
Intent showDetailsIntent = new Intent(this, FileDetailActivity.class);
- showDetailsIntent.putExtra(FileDetailFragment.EXTRA_FILE, file);
- showDetailsIntent.putExtra(FileDetailFragment.EXTRA_ACCOUNT, getAccount());
+ showDetailsIntent.putExtra(EXTRA_FILE, file);
+ showDetailsIntent.putExtra(EXTRA_ACCOUNT, getAccount());
startActivity(showDetailsIntent);
}
}
transaction.commit();
} else {
Intent showDetailsIntent = new Intent(this, FileDetailActivity.class);
- showDetailsIntent.putExtra(FileDetailFragment.EXTRA_FILE, file);
- showDetailsIntent.putExtra(FileDetailFragment.EXTRA_ACCOUNT, getAccount());
+ showDetailsIntent.putExtra(EXTRA_FILE, file);
+ showDetailsIntent.putExtra(EXTRA_ACCOUNT, getAccount());
startActivity(showDetailsIntent);
}
}
} else {
Intent showDetailsIntent = new Intent(this, FileDetailActivity.class);
- showDetailsIntent.putExtra(FileDetailFragment.EXTRA_FILE, file);
- showDetailsIntent.putExtra(FileDetailFragment.EXTRA_ACCOUNT, getAccount());
+ showDetailsIntent.putExtra(EXTRA_FILE, file);
+ showDetailsIntent.putExtra(EXTRA_ACCOUNT, getAccount());
showDetailsIntent.putExtra(FileDetailActivity.EXTRA_MODE, FileDetailActivity.MODE_DETAILS);
startActivity(showDetailsIntent);
}