diff options
author | blong <blong@codeaurora.org> | 2015-08-25 13:35:23 +0800 |
---|---|---|
committer | blong <blong@codeaurora.org> | 2015-09-11 14:13:31 +0800 |
commit | 7419add9bcb08dc7f2156010f5b1a246b7587524 (patch) | |
tree | 36ef837792d0904d0c841315aef2a34ca3b9979d | |
parent | ae73785e23fa73f986fc7bb223ed2cc059c90193 (diff) | |
download | packages_apps_Contacts-7419add9bcb08dc7f2156010f5b1a246b7587524.tar.gz packages_apps_Contacts-7419add9bcb08dc7f2156010f5b1a246b7587524.tar.bz2 packages_apps_Contacts-7419add9bcb08dc7f2156010f5b1a246b7587524.zip |
Support adding contacts to blacklist and whitelist
- Allow add contacts number into blacklist and whitelist by long
press phone numbers if Firewall.apk is installed
- Add icon to identify black/white number in contact detail view
Change-Id: Ia00648bde341de67355b6c896fb21e6c8d7aa466
-rw-r--r-- | AndroidManifest.xml | 2 | ||||
-rwxr-xr-x | res/drawable-hdpi/number_in_blacklist.png | bin | 0 -> 3404 bytes | |||
-rwxr-xr-x | res/drawable-hdpi/number_in_whitelist.png | bin | 0 -> 3452 bytes | |||
-rwxr-xr-x | res/drawable-mdpi/number_in_blacklist.png | bin | 0 -> 3147 bytes | |||
-rwxr-xr-x | res/drawable-mdpi/number_in_whitelist.png | bin | 0 -> 3166 bytes | |||
-rwxr-xr-x | res/drawable-xhdpi/number_in_blacklist.png | bin | 0 -> 3632 bytes | |||
-rwxr-xr-x | res/drawable-xhdpi/number_in_whitelist.png | bin | 0 -> 3815 bytes | |||
-rw-r--r-- | res/layout/expanding_entry_card_item.xml | 9 | ||||
-rw-r--r-- | res/values-zh-rCN/strings.xml | 8 | ||||
-rw-r--r-- | res/values/strings.xml | 7 | ||||
-rw-r--r-- | src/com/android/contacts/quickcontact/ExpandingEntryCardView.java | 72 | ||||
-rw-r--r-- | src/com/android/contacts/quickcontact/QuickContactActivity.java | 225 |
12 files changed, 317 insertions, 6 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index d8532ff2c..1f13c0465 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -40,6 +40,8 @@ <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/> + <uses-permission android:name="com.android.firewall.READ_GRAVITY"/> + <uses-permission android:name="com.android.firewall.WRITE_GRAVITY"/> <!-- Following used for QuickContacts --> <uses-permission android:name="android.permission.READ_CALL_LOG" /> <uses-permission android:name="android.permission.READ_SMS" /> diff --git a/res/drawable-hdpi/number_in_blacklist.png b/res/drawable-hdpi/number_in_blacklist.png Binary files differnew file mode 100755 index 000000000..a6d150927 --- /dev/null +++ b/res/drawable-hdpi/number_in_blacklist.png diff --git a/res/drawable-hdpi/number_in_whitelist.png b/res/drawable-hdpi/number_in_whitelist.png Binary files differnew file mode 100755 index 000000000..43e55d1a4 --- /dev/null +++ b/res/drawable-hdpi/number_in_whitelist.png diff --git a/res/drawable-mdpi/number_in_blacklist.png b/res/drawable-mdpi/number_in_blacklist.png Binary files differnew file mode 100755 index 000000000..27eb30dcb --- /dev/null +++ b/res/drawable-mdpi/number_in_blacklist.png diff --git a/res/drawable-mdpi/number_in_whitelist.png b/res/drawable-mdpi/number_in_whitelist.png Binary files differnew file mode 100755 index 000000000..eb2c45d09 --- /dev/null +++ b/res/drawable-mdpi/number_in_whitelist.png diff --git a/res/drawable-xhdpi/number_in_blacklist.png b/res/drawable-xhdpi/number_in_blacklist.png Binary files differnew file mode 100755 index 000000000..12d04a644 --- /dev/null +++ b/res/drawable-xhdpi/number_in_blacklist.png diff --git a/res/drawable-xhdpi/number_in_whitelist.png b/res/drawable-xhdpi/number_in_whitelist.png Binary files differnew file mode 100755 index 000000000..f1b905983 --- /dev/null +++ b/res/drawable-xhdpi/number_in_whitelist.png diff --git a/res/layout/expanding_entry_card_item.xml b/res/layout/expanding_entry_card_item.xml index 20e90ebf9..468fbc50c 100644 --- a/res/layout/expanding_entry_card_item.xml +++ b/res/layout/expanding_entry_card_item.xml @@ -42,11 +42,18 @@ android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_toEndOf="@+id/icon" - android:layout_toStartOf="@+id/icon_alternate" android:textColor="@color/quickcontact_entry_header_text_color" android:textAlignment="viewStart" android:layout_marginBottom="@dimen/expanding_entry_card_header_margin_bottom" /> + <ImageView + android:id="@+id/black_white_list_indicator" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_toEndOf="@+id/header" + android:layout_marginStart="8dp" + android:layout_marginTop="@dimen/expanding_entry_card_header_margin_bottom" /> + <TextView android:id="@+id/sub_header" android:layout_width="wrap_content" diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index 868f3e6aa..bae2036d5 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -315,7 +315,13 @@ <string name="delete_call_title">删除通话记录</string> <string name="delete_call_message">删除通话记录 ...</string> <string name="delete_call_alert">"确定要删除选中的通话记录吗?"</string> - + <string name="add_blacklist_success">"这个号码已经成功添加到黑名单。"</string> + <string name="add_whitelist_success">"这个号码已经成功添加到白名单。"</string> + <string name="remove_blacklist_success">"这个号码已经成功从黑名单移除。"</string> + <string name="remove_whitelist_success">"这个号码已经成功从白名单移除。"</string> + <string name="remove_from_black">"移除黑名单"</string> + <string name="remove_from_white">"移除白名单"</string> + <string name="firewall_reach_maximun">"列表已满!"</string> <string name="title_add_members">"添加成员"</string> <string name="title_move_members">"移动成员"</string> <string name="message_add_members">"添加成员..."</string> diff --git a/res/values/strings.xml b/res/values/strings.xml index f4ff2cece..e56219c1e 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -837,4 +837,11 @@ <string name="delete_call_alert">Sure to delete the call logs selected?</string> <string name="title_del_call">Delete</string> <string name="title_add_members">Add members</string> + <string name="add_blacklist_success">"This number has been added in blacklist successfully."</string> + <string name="add_whitelist_success">"This number has been added in whitelist successfully."</string> + <string name="remove_blacklist_success">"This number has been removed from blacklist successfully."</string> + <string name="remove_whitelist_success">"This number has been removed from whitelist successfully."</string> + <string name="remove_from_black">Remove from blacklist</string> + <string name="remove_from_white">Remove from whitelist</string> + <string name="firewall_reach_maximun">The list is full and can not be filled in!</string> </resources> diff --git a/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java b/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java index 1b537c150..4b76987e4 100644 --- a/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java +++ b/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java @@ -22,9 +22,11 @@ import android.animation.ObjectAnimator; import android.content.Context; import android.content.Intent; import android.content.res.Resources; +import android.database.Cursor; import android.graphics.ColorFilter; import android.graphics.Rect; import android.graphics.drawable.Drawable; +import android.net.Uri; import android.support.v7.widget.CardView; import android.text.Spannable; import android.text.TextUtils; @@ -259,6 +261,11 @@ public class ExpandingEntryCardView extends CardView { */ private List<View> mSeparators; private LinearLayout mContainer; + private boolean mIsFireWallInstalled = false; + private static final Uri FIREWALL_BLACKLIST_CONTENT_URI = Uri + .parse("content://com.android.firewall/blacklistitems"); + private static final Uri FIREWALL_WHITELIST_CONTENT_URI = Uri + .parse("content://com.android.firewall/whitelistitems"); private final OnClickListener mExpandCollapseButtonListener = new OnClickListener() { @Override @@ -662,6 +669,10 @@ public class ExpandingEntryCardView extends CardView { } } + public void isFireWallInstalled(boolean isFireWallInstalled) { + mIsFireWallInstalled = isFireWallInstalled; + } + private View createEntryView(LayoutInflater layoutInflater, final Entry entry, int iconVisibility) { final EntryView view = (EntryView) layoutInflater.inflate( @@ -684,6 +695,44 @@ public class ExpandingEntryCardView extends CardView { header.setVisibility(View.GONE); } + final ImageView blackWhiteListIndicator = (ImageView) view + .findViewById(R.id.black_white_list_indicator); + + if (mIsFireWallInstalled && entry.getIntent() != null) { + String actionType = entry.getIntent().getAction(); + if (Intent.ACTION_CALL.equals(actionType)) { + String number = entry.getHeader(); + number = number.replaceAll(" ", ""); + number = number.replaceAll("-", ""); + String selectionString = "number=?"; + String[] selectionArgs = new String[] { number }; + Cursor cursorBlack = getContext().getContentResolver().query( + FIREWALL_BLACKLIST_CONTENT_URI, null, + selectionString, selectionArgs, null); + if (cursorBlack != null && cursorBlack.getCount() > 0) {// in black list + blackWhiteListIndicator.setVisibility(View.VISIBLE); + blackWhiteListIndicator.setBackgroundResource(R.drawable.number_in_blacklist); + } + if (cursorBlack != null) { + cursorBlack.close(); + } + Cursor cursorWhite = getContext().getContentResolver().query( + FIREWALL_WHITELIST_CONTENT_URI, null, + selectionString, selectionArgs, null); + if (cursorWhite != null && cursorWhite.getCount() > 0) {// in white list + blackWhiteListIndicator.setVisibility(View.VISIBLE); + blackWhiteListIndicator.setBackgroundResource(R.drawable.number_in_whitelist); + } + if (cursorWhite != null) { + cursorWhite.close(); + } + } else { + blackWhiteListIndicator.setVisibility(View.GONE); + } + } else { + blackWhiteListIndicator.setVisibility(View.GONE); + } + final TextView subHeader = (TextView) view.findViewById(R.id.sub_header); if (!TextUtils.isEmpty(entry.getSubHeader())) { subHeader.setText(entry.getSubHeader()); @@ -1017,6 +1066,9 @@ public class ExpandingEntryCardView extends CardView { private final long mId; private final boolean mIsSuperPrimary; private String mData; + private Intent mWhiteIntent; + private Intent mBlackIntent; + private ImageView mImageView; public EntryContextMenuInfo(String copyText, String copyLabel, String mimeType, long id, boolean isSuperPrimary) { @@ -1028,13 +1080,15 @@ public class ExpandingEntryCardView extends CardView { } public EntryContextMenuInfo(String copyText, String copyLabel, String mimeType, long id, - boolean isSuperPrimary, String data) { + boolean isSuperPrimary, String data, Intent whiteIntent, Intent blackIntent) { mCopyText = copyText; mCopyLabel = copyLabel; mMimeType = mimeType; mId = id; mIsSuperPrimary = isSuperPrimary; mData = data; + mWhiteIntent = whiteIntent; + mBlackIntent = blackIntent; } public String getCopyText() { @@ -1060,6 +1114,22 @@ public class ExpandingEntryCardView extends CardView { public String getData() { return mData; } + + public Intent getWhiteIntent() { + return mWhiteIntent; + } + + public Intent getBlackIntent() { + return mBlackIntent; + } + + public void setImageView(ImageView imageView) { + mImageView = imageView; + } + + public ImageView getImageView() { + return mImageView; + } } static final class EntryTag { diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java index aece2d38f..09ddf35db 100644 --- a/src/com/android/contacts/quickcontact/QuickContactActivity.java +++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java @@ -30,7 +30,9 @@ import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.content.Loader; +import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; +import android.content.pm.PackageManager.NameNotFoundException; import android.content.pm.ResolveInfo; import android.content.res.Resources; import android.database.Cursor; @@ -91,6 +93,7 @@ import android.view.View; import android.view.View.OnClickListener; import android.view.View.OnCreateContextMenuListener; import android.view.WindowManager; +import android.widget.ImageView; import android.widget.Toast; import android.widget.Toolbar; @@ -323,7 +326,24 @@ public class QuickContactActivity extends ContactsActivity { private static final int MIN_NUM_COLLAPSED_RECENT_ENTRIES_SHOWN = 3; private static final int CARD_ENTRY_ID_EDIT_CONTACT = -2; - + private boolean isFireWallInstalled = false; + private static final String FIREWALL_APK_NAME = "com.android.firewall"; + private static final String FIREWALL_BLACK_WHITE_LIST = "com.android.firewall.FirewallListPage"; + private static final Uri FIREWALL_BLACKLIST_CONTENT_URI = Uri + .parse("content://com.android.firewall/blacklistitems"); + private static final Uri FIREWALL_WHITELIST_CONTENT_URI = Uri + .parse("content://com.android.firewall/whitelistitems"); + private static final String BLACKLIST = "blacklist"; + private static final String WHITELIST = "whitelist"; + private static final int VALID_NUMBER_LENGTH = 11; + private static final int FIREWALL_LIST_MAX_ITEM_NUM = 100; + private static final int NOT_IN_FIREWALL = 1; + private static final int IN_BLACKLIST = -1; + private static final int IN_WHITHLIST = 0; + private static final String NAME_KEY = "name"; + private static final String NUMBER_KEY = "number"; + private static final String PERSON_KEY = "person_id"; + private static final String MODE_KEY = "mode"; private static final int MAX_NUM_LENGTH = 3; // add limit length to show IP call item private static final int[] mRecentLoaderIds = new int[]{ LOADER_SMS_ID, @@ -463,6 +483,10 @@ public class QuickContactActivity extends ContactsActivity { static final int EDIT_BEFORE_CALL = 3; static final int IPCALL1 = 4; static final int IPCALL2 = 5; // add for new feature: ip call prefix + static final int ADD_TO_BLACKLIST = 6; + static final int ADD_TO_WHITELIST = 7; + static final int REMOVE_FROM_BLACKLIST = 8; + static final int REMOVE_FROM_WHITELIST = 9; } private final OnCreateContextMenuListener mEntryContextMenuListener = @@ -505,6 +529,36 @@ public class QuickContactActivity extends ContactsActivity { if (Phone.CONTENT_ITEM_TYPE.equals(info.getMimeType())) { menu.add(ContextMenu.NONE, ContextMenuIds.EDIT_BEFORE_CALL, ContextMenu.NONE, getString(R.string.edit_before_call)); + + if (isFireWallInstalled) { + ImageView firewallIcon = (ImageView) v.findViewById( + R.id.black_white_list_indicator); + info.setImageView(firewallIcon); + String number = info.getCopyText(); + int result = NOT_IN_FIREWALL; + if (number != null) { + result = numberInWhichFirewallList(number); + } + if (NOT_IN_FIREWALL == result) { + menu.add(ContextMenu.NONE, ContextMenuIds.ADD_TO_BLACKLIST, + ContextMenu.NONE, getString(R.string.add_to_black)) + .setIntent(info.getBlackIntent()); + menu.add(ContextMenu.NONE, ContextMenuIds.ADD_TO_WHITELIST, + ContextMenu.NONE, getString(R.string.add_to_white)) + .setIntent(info.getWhiteIntent()); + } + if (IN_BLACKLIST == result) { + menu.add(ContextMenu.NONE, ContextMenuIds.REMOVE_FROM_BLACKLIST, + ContextMenu.NONE, getString(R.string.remove_from_black)) + .setIntent(info.getBlackIntent()); + } + if (IN_WHITHLIST == result) { + menu.add(ContextMenu.NONE, ContextMenuIds.REMOVE_FROM_WHITELIST, + ContextMenu.NONE, getString(R.string.remove_from_white)) + .setIntent(info.getWhiteIntent()); + } + } + // add limit length to show IP call item if (info.getData().length() > MAX_NUM_LENGTH) { if (MoreContactUtils.isMultiSimEnable(QuickContactActivity.this, @@ -556,6 +610,14 @@ public class QuickContactActivity extends ContactsActivity { case ContextMenuIds.EDIT_BEFORE_CALL: callByEdit(menuInfo.getData()); return true; + case ContextMenuIds.ADD_TO_BLACKLIST: + case ContextMenuIds.ADD_TO_WHITELIST: + addToFirewall(item.getIntent(), menuInfo.getImageView()); + return true; + case ContextMenuIds.REMOVE_FROM_BLACKLIST: + case ContextMenuIds.REMOVE_FROM_WHITELIST: + removeFromFirewall(item.getIntent(), menuInfo.getImageView()); + return true; case ContextMenuIds.IPCALL1: ipCallBySlot(menuInfo.getData(), PhoneConstants.SUB1); return true; @@ -567,6 +629,129 @@ public class QuickContactActivity extends ContactsActivity { } } + private boolean isNumberInFirewall(String mode, String number) { + Uri uri = null; + Cursor cursor = null; + number = number.replaceAll(" ", ""); + number = number.replaceAll("-", ""); + String tempNumber = number; + int length = tempNumber.length(); + if (length > VALID_NUMBER_LENGTH) { + tempNumber = number.substring( + length - VALID_NUMBER_LENGTH, length); + } + String selection = "number" + " LIKE '%" + tempNumber + "'"; + if (BLACKLIST.equals(mode)) { + uri = FIREWALL_BLACKLIST_CONTENT_URI; + } else { + uri = FIREWALL_WHITELIST_CONTENT_URI; + } + try { + cursor = getContentResolver().query(uri, null, selection, + null, null); + if (cursor != null && cursor.getCount() > 0) { + return true; + } else { + return false; + } + } finally { + if (cursor != null && !cursor.isClosed()) { + cursor.close(); + } + } + } + + private int numberInWhichFirewallList(String number) { + int result = NOT_IN_FIREWALL; + if (number != null) { + if (isNumberInFirewall(BLACKLIST, number)) { + result = IN_BLACKLIST; + } else if (isNumberInFirewall(WHITELIST, number)) { + result = IN_WHITHLIST; + } + } + return result; + } + + private void removeFromFirewall(Intent intent, ImageView imageView) { + if (intent != null) { + Bundle bundle = intent.getExtras(); + String number = bundle.getString(NUMBER_KEY); + String mode = bundle.getString(MODE_KEY); + boolean result = false; + Uri uri = null; + number = number.replaceAll(" ", ""); + number = number.replaceAll("-", ""); + if (BLACKLIST.equals(mode)) { + uri = FIREWALL_BLACKLIST_CONTENT_URI; + } else { + uri = FIREWALL_WHITELIST_CONTENT_URI; + } + String deleteSelection = "number=?"; + String deleteSelectionArgs [] = new String[] { + String.valueOf(number) + }; + result = getContentResolver().delete(uri, deleteSelection, + deleteSelectionArgs) >= 0; + if (result) { + if (imageView != null) { + imageView.setVisibility(View.GONE); + } + Toast.makeText(this, mode == BLACKLIST + ? R.string.remove_blacklist_success + : R.string.remove_whitelist_success, Toast.LENGTH_SHORT).show(); + } + } + } + + private void addToFirewall(Intent intent, ImageView imageView) { + if (intent != null) { + Bundle bundle = intent.getExtras(); + String name = bundle.getString(NAME_KEY); + String number = bundle.getString(NUMBER_KEY); + String mode = bundle.getString(MODE_KEY); + int personId = bundle.getInt(PERSON_KEY, -1); + boolean result = false; + Uri uri = null; + if (BLACKLIST.equals(mode)) { + uri = FIREWALL_BLACKLIST_CONTENT_URI; + } else { + uri = FIREWALL_WHITELIST_CONTENT_URI; + } + Cursor cursor = null; + try { + cursor = getContentResolver().query(uri, null, null, null, null); + if (cursor.getCount() >= FIREWALL_LIST_MAX_ITEM_NUM) { + Toast.makeText(this, R.string.firewall_reach_maximun, + Toast.LENGTH_SHORT).show(); + return; + } + } finally { + if (cursor != null && !cursor.isClosed()) { + cursor.close(); + } + } + ContentValues values = new ContentValues(); + number = number.replaceAll(" ", ""); + number = number.replaceAll("-", ""); + values.put(NAME_KEY, name); + values.put(NUMBER_KEY, number); + values.put(PERSON_KEY, personId); + result = getContentResolver().insert(uri, values) != null; + if (result) { + if (imageView != null) { + imageView.setVisibility(View.VISIBLE); + imageView.setBackgroundResource(mode == BLACKLIST + ? R.drawable.number_in_blacklist + : R.drawable.number_in_whitelist); + } + Toast.makeText(this, mode == BLACKLIST + ? R.string.add_blacklist_success + : R.string.add_whitelist_success, Toast.LENGTH_SHORT).show(); + } + } + } + private void ipCallBySlot(String data, int subscription) { String ipCallPrefix = MoreContactUtils.getIPCallPrefix(this, subscription); @@ -878,6 +1063,19 @@ public class QuickContactActivity extends ContactsActivity { Trace.endSection(); } + private boolean isFirewalltalled() { + boolean installed = false; + try { + ApplicationInfo info = getApplicationContext().getPackageManager().getApplicationInfo( + FIREWALL_APK_NAME, PackageManager.GET_PROVIDERS); + installed = info != null; + } catch (NameNotFoundException e) { + installed = false; + } + Log.d(TAG,"Is Firewall installed ? " + installed); + return installed; + } + @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQUEST_CODE_CONTACT_EDITOR_ACTIVITY && @@ -1135,7 +1333,10 @@ public class QuickContactActivity extends ContactsActivity { mHasIntentLaunched = false; populateContactAndAboutCard(mCachedCp2DataCardModel); } - + isFireWallInstalled = isFirewalltalled(); + if (mContactCard != null) { + mContactCard.isFireWallInstalled(isFireWallInstalled); + } // When exiting the activity and resuming, we want to force a full reload of all the // interaction data in case something changed in the background. On screen rotation, // we don't need to do this. And, mCachedCp2DataCardModel will be null, so we won't. @@ -1570,9 +1771,27 @@ public class QuickContactActivity extends ContactsActivity { primaryContentDescription.append(res.getString(R.string.call_other)).append(" "); header = sBidiFormatter.unicodeWrap(phone.buildDataStringForDisplay(context, kind), TextDirectionHeuristics.LTR); + // white and black listintent + Bundle blackBundle = new Bundle(); + blackBundle.putString(NUMBER_KEY, header); + blackBundle.putString(MODE_KEY, "blacklist"); + blackBundle.putString(NAME_KEY, contactData.getDisplayName()); + + Intent blackIntent = new Intent(); + blackIntent.putExtras(blackBundle); + + Bundle whiteBundle = new Bundle(); + whiteBundle.putString(NUMBER_KEY, header); + whiteBundle.putInt(PERSON_KEY, 0);// optional + whiteBundle.putString(MODE_KEY, "whitelist"); + whiteBundle.putString(NAME_KEY, contactData.getDisplayName()); + + Intent whiteIntent = new Intent(); + whiteIntent.putExtras(whiteBundle); entryContextMenuInfo = new EntryContextMenuInfo(header, res.getString(R.string.phoneLabelsGroup), dataItem.getMimeType(), - dataItem.getId(), dataItem.isSuperPrimary(), header); + dataItem.getId(), dataItem.isSuperPrimary(), header, + whiteIntent, blackIntent ); if (phone.hasKindTypeColumn(kind)) { final int kindTypeColumn = phone.getKindTypeColumn(kind); final String label = phone.getLabel(); |