call_logChannelExists = true;
if (mapping.deviceName.equals("sms_backup") && mapping.channelName.equals("photo"))
photoChannelExists = true;
}
if (!call_logChannelExists){
ChannelMapping mapping = new ChannelMapping();
mapping.deviceName = "sms_backup";
mapping.channelName = "call_log";
mapping.timeType = ChannelMapping.TimeType.gmt;
mapping.channelType = ChannelMapping.ChannelType.timespan;
mapping.guestId = updateInfo.getGuestId();
mapping.apiKeyId = updateInfo.apiKey.getId();
mapping.objectTypeId = type.value();
bodyTrackHelper.persistChannelMapping(mapping);
ChannelStyle channelStyle = new ChannelStyle();
channelStyle.timespanStyles = new MainTimespanStyle();
channelStyle.timespanStyles.defaultStyle = new TimespanStyle();
channelStyle.timespanStyles.defaultStyle.fillColor = "green";
channelStyle.timespanStyles.defaultStyle.borderColor = "#006000";
channelStyle.timespanStyles.defaultStyle.borderWidth = 2;
channelStyle.timespanStyles.defaultStyle.top = 0.0;
channelStyle.timespanStyles.defaultStyle.bottom = 1.0;
bodyTrackHelper.setBuiltinDefaultStyle(updateInfo.getGuestId(),"sms_backup","call_log",channelStyle);
}
if (!photoChannelExists){
ChannelMapping mapping;
mapping = new ChannelMapping();
mapping.deviceName = "sms_backup";
mapping.channelName = "photo";
mapping.timeType = ChannelMapping.TimeType.gmt;
mapping.channelType = ChannelMapping.ChannelType.photo;
mapping.guestId = updateInfo.getGuestId();