New setting for recommendation request timeout.

Added a new global setting, NETWORK_RECOMMENDATION_REQUEST_TIMEOUT_MS,
to control the maximum amount of time a recommendation request can
take.

Updated the NetworkScoreService to monitor the value and to update
its cached copy on observed changes.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 34060959
Change-Id: I7650ee024e53dbc856cf20d7520a6eb252c73bdf
This commit is contained in:
Jeremy Joslin
2017-01-03 17:31:23 -08:00
parent ce73c6f296
commit cb594f363d
3 changed files with 124 additions and 39 deletions

View File

@@ -8019,6 +8019,16 @@ public final class Settings {
public static final String NETWORK_RECOMMENDATIONS_ENABLED =
"network_recommendations_enabled";
/**
* The number of milliseconds the {@link com.android.server.NetworkScoreService}
* will give a recommendation request to complete before returning a default response.
*
* Type: long
* @hide
*/
public static final String NETWORK_RECOMMENDATION_REQUEST_TIMEOUT_MS =
"network_recommendation_request_timeout_ms";
/**
* Settings to allow BLE scans to be enabled even when Bluetooth is turned off for
* connectivity.