Loading src/java/com/android/internal/telephony/DefaultPhoneNotifier.java +2 −2 Original line number Diff line number Diff line Loading @@ -160,7 +160,7 @@ public class DefaultPhoneNotifier implements PhoneNotifier { } public void notifyDisconnectCause(Phone sender, int cause, int preciseCause) { mTelephonyRegistryMgr.notifyDisconnectCause(sender.getSubId(), sender.getPhoneId(), cause, mTelephonyRegistryMgr.notifyDisconnectCause(sender.getPhoneId(), sender.getSubId(), cause, preciseCause); } Loading tests/telephonytests/src/com/android/internal/telephony/DefaultPhoneNotifierTest.java +8 −6 Original line number Diff line number Diff line Loading @@ -46,6 +46,8 @@ import java.util.Collections; import java.util.List; public class DefaultPhoneNotifierTest extends TelephonyTest { private static final int PHONE_ID = 1; private static final int SUB_ID = 0; private DefaultPhoneNotifier mDefaultPhoneNotifierUT; @Mock Loading Loading @@ -152,17 +154,17 @@ public class DefaultPhoneNotifierTest extends TelephonyTest { @Test @SmallTest public void testNotifyDisconnectCause() throws Exception { doReturn(1).when(mPhone).getPhoneId(); doReturn(0).when(mPhone).getSubId(); doReturn(PHONE_ID).when(mPhone).getPhoneId(); doReturn(SUB_ID).when(mPhone).getSubId(); mDefaultPhoneNotifierUT.notifyDisconnectCause(mPhone, DisconnectCause.NOT_VALID, PreciseDisconnectCause.FDN_BLOCKED); verify(mTelephonyRegistryManager).notifyDisconnectCause(0, 1, DisconnectCause.NOT_VALID, PreciseDisconnectCause.FDN_BLOCKED); verify(mTelephonyRegistryManager).notifyDisconnectCause(PHONE_ID, SUB_ID, DisconnectCause.NOT_VALID, PreciseDisconnectCause.FDN_BLOCKED); mDefaultPhoneNotifierUT.notifyDisconnectCause(mPhone, DisconnectCause.LOCAL, PreciseDisconnectCause.CHANNEL_NOT_AVAIL); verify(mTelephonyRegistryManager).notifyDisconnectCause(0, 1, DisconnectCause.LOCAL, PreciseDisconnectCause.CHANNEL_NOT_AVAIL); verify(mTelephonyRegistryManager).notifyDisconnectCause(PHONE_ID, SUB_ID, DisconnectCause.LOCAL, PreciseDisconnectCause.CHANNEL_NOT_AVAIL); } @Test @SmallTest Loading Loading
src/java/com/android/internal/telephony/DefaultPhoneNotifier.java +2 −2 Original line number Diff line number Diff line Loading @@ -160,7 +160,7 @@ public class DefaultPhoneNotifier implements PhoneNotifier { } public void notifyDisconnectCause(Phone sender, int cause, int preciseCause) { mTelephonyRegistryMgr.notifyDisconnectCause(sender.getSubId(), sender.getPhoneId(), cause, mTelephonyRegistryMgr.notifyDisconnectCause(sender.getPhoneId(), sender.getSubId(), cause, preciseCause); } Loading
tests/telephonytests/src/com/android/internal/telephony/DefaultPhoneNotifierTest.java +8 −6 Original line number Diff line number Diff line Loading @@ -46,6 +46,8 @@ import java.util.Collections; import java.util.List; public class DefaultPhoneNotifierTest extends TelephonyTest { private static final int PHONE_ID = 1; private static final int SUB_ID = 0; private DefaultPhoneNotifier mDefaultPhoneNotifierUT; @Mock Loading Loading @@ -152,17 +154,17 @@ public class DefaultPhoneNotifierTest extends TelephonyTest { @Test @SmallTest public void testNotifyDisconnectCause() throws Exception { doReturn(1).when(mPhone).getPhoneId(); doReturn(0).when(mPhone).getSubId(); doReturn(PHONE_ID).when(mPhone).getPhoneId(); doReturn(SUB_ID).when(mPhone).getSubId(); mDefaultPhoneNotifierUT.notifyDisconnectCause(mPhone, DisconnectCause.NOT_VALID, PreciseDisconnectCause.FDN_BLOCKED); verify(mTelephonyRegistryManager).notifyDisconnectCause(0, 1, DisconnectCause.NOT_VALID, PreciseDisconnectCause.FDN_BLOCKED); verify(mTelephonyRegistryManager).notifyDisconnectCause(PHONE_ID, SUB_ID, DisconnectCause.NOT_VALID, PreciseDisconnectCause.FDN_BLOCKED); mDefaultPhoneNotifierUT.notifyDisconnectCause(mPhone, DisconnectCause.LOCAL, PreciseDisconnectCause.CHANNEL_NOT_AVAIL); verify(mTelephonyRegistryManager).notifyDisconnectCause(0, 1, DisconnectCause.LOCAL, PreciseDisconnectCause.CHANNEL_NOT_AVAIL); verify(mTelephonyRegistryManager).notifyDisconnectCause(PHONE_ID, SUB_ID, DisconnectCause.LOCAL, PreciseDisconnectCause.CHANNEL_NOT_AVAIL); } @Test @SmallTest Loading