Synchronize on_ring_buffer_data_callback and writeRingbufferFiles am: 25b3a6f0a4 am: 7a67f397d9

Change-Id: I9bba6ccca0b14f381fe66495735b0739b35030f7