/** * Get the phone number that raised this activity. * * @return The phone number we are trying to call with this activity */ public String getPhoneNumber() { if (phoneNumber == null) { Intent it = getIntent(); // Use utility function to extract number phoneNumber = UriUtils.extractNumberFromIntent(it, this); // Additional check to know if a csip uri (so that no rewriting rules applies) if (phoneNumber != null) { String action = it.getAction(); Uri data = it.getData(); if (!Intent.ACTION_SENDTO.equalsIgnoreCase(action) && data != null) { String scheme = data.getScheme(); if (scheme != null) { scheme = scheme.toLowerCase(); } if (SCHEME_CSIP.equals(scheme)) { ignoreRewritingRules = true; } } } // Still null ... well make it empty. if (phoneNumber == null) { phoneNumber = ""; } return phoneNumber; } return phoneNumber; }