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

Commit ed773a0d authored by Vinícius Julião's avatar Vinícius Julião Committed by Android (Google) Code Review
Browse files

Merge "Unmocking SurfacePackage in AdminSecondaryLockScreenControllerTest.java" into udc-qpr-dev

parents 33cdf029 0985afec
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -33,12 +33,15 @@ import android.app.admin.IKeyguardCallback;
import android.app.admin.IKeyguardClient;
import android.content.ComponentName;
import android.content.Intent;
import android.hardware.display.DisplayManager;
import android.os.Binder;
import android.os.Handler;
import android.os.RemoteException;
import android.testing.AndroidTestingRunner;
import android.testing.TestableLooper;
import android.testing.TestableLooper.RunWithLooper;
import android.testing.ViewUtils;
import android.view.Display;
import android.view.SurfaceControlViewHost;
import android.view.SurfaceView;
import android.view.View;
@@ -50,7 +53,6 @@ import com.android.systemui.SysuiTestCase;

import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
@@ -60,7 +62,6 @@ import org.mockito.MockitoAnnotations;
@RunWithLooper
@RunWith(AndroidTestingRunner.class)
@SmallTest
@Ignore("b/286245842")
public class AdminSecondaryLockScreenControllerTest extends SysuiTestCase {

    private static final int TARGET_USER_ID = KeyguardUpdateMonitor.getCurrentUser();
@@ -79,7 +80,7 @@ public class AdminSecondaryLockScreenControllerTest extends SysuiTestCase {
    private KeyguardSecurityCallback mKeyguardCallback;
    @Mock
    private KeyguardUpdateMonitor mUpdateMonitor;
    @Mock

    private SurfaceControlViewHost.SurfacePackage mSurfacePackage;

    @Before
@@ -99,6 +100,11 @@ public class AdminSecondaryLockScreenControllerTest extends SysuiTestCase {
        when(mKeyguardClient.queryLocalInterface(anyString())).thenReturn(mKeyguardClient);
        when(mKeyguardClient.asBinder()).thenReturn(mKeyguardClient);

        Display display = mContext.getSystemService(DisplayManager.class).getDisplay(
                Display.DEFAULT_DISPLAY);
        mSurfacePackage = (new SurfaceControlViewHost(mContext, display,
                new Binder())).getSurfacePackage();

        mTestController = new AdminSecondaryLockScreenController.Factory(
                mContext, mKeyguardSecurityContainer, mUpdateMonitor, mHandler)
                .create(mKeyguardCallback);