Add null check when build MediaDevice

- We may not found CachedBluetoothDevice through
  CachedBluetoothDeviceManager. This CL add null check before
  we build the MediaDevice.
- Add test case

Bug: 154152005
Test: make -j42 RunSettingsLibRoboTests
Change-Id: I042912317e1924d8b9bdababf0b7dcb69836f9e2
2 files changed