Loading packages/SystemUI/src/com/android/systemui/ambientcue/data/repository/AmbientCueRepository.kt +3 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ constructor( smartSpaceManager.createSmartspaceSession( SmartspaceConfig.Builder(applicationContext, AMBIENT_CUE_SURFACE).build() ) Log.i(TAG, "SmartSpace session created") val smartSpaceListener = OnTargetsAvailableListener { targets -> val actions = Loading Loading @@ -137,9 +138,11 @@ constructor( } session.addOnTargetsAvailableListener(executor, smartSpaceListener) Log.i(TAG, "SmartSpace session addOnTargetsAvailableListener") awaitClose { session.removeOnTargetsAvailableListener(smartSpaceListener) session.close() Log.i(TAG, "SmartSpace session closed") } } .onEach { actions -> isVisible.update { actions.isNotEmpty() } } Loading Loading
packages/SystemUI/src/com/android/systemui/ambientcue/data/repository/AmbientCueRepository.kt +3 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ constructor( smartSpaceManager.createSmartspaceSession( SmartspaceConfig.Builder(applicationContext, AMBIENT_CUE_SURFACE).build() ) Log.i(TAG, "SmartSpace session created") val smartSpaceListener = OnTargetsAvailableListener { targets -> val actions = Loading Loading @@ -137,9 +138,11 @@ constructor( } session.addOnTargetsAvailableListener(executor, smartSpaceListener) Log.i(TAG, "SmartSpace session addOnTargetsAvailableListener") awaitClose { session.removeOnTargetsAvailableListener(smartSpaceListener) session.close() Log.i(TAG, "SmartSpace session closed") } } .onEach { actions -> isVisible.update { actions.isNotEmpty() } } Loading