Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 422017be authored by Daisuke Miyakawa's avatar Daisuke Miyakawa Committed by Android (Google) Code Review
Browse files

Merge "Make vCard code a separated static library."

parents 3ec26bde 64545a8c
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
<HTML>
<BODY>
{@hide}
</BODY>
</HTML>
 No newline at end of file
+0 −5
Original line number Diff line number Diff line
<HTML>
<BODY>
{@hide}
</BODY>
</HTML>
 No newline at end of file

vcard/Android.mk

0 → 100644
+28 −0
Original line number Diff line number Diff line
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE := com.android.vcard
LOCAL_SRC_FILES := $(call all-java-files-under, java)

# Use google-common instead of android-common for using hidden code in telephony library.
# Use ext for using Quoted-Printable codec.
LOCAL_JAVA_LIBRARIES := google-common ext

include $(BUILD_STATIC_JAVA_LIBRARY)

# Build the test package.
include $(call all-makefiles-under, $(LOCAL_PATH))
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

package android.pim.vcard;
package com.android.vcard;

import java.util.HashMap;
import java.util.Map;
+4 −4
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package android.pim.vcard;
package com.android.vcard;

import android.content.ContentValues;
import android.provider.ContactsContract.CommonDataKinds.Email;
@@ -30,11 +30,10 @@ import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
import android.provider.ContactsContract.CommonDataKinds.Website;
import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
import android.util.Base64;
import android.util.CharsetUtils;
import android.util.Log;

import org.apache.commons.codec.binary.Base64;

import java.io.UnsupportedEncodingException;
import java.nio.charset.UnsupportedCharsetException;
import java.util.ArrayList;
@@ -1166,7 +1165,8 @@ public class VCardBuilder {
                    Log.d(LOG_TAG, "Unknown photo type. Ignored.");
                    continue;
                }
                final String photoString = new String(Base64.encodeBase64(data));
                // TODO: check this works fine.
                final String photoString = new String(Base64.encode(data, Base64.NO_WRAP));
                if (!TextUtils.isEmpty(photoString)) {
                    appendPhotoLine(photoString, photoType);
                }
Loading