From fec783e012a568e3b0a2c6e220b4bf742f89d983 Mon Sep 17 00:00:00 2001 From: Daisuke Miyakawa Date: Mon, 16 Nov 2009 16:32:10 +0900 Subject: [PATCH] Rename class names. Must be applied with the change Iecf85b40. Internal issue number: 2195990 --- src/com/android/contacts/ImportVCardActivity.java | 24 +++++++++++------------ src/com/android/contacts/ProgressShower.java | 16 +++++++-------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/com/android/contacts/ImportVCardActivity.java b/src/com/android/contacts/ImportVCardActivity.java index eb99c95..4b5eeac 100644 --- a/src/com/android/contacts/ImportVCardActivity.java +++ b/src/com/android/contacts/ImportVCardActivity.java @@ -30,11 +30,11 @@ import android.content.DialogInterface.OnClickListener; import android.os.Bundle; import android.os.Handler; import android.os.PowerManager; -import android.pim.vcard.EntryCommitter; -import android.pim.vcard.VCardBuilder; -import android.pim.vcard.VCardBuilderCollection; +import android.pim.vcard.VCardEntryCommitter; +import android.pim.vcard.VCardInterpreter; +import android.pim.vcard.VCardInterPreterCollection; import android.pim.vcard.VCardConfig; -import android.pim.vcard.VCardDataBuilder; +import android.pim.vcard.VCardEntryConstructor; import android.pim.vcard.VCardEntryCounter; import android.pim.vcard.VCardParser_V21; import android.pim.vcard.VCardParser_V30; @@ -202,7 +202,7 @@ public class ImportVCardActivity extends Activity { } VCardEntryCounter counter = new VCardEntryCounter(); VCardSourceDetector detector = new VCardSourceDetector(); - VCardBuilderCollection builderCollection = new VCardBuilderCollection( + VCardInterPreterCollection builderCollection = new VCardInterPreterCollection( Arrays.asList(counter, detector)); boolean result; @@ -295,17 +295,17 @@ public class ImportVCardActivity extends Activity { String charset, boolean showEntryParseProgress, VCardSourceDetector detector, List errorFileNameList) { final Context context = ImportVCardActivity.this; - VCardDataBuilder builder; + VCardEntryConstructor builder; final String currentLanguage = Locale.getDefault().getLanguage(); int vcardType = VCardConfig.getVCardTypeFromString( context.getString(R.string.config_import_vcard_type)); if (charset != null) { - builder = new VCardDataBuilder(charset, charset, false, vcardType, mAccount); + builder = new VCardEntryConstructor(charset, charset, false, vcardType, mAccount); } else { charset = VCardConfig.DEFAULT_CHARSET; - builder = new VCardDataBuilder(null, null, false, vcardType, mAccount); + builder = new VCardEntryConstructor(null, null, false, vcardType, mAccount); } - builder.addEntryHandler(new EntryCommitter(mResolver)); + builder.addEntryHandler(new VCardEntryCommitter(mResolver)); if (showEntryParseProgress) { builder.addEntryHandler(new ProgressShower(mProgressDialogForReadVCard, context.getString(R.string.reading_vcard_message), @@ -324,7 +324,7 @@ public class ImportVCardActivity extends Activity { } private boolean readOneVCardFile(String canonicalPath, String charset, - VCardBuilder builder, VCardSourceDetector detector, + VCardInterpreter builder, VCardSourceDetector detector, boolean throwNestedException, List errorFileNameList) throws VCardNestedException { FileInputStream is; @@ -339,9 +339,9 @@ public class ImportVCardActivity extends Activity { is.close(); } catch (IOException e) { } - if (builder instanceof VCardDataBuilder) { + if (builder instanceof VCardEntryConstructor) { // Let the object clean up internal temporal objects, - ((VCardDataBuilder)builder).clear(); + ((VCardEntryConstructor)builder).clear(); } is = new FileInputStream(canonicalPath); diff --git a/src/com/android/contacts/ProgressShower.java b/src/com/android/contacts/ProgressShower.java index c1a2493..a5ad2a2 100644 --- a/src/com/android/contacts/ProgressShower.java +++ b/src/com/android/contacts/ProgressShower.java @@ -18,12 +18,12 @@ package com.android.contacts; import android.app.ProgressDialog; import android.content.Context; import android.os.Handler; -import android.pim.vcard.ContactStruct; -import android.pim.vcard.EntryHandler; +import android.pim.vcard.VCardEntry; +import android.pim.vcard.VCardEntryHandler; import android.pim.vcard.VCardConfig; import android.util.Log; -public class ProgressShower implements EntryHandler { +public class ProgressShower implements VCardEntryHandler { public static final String LOG_TAG = "vcard.ProgressShower"; private final Context mContext; @@ -34,9 +34,9 @@ public class ProgressShower implements EntryHandler { private long mTime; private class ShowProgressRunnable implements Runnable { - private ContactStruct mContact; + private VCardEntry mContact; - public ShowProgressRunnable(ContactStruct contact) { + public ShowProgressRunnable(VCardEntry contact) { mContact = contact; } @@ -57,10 +57,10 @@ public class ProgressShower implements EntryHandler { mProgressMessage = progressMessage; } - public void onParsingStart() { + public void onStart() { } - public void onEntryCreated(ContactStruct contactStruct) { + public void onEntryCreated(VCardEntry contactStruct) { long start = System.currentTimeMillis(); if (!contactStruct.isIgnorable()) { @@ -78,7 +78,7 @@ public class ProgressShower implements EntryHandler { mTime += System.currentTimeMillis() - start; } - public void onParsingEnd() { + public void onEnd() { if (VCardConfig.showPerformanceLog()) { Log.d(LOG_TAG, String.format("Time to progress a dialog: %d ms", mTime)); -- 2.11.0