Fix CommunalManagerUpdaterTest build error.
Test: atest CommunalManagerUpdaterTest
Bug: 208716876
Change-Id: Ied6da2b39be9a7d50635f74c2a21f53d1d6bf681
diff --git a/packages/SystemUI/tests/src/com/android/systemui/communal/CommunalManagerUpdaterTest.java b/packages/SystemUI/tests/src/com/android/systemui/communal/CommunalManagerUpdaterTest.java
index e7ae6cb..fb8efa9 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/communal/CommunalManagerUpdaterTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/communal/CommunalManagerUpdaterTest.java
@@ -20,14 +20,13 @@
import static org.mockito.Mockito.verify;
import android.app.communal.CommunalManager;
-import android.os.Handler;
import android.testing.AndroidTestingRunner;
import android.testing.TestableLooper;
import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase;
-import com.android.systemui.util.settings.FakeSettings;
+import com.android.systemui.communal.conditions.CommunalConditionsMonitor;
import org.junit.Before;
import org.junit.Test;
@@ -42,15 +41,15 @@
private CommunalSourceMonitor mMonitor;
@Mock
private CommunalManager mCommunalManager;
+ @Mock
+ private CommunalConditionsMonitor mCommunalConditionsMonitor;
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
mContext.addMockSystemService(CommunalManager.class, mCommunalManager);
- mMonitor = new CommunalSourceMonitor(
- Handler.createAsync(TestableLooper.get(this).getLooper()),
- new FakeSettings());
+ mMonitor = new CommunalSourceMonitor(mCommunalConditionsMonitor);
final CommunalManagerUpdater updater = new CommunalManagerUpdater(mContext, mMonitor);
updater.start();
}