Loading res/values-zh-rCN/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -326,6 +326,8 @@ <string name="message_add_members">"添加成员..."</string> <string name="message_move_members">"移动成员..."</string> <string name="cancel_operation">"操作取消"</string> <!-- Menu item used to refresh a specific contact --> <string name="menu_refresh">刷新</string> <string name="message_can_not_move_members">"不能移动成员"</string> <string name="message_from_you_prefix" msgid="7180706529908434482">"您:<xliff:g id="SMS_BODY">%s</xliff:g>"</string> <string name="contact_editor_hangouts_im_alert" msgid="114855385615225735">"请将联系人的环聊帐号信息输入到电子邮件地址字段或电话号码字段,以便获得更佳的环聊使用体验。"</string> Loading src/com/android/contacts/activities/MultiPickContactsActivity.java +49 −1 Original line number Diff line number Diff line Loading @@ -245,6 +245,7 @@ public class MultiPickContactsActivity extends Activity implements ViewPager.OnP // so the Fragment will only be created once. If we add a TAG manually, there will // occur crash. position = getRtlPosition(position); if (mAreTabsHiddenInViewPager) { if (mPickMode.isPickCall()) { mDelCallLogFragment = new DelCallLogFragment(); Loading Loading @@ -289,6 +290,53 @@ public class MultiPickContactsActivity extends Activity implements ViewPager.OnP public int getCount() { return mAreTabsHiddenInViewPager ? 1 : TAB_INDEX_COUNT; } @Override public Object instantiateItem(ViewGroup container, int position) { Fragment f = (Fragment) super.instantiateItem(container, position); if (mAreTabsHiddenInViewPager) { if (mPickMode.isPickCall()) { if (mDelCallLogFragment == null) { mDelCallLogFragment = (DelCallLogFragment) f; mDelCallLogFragment .setCheckListListener(new CheckListListener()); } } else { if (mContactsFragment == null) { mContactsFragment = (ContactsFragment) f; mContactsFragment .setCheckListListener(new CheckListListener()); } } } else { switch (position) { case TAB_INDEX_RECENT: if (mCallLogFragment == null) { mCallLogFragment = (CallLogFragment) f; mCallLogFragment .setCheckListListener(new CheckListListener()); } break; case TAB_INDEX_CONTACTS: if (mContactsFragment == null) { mContactsFragment = (ContactsFragment) f; mContactsFragment .setCheckListListener(new CheckListListener()); } break; case TAB_INDEX_GROUP: if (mGroupFragment == null) { mGroupFragment = (GroupsFragment) f; mGroupFragment .setCheckListListener(new CheckListListener()); } break; } } return f; } } @Override Loading Loading @@ -1508,7 +1556,7 @@ public class MultiPickContactsActivity extends Activity implements ViewPager.OnP private void showGroupSelectionList(String accountType, long srcGroupId) { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(getString(R.string.label_groups)); builder.setTitle(getString(R.string.groupsLabel)); ContentResolver resolver = getContentResolver(); String selection = Groups.ACCOUNT_TYPE + " =? AND " + Groups.DELETED + " != ? AND (" + Groups.SOURCE_ID + "!='RCS'" + " OR " + Groups.SOURCE_ID + " IS NULL)"; Loading src/com/android/contacts/group/GroupEditorFragment.java +17 −4 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ public class GroupEditorFragment extends Fragment implements SelectAccountDialog private static final String CURRENT_EDITOR_TAG = "currentEditorForAccount"; public static final int REQUEST_CODE_PICK_GROUP_MEM = 1001; private static final int MAX_CACHE_MEMBER_SIZE = 500; public static interface Listener { /** Loading Loading @@ -238,7 +239,7 @@ public class GroupEditorFragment extends Fragment implements SelectAccountDialog onRestoreInstanceState(savedInstanceState); if (mStatus == Status.SELECTING_ACCOUNT) { // Account select dialog is showing. Don't setup the editor yet. } else if (mStatus == Status.LOADING) { } else if (mStatus == Status.LOADING || getCacheSize() == 0) { startGroupMetaDataLoader(); } else { setupEditorForAccount(); Loading Loading @@ -288,9 +289,15 @@ public class GroupEditorFragment extends Fragment implements SelectAccountDialog outState.putBoolean(KEY_GROUP_NAME_IS_READ_ONLY, mGroupNameIsReadOnly); outState.putString(KEY_ORIGINAL_GROUP_NAME, mOriginalGroupName); outState.putParcelableArrayList(KEY_MEMBERS_TO_ADD, mListMembersToAdd); outState.putParcelableArrayList(KEY_MEMBERS_TO_REMOVE, mListMembersToRemove); outState.putParcelableArrayList(KEY_MEMBERS_TO_DISPLAY, mListToDisplay); // if size is too large,it will cause TransactionTooLargeException,so add limit here if (getCacheSize() <= MAX_CACHE_MEMBER_SIZE) { outState.putParcelableArrayList(KEY_MEMBERS_TO_ADD, mListMembersToAdd); outState.putParcelableArrayList(KEY_MEMBERS_TO_REMOVE, mListMembersToRemove); outState.putParcelableArrayList(KEY_MEMBERS_TO_DISPLAY, mListToDisplay); } } private void onRestoreInstanceState(Bundle state) { Loading @@ -311,6 +318,12 @@ public class GroupEditorFragment extends Fragment implements SelectAccountDialog mListToDisplay = state.getParcelableArrayList(KEY_MEMBERS_TO_DISPLAY); } private int getCacheSize() { int size = mListMembersToAdd.size() + mListMembersToRemove.size() + mListToDisplay.size(); return size; } public void setContentResolver(ContentResolver resolver) { mContentResolver = resolver; if (mAutoCompleteAdapter != null) { Loading Loading
res/values-zh-rCN/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -326,6 +326,8 @@ <string name="message_add_members">"添加成员..."</string> <string name="message_move_members">"移动成员..."</string> <string name="cancel_operation">"操作取消"</string> <!-- Menu item used to refresh a specific contact --> <string name="menu_refresh">刷新</string> <string name="message_can_not_move_members">"不能移动成员"</string> <string name="message_from_you_prefix" msgid="7180706529908434482">"您:<xliff:g id="SMS_BODY">%s</xliff:g>"</string> <string name="contact_editor_hangouts_im_alert" msgid="114855385615225735">"请将联系人的环聊帐号信息输入到电子邮件地址字段或电话号码字段,以便获得更佳的环聊使用体验。"</string> Loading
src/com/android/contacts/activities/MultiPickContactsActivity.java +49 −1 Original line number Diff line number Diff line Loading @@ -245,6 +245,7 @@ public class MultiPickContactsActivity extends Activity implements ViewPager.OnP // so the Fragment will only be created once. If we add a TAG manually, there will // occur crash. position = getRtlPosition(position); if (mAreTabsHiddenInViewPager) { if (mPickMode.isPickCall()) { mDelCallLogFragment = new DelCallLogFragment(); Loading Loading @@ -289,6 +290,53 @@ public class MultiPickContactsActivity extends Activity implements ViewPager.OnP public int getCount() { return mAreTabsHiddenInViewPager ? 1 : TAB_INDEX_COUNT; } @Override public Object instantiateItem(ViewGroup container, int position) { Fragment f = (Fragment) super.instantiateItem(container, position); if (mAreTabsHiddenInViewPager) { if (mPickMode.isPickCall()) { if (mDelCallLogFragment == null) { mDelCallLogFragment = (DelCallLogFragment) f; mDelCallLogFragment .setCheckListListener(new CheckListListener()); } } else { if (mContactsFragment == null) { mContactsFragment = (ContactsFragment) f; mContactsFragment .setCheckListListener(new CheckListListener()); } } } else { switch (position) { case TAB_INDEX_RECENT: if (mCallLogFragment == null) { mCallLogFragment = (CallLogFragment) f; mCallLogFragment .setCheckListListener(new CheckListListener()); } break; case TAB_INDEX_CONTACTS: if (mContactsFragment == null) { mContactsFragment = (ContactsFragment) f; mContactsFragment .setCheckListListener(new CheckListListener()); } break; case TAB_INDEX_GROUP: if (mGroupFragment == null) { mGroupFragment = (GroupsFragment) f; mGroupFragment .setCheckListListener(new CheckListListener()); } break; } } return f; } } @Override Loading Loading @@ -1508,7 +1556,7 @@ public class MultiPickContactsActivity extends Activity implements ViewPager.OnP private void showGroupSelectionList(String accountType, long srcGroupId) { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(getString(R.string.label_groups)); builder.setTitle(getString(R.string.groupsLabel)); ContentResolver resolver = getContentResolver(); String selection = Groups.ACCOUNT_TYPE + " =? AND " + Groups.DELETED + " != ? AND (" + Groups.SOURCE_ID + "!='RCS'" + " OR " + Groups.SOURCE_ID + " IS NULL)"; Loading
src/com/android/contacts/group/GroupEditorFragment.java +17 −4 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ public class GroupEditorFragment extends Fragment implements SelectAccountDialog private static final String CURRENT_EDITOR_TAG = "currentEditorForAccount"; public static final int REQUEST_CODE_PICK_GROUP_MEM = 1001; private static final int MAX_CACHE_MEMBER_SIZE = 500; public static interface Listener { /** Loading Loading @@ -238,7 +239,7 @@ public class GroupEditorFragment extends Fragment implements SelectAccountDialog onRestoreInstanceState(savedInstanceState); if (mStatus == Status.SELECTING_ACCOUNT) { // Account select dialog is showing. Don't setup the editor yet. } else if (mStatus == Status.LOADING) { } else if (mStatus == Status.LOADING || getCacheSize() == 0) { startGroupMetaDataLoader(); } else { setupEditorForAccount(); Loading Loading @@ -288,9 +289,15 @@ public class GroupEditorFragment extends Fragment implements SelectAccountDialog outState.putBoolean(KEY_GROUP_NAME_IS_READ_ONLY, mGroupNameIsReadOnly); outState.putString(KEY_ORIGINAL_GROUP_NAME, mOriginalGroupName); outState.putParcelableArrayList(KEY_MEMBERS_TO_ADD, mListMembersToAdd); outState.putParcelableArrayList(KEY_MEMBERS_TO_REMOVE, mListMembersToRemove); outState.putParcelableArrayList(KEY_MEMBERS_TO_DISPLAY, mListToDisplay); // if size is too large,it will cause TransactionTooLargeException,so add limit here if (getCacheSize() <= MAX_CACHE_MEMBER_SIZE) { outState.putParcelableArrayList(KEY_MEMBERS_TO_ADD, mListMembersToAdd); outState.putParcelableArrayList(KEY_MEMBERS_TO_REMOVE, mListMembersToRemove); outState.putParcelableArrayList(KEY_MEMBERS_TO_DISPLAY, mListToDisplay); } } private void onRestoreInstanceState(Bundle state) { Loading @@ -311,6 +318,12 @@ public class GroupEditorFragment extends Fragment implements SelectAccountDialog mListToDisplay = state.getParcelableArrayList(KEY_MEMBERS_TO_DISPLAY); } private int getCacheSize() { int size = mListMembersToAdd.size() + mListMembersToRemove.size() + mListToDisplay.size(); return size; } public void setContentResolver(ContentResolver resolver) { mContentResolver = resolver; if (mAutoCompleteAdapter != null) { Loading