Add null check for worker
Add null check to avoid crash when worker cannot get through uri. Bug: 128492874 Test: make -j42 RunSettingsRoboTests Change-Id: I789ce0bfa98c0b0b145a8605c58c88a77eeb76a9
This commit is contained in:
@@ -93,6 +93,13 @@ public class MediaOutputSliceTest {
|
||||
mMediaOutputSlice.init(TEST_PACKAGE_NAME, mMediaDeviceUpdateWorker);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getSlice_workerIsNull_shouldNotCrash() {
|
||||
mMediaOutputSlice.init(TEST_PACKAGE_NAME, null);
|
||||
|
||||
mMediaOutputSlice.getSlice();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getSlice_shouldHaveActiveDeviceName() {
|
||||
mDevices.clear();
|
||||
|
Reference in New Issue
Block a user