Skip to content

Commit

Permalink
make Carrier final and add toString() (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
breedx-splk authored Oct 3, 2022
1 parent 6742845 commit d146504
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion splunk-otel-android/src/main/java/com/splunk/rum/Carrier.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit d146504

Please sign in to comment.