Second try at fixing replacement of a range of digits with a pause.
It was still not working all the time, because the automatic number
formatter could change the buffer offsets in between the deletion of
the old digits and the insertion of the pause character. Do it as
a single operation so that nothing can happen in between.
diff --git a/src/com/android/contacts/TwelveKeyDialer.java b/src/com/android/contacts/TwelveKeyDialer.java
index 0e9503a..6ee9b32 100644
--- a/src/com/android/contacts/TwelveKeyDialer.java
+++ b/src/com/android/contacts/TwelveKeyDialer.java
@@ -1024,8 +1024,7 @@
// position and update the mDigits.
digits.replace(selectionStart, selectionStart, newDigits);
} else {
- digits.delete(selectionStart, selectionEnd);
- digits.replace(selectionStart, selectionStart, newDigits);
+ digits.replace(selectionStart, selectionEnd, newDigits);
}
} else {
int len = mDigits.length();