account may be null

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2018-06-22 08:34:33 +02:00
parent 11e2856571
commit 5b0f0a3bfd
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7

View file

@ -111,9 +111,14 @@ public class ManageAccountsActivity extends FileActivity
Account[] accountList = AccountManager.get(this).getAccountsByType(MainApp.getAccountType(this));
mOriginalAccounts = DisplayUtils.toAccountNameSet(Arrays.asList(accountList));
mOriginalCurrentAccount = AccountUtils.getCurrentOwnCloudAccount(this).name;
setAccount(AccountUtils.getCurrentOwnCloudAccount(this));
Account currentAccount = AccountUtils.getCurrentOwnCloudAccount(this);
if (currentAccount != null) {
mOriginalCurrentAccount = currentAccount.name;
}
setAccount(currentAccount);
onAccountSet(false);
arbitraryDataProvider = new ArbitraryDataProvider(getContentResolver());