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

Commit 55474d97 authored by Vinícius Julião's avatar Vinícius Julião Committed by Automerger Merge Worker
Browse files

Merge "Unmocking SurfacePackage in...

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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23728010



Change-Id: I51377dc5ee7210b08a221eb33b9cf1763b4523a3
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 0b4aa511 ed773a0d
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);