String action = intent.getAction();
switch (action) {
case ACTION_GET_RENDERER: {
return new PdfRendererImpl();
}
case ACTION_GET_EDITOR: {
return new PdfEditorImpl();
}
default: {
throw new IllegalArgumentException("Invalid intent action:" + action);
}
}