mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Merge "Removing RotationTouchHelper state management from RecentsAnimationDeviceState" into main
This commit is contained in:
@@ -118,7 +118,6 @@ public abstract class AbsSwipeUpHandlerTestCase<
|
||||
|
||||
protected RecentsAnimationTargets mRecentsAnimationTargets;
|
||||
protected TaskAnimationManager mTaskAnimationManager;
|
||||
protected RecentsAnimationDeviceState mRecentsAnimationDeviceState;
|
||||
|
||||
@Mock protected CONTAINER_INTERFACE mActivityInterface;
|
||||
@Mock protected ContextInitListener<?> mContextInitListener;
|
||||
@@ -180,7 +179,8 @@ public abstract class AbsSwipeUpHandlerTestCase<
|
||||
|
||||
@Before
|
||||
public void setUpRecentsContainer() {
|
||||
mTaskAnimationManager = new TaskAnimationManager(mContext, mRecentsAnimationDeviceState);
|
||||
mTaskAnimationManager = new TaskAnimationManager(mContext,
|
||||
RecentsAnimationDeviceState.INSTANCE.get(mContext));
|
||||
RecentsViewContainer recentsContainer = getRecentsContainer();
|
||||
RECENTS_VIEW recentsView = getRecentsView();
|
||||
|
||||
@@ -198,12 +198,6 @@ public abstract class AbsSwipeUpHandlerTestCase<
|
||||
}).when(recentsContainer).runOnBindToTouchInteractionService(any());
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setUpRecentsAnimationDeviceState() {
|
||||
runOnMainSync(() ->
|
||||
mRecentsAnimationDeviceState = new RecentsAnimationDeviceState(mContext, true));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInitWhenReady_registersActivityInitListener() {
|
||||
String reasonString = "because i said so";
|
||||
|
||||
@@ -44,7 +44,6 @@ public class FallbackSwipeHandlerTestCase extends AbsSwipeUpHandlerTestCase<
|
||||
long touchTimeMs, boolean continuingLastGesture) {
|
||||
return new FallbackSwipeHandler(
|
||||
mContext,
|
||||
mRecentsAnimationDeviceState,
|
||||
mTaskAnimationManager,
|
||||
mGestureState,
|
||||
touchTimeMs,
|
||||
|
||||
@@ -40,7 +40,6 @@ import org.mockito.Mockito.spy
|
||||
import org.mockito.junit.MockitoJUnit
|
||||
import org.mockito.kotlin.eq
|
||||
import org.mockito.kotlin.verify
|
||||
import org.mockito.kotlin.whenever
|
||||
|
||||
@SmallTest
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
@@ -72,15 +71,18 @@ class LauncherSwipeHandlerV2Test {
|
||||
.bindSystemUiProxy(systemUiProxy)
|
||||
.bindRecentsDisplayModel(RecentsDisplayModel(sandboxContext))
|
||||
)
|
||||
|
||||
sandboxContext.putObject(
|
||||
RotationTouchHelper.INSTANCE,
|
||||
mock(RotationTouchHelper::class.java),
|
||||
)
|
||||
val deviceState = mock(RecentsAnimationDeviceState::class.java)
|
||||
whenever(deviceState.rotationTouchHelper).thenReturn(mock(RotationTouchHelper::class.java))
|
||||
sandboxContext.putObject(RecentsAnimationDeviceState.INSTANCE, deviceState)
|
||||
|
||||
gestureState = spy(GestureState(OverviewComponentObserver.INSTANCE.get(sandboxContext), 0))
|
||||
|
||||
underTest =
|
||||
LauncherSwipeHandlerV2(
|
||||
sandboxContext,
|
||||
deviceState,
|
||||
taskAnimationManager,
|
||||
gestureState,
|
||||
0,
|
||||
|
||||
@@ -73,7 +73,6 @@ public class LauncherSwipeHandlerV2TestCase extends AbsSwipeUpHandlerTestCase<
|
||||
long touchTimeMs, boolean continuingLastGesture) {
|
||||
return new LauncherSwipeHandlerV2(
|
||||
mContext,
|
||||
mRecentsAnimationDeviceState,
|
||||
mTaskAnimationManager,
|
||||
mGestureState,
|
||||
touchTimeMs,
|
||||
|
||||
@@ -62,7 +62,6 @@ public class RecentsWindowSwipeHandlerTestCase extends AbsSwipeUpHandlerTestCase
|
||||
boolean continuingLastGesture) {
|
||||
return new RecentsWindowSwipeHandler(
|
||||
mContext,
|
||||
mRecentsAnimationDeviceState,
|
||||
mTaskAnimationManager,
|
||||
mGestureState,
|
||||
touchTimeMs,
|
||||
|
||||
Reference in New Issue
Block a user