Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 29e125bc authored by Yifei Zhang's avatar Yifei Zhang Committed by Android (Google) Code Review
Browse files

Merge "wmshell: skip check for DesktopModeStatus" into main

parents 10614f64 885afbc9
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -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
@@ -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();
        });
    }

    //