diff options
author | Jay Shrauner <shrauner@google.com> | 2014-09-06 10:09:24 -0700 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2014-09-06 10:18:46 -0700 |
commit | ae274c05cdb6707ca9593bedf20c016cd8164c0b (patch) | |
tree | 3e83d94e6b5647f0297c5047d2d7697626e0dcef /src/com/android/dialer/dialpad/DialpadFragment.java | |
parent | 8be85c826eb66dfd6f48b7fb79286f699d47e1cb (diff) |
Use framework scheme definitions
Use PhoneAccount defined values for SCHEME_{TEL, SIP, VOICEMAIL}.
Bug:17398074
Change-Id: I77dfa539646b9c5ae5dca220bbc906048a17b383
Diffstat (limited to 'src/com/android/dialer/dialpad/DialpadFragment.java')
-rw-r--r-- | src/com/android/dialer/dialpad/DialpadFragment.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index 7e9cc8913..169b9f3c4 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -37,6 +37,7 @@ import android.provider.Contacts.People; import android.provider.Contacts.Phones; import android.provider.Contacts.PhonesColumns; import android.provider.Settings; +import android.telecomm.PhoneAccount; import android.telecomm.TelecommManager; import android.telephony.PhoneNumberUtils; import android.telephony.PhoneStateListener; @@ -67,6 +68,7 @@ import android.widget.RelativeLayout; import android.widget.TextView; import com.android.contacts.common.CallUtil; +import com.android.contacts.common.ContactsUtils; import com.android.contacts.common.GeoUtil; import com.android.contacts.common.util.PhoneNumberFormatter; import com.android.contacts.common.util.StopWatch; @@ -258,7 +260,7 @@ public class DialpadFragment extends AnalyticsFragment * Return an Intent for launching voicemail screen. */ private static Intent getVoicemailIntent() { - return CallUtil.getCallIntent(Uri.fromParts("voicemail", "", null)); + return CallUtil.getCallIntent(Uri.fromParts(PhoneAccount.SCHEME_VOICEMAIL, "", null)); } private TelephonyManager getTelephonyManager() { @@ -415,7 +417,7 @@ public class DialpadFragment extends AnalyticsFragment if (Intent.ACTION_DIAL.equals(action) || Intent.ACTION_VIEW.equals(action)) { Uri uri = intent.getData(); if (uri != null) { - if (CallUtil.SCHEME_TEL.equals(uri.getScheme())) { + if (PhoneAccount.SCHEME_TEL.equals(uri.getScheme())) { // Put the requested number into the input area String data = uri.getSchemeSpecificPart(); // Remember it is filled via Intent. @@ -1431,7 +1433,7 @@ public class DialpadFragment extends AnalyticsFragment case R.id.menu_send_message: { final CharSequence digits = mDigits.getText(); final Intent smsIntent = new Intent(Intent.ACTION_SENDTO, - Uri.fromParts(CallUtil.SCHEME_SMSTO, digits.toString(), null)); + Uri.fromParts(ContactsUtils.SCHEME_SMSTO, digits.toString(), null)); smsIntent.setComponent(mSmsPackageComponentName); DialerUtils.startActivityWithErrorToast(getActivity(), smsIntent); return true; |