summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
author William Escande <wescande@google.com> 2025-02-21 18:16:48 -0800
committer William Escande <wescande@google.com> 2025-02-21 18:18:13 -0800
commitd04e4fe1e23afe51a3dc40577f5f875a3e087f95 (patch)
tree5ced3d3b69331300afe0e8792b1dc923238a57b5 /service
parentc12790b71e0694714a8854a1ac0a001edd111284 (diff)
SystemServer: improve coverage detection
Overload annotation is creating as many overload as possible and they appear uncovered in test, while they are. Deleting the overload and manually implement the only 2 necessary help for detection Bug: 311772251 Flag: Exempt refactor Test: atest ServiceBluetoothRoboTests Change-Id: I62c533f349c24b2943e4fd184b9e8add20c86b06
Diffstat (limited to 'service')
-rw-r--r--service/src/ActiveLog.kt15
1 files changed, 7 insertions, 8 deletions
diff --git a/service/src/ActiveLog.kt b/service/src/ActiveLog.kt
index c504363d22..46e3a5570d 100644
--- a/service/src/ActiveLog.kt
+++ b/service/src/ActiveLog.kt
@@ -65,13 +65,12 @@ object ActiveLogs {
}
@JvmStatic
- @JvmOverloads
- fun add(
- reason: Int,
- enable: Boolean,
- packageName: String = "BluetoothSystemServer",
- isBle: Boolean = false
- ) {
+ fun add(reason: Int, enable: Boolean) {
+ add(reason, enable, "BluetoothSystemServer", false)
+ }
+
+ @JvmStatic
+ fun add(reason: Int, enable: Boolean, packageName: String, isBle: Boolean) {
val last = activeLogs.lastOrNull()
if (activeLogs.size == MAX_ENTRIES_STORED) {
activeLogs.removeFirst()
@@ -100,7 +99,7 @@ object ActiveLogs {
reason,
packageName,
lastState,
- timeSinceLastChanged
+ timeSinceLastChanged,
)
}
}