ActivatedVariablePolicy policy, Variant variant,
InternalDevice device) {
ActivatedThemeContent content =
(ActivatedThemeContent) variant.getContent();
StyleSheet styleSheet = content.getStyleSheet();
// Create a new style sheet.
StyleSheet compositeStyleSheet;
// If importing the parent theme then find a theme that is
// explicitly targeted at the parent device.
if (content.getImportParent()) {
// Create a style sheet to contain all the rules.
compositeStyleSheet = styleSheetFactory.createStyleSheet();
List rules = compositeStyleSheet.getRules();
// Add the rules from the parent style sheet first.
addParentRules(policy, device, rules);
// Add the style sheet rules for this after the parent's