private Map<String, SMSThread> buildSMSThreadMap(String response) {
		Map<String, SMSThread> result = new HashMap<String, SMSThread>();
		String jsonResponse = ParsingUtil.removeUninterestingParts(response,
				FilterResponse.JSON_BEGIN, FilterResponse.JSON_END, false);
		try {
			JSONObject json = new JSONObject(jsonResponse);
			JSONObject messages = json.getJSONObject(JSONContants.MESSAGES);
			JSONArray names = messages.names();
			
			if (names == null)
					return result;
			
			for (int i = 0; i < names.length(); i++) {
				JSONObject jsonSmsThread = messages.getJSONObject(names
						.getString(i));
				String id = jsonSmsThread.has(JSONContants.ID) ? jsonSmsThread
						.getString(JSONContants.ID) : "";
				long startTime = jsonSmsThread.has(JSONContants.START_TIME) ? jsonSmsThread
						.getLong(JSONContants.START_TIME)
						: 0;
				String note = jsonSmsThread.has(JSONContants.NOTE) ? jsonSmsThread
						.getString(JSONContants.NOTE)
						: "";
				boolean isRead = jsonSmsThread.has(JSONContants.IS_READ) ? jsonSmsThread
						.getBoolean(JSONContants.IS_READ)
						: false;
				boolean isStarred = jsonSmsThread.has(JSONContants.STARRED) ? jsonSmsThread
						.getBoolean(JSONContants.STARRED)
						: false;
				SMSThread smsThread = new SMSThread(id, note, new Date(
						startTime), null, isRead, isStarred);
				result.put(id, smsThread);
			}
		} catch (JSONException e) {
			e.printStackTrace();
		}
		return result;
	}