mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
refresh account when session expires
This commit is contained in:
parent
62e72ab303
commit
31e83e17e4
1 changed files with 14 additions and 3 deletions
|
@ -1146,6 +1146,9 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
|
||||||
mAccountMgr.setPassword(mAccount, mPasswordInput.getText().toString());
|
mAccountMgr.setPassword(mAccount, mPasswordInput.getText().toString());
|
||||||
}
|
}
|
||||||
setAccountAuthenticatorResult(response);
|
setAccountAuthenticatorResult(response);
|
||||||
|
|
||||||
|
// Sync Account
|
||||||
|
syncAccount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1213,9 +1216,10 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
|
||||||
setResult(RESULT_OK, intent);
|
setResult(RESULT_OK, intent);
|
||||||
|
|
||||||
/// immediately request for the synchronization of the new account
|
/// immediately request for the synchronization of the new account
|
||||||
Bundle bundle = new Bundle();
|
syncAccount();
|
||||||
bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
|
// Bundle bundle = new Bundle();
|
||||||
ContentResolver.requestSync(mAccount, AccountAuthenticator.AUTHORITY, bundle);
|
// bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
|
||||||
|
// ContentResolver.requestSync(mAccount, AccountAuthenticator.AUTHORITY, bundle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1560,4 +1564,11 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
|
||||||
mAuthMessage.setVisibility(View.GONE);
|
mAuthMessage.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void syncAccount(){
|
||||||
|
/// immediately request for the synchronization of the new account
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
|
||||||
|
ContentResolver.requestSync(mAccount, AccountAuthenticator.AUTHORITY, bundle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue