morenoh149 / react-native-contacts

React Native Contacts
MIT License
1.64k stars 560 forks source link

Android: cleanup implementation (remove deprecated async task, share code between old/new architecture, prevent crashes on curson management) #752

Open EnricoMazzu opened 3 days ago

EnricoMazzu commented 3 days ago

Step of rewark:

  1. Remove usage of deprecated AsyncTask
  2. use try with close instead of try - finally
  3. add check to prevent crashes in cursor read (invalid indexing or other similar condition)
  4. Check if create a Impl class for prevent code duplication between old and new architecture

NB: work on implementation , not on apis contract ->No breaking changes

I will submit a pull request in the next days