Protect accesses to mFlushesPending.

Previously we weren't taking 'mLock' before accessing mFlushesPending
introducing a possible race condition.

Bug: 79994899
Change-Id: I382e0aa5879b8804718f0c41cf648910d88dee53
Merged-In: I9753d4ffc55c81716a80aefc2e8368f9b727484c
1 file changed