Extract the full telephone number from the tel: URL.
Previously to extract the number from the dial intent data
we used the Uri class. This does not work very well be cause
dial string can contain character that are special in a Uri context.
For instance '#' in a dial string is a interpreted as a Uri fragment.
To work around that issue, we extract the dial string by flattening
the Uri into a string and skip the 'tel:' scheme.
Bug:2282423
diff --git a/src/com/android/contacts/TwelveKeyDialer.java b/src/com/android/contacts/TwelveKeyDialer.java
index cb0b06d..d28f01d 100644
--- a/src/com/android/contacts/TwelveKeyDialer.java
+++ b/src/com/android/contacts/TwelveKeyDialer.java
@@ -295,7 +295,7 @@
if (uri != null) {
if ("tel".equals(uri.getScheme())) {
// Put the requested number into the input area
- String data = uri.getSchemeSpecificPart();
+ String data = uri.toString().substring("tel:".length());
setFormattedDigits(data);
} else {
String type = intent.getType();