Cellular data stall recovery based on networkStatus

This CL introduces cellular data stall recovery based on
network validation result. It still re-uses the existing
recovery steps but the triggers are based on networkStatus
from NetworkMonitor when the network is bad. Each recovery
step is spaced by a configurable grace period (default 3 mins)
to avoid back to back recovery.

This feature is controlled by the following settings. If this
feature is enabled then the legacy data stall detection based
on TrafficStats will automatically be disabled.

Settings.Global.DATA_STALL_RECOVERY_ON_BAD_NETWORK
1 => Enabled (default)
0 => Disabled

Settings.Global.MIN_DURATION_BETWEEN_RECOVERY_STEPS_IN_MS
3 minutes is default value

Bug: 113916551
Test: atest FrameworksTelephonyTests:com.android.internal.telephony.dataconnection.DcTrackerTest

Change-Id: I738fc7ed08803de1114f7a3d79bf278449e94ea8
This commit is contained in:
Jayachandran C
2018-12-06 11:12:07 -08:00
committed by Jayachandran Chinnakkannu
parent 56401a4c74
commit 8ef41bf34f
3 changed files with 18 additions and 1 deletions

View File

@@ -10470,6 +10470,21 @@ public final class Settings {
*/
public static final String DATA_STALL_EVALUATION_TYPE = "data_stall_evaluation_type";
/**
* Whether to try cellular data recovery when a bad network is reported.
*
* @hide
*/
public static final String DATA_STALL_RECOVERY_ON_BAD_NETWORK =
"data_stall_recovery_on_bad_network";
/**
* Minumim duration in millisecodns between cellular data recovery attempts
*
* @hide
*/
public static final String MIN_DURATION_BETWEEN_RECOVERY_STEPS_IN_MS =
"min_duration_between_recovery_steps";
/**
* Whether network service discovery is enabled.
*