diff options
author | kaiyiz <kaiyiz@codeaurora.org> | 2014-10-14 09:27:18 +0800 |
---|---|---|
committer | Matt Garnes <matt@cyngn.com> | 2014-11-13 17:48:11 -0800 |
commit | 4e699d29fde8565406c7ba5ed47288a7df200d9e (patch) | |
tree | 23fe146a8aa460023fb36b935b37aedbb9de410e /src | |
parent | e52bb2ee4530f283f90c68b52092bd6c739ac031 (diff) | |
download | android_packages_apps_Dialer-4e699d29fde8565406c7ba5ed47288a7df200d9e.tar.gz android_packages_apps_Dialer-4e699d29fde8565406c7ba5ed47288a7df200d9e.tar.bz2 android_packages_apps_Dialer-4e699d29fde8565406c7ba5ed47288a7df200d9e.zip |
Dialer: Start VoiceMail interface directly when click voice mail
Start SelectSubscription when click voicemail in SpeedDialListActivity.
Make an intent to start CallFeaturesSetting add a sub to decide
which sim card's setting to start.
CRs-Fixed: 731532
Change-Id: Ie5daf6e2c30580aaf9e74d274ee24dcf38092615
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/SpeedDialListActivity.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/dialer/SpeedDialListActivity.java b/src/com/android/dialer/SpeedDialListActivity.java index 83c9852ae..01376b3da 100644 --- a/src/com/android/dialer/SpeedDialListActivity.java +++ b/src/com/android/dialer/SpeedDialListActivity.java @@ -44,6 +44,8 @@ import android.provider.ContactsContract.Contacts.Data; import android.provider.ContactsContract.RawContacts; import android.provider.Settings; import android.provider.Settings.SettingNotFoundException; +import android.telephony.SubscriptionManager; +import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.Log; import android.view.ContextMenu; @@ -57,6 +59,8 @@ import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.Toast; +import static com.android.internal.telephony.PhoneConstants.SUBSCRIPTION_KEY; + public class SpeedDialListActivity extends ListActivity implements OnItemClickListener, OnCreateContextMenuListener { @@ -162,6 +166,15 @@ public class SpeedDialListActivity extends ListActivity // TODO Auto-generated method stub if (position == 0) { Intent intent = new Intent(ACTION_ADD_VOICEMAIL); + if (TelephonyManager.getDefault().getPhoneCount() > 1) { + long sub = SubscriptionManager.getDefaultVoiceSubId(); + intent.setClassName("com.android.phone", + "com.android.phone.MSimCallFeaturesSubSetting"); + intent.putExtra(SUBSCRIPTION_KEY, sub); + } else { + intent.setClassName("com.android.phone", + "com.android.phone.CallFeaturesSetting"); + } try { startActivity(intent); } catch(ActivityNotFoundException e) { |