super.onCreate(savedInstanceState);
mHandler = new Handler();
mFileOperationsHelper = new FileOperationsHelper(this);
- Account account;
+ Account account = null;
if(savedInstanceState != null) {
- account = savedInstanceState.getParcelable(FileActivity.EXTRA_ACCOUNT);
mFile = savedInstanceState.getParcelable(FileActivity.EXTRA_FILE);
mFromNotification = savedInstanceState.getBoolean(FileActivity.EXTRA_FROM_NOTIFICATION);
mFileOperationsHelper.setOpIdWaitingFor(
@Override
protected void onStart() {
- Log_OC.v(TAG, "onStart() start");
super.onStart();
if (mAccountWasSet) {
onAccountSet(mAccountWasRestored);
}
- Log_OC.v(TAG, "onStart() end");
}
@Override
protected void onResume() {
- Log_OC.v(TAG, "onResume() start");
super.onResume();
if (mOperationsServiceBinder != null) {
doOnResumeAndBound();
}
- Log_OC.v(TAG, "onResume() end");
}
@Override
protected void onPause() {
- Log_OC.v(TAG, "onPause() start");
-
if (mOperationsServiceBinder != null) {
mOperationsServiceBinder.removeOperationListener(this);
}
super.onPause();
- Log_OC.v(TAG, "onPause() end");
}
@Override
protected void onDestroy() {
- Log_OC.v(TAG, "onDestroy() start");
if (mOperationsServiceConnection != null) {
unbindService(mOperationsServiceConnection);
mOperationsServiceBinder = null;
}
super.onDestroy();
- Log_OC.v(TAG, "onDestroy() end");
}
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putParcelable(FileActivity.EXTRA_FILE, mFile);
- outState.putParcelable(FileActivity.EXTRA_ACCOUNT, mAccount);
outState.putBoolean(FileActivity.EXTRA_FROM_NOTIFICATION, mFromNotification);
outState.putLong(KEY_WAITING_FOR_OP_ID, mFileOperationsHelper.getOpIdWaitingFor());
outState.putBoolean(KEY_TRY_SHARE_AGAIN, mTryShareAgain);