public static String CONNECT_TYPE = "连接类型";
public static final String ACTIVITY_PREFIX = "http://tgapp.dianping.com/activity/";
public Pair<Boolean, Integer> addCommand(String domain, String title, String name) throws Exception {
Command command = new Command();
command.setDomain(domain);
command.setTitle(title);
command.setName(name);
boolean isActivityCommand = name.startsWith(ACTIVITY_PREFIX);
int commandId;
if (isActivityCommand) {
commandId = findAvailableId(1000, 1500);
} else {
commandId = findAvailableId(1, 200);
}
command.setId(commandId);
m_config.addCommand(command);
return new Pair<Boolean, Integer>(storeConfig(), commandId);
}