Loading packages/SystemUI/src/com/android/systemui/smartspace/data/repository/SmartspaceRepository.kt +4 −13 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -43,7 +41,6 @@ class SmartspaceRepositoryImpl @Inject constructor( private val communalSmartspaceController: CommunalSmartspaceController, @Main private val uiExecutor: Executor, ) : SmartspaceRepository, BcSmartspaceDataPlugin.SmartspaceTargetListener { override val isSmartspaceRemoteViewsEnabled: Boolean Loading @@ -54,19 +51,13 @@ 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 ) } } override fun onSmartspaceTargetsUpdated(targetsNullable: MutableList<out Parcelable>?) { targetsNullable?.let { targets -> Loading Loading
packages/SystemUI/src/com/android/systemui/smartspace/data/repository/SmartspaceRepository.kt +4 −13 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -43,7 +41,6 @@ class SmartspaceRepositoryImpl @Inject constructor( private val communalSmartspaceController: CommunalSmartspaceController, @Main private val uiExecutor: Executor, ) : SmartspaceRepository, BcSmartspaceDataPlugin.SmartspaceTargetListener { override val isSmartspaceRemoteViewsEnabled: Boolean Loading @@ -54,19 +51,13 @@ 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 ) } } override fun onSmartspaceTargetsUpdated(targetsNullable: MutableList<out Parcelable>?) { targetsNullable?.let { targets -> Loading