Skip to content
Snippets Groups Projects
Commit 28c8d503 authored by Hunter Knepshield's avatar Hunter Knepshield
Browse files

Add BarringInfo.BarringServiceInfo#toString

This is missing currently, so we get memory addresses instead of useful information in e.g. TelephonyRegistry dumpsys.

Change-Id: I6c685e9015f666da642d970a37b2f3361dfb41a8
Tested: make + `dumpsys telephony.registry` on device
Bug: 304400868
parent cbeabedc
No related branches found
No related tags found
No related merge requests found
......@@ -202,6 +202,24 @@ public final class BarringInfo implements Parcelable {
&& mConditionalBarringTimeSeconds == other.mConditionalBarringTimeSeconds;
}
private static String barringTypeToString(@BarringType int barringType) {
return switch (barringType) {
case BARRING_TYPE_NONE -> "NONE";
case BARRING_TYPE_CONDITIONAL -> "CONDITIONAL";
case BARRING_TYPE_UNCONDITIONAL -> "UNCONDITIONAL";
case BARRING_TYPE_UNKNOWN -> "UNKNOWN";
default -> "UNKNOWN(" + barringType + ")";
};
}
@Override
public String toString() {
return "BarringServiceInfo {mBarringType=" + barringTypeToString(mBarringType)
+ ", mIsConditionallyBarred=" + mIsConditionallyBarred
+ ", mConditionalBarringFactor=" + mConditionalBarringFactor
+ ", mConditionalBarringTimeSeconds=" + mConditionalBarringTimeSeconds + "}";
}
/** @hide */
public BarringServiceInfo(Parcel p) {
mBarringType = p.readInt();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment