Add targetAPI annotation for setLayerType