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

Commit ab93fff4 authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

Ensure Keyguard classes use display-aware context

This commit updates all classes in com.android.systemui.keyguard to utilize a @ShadeDisplayAware annotated context. This change prepares for the potential movement of the shade window to a different display, ensuring correct inflation and rendering of keyguard elements.

A linter will be implemented shortly to enforce the use of this annotated context and prevent issues with non-annotated contexts/resources.

Currently, this change has no functional impact as the feature flag is disabled. The @ShadeDisplayAware context remains equivalent to the @Application context.

Bug: 362719719
Bug: 374267505
Test: SystemUI presubmit tests for all changed classes
Flag: com.android.systemui.shade_window_goes_around
Change-Id: I03657d95d2408ab951b56647f4e2e66a3d5a38e5
parent 69f17cbb
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ class KeyguardSmartspaceRepositoryImplTest : SysuiTestCase() {
        fakeSettings.userId = fakeUserTracker.userId
        underTest =
            KeyguardSmartspaceRepositoryImpl(
                context = context,
                secureSettings = fakeSettings,
                userTracker = fakeUserTracker,
                applicationScope = scope.backgroundScope,
+1 −1
Original line number Diff line number Diff line
@@ -310,7 +310,7 @@ class KeyguardTouchHandlingInteractorTest : SysuiTestCase() {
        // read during initialization to set up flows. Maybe there is a better way to handle that.
        underTest =
            KeyguardTouchHandlingInteractor(
                appContext = mContext,
                context = mContext,
                scope = testScope.backgroundScope,
                transitionInteractor = kosmos.keyguardTransitionInteractor,
                repository = keyguardRepository,
+1 −1
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ constructor(
    private val keyguardBlueprintViewModel: KeyguardBlueprintViewModel,
    private val keyguardStatusViewComponentFactory: KeyguardStatusViewComponent.Factory,
    @ShadeDisplayAware private val configuration: ConfigurationState,
    private val context: Context,
    @ShadeDisplayAware private val context: Context,
    private val keyguardIndicationController: KeyguardIndicationController,
    private val shadeInteractor: ShadeInteractor,
    private val interactionJankMonitor: InteractionJankMonitor,
+2 −1
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.power.domain.interactor.PowerInteractor;
import com.android.systemui.res.R;
import com.android.systemui.shade.ShadeDisplayAware;
import com.android.systemui.util.time.SystemClock;

import java.io.PrintWriter;
@@ -91,7 +92,7 @@ public class WakefulnessLifecycle extends Lifecycle<WakefulnessLifecycle.Observe

    @Inject
    public WakefulnessLifecycle(
            Context context,
            @ShadeDisplayAware Context context,
            @Nullable IWallpaperManager wallpaperManagerService,
            SystemClock systemClock,
            DumpManager dumpManager) {
+2 −1
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.keyguard.ui.viewmodel.DreamingToLockscreenTransitionViewModel
import com.android.systemui.power.domain.interactor.PowerInteractor
import com.android.systemui.res.R
import com.android.systemui.shade.ShadeDisplayAware
import java.util.concurrent.Executor
import javax.inject.Inject

@@ -83,7 +84,7 @@ constructor(
    val activityTransitionAnimator: ActivityTransitionAnimator,
    val keyguardViewController: dagger.Lazy<KeyguardViewController>,
    val powerInteractor: PowerInteractor,
    val context: Context,
    @ShadeDisplayAware val context: Context,
    val interactionJankMonitor: InteractionJankMonitor,
    @Main executor: Executor,
    val dreamingToLockscreenTransitionViewModel: DreamingToLockscreenTransitionViewModel,
Loading