diff options
| author | 2024-02-05 23:49:55 +0000 | |
|---|---|---|
| committer | 2024-02-05 23:49:55 +0000 | |
| commit | 9ae796c523466f44d4204ba7ee70cc6b610b7a7c (patch) | |
| tree | 7b323d422082c43b467f90f0a4047e2200e17e2c | |
| parent | e90606d9e1140fb4763fd177872031a47a107d60 (diff) | |
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
Change-Id: I7b864821fe1df20446a21a08e779ec0441e553a4
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/smartspace/data/repository/SmartspaceRepository.kt | 17 |
1 files changed, 4 insertions, 13 deletions
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 52a1c1555591..095d30ef55df 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.os.Parcelable 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 @@ class SmartspaceRepositoryImpl @Inject constructor( private val communalSmartspaceController: CommunalSmartspaceController, - @Main private val uiExecutor: Executor, ) : SmartspaceRepository, BcSmartspaceDataPlugin.SmartspaceTargetListener { override val isSmartspaceRemoteViewsEnabled: Boolean @@ -54,18 +51,12 @@ constructor( 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>?) { |