Search in sources :

Example 6 with LooperExecutor

use of com.android.launcher3.util.LooperExecutor in project android_packages_apps_Launcher3 by crdroidandroid.

the class RecentTasksListTest method setup.

@Before
public void setup() {
    LooperExecutor mockMainThreadExecutor = mock(LooperExecutor.class);
    KeyguardManagerCompat mockKeyguardManagerCompat = mock(KeyguardManagerCompat.class);
    mockActivityManagerWrapper = mock(ActivityManagerWrapper.class);
    mRecentTasksList = new RecentTasksList(mockMainThreadExecutor, mockKeyguardManagerCompat, mockActivityManagerWrapper);
}
Also used : ActivityManagerWrapper(com.android.systemui.shared.system.ActivityManagerWrapper) LooperExecutor(com.android.launcher3.util.LooperExecutor) KeyguardManagerCompat(com.android.systemui.shared.system.KeyguardManagerCompat) Before(org.junit.Before)

Example 7 with LooperExecutor

use of com.android.launcher3.util.LooperExecutor in project android_packages_apps_Launcher3 by crdroidandroid.

the class ModelMultiCallbacksTest method setUp.

@Before
public void setUp() throws Exception {
    mModelHelper = new LauncherModelHelper();
    mModelHelper.installApp(TEST_PACKAGE);
    mSpm = shadowOf(RuntimeEnvironment.application.getPackageManager());
    // Since robolectric tests run on main thread, we run the loader-UI calls on a temp thread,
    // so that we can wait appropriately for the loader to complete.
    mTempMainExecutor = new LooperExecutor(createAndStartNewLooper("tempMain"));
    ShadowLooperExecutor sle = Shadow.extract(Executors.MAIN_EXECUTOR);
    sle.setHandler(mTempMainExecutor.getHandler());
}
Also used : LooperExecutor(com.android.launcher3.util.LooperExecutor) ShadowLooperExecutor(com.android.launcher3.shadows.ShadowLooperExecutor) LauncherModelHelper(com.android.launcher3.util.LauncherModelHelper) ShadowLooperExecutor(com.android.launcher3.shadows.ShadowLooperExecutor) Before(org.junit.Before)

Example 8 with LooperExecutor

use of com.android.launcher3.util.LooperExecutor in project android_packages_apps_Trebuchet by LineageOS.

the class ModelMultiCallbacksTest method setUp.

@Before
public void setUp() throws Exception {
    mModelHelper = new LauncherModelHelper();
    mModelHelper.installApp(TEST_PACKAGE);
    mSpm = shadowOf(RuntimeEnvironment.application.getPackageManager());
    // Since robolectric tests run on main thread, we run the loader-UI calls on a temp thread,
    // so that we can wait appropriately for the loader to complete.
    mTempMainExecutor = new LooperExecutor(createAndStartNewForegroundLooper("tempMain"));
    ReflectionHelpers.setField(mModelHelper.getModel(), "mMainExecutor", mTempMainExecutor);
}
Also used : LooperExecutor(com.android.launcher3.util.LooperExecutor) LauncherModelHelper(com.android.launcher3.util.LauncherModelHelper) Before(org.junit.Before)

Example 9 with LooperExecutor

use of com.android.launcher3.util.LooperExecutor in project android_packages_apps_Launcher3 by ProtonAOSP.

the class RecentTasksListTest method setup.

@Before
public void setup() {
    MockitoAnnotations.initMocks(this);
    LooperExecutor mockMainThreadExecutor = mock(LooperExecutor.class);
    KeyguardManagerCompat mockKeyguardManagerCompat = mock(KeyguardManagerCompat.class);
    mRecentTasksList = new RecentTasksList(mockMainThreadExecutor, mockKeyguardManagerCompat, mockSystemUiProxy);
}
Also used : LooperExecutor(com.android.launcher3.util.LooperExecutor) KeyguardManagerCompat(com.android.systemui.shared.system.KeyguardManagerCompat) Before(org.junit.Before)

Example 10 with LooperExecutor

use of com.android.launcher3.util.LooperExecutor in project android_packages_apps_Launcher3 by AOSPA.

the class RecentTasksListTest method setup.

@Before
public void setup() {
    MockitoAnnotations.initMocks(this);
    LooperExecutor mockMainThreadExecutor = mock(LooperExecutor.class);
    KeyguardManagerCompat mockKeyguardManagerCompat = mock(KeyguardManagerCompat.class);
    mRecentTasksList = new RecentTasksList(mockMainThreadExecutor, mockKeyguardManagerCompat, mockSystemUiProxy);
}
Also used : LooperExecutor(com.android.launcher3.util.LooperExecutor) KeyguardManagerCompat(com.android.systemui.shared.system.KeyguardManagerCompat) Before(org.junit.Before)

Aggregations

LooperExecutor (com.android.launcher3.util.LooperExecutor)10 Before (org.junit.Before)9 KeyguardManagerCompat (com.android.systemui.shared.system.KeyguardManagerCompat)7 ActivityManagerWrapper (com.android.systemui.shared.system.ActivityManagerWrapper)3 LauncherModelHelper (com.android.launcher3.util.LauncherModelHelper)2 ShadowLooperExecutor (com.android.launcher3.shadows.ShadowLooperExecutor)1