diff options
4 files changed, 32 insertions, 5 deletions
diff --git a/Android.mk b/Android.mk index 5c20d5328..deb85db21 100644 --- a/Android.mk +++ b/Android.mk @@ -54,7 +54,7 @@ LOCAL_STATIC_JAVA_LIBRARIES := \ LOCAL_PACKAGE_NAME := Contacts LOCAL_CERTIFICATE := shared LOCAL_PRIVILEGED_MODULE := true - +LOCAL_JAVA_LIBRARIES := telephony-common LOCAL_PROGUARD_FLAG_FILES := proguard.flags LOCAL_SDK_VERSION := current diff --git a/src/com/android/contacts/editor/CompactRawContactsEditorView.java b/src/com/android/contacts/editor/CompactRawContactsEditorView.java index 4a03398fd..35e56c0e4 100644 --- a/src/com/android/contacts/editor/CompactRawContactsEditorView.java +++ b/src/com/android/contacts/editor/CompactRawContactsEditorView.java @@ -67,6 +67,8 @@ import android.widget.LinearLayout; import android.widget.ListPopupWindow; import android.widget.TextView; +import com.android.contacts.common.MoreContactUtils; + import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.Arrays; @@ -852,6 +854,8 @@ public class CompactRawContactsEditorView extends LinearLayout implements View.O } else { mAccountSelectorName.setVisibility(View.VISIBLE); mAccountSelectorName.setText(accountInfo.first); + MoreContactUtils.setSimOperatorName(accountInfo.first, + mAccountSelectorName, getContext()); } final String selectorTitle = getResources().getString( diff --git a/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java b/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java index dd36fcffb..a3b1b1d29 100644 --- a/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java +++ b/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java @@ -361,7 +361,7 @@ public class ExpandingEntryCardView extends CardView { if (mEnablePresence) { mVideoCalling = (Switch) expandingEntryCardView .findViewById(R.id.switch_video_call); - mVideoCalling.setVisibility(View.VISIBLE); + mVideoCalling.setVisibility(View.GONE); mDefaultEnable = Settings.System.getInt(mContext.getContentResolver(), CallUtil.CONFIG_VIDEO_CALLING,CallUtil.DISABLE_VIDEO_CALLING); mEnable = mDefaultEnable; @@ -408,9 +408,6 @@ public class ExpandingEntryCardView extends CardView { mNumEntries = 0; mAllEntriesInflated = false; mShowFirstEntryTypeTwice = showFirstEntryTypeTwice; - if (isSupportVideoCall) { - mVideoCalling.setVisibility(View.VISIBLE); - } for (List<Entry> entryList : mEntries) { mNumEntries += entryList.size(); mEntryViews.add(new ArrayList<View>()); diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java index d690d4011..a931e0807 100755 --- a/src/com/android/contacts/quickcontact/QuickContactActivity.java +++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java @@ -187,6 +187,8 @@ import com.android.contacts.widget.MultiShrinkScroller.MultiShrinkScrollerListen import com.android.contacts.widget.QuickContactImageView; import com.android.contactsbind.HelpUtils; +import com.android.internal.telephony.OperatorSimInfo; + import com.google.common.collect.Lists; import com.google.common.collect.ImmutableList; import java.lang.SecurityException; @@ -2943,6 +2945,12 @@ public class QuickContactActivity extends ContactsActivity + MoreContactUtils.getAcount( QuickContactActivity.this, SimContactsConstants.SLOT2).name); + String customLabel = MoreContactUtils.getCustomOperatorLabel( + getApplicationContext(), SimContactsConstants.SLOT2); + if(!TextUtils.isEmpty(customLabel)) { + copyToSim2Menu.setTitle(getString(R.string.menu_copyTo) + + customLabel); + } copyToSim2Menu.setVisible(true); } if (SimContactsConstants.SIM_NAME_2.equals(accoutName) @@ -2951,6 +2959,12 @@ public class QuickContactActivity extends ContactsActivity + MoreContactUtils.getAcount( QuickContactActivity.this, SimContactsConstants.SLOT1).name); + String customLabel = MoreContactUtils.getCustomOperatorLabel( + getApplicationContext(), SimContactsConstants.SLOT1); + if(!TextUtils.isEmpty(customLabel)) { + copyToSim1Menu.setTitle(getString(R.string.menu_copyTo) + + customLabel); + } copyToSim1Menu.setVisible(true); } } @@ -2962,12 +2976,24 @@ public class QuickContactActivity extends ContactsActivity copyToSim1Menu.setTitle(getString(R.string.menu_copyTo) + MoreContactUtils.getAcount( this, SimContactsConstants.SLOT1).name); + String customLabel = MoreContactUtils.getCustomOperatorLabel( + getApplicationContext(), SimContactsConstants.SLOT1); + if(!TextUtils.isEmpty(customLabel)) { + copyToSim1Menu.setTitle(getString(R.string.menu_copyTo) + + customLabel); + } copyToSim1Menu.setVisible(true); } if (hasPhoneOrEmail && simTwoLoadComplete) { copyToSim2Menu.setTitle(getString(R.string.menu_copyTo) + MoreContactUtils.getAcount( this, SimContactsConstants.SLOT2).name); + String customLabel = MoreContactUtils.getCustomOperatorLabel( + getApplicationContext(), SimContactsConstants.SLOT2); + if(!TextUtils.isEmpty(customLabel)) { + copyToSim2Menu.setTitle(getString(R.string.menu_copyTo) + + customLabel); + } copyToSim2Menu.setVisible(true); } } else { |