Skip to content
Snippets Groups Projects
Commit 6f25c5b7 authored by Hunter Knepshield's avatar Hunter Knepshield Committed by Gerrit Code Review
Browse files

Merge "Add BarringInfo.BarringServiceInfo#toString" into main

parents 69bbd1c8 28c8d503
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