From 179aa5a2c434c0c47bedc1e4b581e7630c853149 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Wed, 3 Aug 2022 04:32:07 +0000 Subject: [PATCH] 6/ Removing unused code from previous cleanup - No module overrides DisplayImeController now - ShellController injects ShellInit & ShellCommandHandler now Bug: 238217847 Test: atest WMShellUnitTests Change-Id: I09ca0aa50e83fa9c4bfe203a0e17cb750d4a5a82 --- .../android/wm/shell/dagger/WMShellBaseModule.java | 9 --------- .../com/android/systemui/dagger/WMComponent.java | 13 ------------- 2 files changed, 22 deletions(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java index bbaf51f7c54c3..a6a04cf67b3c1 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java @@ -128,15 +128,9 @@ public abstract class WMShellBaseModule { mainExecutor); } - // Workaround for dynamic overriding with a default implementation, see {@link DynamicOverride} - @BindsOptionalOf - @DynamicOverride - abstract DisplayImeController optionalDisplayImeController(); - @WMSingleton @Provides static DisplayImeController provideDisplayImeController( - @DynamicOverride Optional overrideDisplayImeController, IWindowManager wmService, ShellInit shellInit, DisplayController displayController, @@ -144,9 +138,6 @@ public abstract class WMShellBaseModule { TransactionPool transactionPool, @ShellMainThread ShellExecutor mainExecutor ) { - if (overrideDisplayImeController.isPresent()) { - return overrideDisplayImeController.get(); - } return new DisplayImeController(wmService, shellInit, displayController, displayInsetsController, transactionPool, mainExecutor); } diff --git a/packages/SystemUI/src/com/android/systemui/dagger/WMComponent.java b/packages/SystemUI/src/com/android/systemui/dagger/WMComponent.java index 78a45f9d33107..b6923a867507c 100644 --- a/packages/SystemUI/src/com/android/systemui/dagger/WMComponent.java +++ b/packages/SystemUI/src/com/android/systemui/dagger/WMComponent.java @@ -75,25 +75,12 @@ public interface WMComponent { * Initializes all the WMShell components before starting any of the SystemUI components. */ default void init() { - // TODO(238217847): To be removed once the dependencies are inverted and ShellController can - // inject these classes directly, otherwise, it's currently needed to ensure that these - // classes are created and set on the controller before onInit() is called - getShellInit(); - getShellCommandHandler(); getShell().onInit(); } @WMSingleton ShellInterface getShell(); - // TODO(238217847): To be removed once ShellController can inject ShellInit directly - @WMSingleton - ShellInit getShellInit(); - - // TODO(238217847): To be removed once ShellController can inject ShellCommandHandler directly - @WMSingleton - ShellCommandHandler getShellCommandHandler(); - @WMSingleton Optional getOneHanded();