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

Commit d0ed0070 authored by Nicolò Mazzucato's avatar Nicolò Mazzucato
Browse files

Lazily inject ShadePrimaryDisplayCommand

When @IntoMap is used, parameters are instantiated regardless even if they are not used.

Bug: 362719719
Fixes: 380013535
Change-Id: I2c60afc219fdfb954fc40fe13e53d33f9f564532
Test: Boots fine even when the flag is disabled
Flag: com.android.systemui.shade_window_goes_around
parent fc0eed37
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -195,9 +195,9 @@ object ShadeDisplayAwareModule {
    @Provides
    @IntoMap
    @ClassKey(ShadePrimaryDisplayCommand::class)
    fun provideShadePrimaryDisplayCommand(impl: ShadePrimaryDisplayCommand): CoreStartable {
    fun provideShadePrimaryDisplayCommand(impl: Provider<ShadePrimaryDisplayCommand>): CoreStartable {
        return if (ShadeWindowGoesAround.isEnabled) {
            impl
            impl.get()
        } else {
            CoreStartable.NOP
        }