Merge "Fix the testcase error" into tm-d1-dev am: 602fe375d9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19083766 Change-Id: I2e79ea4100840627a21bd8797c9f1875b09c9161 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -46,8 +46,10 @@ import androidx.slice.core.SliceQuery;
|
||||
import androidx.slice.widget.SliceLiveData;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.bluetooth.Utils;
|
||||
import com.android.settings.testutils.SliceTester;
|
||||
import com.android.settings.testutils.shadow.ShadowBluetoothAdapter;
|
||||
import com.android.settings.testutils.shadow.ShadowCachedBluetoothDeviceManager;
|
||||
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
|
||||
|
||||
import org.junit.After;
|
||||
@@ -67,7 +69,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
@Config(shadows = ShadowBluetoothAdapter.class)
|
||||
@Config(shadows = {ShadowBluetoothAdapter.class, ShadowCachedBluetoothDeviceManager.class})
|
||||
public class BluetoothDevicesSliceTest {
|
||||
|
||||
private static final String BLUETOOTH_MOCK_ADDRESS = "00:11:00:11:00:11";
|
||||
@@ -111,6 +113,9 @@ public class BluetoothDevicesSliceTest {
|
||||
mShadowBluetoothAdapter.setEnabled(true);
|
||||
mShadowBluetoothAdapter.setState(BluetoothAdapter.STATE_ON);
|
||||
}
|
||||
final ShadowCachedBluetoothDeviceManager shadowCachedBluetoothDeviceManager =
|
||||
Shadow.extract(Utils.getLocalBtManager(mContext).getCachedDeviceManager());
|
||||
shadowCachedBluetoothDeviceManager.setCachedDevicesCopy(mBluetoothDeviceList);
|
||||
}
|
||||
|
||||
@After
|
||||
|
Reference in New Issue
Block a user