[DK4-0]Add CM#setTestLowTcpPollingTimerForKeepalive for testing
The default TCP polling alarm timer is very large(2 mins). It's expensive in the CTS to wait for a couple alarms. The polling alarm should be deprecated soon and replace with callback design, so add the hidden method for testing purpose to support the short term usage until design is replaced with callbacks. With the hidden method, the alarm timer will decrease to 1 second for a specified time period. The TCP sockets status could be verified every 1 second. Bug: 259000745 Test: m ; atest HostsideVpnTests with the follow up test Change-Id: I99d494d3b50b2fbee73b926e92e97b1e194d43d4
This commit is contained in:
@@ -1501,6 +1501,22 @@ public class ConnectivityManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Temporarily set automaticOnOff keeplaive TCP polling alarm timer to 1 second.
|
||||
*
|
||||
* TODO: Remove this when the TCP polling design is replaced with callback.
|
||||
* @params timeMs The time of expiry, with System.currentTimeMillis() base. The value should be
|
||||
* set no more than 5 minutes in the future.
|
||||
* @hide
|
||||
*/
|
||||
public void setTestLowTcpPollingTimerForKeepalive(long timeMs) {
|
||||
try {
|
||||
mService.setTestLowTcpPollingTimerForKeepalive(timeMs);
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Informs ConnectivityService of whether the legacy lockdown VPN, as implemented by
|
||||
* LockdownVpnTracker, is in use. This is deprecated for new devices starting from Android 12
|
||||
|
||||
Reference in New Issue
Block a user