Fix null point exception on MediaDevice

This CL before, since we use mMediaDevices to do array compare
directly if other thread clear or change mMediaDevices will
cause the crash.

This CL will new a mMediaDevices array to do array compare to fix
this exception, also will use synchronized to protect mMediaDevices.

Bug: 155933396
Test: make -j42 RunSettingsLibRoboTests
Change-Id: I2b15a0ede7c77f2c82f32d26ff2237109808a5a2
1 file changed