use provide activity instead of calling getActivity, which might be null.

Signed-off-by: tobiaskaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiaskaminsky 2018-01-17 15:23:26 +01:00
parent 4e2a019de6
commit 3d3fbe557a
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7

View file

@ -167,7 +167,7 @@ public class ContactsBackupFragment extends FileFragment implements DatePickerDi
view.findViewById(R.id.contacts_backup_now).getBackground()
.setColorFilter(accentColor, PorterDuff.Mode.SRC_ATOP);
AppCompatButton chooseDate = (AppCompatButton) view.findViewById(R.id.contacts_datepicker);
AppCompatButton chooseDate = view.findViewById(R.id.contacts_datepicker);
chooseDate.getBackground().setColorFilter(accentColor, PorterDuff.Mode.SRC_ATOP);
chooseDate.setTextColor(ThemeUtils.fontColor());
@ -203,7 +203,7 @@ public class ContactsBackupFragment extends FileFragment implements DatePickerDi
@Override
protected Boolean doInBackground(String... path) {
FileDataStorageManager storageManager = new FileDataStorageManager(account,
getActivity().getContentResolver());
contactsPreferenceActivity.getContentResolver());
OCFile folder = storageManager.getFileByPath(path[0]);