}
-
+
+ @Override
+ protected void onNewIntent (Intent intent) {
+ Log_OC.v(TAG, "onNewIntent() start");
+ Account current = AccountUtils.getCurrentOwnCloudAccount(this);
+ if (current != null && mAccount != null && !mAccount.name.equals(current.name)) {
+ mAccount = current;
+ }
+ Log_OC.v(TAG, "onNewIntent() stop");
+ }
+
/**
* Since ownCloud {@link Account}s can be managed from the system setting menu,
* the existence of the {@link Account} associated to the instance must be checked
protected void onRestart() {
Log_OC.v(TAG, "onRestart() start");
super.onRestart();
- boolean validAccount =
- (mAccount != null && AccountUtils.setCurrentOwnCloudAccount(getApplicationContext(), mAccount.name));
+ boolean validAccount = (mAccount != null && AccountUtils.exists(mAccount, this));
if (!validAccount) {
swapToDefaultAccount();
}
@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");
}
import android.accounts.AuthenticatorException;
import android.annotation.TargetApi;
import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.ProgressDialog;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.ContentResolver;
@Override
protected void onDestroy() {
+ Log_OC.d(TAG, "onDestroy() start");
super.onDestroy();
+ Log_OC.d(TAG, "onDestroy() end");
}
/**