private List<Map<String, Object>> getSimData() { List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); Map<String, Object> map = new HashMap<String, Object>(); Resources res = getResources(); int msimindex = MmsConfig.getSimCardInfo(); if (msimindex > mSubCount) { msimindex = msimindex - 1; } map.put(VIEW_ITEM_KEY_SIMNAME, res.getText(R.string.allmessage)); if (msimindex == 0) { map.put(VIEW_ITEM_KEY_SELECT, true); } else { map.put(VIEW_ITEM_KEY_SELECT, false); } map.put(VIEW_ITEM_KEY, "0"); list.add(map); if (mSubCount == 2) { map = new HashMap<String, Object>(); if (mSubInfoList.get(0).slotId == 0) { map.put(VIEW_ITEM_KEY_IMAGE, mSubInfoList.get(0).simIconRes[0]); map.put(VIEW_ITEM_KEY_SIMNAME, mSubInfoList.get(0).displayName); } else { map.put(VIEW_ITEM_KEY_IMAGE, mSubInfoList.get(1).simIconRes[0]); map.put(VIEW_ITEM_KEY_SIMNAME, mSubInfoList.get(1).displayName); } if (msimindex == 1) { map.put(VIEW_ITEM_KEY_SELECT, true); } else { map.put(VIEW_ITEM_KEY_SELECT, false); } map.put(VIEW_ITEM_KEY, "1"); list.add(map); map = new HashMap<String, Object>(); if (mSubInfoList.get(0).slotId == 1) { map.put(VIEW_ITEM_KEY_IMAGE, mSubInfoList.get(0).simIconRes[0]); map.put(VIEW_ITEM_KEY_SIMNAME, mSubInfoList.get(0).displayName); } else { map.put(VIEW_ITEM_KEY_IMAGE, mSubInfoList.get(1).simIconRes[0]); map.put(VIEW_ITEM_KEY_SIMNAME, mSubInfoList.get(1).displayName); } if (msimindex == 2) { map.put(VIEW_ITEM_KEY_SELECT, true); } else { map.put(VIEW_ITEM_KEY_SELECT, false); } map.put(VIEW_ITEM_KEY, "2"); list.add(map); } else if (mSubCount == 1) { int slotId = 0; if (FeatureOption.MTK_GEMINI_SUPPORT) { map = new HashMap<String, Object>(); map.put(VIEW_ITEM_KEY_IMAGE, mSubInfoList.get(0).simIconRes[0]); map.put(VIEW_ITEM_KEY_SIMNAME, mSubInfoList.get(0).displayName); if (msimindex == 1) { map.put(VIEW_ITEM_KEY_SELECT, true); } else { map.put(VIEW_ITEM_KEY_SELECT, false); } map.put(VIEW_ITEM_KEY, "1"); list.add(map); } } return list; }