From 4261acf6da8ca23a60698a2dfa16f12eed2591dd Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Fri, 22 Jun 2018 07:57:55 +0200 Subject: [PATCH] use correct context flip if add annotations Signed-off-by: tobiasKaminsky --- .../contactsbackup/ContactListFragment.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/owncloud/android/ui/fragment/contactsbackup/ContactListFragment.java b/src/main/java/com/owncloud/android/ui/fragment/contactsbackup/ContactListFragment.java index 9291f53f57..4cb8216228 100644 --- a/src/main/java/com/owncloud/android/ui/fragment/contactsbackup/ContactListFragment.java +++ b/src/main/java/com/owncloud/android/ui/fragment/contactsbackup/ContactListFragment.java @@ -162,7 +162,7 @@ public class ContactListFragment extends FileFragment { } @Override - public View onCreateView(final LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + public View onCreateView(@NonNull final LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.contactlist_fragment, container, false); ButterKnife.bind(this, view); @@ -233,7 +233,7 @@ public class ContactListFragment extends FileFragment { } @Override - public void onSaveInstanceState(Bundle outState) { + public void onSaveInstanceState(@NonNull Bundle outState) { super.onSaveInstanceState(outState); outState.putIntArray(CHECKED_ITEMS_ARRAY_KEY, contactListAdapter.getCheckedIntArray()); } @@ -496,11 +496,11 @@ public class ContactListFragment extends FileFragment { @Override public void onReceive(Context context, Intent intent) { - if (intent.getAction().equalsIgnoreCase(FileDownloader.getDownloadFinishMessage())) { + if (FileDownloader.getDownloadFinishMessage().equalsIgnoreCase(intent.getAction())) { String downloadedRemotePath = intent.getStringExtra(FileDownloader.EXTRA_REMOTE_PATH); FileDataStorageManager storageManager = new FileDataStorageManager(account, - getContext().getContentResolver()); + context.getContentResolver()); ocFile = storageManager.getFileByPath(downloadedRemotePath); loadContactsTask.execute(); } @@ -612,15 +612,16 @@ class ContactListAdapter extends RecyclerView.Adapter