While jenzz anwser works for the simplest case. It doesn't if your moving the cursor before editing your text because as soon as the second letter is typed it will be moved to the end of the EditText.
Prefer using this solution:
@Override
public void onTextChanged(CharSequence s, int start, int before, int count)
{
...
int position = et_mobile.getSelectionStart();
et_mobile.setText(f(s));
et_mobile.setSelection(position);
...
}