diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt index 0154b493bd0ca..f50565a747428 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt @@ -209,9 +209,15 @@ abstract class ShadeModule { @Provides @SysUISingleton fun providesLockIconView( - notificationShadeWindowView: NotificationShadeWindowView, + keyguardRootView: KeyguardRootView, + notificationPanelView: NotificationPanelView, + featureFlags: FeatureFlags ): LockIconView { - return notificationShadeWindowView.findViewById(R.id.lock_icon_view) + if (featureFlags.isEnabled(Flags.MIGRATE_LOCK_ICON)) { + return keyguardRootView.findViewById(R.id.lock_icon_view) + } else { + return notificationPanelView.findViewById(R.id.lock_icon_view) + } } // TODO(b/277762009): Only allow this view's controller to inject the view. See above.