fix argument to CloseGuard.open()

Based on documentation, String parameter to CloseGuard.open() should be the name of the method to close the resource (in this case Resource.close()).

As currently written, the debug output from warnIfOpen() will be "Resource failed to call constructor."

Bug: 131838407
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I9b8a71f9076712014bb883bbde5e5fbdb018b2d5
This commit is contained in:
Maciej Żenczykowski
2023-01-07 00:59:44 +00:00
parent 4f46dd8d78
commit 223b5cc371

View File

@@ -610,7 +610,7 @@ public class IpSecManager {
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
mCloseGuard.open("constructor");
mCloseGuard.open("close");
}
/** Get the encapsulation socket's file descriptor. */
@@ -890,7 +890,7 @@ public class IpSecManager {
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
mCloseGuard.open("constructor");
mCloseGuard.open("close");
}
/**