From bf900241b71a4a594ce989bf0d18ada1d5fadb56 Mon Sep 17 00:00:00 2001 From: twyen Date: Fri, 8 Sep 2017 11:10:16 -0700 Subject: Send PhoneAccountHandle with ACTION_CONFIGURE_VOICEMAIL When opening a voicemail setting from Dialer with ACTION_CONFIGURE_VOICEMAIL, no subId is passed. So on a multi-SIM device, it is always configuration on the default phone regardless of SIM. To solve this, set the PhoneAccountHandle to intent extra for ACTION_CONFIGURE_VOICEMAIL. In the advanced settings, obtains subId from the PhoneAccountHandle. Test: manual - Checked that correct PhoneAccountHandle will be passed with ACTION_CONFIGURE_VOICEMAIL intent Bug: 65001008 Author: xuegang.x.liu Bug: 65001008 Test: manual - Checked that correct PhoneAccountHandle will be passed PiperOrigin-RevId: 168019873 Change-Id: I8578dd2c4ac24e4af121a90b2b175baae2832461 --- java/com/android/voicemail/stub/StubVoicemailClient.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'java/com/android/voicemail/stub') diff --git a/java/com/android/voicemail/stub/StubVoicemailClient.java b/java/com/android/voicemail/stub/StubVoicemailClient.java index 992950340..c2c7a6d38 100644 --- a/java/com/android/voicemail/stub/StubVoicemailClient.java +++ b/java/com/android/voicemail/stub/StubVoicemailClient.java @@ -77,7 +77,9 @@ public final class StubVoicemailClient implements VoicemailClient { @Override public Intent getSetPinIntent(Context context, PhoneAccountHandle phoneAccountHandle) { - return new Intent(TelephonyManager.ACTION_CONFIGURE_VOICEMAIL); + Intent intent = new Intent(TelephonyManager.ACTION_CONFIGURE_VOICEMAIL); + intent.putExtra(TelephonyManager.EXTRA_PHONE_ACCOUNT_HANDLE, phoneAccountHandle); + return intent; } @Override -- cgit v1.2.3