mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Cleaning up unusued handlers
Test: Built and tested locally Flag: NONE Removing unused handler references Bug:292269949 Change-Id: I83ec8299a82ea8f3db0dace7fb3b823a703b6b62
This commit is contained in:
@@ -73,10 +73,6 @@ public abstract class AbsSwipeUpHandlerTestCase<
|
||||
|
||||
protected final Context mContext =
|
||||
InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
protected final RecentsWindowManager mRecentsWindowManager =
|
||||
Flags.enableFallbackOverviewInWindow() ? new RecentsWindowManager(mContext) : null;
|
||||
protected final TaskAnimationManager mTaskAnimationManager =
|
||||
new TaskAnimationManager(mContext, mRecentsWindowManager);
|
||||
protected final RecentsAnimationDeviceState mRecentsAnimationDeviceState =
|
||||
new RecentsAnimationDeviceState(mContext, true);
|
||||
protected final InputConsumerController mInputConsumerController =
|
||||
@@ -110,6 +106,9 @@ public abstract class AbsSwipeUpHandlerTestCase<
|
||||
/* minimizedHomeBounds= */ null,
|
||||
new Bundle());
|
||||
|
||||
protected RecentsWindowManager mRecentsWindowManager;
|
||||
protected TaskAnimationManager mTaskAnimationManager;
|
||||
|
||||
@Mock protected ACTIVITY_INTERFACE mActivityInterface;
|
||||
@Mock protected ActivityInitListener<?> mActivityInitListener;
|
||||
@Mock protected RecentsAnimationController mRecentsAnimationController;
|
||||
@@ -123,6 +122,16 @@ public abstract class AbsSwipeUpHandlerTestCase<
|
||||
@Rule
|
||||
public final MockitoRule mMockitoRule = MockitoJUnit.rule();
|
||||
|
||||
@Before
|
||||
public void setUpTaskAnimationManager() {
|
||||
runOnMainSync(() -> {
|
||||
if(Flags.enableFallbackOverviewInWindow()){
|
||||
mRecentsWindowManager = new RecentsWindowManager(mContext);
|
||||
}
|
||||
mTaskAnimationManager = new TaskAnimationManager(mContext, mRecentsWindowManager);
|
||||
});
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setUpRunningTaskInfo() {
|
||||
mRunningTaskInfo.baseIntent = new Intent(Intent.ACTION_MAIN)
|
||||
|
||||
@@ -22,7 +22,6 @@ import android.app.PendingIntent
|
||||
import android.content.ComponentName
|
||||
import android.content.Intent
|
||||
import android.graphics.Rect
|
||||
import android.os.Handler
|
||||
import android.os.UserHandle
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import com.android.launcher3.LauncherState
|
||||
@@ -40,7 +39,6 @@ import com.android.quickstep.util.SplitSelectStateController.SplitFromDesktopCon
|
||||
import com.android.quickstep.views.RecentsViewContainer
|
||||
import com.android.systemui.shared.recents.model.Task
|
||||
import com.android.wm.shell.shared.split.SplitScreenConstants.SNAP_TO_50_50
|
||||
import java.util.function.Consumer
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertNull
|
||||
@@ -54,6 +52,7 @@ import org.mockito.kotlin.argumentCaptor
|
||||
import org.mockito.kotlin.mock
|
||||
import org.mockito.kotlin.verify
|
||||
import org.mockito.kotlin.whenever
|
||||
import java.util.function.Consumer
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class SplitSelectStateControllerTest {
|
||||
@@ -63,7 +62,6 @@ class SplitSelectStateControllerTest {
|
||||
private val statsLogManager: StatsLogManager = mock()
|
||||
private val statsLogger: StatsLogger = mock()
|
||||
private val stateManager: StateManager<LauncherState, StatefulActivity<LauncherState>> = mock()
|
||||
private val handler: Handler = mock()
|
||||
private val context: RecentsViewContainer = mock()
|
||||
private val recentsModel: RecentsModel = mock()
|
||||
private val pendingIntent: PendingIntent = mock()
|
||||
@@ -87,7 +85,6 @@ class SplitSelectStateControllerTest {
|
||||
splitSelectStateController =
|
||||
SplitSelectStateController(
|
||||
context,
|
||||
handler,
|
||||
stateManager,
|
||||
depthController,
|
||||
statsLogManager,
|
||||
|
||||
Reference in New Issue
Block a user