Add some tests for packet wakeup logging changes

Cellular networks are now supported for marking wakeup packets. As a
result onWakeupEvent now also reports data relevant to the cell
transport.

These unit tests should add coverage for these new behaviors.

Test: atest FrameworksNetTests

Bug: 276498460
Change-Id: I0b8a03fff6255e067b736f3dbfb53de56420f90b
This commit is contained in:
Suprabh Shukla 2023-04-26 18:47:36 -07:00
commit 53e1639b7d

View file

@ -7919,7 +7919,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
return captivePortalBuilder.build();
}
private String makeNflogPrefix(String iface, long networkHandle) {
@VisibleForTesting
static String makeNflogPrefix(String iface, long networkHandle) {
// This needs to be kept in sync and backwards compatible with the decoding logic in
// NetdEventListenerService, which is non-mainline code.
return SdkLevel.isAtLeastU() ? (networkHandle + ":" + iface) : ("iface:" + iface);