mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
account possible can be null
This commit is contained in:
parent
ec246eac59
commit
d5f0aa7db1
1 changed files with 12 additions and 10 deletions
|
@ -164,18 +164,20 @@ public class NotificationsActivity extends FileActivity {
|
|||
Account account = AccountUtils.getCurrentOwnCloudAccount(context);
|
||||
ArbitraryDataProvider arbitraryDataProvider = new ArbitraryDataProvider(getContentResolver());
|
||||
|
||||
boolean usesOldLogin = arbitraryDataProvider.getBooleanValue(account.name,
|
||||
AccountUtils.ACCOUNT_USES_STANDARD_PASSWORD);
|
||||
if (account != null) {
|
||||
boolean usesOldLogin = arbitraryDataProvider.getBooleanValue(account.name,
|
||||
AccountUtils.ACCOUNT_USES_STANDARD_PASSWORD);
|
||||
|
||||
if (usesOldLogin) {
|
||||
snackbar = Snackbar.make(emptyContentContainer, R.string.push_notifications_old_login,
|
||||
Snackbar.LENGTH_INDEFINITE);
|
||||
} else {
|
||||
String pushValue = arbitraryDataProvider.getValue(account.name, PushUtils.KEY_PUSH);
|
||||
|
||||
if (pushValue == null || pushValue.isEmpty()) {
|
||||
snackbar = Snackbar.make(emptyContentContainer, R.string.push_notifications_temp_error,
|
||||
if (usesOldLogin) {
|
||||
snackbar = Snackbar.make(emptyContentContainer, R.string.push_notifications_old_login,
|
||||
Snackbar.LENGTH_INDEFINITE);
|
||||
} else {
|
||||
String pushValue = arbitraryDataProvider.getValue(account.name, PushUtils.KEY_PUSH);
|
||||
|
||||
if (pushValue == null || pushValue.isEmpty()) {
|
||||
snackbar = Snackbar.make(emptyContentContainer, R.string.push_notifications_temp_error,
|
||||
Snackbar.LENGTH_INDEFINITE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue