- @Override
- protected void onPause() {
- if (this.isFinishing()) {
- Account current = AccountUtils.getCurrentOwnCloudAccount(this);
- if ((mPreviousAccount == null && current != null)
- || (mPreviousAccount != null && !mPreviousAccount.equals(current))) {
- // the account set as default changed since this activity was
- // created
-
- // restart the main activity
- Intent i = new Intent(this, FileDisplayActivity.class);
- i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
- startActivity(i);
- }
- }
- super.onPause();
- }
-