Code example for ComponentName

Methods: getClassName, getPackageName

0
        intent.addFlags(
                Intent.FLAG_ACTIVITY_FORWARD_RESULT |
                Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP);
        intent.setComponent(
                new ComponentName(
                        cn.getPackageName(),
                        cn.getClassName()));
        return intent;
    } 
 
    /** 
     * Method that returns if the selected resolve info is about an internal viewer 
     * 
     * @param ri The resolve info 
     * @return boolean  If the selected resolve info is about an internal viewer 
     * @hide 
     */ 
    public static final boolean isInternalEditor(ResolveInfo ri) {
        return ri.activityInfo.metaData != null &&
                ri.activityInfo.metaData.getBoolean(
                        IntentsActionPolicy.CATEGORY_INTERNAL_VIEWER, false);