Loading libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java +12 −8 Original line number Diff line number Diff line Loading @@ -838,10 +838,12 @@ public abstract class WMShellBaseModule { // Use optional-of-lazy for the dependency that this provider relies on. // Lazy ensures that this provider will not be the cause the dependency is created // when it will not be returned due to the condition below. return desktopTasksController.flatMap((lazy)-> { if (DesktopModeStatus.isEnabled()) { return desktopTasksController.map(Lazy::get); return Optional.of(lazy.get()); } return Optional.empty(); }); } @BindsOptionalOf Loading @@ -855,10 +857,12 @@ public abstract class WMShellBaseModule { // Use optional-of-lazy for the dependency that this provider relies on. // Lazy ensures that this provider will not be the cause the dependency is created // when it will not be returned due to the condition below. return desktopModeTaskRepository.flatMap((lazy)-> { if (DesktopModeStatus.isEnabled()) { return desktopModeTaskRepository.map(Lazy::get); return Optional.of(lazy.get()); } return Optional.empty(); }); } // Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java +12 −8 Original line number Diff line number Diff line Loading @@ -838,10 +838,12 @@ public abstract class WMShellBaseModule { // Use optional-of-lazy for the dependency that this provider relies on. // Lazy ensures that this provider will not be the cause the dependency is created // when it will not be returned due to the condition below. return desktopTasksController.flatMap((lazy)-> { if (DesktopModeStatus.isEnabled()) { return desktopTasksController.map(Lazy::get); return Optional.of(lazy.get()); } return Optional.empty(); }); } @BindsOptionalOf Loading @@ -855,10 +857,12 @@ public abstract class WMShellBaseModule { // Use optional-of-lazy for the dependency that this provider relies on. // Lazy ensures that this provider will not be the cause the dependency is created // when it will not be returned due to the condition below. return desktopModeTaskRepository.flatMap((lazy)-> { if (DesktopModeStatus.isEnabled()) { return desktopModeTaskRepository.map(Lazy::get); return Optional.of(lazy.get()); } return Optional.empty(); }); } // Loading