Use ComponentName.flattenToShortString
Change-Id: I39ab41db896148b31d0c78ef8875c315c80f99af
diff --git a/src/com/android/telecomm/Call.java b/src/com/android/telecomm/Call.java
index 2db5b4e..b33f862 100644
--- a/src/com/android/telecomm/Call.java
+++ b/src/com/android/telecomm/Call.java
@@ -139,9 +139,11 @@
/** {@inheritDoc} */
@Override public String toString() {
- return String.format(Locale.US, "[%s, %s, %s]", mState,
- mCallService == null ? "<null>" : mCallService.getComponentName(),
- Log.piiHandle(mHandle));
+ String component = null;
+ if (mCallService != null && mCallService.getComponentName() != null) {
+ component = mCallService.getComponentName().flattenToShortString();
+ }
+ return String.format(Locale.US, "[%s, %s, %s]", mState, component, Log.piiHandle(mHandle));
}
CallState getState() {