Improved data fail cause debug message

Test: Manual
Fix: 228611718
Change-Id: Ic3a5a64a4e57ed49dd4445ff31018b78e833f73f
This commit is contained in:
Jack Yu
2022-04-08 10:48:07 -07:00
parent 3fda2bf279
commit 81ab8c73c1
2 changed files with 3 additions and 3 deletions

View File

@@ -1661,8 +1661,8 @@ public final class DataFailCause {
/** @hide */
public static String toString(@DataFailureCause int dataFailCause) {
int cause = getFailCause(dataFailCause);
return (cause == UNKNOWN) ? "UNKNOWN(" + dataFailCause + ")" : sFailCauseMap.get(cause);
return sFailCauseMap.getOrDefault(dataFailCause, "UNKNOWN") + "(0x"
+ Integer.toHexString(dataFailCause) + ")";
}
/** @hide */

View File

@@ -428,7 +428,7 @@ public final class DataCallResponse implements Parcelable {
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("DataCallResponse: {")
.append(" cause=").append(mCause)
.append(" cause=").append(DataFailCause.toString(mCause))
.append(" retry=").append(mSuggestedRetryTime)
.append(" cid=").append(mId)
.append(" linkStatus=").append(mLinkStatus)