Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b34dcecc authored by Chun-Ku Lin's avatar Chun-Ku Lin
Browse files

Adding ShadowBluetoothAdapter for the test

Many robotests that touches BluetoothAdapter might need to use our own
ShadowBluetoothAdapter which implements a "fake" getSupportedProfiles
call, so that the test won't trying to execute the android framework's getSupportedProfiles method.

Bug: 285235777
Test: atest AccessibilitySettingsTest

Change-Id: I5b3b2f4528a2b32aff22928653c57576981c0ff9
parent 40897d4b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ import com.android.internal.accessibility.util.AccessibilityUtils;
import com.android.internal.content.PackageMonitor;
import com.android.settings.R;
import com.android.settings.testutils.XmlTestUtils;
import com.android.settings.testutils.shadow.ShadowBluetoothAdapter;
import com.android.settings.testutils.shadow.ShadowBluetoothUtils;
import com.android.settings.testutils.shadow.ShadowFragment;
import com.android.settings.testutils.shadow.ShadowUserManager;
@@ -86,7 +87,7 @@ import java.util.List;

/** Test for {@link AccessibilitySettings}. */
@RunWith(RobolectricTestRunner.class)
@Config(shadows = {ShadowBluetoothUtils.class})
@Config(shadows = {ShadowBluetoothUtils.class, ShadowBluetoothAdapter.class})
public class AccessibilitySettingsTest {
    private static final String PACKAGE_NAME = "com.android.test";
    private static final String CLASS_NAME = PACKAGE_NAME + ".test_a11y_service";