diff --git a/src/com/android/settings/network/telephony/scan/NetworkScanRepository.kt b/src/com/android/settings/network/telephony/scan/NetworkScanRepository.kt index 2067b8c3be5..dfa79cbc869 100644 --- a/src/com/android/settings/network/telephony/scan/NetworkScanRepository.kt +++ b/src/com/android/settings/network/telephony/scan/NetworkScanRepository.kt @@ -25,8 +25,8 @@ import android.telephony.RadioAccessSpecifier import android.telephony.TelephonyManager import android.telephony.TelephonyScanManager import android.util.Log -import androidx.annotation.VisibleForTesting import androidx.lifecycle.LifecycleOwner +import com.android.settings.R import com.android.settings.network.telephony.CellInfoUtil import com.android.settings.network.telephony.CellInfoUtil.getNetworkTitle import com.android.settingslib.spa.framework.util.collectLatestWithLifecycle @@ -37,7 +37,7 @@ import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.callbackFlow import kotlinx.coroutines.flow.flowOn -class NetworkScanRepository(context: Context, subId: Int) { +class NetworkScanRepository(private val context: Context, subId: Int) { sealed interface NetworkScanResult data class NetworkScanCellInfos(val cellInfos: List) : NetworkScanResult @@ -105,7 +105,7 @@ class NetworkScanRepository(context: Context, subId: Int) { NetworkScanRequest.SCAN_TYPE_ONE_SHOT, radioAccessSpecifiers, NetworkScanRequest.MIN_SEARCH_PERIODICITY_SEC, // one shot, not used - MAX_SEARCH_TIME_SEC, + context.resources.getInteger(R.integer.config_network_scan_helper_max_search_time_sec), true, INCREMENTAL_RESULTS_PERIODICITY_SEC, null, @@ -158,10 +158,6 @@ class NetworkScanRepository(context: Context, subId: Int) { companion object { private const val TAG = "NetworkScanRepository" - @VisibleForTesting - val MAX_SEARCH_TIME_SEC = 300 - - @VisibleForTesting - val INCREMENTAL_RESULTS_PERIODICITY_SEC = 3 + private const val INCREMENTAL_RESULTS_PERIODICITY_SEC = 3 } }