Start widget configuration activity if needed
Add logic to start the widget configuration activity if needed when new
widgets are added. This must be done after a widget id has been
assigned, but before the widget has been added to the database. If
configuration fails, we do not add the widget.
Also made some small improvements to the widget repository to run
database query in a background thread.
Fixes: 318537425
Test: atest CommunalEditModeViewModelTest
Test: atest CommunalWidgetRepositoryImplTest
Flag: ACONFIG com.android.systemui.communal_hub DEVELOPMENT
Change-Id: Ic322ff9b51df00d606b5e9016911fd95e4f052d1
11 files changed