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

Commit 6dbe6f55 authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

Use display aware context, resources, configController and Layout inflater in shade dir

Only when the new flag is on, this will make all shade/ classes use the correct context and receive the configuration from the root view.

Bug: 362719719
Bug: 374267505
Test: sysui unit tests
Flag: com.android.systemui.shade_window_goes_around
Change-Id: Ibe582db7125fd303d77219753cc3cfe36e7f6e3c
parent 599b7208
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ class ShadeRepositoryImplTest : SysuiTestCase() {

    @Before
    fun setUp() {
        underTest = ShadeRepositoryImpl(getContext())
        underTest = ShadeRepositoryImpl()
    }

    @Test
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ import com.android.systemui.res.R
import javax.inject.Inject
import kotlin.math.max

class LargeScreenHeaderHelper @Inject constructor(private val context: Context) {
class LargeScreenHeaderHelper @Inject constructor(@ShadeDisplayAware private val context: Context) {

    fun getLargeScreenHeaderHeight(): Int = getLargeScreenHeaderHeight(context)

+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ import javax.inject.Inject
class NotificationPanelUnfoldAnimationController
@Inject
constructor(
    private val context: Context,
    @ShadeDisplayAware private val context: Context,
    statusBarStateController: StatusBarStateController,
    progressProvider: NaturalRotationUnfoldProgressProvider,
) {
+1 −1
Original line number Diff line number Diff line
@@ -668,7 +668,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
    @Inject
    public NotificationPanelViewController(NotificationPanelView view,
            @Main Handler handler,
            LayoutInflater layoutInflater,
            @ShadeDisplayAware LayoutInflater layoutInflater,
            FeatureFlags featureFlags,
            NotificationWakeUpCoordinator coordinator,
            PulseExpansionHandler pulseExpansionHandler,
+1 −1
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW

    @Inject
    public NotificationShadeWindowControllerImpl(
            Context context,
            @ShadeDisplayAware Context context,
            WindowRootViewComponent.Factory windowRootViewComponentFactory,
            ViewCaptureAwareWindowManager viewCaptureAwareWindowManager,
            IActivityManager activityManager,
Loading