Replace String by CharSequence for compatibility.