Skip to content

Commit

Permalink
Merge "Ensure that we destroy view before adding another" into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Liu authored and Android (Google) Code Review committed Nov 28, 2023
2 parents 4dfae1e + 3c60580 commit bf67785
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@ constructor(
return
}

if (smartSpaceView != null) {
parentView.removeView(smartSpaceView)
}

smartSpaceView = lockscreenSmartspaceController.buildAndConnectDateView(parentView)

val topPadding: Int =
Expand Down Expand Up @@ -362,12 +366,13 @@ constructor(
),
)

setUpUdfps(previewContext, rootView)

disposables.add(
PreviewKeyguardBlueprintViewBinder.bind(keyguardRootView, keyguardBlueprintViewModel) {
if (keyguardBottomAreaRefactor()) {
setupShortcuts(keyguardRootView)
}
setUpUdfps(previewContext, rootView)

if (!shouldHideClock) {
setUpClock(previewContext, rootView)
Expand Down

0 comments on commit bf67785

Please sign in to comment.