ResourceResolver resources = (ResourceResolver) params.getResources();
int apiLevel = getLegacyApiLevel();
// create a log wrapper since the older api requires a ILayoutLog
final LayoutLog log = params.getLog();
ILayoutLog logWrapper = new ILayoutLog() {
@Override
public void warning(String message) {
log.warning(null, message, null /*data*/);
}
@Override
public void error(Throwable t) {
log.error(null, "error!", t, null /*data*/);
}
@Override
public void error(String message) {
log.error(null, message, null /*data*/);
}
};
// convert the map of ResourceValue into IResourceValue. Super ugly but works.