PBAP: Handle FATAL Exception during simulteneous contact sync & BT ON
Precondition:
There should be very large number of contacts in database and
Contacts are getting updated in Contacts App.
Usecase:
1) Trigger operation from contact app (like contact sync or
deletion of large number of contacts)
2) Turn ON Bluetooth.
Issue:
Bluetooth crashes or sometimes ANR is observed.
Root Cause:
When Bluetooth is turned ON, contacts are loaded in cursor. If
there is contact sync or contacts deletion after query is completed,
already fetched data in cursor is not available in database and
api like Cursor.getString(Column_Index) results in fatal exception.
Fix:
Skip the contacts/fields which are deleted.
Test: There is no FATAL exception if contacts are skipped.
Change-Id: Ia0b8e173218f0ce553d603187794aabfaf28afd9
CRs-Fixed: 2270047
2 files changed