Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/devicesettings/data/repository/DeviceSettingServiceConnection.kt +6 −6 Original line number Diff line number Diff line Loading @@ -160,6 +160,12 @@ class DeviceSettingServiceConnection( } .shareIn(scope = coroutineScope, started = SharingStarted.WhileSubscribed(), replay = 1) private val services = ConcurrentHashMap< EndPoint, StateFlow<ServiceConnectionStatus<IDeviceSettingsProviderService>>, >() /** Gets [DeviceSettingsConfig] for the device, return null when failed. */ suspend fun getDeviceSettingsConfig(): DeviceSettingsConfig? { if (!isServiceEnabled.await()) { Loading Loading @@ -320,11 +326,5 @@ class DeviceSettingServiceConnection( const val CONFIG_SERVICE_PACKAGE_NAME = "DEVICE_SETTINGS_CONFIG_PACKAGE_NAME" const val CONFIG_SERVICE_CLASS_NAME = "DEVICE_SETTINGS_CONFIG_CLASS" const val CONFIG_SERVICE_INTENT_ACTION = "DEVICE_SETTINGS_CONFIG_ACTION" val services = ConcurrentHashMap< EndPoint, StateFlow<ServiceConnectionStatus<IDeviceSettingsProviderService>>, >() } } packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/devicesettings/data/repository/DeviceSettingRepositoryTest.kt +0 −6 Original line number Diff line number Diff line Loading @@ -53,7 +53,6 @@ import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runCurrent import kotlinx.coroutines.test.runTest import org.junit.After import org.junit.Before import org.junit.Rule import org.junit.Test Loading Loading @@ -140,11 +139,6 @@ class DeviceSettingRepositoryTest { ) } @After fun clean() { DeviceSettingServiceConnection.services.clear() } @Test fun getDeviceSettingsConfig_withMetadata_success() { testScope.runTest { Loading Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/devicesettings/data/repository/DeviceSettingServiceConnection.kt +6 −6 Original line number Diff line number Diff line Loading @@ -160,6 +160,12 @@ class DeviceSettingServiceConnection( } .shareIn(scope = coroutineScope, started = SharingStarted.WhileSubscribed(), replay = 1) private val services = ConcurrentHashMap< EndPoint, StateFlow<ServiceConnectionStatus<IDeviceSettingsProviderService>>, >() /** Gets [DeviceSettingsConfig] for the device, return null when failed. */ suspend fun getDeviceSettingsConfig(): DeviceSettingsConfig? { if (!isServiceEnabled.await()) { Loading Loading @@ -320,11 +326,5 @@ class DeviceSettingServiceConnection( const val CONFIG_SERVICE_PACKAGE_NAME = "DEVICE_SETTINGS_CONFIG_PACKAGE_NAME" const val CONFIG_SERVICE_CLASS_NAME = "DEVICE_SETTINGS_CONFIG_CLASS" const val CONFIG_SERVICE_INTENT_ACTION = "DEVICE_SETTINGS_CONFIG_ACTION" val services = ConcurrentHashMap< EndPoint, StateFlow<ServiceConnectionStatus<IDeviceSettingsProviderService>>, >() } }
packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/devicesettings/data/repository/DeviceSettingRepositoryTest.kt +0 −6 Original line number Diff line number Diff line Loading @@ -53,7 +53,6 @@ import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runCurrent import kotlinx.coroutines.test.runTest import org.junit.After import org.junit.Before import org.junit.Rule import org.junit.Test Loading Loading @@ -140,11 +139,6 @@ class DeviceSettingRepositoryTest { ) } @After fun clean() { DeviceSettingServiceConnection.services.clear() } @Test fun getDeviceSettingsConfig_withMetadata_success() { testScope.runTest { Loading