11/ Clean up usage of exported interfaces from internal controllers
- Adding documentation for dagger setup for shell - We should only reference the controllers from shell code instead of through the external interfaces. This reduces the number of exposed methods, and is also more direct (it ends up in the controller anyways). This means that the base module will provide the controllers separately and we can remove some duplication in the create methods for the controllers (except in cases where it's doing other initialization) - Remove SizeCompatUi interface since it's not actually used in SysUI - Group related dependencies in the module to make it a little eaiser to parse Bug: 161979899 Test: atest WMShellUnitTests Test: atest SystemUITests Change-Id: I07c2c002b87ffd127ebfce67b5485ff47d127e1f
This commit is contained in:
@@ -51,7 +51,7 @@ import androidx.test.filters.SmallTest;
|
||||
import com.android.wm.shell.common.ShellExecutor;
|
||||
import com.android.wm.shell.common.SyncTransactionQueue;
|
||||
import com.android.wm.shell.common.TransactionPool;
|
||||
import com.android.wm.shell.sizecompatui.SizeCompatUI;
|
||||
import com.android.wm.shell.sizecompatui.SizeCompatUIController;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
@@ -76,7 +76,7 @@ public class ShellTaskOrganizerTests {
|
||||
@Mock
|
||||
private Context mContext;
|
||||
@Mock
|
||||
private SizeCompatUI mSizeCompatUI;
|
||||
private SizeCompatUIController mSizeCompatUI;
|
||||
|
||||
ShellTaskOrganizer mOrganizer;
|
||||
private final SyncTransactionQueue mSyncTransactionQueue = mock(SyncTransactionQueue.class);
|
||||
|
||||
@@ -44,6 +44,7 @@ import com.android.wm.shell.TestShellExecutor;
|
||||
import com.android.wm.shell.common.DisplayController;
|
||||
import com.android.wm.shell.common.DisplayLayout;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
|
||||
import com.android.wm.shell.legacysplitscreen.LegacySplitScreenController;
|
||||
import com.android.wm.shell.pip.phone.PhonePipMenuController;
|
||||
|
||||
import org.junit.Before;
|
||||
@@ -70,7 +71,7 @@ public class PipTaskOrganizerTest extends ShellTestCase {
|
||||
@Mock private PipTransitionController mMockPipTransitionController;
|
||||
@Mock private PipSurfaceTransactionHelper mMockPipSurfaceTransactionHelper;
|
||||
@Mock private PipUiEventLogger mMockPipUiEventLogger;
|
||||
@Mock private Optional<LegacySplitScreen> mMockOptionalSplitScreen;
|
||||
@Mock private Optional<LegacySplitScreenController> mMockOptionalSplitScreen;
|
||||
@Mock private ShellTaskOrganizer mMockShellTaskOrganizer;
|
||||
private TestShellExecutor mMainExecutor;
|
||||
private PipBoundsState mPipBoundsState;
|
||||
|
||||
@@ -86,7 +86,7 @@ public class SizeCompatUIControllerTest extends ShellTestCase {
|
||||
final Rect taskBounds = new Rect(0, 0, 1000, 2000);
|
||||
|
||||
// Verify that the restart button is added with non-null size compat activity.
|
||||
mController.mImpl.onSizeCompatInfoChanged(DISPLAY_ID, taskId, taskBounds,
|
||||
mController.onSizeCompatInfoChanged(DISPLAY_ID, taskId, taskBounds,
|
||||
mMockActivityToken, mMockTaskListener);
|
||||
mShellMainExecutor.flushAll();
|
||||
|
||||
@@ -94,7 +94,7 @@ public class SizeCompatUIControllerTest extends ShellTestCase {
|
||||
verify(mMockButton).updateLastTargetActivity(eq(mMockActivityToken));
|
||||
|
||||
// Verify that the restart button is removed with null size compat activity.
|
||||
mController.mImpl.onSizeCompatInfoChanged(DISPLAY_ID, taskId, null, null, null);
|
||||
mController.onSizeCompatInfoChanged(DISPLAY_ID, taskId, null, null, null);
|
||||
|
||||
mShellMainExecutor.flushAll();
|
||||
verify(mMockButton).remove();
|
||||
@@ -104,7 +104,7 @@ public class SizeCompatUIControllerTest extends ShellTestCase {
|
||||
public void testChangeButtonVisibilityOnImeShowHide() {
|
||||
final int taskId = 12;
|
||||
final Rect taskBounds = new Rect(0, 0, 1000, 2000);
|
||||
mController.mImpl.onSizeCompatInfoChanged(DISPLAY_ID, taskId, taskBounds,
|
||||
mController.onSizeCompatInfoChanged(DISPLAY_ID, taskId, taskBounds,
|
||||
mMockActivityToken, mMockTaskListener);
|
||||
mShellMainExecutor.flushAll();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user