Add lock to update mCache from the constructor

Without lock, it's not guaranteed that the methods see values
populated by the constructor

Bug: 349952743
Test: TH
(cherry picked from https://android-review.googlesource.com/q/commit:053f9e63e5271be6bb5f10992141cd3c273971b4)
Merged-In: I5c98766a22047f49ad3338bfe620d3b8f4ef477e
Change-Id: I5c98766a22047f49ad3338bfe620d3b8f4ef477e
1 file changed