Java Code Examples for android.content.ComponentName#toShortString()

The following examples show how to use android.content.ComponentName#toShortString() . 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: ActivityThread.java    From AndroidComponentPlugin with Apache License 2.0 6 votes vote down vote up
public final Activity startActivityNow(Activity parent, String id,
    Intent intent, ActivityInfo activityInfo, IBinder token, Bundle state,
    Activity.NonConfigurationInstances lastNonConfigurationInstances) {
    ActivityClientRecord r = new ActivityClientRecord();
        r.token = token;
        r.ident = 0;
        r.intent = intent;
        r.state = state;
        r.parent = parent;
        r.embeddedID = id;
        r.activityInfo = activityInfo;
        r.lastNonConfigurationInstances = lastNonConfigurationInstances;
    if (localLOGV) {
        ComponentName compname = intent.getComponent();
        String name;
        if (compname != null) {
            name = compname.toShortString();
        } else {
            name = "(Intent " + intent + ").getComponent() returned null";
        }
        Slog.v(TAG, "Performing launch: action=" + intent.getAction()
                + ", comp=" + name
                + ", token=" + token);
    }
    return performLaunchActivity(r, null);
}
 
Example 2
Source File: ActivityThread.java    From AndroidComponentPlugin with Apache License 2.0 6 votes vote down vote up
public final Activity startActivityNow(Activity parent, String id,
    Intent intent, ActivityInfo activityInfo, IBinder token, Bundle state,
    Activity.NonConfigurationInstances lastNonConfigurationInstances) {
    ActivityClientRecord r = new ActivityClientRecord();
        r.token = token;
        r.ident = 0;
        r.intent = intent;
        r.state = state;
        r.parent = parent;
        r.embeddedID = id;
        r.activityInfo = activityInfo;
        r.lastNonConfigurationInstances = lastNonConfigurationInstances;
    if (localLOGV) {
        ComponentName compname = intent.getComponent();
        String name;
        if (compname != null) {
            name = compname.toShortString();
        } else {
            name = "(Intent " + intent + ").getComponent() returned null";
        }
        Slog.v(TAG, "Performing launch: action=" + intent.getAction()
                + ", comp=" + name
                + ", token=" + token);
    }
    return performLaunchActivity(r, null);
}
 
Example 3
Source File: ActivityThread.java    From AndroidComponentPlugin with Apache License 2.0 5 votes vote down vote up
public String toString() {
    ComponentName componentName = intent != null ? intent.getComponent() : null;
    return "ActivityRecord{"
        + Integer.toHexString(System.identityHashCode(this))
        + " token=" + token + " " + (componentName == null
                ? "no component name" : componentName.toShortString())
        + "}";
}
 
Example 4
Source File: ActivityThread.java    From AndroidComponentPlugin with Apache License 2.0 5 votes vote down vote up
public String toString() {
    ComponentName componentName = intent.getComponent();
    return "ActivityRecord{"
        + Integer.toHexString(System.identityHashCode(this))
        + " token=" + token + " " + (componentName == null
                ? "no component name" : componentName.toShortString())
        + "}";
}
 
Example 5
Source File: ActivityThread.java    From AndroidComponentPlugin with Apache License 2.0 4 votes vote down vote up
private static String safeToComponentShortString(Intent intent) {
    ComponentName component = intent.getComponent();
    return component == null ? "[Unknown]" : component.toShortString();
}
 
Example 6
Source File: ActivityThread.java    From AndroidComponentPlugin with Apache License 2.0 4 votes vote down vote up
private static String safeToComponentShortString(Intent intent) {
    ComponentName component = intent.getComponent();
    return component == null ? "[Unknown]" : component.toShortString();
}
 
Example 7
Source File: ZenLog.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
private static String componentToString(ComponentName component) {
    return component != null ? component.toShortString() : null;
}