Revert "Fix a crash when registering/unregistering a smartspace timer listener."

This reverts commit e90606d9e1140fb4763fd177872031a47a107d60.

Reason for revert: seems to be the culprit for b/323782475
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9ae796c523466f44d4204ba7ee70cc6b610b7a7c)
Merged-In: I7b864821fe1df20446a21a08e779ec0441e553a4
Change-Id: I7b864821fe1df20446a21a08e779ec0441e553a4
diff --git a/packages/SystemUI/src/com/android/systemui/smartspace/data/repository/SmartspaceRepository.kt b/packages/SystemUI/src/com/android/systemui/smartspace/data/repository/SmartspaceRepository.kt
index 52a1c15..095d30e 100644
--- a/packages/SystemUI/src/com/android/systemui/smartspace/data/repository/SmartspaceRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/smartspace/data/repository/SmartspaceRepository.kt
@@ -21,9 +21,7 @@
 import android.widget.RemoteViews
 import com.android.systemui.communal.smartspace.CommunalSmartspaceController
 import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.dagger.qualifiers.Main
 import com.android.systemui.plugins.BcSmartspaceDataPlugin
-import java.util.concurrent.Executor
 import javax.inject.Inject
 import kotlinx.coroutines.flow.Flow
 import kotlinx.coroutines.flow.MutableStateFlow
@@ -43,7 +41,6 @@
 @Inject
 constructor(
     private val communalSmartspaceController: CommunalSmartspaceController,
-    @Main private val uiExecutor: Executor,
 ) : SmartspaceRepository, BcSmartspaceDataPlugin.SmartspaceTargetListener {
 
     override val isSmartspaceRemoteViewsEnabled: Boolean
@@ -54,18 +51,12 @@
     override val communalSmartspaceTargets: Flow<List<SmartspaceTarget>> =
         _communalSmartspaceTargets
             .onStart {
-                uiExecutor.execute {
-                    communalSmartspaceController.addListener(
-                        listener = this@SmartspaceRepositoryImpl
-                    )
-                }
+                communalSmartspaceController.addListener(listener = this@SmartspaceRepositoryImpl)
             }
             .onCompletion {
-                uiExecutor.execute {
-                    communalSmartspaceController.removeListener(
-                        listener = this@SmartspaceRepositoryImpl
-                    )
-                }
+                communalSmartspaceController.removeListener(
+                    listener = this@SmartspaceRepositoryImpl
+                )
             }
 
     override fun onSmartspaceTargetsUpdated(targetsNullable: MutableList<out Parcelable>?) {