Java Code Examples for android.util.DebugUtils#buildShortClassTag()

The following examples show how to use android.util.DebugUtils#buildShortClassTag() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Fragment.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
@Override
public String toString() {
    StringBuilder sb = new StringBuilder(128);
    DebugUtils.buildShortClassTag(this, sb);
    if (mIndex >= 0) {
        sb.append(" #");
        sb.append(mIndex);
    }
    if (mFragmentId != 0) {
        sb.append(" id=0x");
        sb.append(Integer.toHexString(mFragmentId));
    }
    if (mTag != null) {
        sb.append(" ");
        sb.append(mTag);
    }
    sb.append('}');
    return sb.toString();
}
 
Example 2
Source File: VoiceInteractor.java    From android_9.0.0_r45 with Apache License 2.0 6 votes vote down vote up
@Override
public String toString() {
    StringBuilder sb = new StringBuilder(128);
    DebugUtils.buildShortClassTag(this, sb);
    if (mVisualPrompt != null && mVoicePrompts != null && mVoicePrompts.length == 1
        && mVisualPrompt.equals(mVoicePrompts[0])) {
        sb.append(" ");
        sb.append(mVisualPrompt);
    } else {
        if (mVisualPrompt != null) {
            sb.append(" visual="); sb.append(mVisualPrompt);
        }
        if (mVoicePrompts != null) {
            sb.append(", voice=");
            for (int i=0; i<mVoicePrompts.length; i++) {
                if (i > 0) sb.append(" | ");
                sb.append(mVoicePrompts[i]);
            }
        }
    }
    sb.append('}');
    return sb.toString();
}
 
Example 3
Source File: Fragment.java    From droidel with Apache License 2.0 6 votes vote down vote up
@Override
public String toString() {
    StringBuilder sb = new StringBuilder(128);
    DebugUtils.buildShortClassTag(this, sb);
    if (mIndex >= 0) {
        sb.append(" #");
        sb.append(mIndex);
    }
    if (mFragmentId != 0) {
        sb.append(" id=0x");
        sb.append(Integer.toHexString(mFragmentId));
    }
    if (mTag != null) {
        sb.append(" ");
        sb.append(mTag);
    }
    sb.append('}');
    return sb.toString();
}
 
Example 4
Source File: FragmentManager.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
    StringBuilder sb = new StringBuilder(128);
    sb.append("FragmentManager{");
    sb.append(Integer.toHexString(System.identityHashCode(this)));
    sb.append(" in ");
    if (mParent != null) {
        DebugUtils.buildShortClassTag(mParent, sb);
    } else {
        DebugUtils.buildShortClassTag(mHost, sb);
    }
    sb.append("}}");
    return sb.toString();
}
 
Example 5
Source File: LoaderManager.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
    StringBuilder sb = new StringBuilder(64);
    sb.append("LoaderInfo{");
    sb.append(Integer.toHexString(System.identityHashCode(this)));
    sb.append(" #");
    sb.append(mId);
    sb.append(" : ");
    DebugUtils.buildShortClassTag(mLoader, sb);
    sb.append("}}");
    return sb.toString();
}
 
Example 6
Source File: LoaderManager.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
    StringBuilder sb = new StringBuilder(128);
    sb.append("LoaderManager{");
    sb.append(Integer.toHexString(System.identityHashCode(this)));
    sb.append(" in ");
    DebugUtils.buildShortClassTag(mHost, sb);
    sb.append("}}");
    return sb.toString();
}
 
Example 7
Source File: VoiceInteractor.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
    StringBuilder sb = new StringBuilder(128);
    DebugUtils.buildShortClassTag(this, sb);
    sb.append(" ");
    sb.append(getRequestTypeName());
    sb.append(" name=");
    sb.append(mName);
    sb.append('}');
    return sb.toString();
}
 
Example 8
Source File: Loader.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
/**
 * For debugging, converts an instance of the Loader's data class to
 * a string that can be printed.  Must handle a null data.
 */
public String dataToString(D data) {
    StringBuilder sb = new StringBuilder(64);
    DebugUtils.buildShortClassTag(data, sb);
    sb.append("}");
    return sb.toString();
}
 
Example 9
Source File: Loader.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
    StringBuilder sb = new StringBuilder(64);
    DebugUtils.buildShortClassTag(this, sb);
    sb.append(" id=");
    sb.append(mId);
    sb.append("}");
    return sb.toString();
}
 
Example 10
Source File: VoiceInteractionSession.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
    StringBuilder sb = new StringBuilder(128);
    DebugUtils.buildShortClassTag(this, sb);
    sb.append(" ");
    sb.append(mInterface.asBinder());
    sb.append(" pkg=");
    sb.append(mCallingPackage);
    sb.append(" uid=");
    UserHandle.formatUid(sb, mCallingUid);
    sb.append('}');
    return sb.toString();
}