fix possible NPE on stopping contact backup job (#4387)

fix possible NPE on stopping contact backup job
This commit is contained in:
Tobias Kaminsky 2019-08-23 07:45:56 +02:00 committed by GitHub
commit 331edcb69c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,7 +126,7 @@ public class ContactsPreferenceActivity extends FileActivity implements FileFrag
for (JobRequest jobRequest : jobs) {
PersistableBundleCompat extras = jobRequest.getExtras();
if (extras.getString(ContactsBackupJob.ACCOUNT, "").equalsIgnoreCase(account.name) &&
if (extras != null && extras.getString(ContactsBackupJob.ACCOUNT, "").equalsIgnoreCase(account.name) &&
jobRequest.isPeriodic()) {
jobManager.cancel(jobRequest.getJobId());
}