Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 250bbb0e authored by Nancy Chen's avatar Nancy Chen
Browse files

Fix NPE with contact cache, and guard against race condition.

Because the image loading and contact interactions information are
loaded asynchronously at the same time, one of them may be loaded before
the other. To ensure that the main thread is aware when whether one or
both of them have completed, keep a flag in ContactCacheInfo. This will
prevent the callbacks from being cleared before all callbacks are
completed.
Also guard against NPEs by making sure the cache entry is added to the
map of callIds to cacheEntries and check for null before proceeding in
the callback for contact interactions.

Bug: 25618632

Change-Id: I7662242e040948a1e445f66c362f2eaea4cf03af
parent a1bccb17
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment