Add synchronization to PIC shared memory

Add more robust synchronization to the PIC shared memory nonce
storage.  The updated code follows the standard "double-checked"
pattern.

Flag: android.app.pic_uses_shared_memory
Bug: 360897450
Test: atest
 * FrameworksCoreTests:PropertyInvalidatedCacheTests
 * FrameworksCoreTests:IpcDataCacheTest
 * CtsOsTestCases:IpcDataCacheTest
Change-Id: I22ee87f9ea86f1bf17dd5e550dfae237236e3f98
1 file changed