Fix CallsAndAlarmsPreferenceControllerTest

Test: atest
Fix: 323634491
Change-Id: I627a3b6926c86f5e90dcfb27ed794ffb09aa4cfa
This commit is contained in:
Yiyi Shen
2024-02-03 21:53:16 +08:00
parent 769f9ae45e
commit 4e0315d2a3

View File

@@ -171,6 +171,7 @@ public class CallsAndAlarmsPreferenceControllerTest {
mShadowBluetoothAdapter.setEnabled(false);
mController.displayPreference(mScreen);
mController.updateVisibility();
shadowOf(Looper.getMainLooper()).idle();
assertThat(mPreference.isVisible()).isFalse();
}
@@ -180,6 +181,7 @@ public class CallsAndAlarmsPreferenceControllerTest {
mShadowBluetoothAdapter.setEnabled(false);
mController.displayPreference(mScreen);
mController.updateVisibility();
shadowOf(Looper.getMainLooper()).idle();
assertThat(mPreference.isVisible()).isFalse();
}
@@ -188,6 +190,7 @@ public class CallsAndAlarmsPreferenceControllerTest {
when(mBroadcast.isEnabled(any())).thenReturn(false);
mController.displayPreference(mScreen);
mController.updateVisibility();
shadowOf(Looper.getMainLooper()).idle();
assertThat(mPreference.isVisible()).isFalse();
}