Fix test failure of AvailableMediaDeviceGroupControllerTest

Prevent test failing by avoid using ShadowFragment in the test. This
will cause `androidx.fragment.app.SuperNotCalledException` when creating
HearingAidPairingDialogFragment.

Bug: 299597695
Test: atest AvailableMediaDeviceGroupControllerTest
Change-Id: I99b5213cb78aad97fcb7e44e1babcf6c7f11636e
This commit is contained in:
Angela Wang
2023-09-08 11:35:03 +00:00
parent fde9937b04
commit bb1fe04afb
2 changed files with 9 additions and 11 deletions

View File

@@ -134,6 +134,11 @@ public class AvailableMediaDeviceGroupController extends BasePreferenceControlle
AvailableMediaDeviceGroupController.this, fragment.getMetricsCategory());
}
@VisibleForTesting
public void setFragmentManager(FragmentManager fragmentManager) {
mFragmentManager = fragmentManager;
}
@VisibleForTesting
public void setBluetoothDeviceUpdater(BluetoothDeviceUpdater bluetoothDeviceUpdater) {
mBluetoothDeviceUpdater = bluetoothDeviceUpdater;