Use the binder to identify keepalive in IConnectivityManager

This is much simpler and less error-prone, as well as less
subject to race conditions.

It also allows for cleaning up some TODOs.

Test: FrameworksNetTests
      CtsNetTestCases
Bug: 267116236
Change-Id: I470c709446946ef35a0324427defe2f58b434339
This commit is contained in:
Chalard Jean
2023-02-03 22:11:20 +09:00
committed by chiachangwang
parent e3e9f5622b
commit f0b261e7cc
10 changed files with 24 additions and 76 deletions

View File

@@ -69,9 +69,7 @@ public final class TcpSocketKeepalive extends SocketKeepalive {
protected void stopImpl() {
mExecutor.execute(() -> {
try {
if (mSlot != null) {
mService.stopKeepalive(mNetwork, mSlot);
}
mService.stopKeepalive(mCallback);
} catch (RemoteException e) {
Log.e(TAG, "Error stopping packet keepalive: ", e);
throw e.rethrowFromSystemServer();