Merge "Fix CallsAndAlarmsPreferenceControllerTest" into main

This commit is contained in:
Yiyi Shen
2024-02-04 03:19:54 +00:00
committed by Android (Google) Code Review

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();
}