commit | 48b4225329f470ed89e69c7f41f9d3bc31397ccf | [log] [tgz] |
---|---|---|
author | Colin Cross <ccross@android.com> | Wed Aug 09 16:26:31 2023 -0700 |
committer | Colin Cross <ccross@android.com> | Wed Aug 09 16:26:31 2023 -0700 |
tree | b2bfaccbd8cb597a32d4752ca23c17f3597b5e87 | |
parent | 9088a4531c4ecffae92f907634b39707bd05a3bf [diff] |
Fix kotlin nullable errors in ThemePicker Fix kotlin nullable errors that were exposed by setting the retention of android.annotation.NonNull and android.annotation.Nullable to class retention. Bug: 294110802 Test: builds Change-Id: If13ac9b81cfe65730d5ce270e9409bc97cef75ec Merged-In: If13ac9b81cfe65730d5ce270e9409bc97cef75ec
diff --git a/src/com/android/customization/picker/color/ui/binder/ColorSectionViewBinder.kt b/src/com/android/customization/picker/color/ui/binder/ColorSectionViewBinder.kt index 05b0916..9e232d7 100644 --- a/src/com/android/customization/picker/color/ui/binder/ColorSectionViewBinder.kt +++ b/src/com/android/customization/picker/color/ui/binder/ColorSectionViewBinder.kt
@@ -95,7 +95,7 @@ LayoutInflater.from(view.context) .inflate(R.layout.color_option_no_background, view, false) item.payload?.let { ColorOptionIconBinder.bind(itemView as ViewGroup, item.payload) } - val optionSelectedView = itemView.findViewById<ImageView>(R.id.option_selected) + val optionSelectedView = itemView.requireViewById<ImageView>(R.id.option_selected) lifecycleOwner.lifecycleScope.launch { lifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) {