Fix the NullPointerException
Add the checking of null point for LocalBluetoothProfileManager Bug: 296442243 Test: [pass]make RunSettingsRoboTests ROBOTEST_FILTER=MediaOutputIndicatorWorkerTest Change-Id: Ieb38feec0a8a6b1f28c3ebd256ae7482c96fdf55
This commit is contained in:
committed by
SongFerng Wang
parent
67d5cb42e9
commit
280dfac8af
@@ -313,4 +313,18 @@ public class MediaOutputIndicatorWorkerTest {
|
||||
|
||||
assertThat(mMediaOutputIndicatorWorker.isBroadcastSupported()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isBroadcastSupported_noLocalMediaManager_returnFalse() {
|
||||
mMediaOutputIndicatorWorker.mLocalMediaManager = null;
|
||||
|
||||
assertThat(mMediaOutputIndicatorWorker.isBroadcastSupported()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isDeviceBroadcasting_noLocalMediaManager_returnFalse() {
|
||||
mMediaOutputIndicatorWorker.mLocalMediaManager = null;
|
||||
|
||||
assertThat(mMediaOutputIndicatorWorker.isDeviceBroadcasting()).isFalse();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user