From d146504366fecaf2529b60fc08aae91b9ce77a32 Mon Sep 17 00:00:00 2001 From: jason plumb <75337021+breedx-splk@users.noreply.github.com> Date: Mon, 3 Oct 2022 01:31:00 -0700 Subject: [PATCH] make Carrier final and add toString() (#365) --- .../src/main/java/com/splunk/rum/Carrier.java | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/Carrier.java b/splunk-otel-android/src/main/java/com/splunk/rum/Carrier.java index e402c34c9..a1080ca6e 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/Carrier.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/Carrier.java @@ -23,7 +23,7 @@ import java.util.Objects; @RequiresApi(api = Build.VERSION_CODES.P) -class Carrier { +final class Carrier { private final int id; private final @Nullable String name; @@ -84,6 +84,26 @@ public int hashCode() { return Objects.hash(id, name, mobileCountryCode, mobileNetworkCode, isoCountryCode); } + @Override + public String toString() { + return "Carrier{" + + "id=" + + id + + ", name='" + + name + + '\'' + + ", mobileCountryCode='" + + mobileCountryCode + + '\'' + + ", mobileNetworkCode='" + + mobileNetworkCode + + '\'' + + ", isoCountryCode='" + + isoCountryCode + + '\'' + + '}'; + } + static class Builder { private int id = TelephonyManager.UNKNOWN_CARRIER_ID; private @Nullable String name = null;