private static String uriToSafeString(Uri uri) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
            try {
                Method toSafeString = Uri.class.getDeclaredMethod("toSafeString");
                toSafeString.setAccessible(true);
                return (String) toSafeString.invoke(uri);
            } catch (NoSuchMethodException e) {
                e.printStackTrace();
            } catch (InvocationTargetException e) {
                e.printStackTrace();
            } catch (IllegalAccessException e) {
                e.printStackTrace();
            }
        }
        return uri.toString();
    }
Intent object to string, the string would be in the format of "Intent { ... }".
android/android_framework/base/src/main/java/com/elvishew/xlog/internal/util/ObjectToStringUtil.java