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

Commit 083aa307 authored by Fiona Campbell's avatar Fiona Campbell
Browse files

Fix DreamControllerTest

Add mocked resources to DreamControllerTest to fix failure.

Bug: 292540042
Test: atest DreamControllerTest
Change-Id: I39a9efd7f9a6c645639cb9f7f1b1d0e793b253e5
parent 09d77832
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import android.app.ActivityTaskManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.ServiceConnection;
import android.content.res.Resources;
import android.os.Binder;
import android.os.Handler;
import android.os.IBinder;
@@ -72,6 +73,9 @@ public class DreamControllerTest {
    @Mock
    private IDreamService mIDreamService;

    @Mock
    private Resources mResources;

    @Captor
    private ArgumentCaptor<ServiceConnection> mServiceConnectionACaptor;
    @Captor
@@ -105,6 +109,7 @@ public class DreamControllerTest {
                .thenReturn(powerManager);
        when(mContext.getSystemServiceName(PowerManager.class))
                .thenReturn(Context.POWER_SERVICE);
        when(mContext.getResources()).thenReturn(mResources);

        mToken = new Binder();
        mDreamName = ComponentName.unflattenFromString("dream");