From 7e4a1aa7580d974add5c93ddb4939c9ca3159381 Mon Sep 17 00:00:00 2001 From: Quang Anh Luong Date: Fri, 7 Feb 2025 15:45:32 +0900 Subject: [PATCH] Add coverage for StopTetheringCallback default methods StopTetheringCallback implements no-op default methods, so call these explicitly in the CTS test to satisfy the coverage linter. Bug: 385014495 Bug: 385278741 Test: build Change-Id: Ife938fc5acb6635f201cfb0dadccb601e513c929 --- .../net/util/java/android/net/cts/util/CtsTetheringUtils.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/cts/net/util/java/android/net/cts/util/CtsTetheringUtils.java b/tests/cts/net/util/java/android/net/cts/util/CtsTetheringUtils.java index 75b2814b7c..27cba3a096 100644 --- a/tests/cts/net/util/java/android/net/cts/util/CtsTetheringUtils.java +++ b/tests/cts/net/util/java/android/net/cts/util/CtsTetheringUtils.java @@ -160,11 +160,15 @@ public final class CtsTetheringUtils { @Override public void onStopTetheringSucceeded() { mHistory.add(new CallbackValue.OnStopTetheringSucceeded()); + // Call the parent method so that the coverage linter sees it: http://b/385014495 + TetheringManager.StopTetheringCallback.super.onStopTetheringSucceeded(); } @Override public void onStopTetheringFailed(final int error) { mHistory.add(new CallbackValue.OnStopTetheringFailed(error)); + // Call the parent method so that the coverage linter sees it: http://b/385014495 + TetheringManager.StopTetheringCallback.super.onStopTetheringFailed(error); } /**