Changed deprecated call to setInline to setLocality.