Update output switch UI
This CL include following update: 1. Add onDeviceAttributesChanged() callback to update UI when device attributes are changed. 2. Fix the top device when user press device to transfer. 3. Update UI when device is on goning call state and receive STREAM_DEVICES_CHANGED_ACTION intent. Bug: 144535188 Test: make -j42 RunSettingsRoboTests Change-Id: Idd5fb95054db30f8184faf4f6ab75d0b550907a1
This commit is contained in:
@@ -64,7 +64,6 @@ import java.util.List;
|
||||
@Config(shadows = {ShadowBluetoothAdapter.class})
|
||||
public class MediaOutputSliceTest {
|
||||
|
||||
private static final String TEST_PACKAGE_NAME = "com.fake.android.music";
|
||||
private static final String TEST_DEVICE_1_ID = "test_device_1_id";
|
||||
private static final String TEST_DEVICE_1_NAME = "test_device_1_name";
|
||||
private static final int TEST_DEVICE_1_ICON =
|
||||
@@ -100,12 +99,12 @@ public class MediaOutputSliceTest {
|
||||
mMediaDeviceUpdateWorker = new MediaDeviceUpdateWorker(mContext, MEDIA_OUTPUT_SLICE_URI);
|
||||
mMediaDeviceUpdateWorker.onDeviceListUpdate(mDevices);
|
||||
mMediaDeviceUpdateWorker.mLocalMediaManager = mLocalMediaManager;
|
||||
mMediaOutputSlice.init(TEST_PACKAGE_NAME, mMediaDeviceUpdateWorker);
|
||||
mMediaOutputSlice.init(mMediaDeviceUpdateWorker);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getSlice_workerIsNull_shouldReturnZeroRow() {
|
||||
mMediaOutputSlice.init(TEST_PACKAGE_NAME, null);
|
||||
mMediaOutputSlice.init(null);
|
||||
|
||||
final Slice slice = mMediaOutputSlice.getSlice();
|
||||
|
||||
|
Reference in New Issue
Block a user