Loading src/java/com/android/internal/telephony/SubscriptionController.java +0 −20 Original line number Diff line number Diff line Loading @@ -3755,26 +3755,6 @@ public class SubscriptionController extends ISub.Stub { return true; } // TODO: This method should belong to Telephony manager like other data enabled settings and // override APIs. Remove this once TelephonyManager API is added. @Override public boolean setAlwaysAllowMmsData(int subId, boolean alwaysAllow) { if (DBG) logd("[setAlwaysAllowMmsData]+ alwaysAllow:" + alwaysAllow + " subId:" + subId); enforceModifyPhoneState("setAlwaysAllowMmsData"); // Now that all security checks passes, perform the operation as ourselves. final long identity = Binder.clearCallingIdentity(); try { validateSubId(subId); Phone phone = PhoneFactory.getPhone(getPhoneId(subId)); if (phone == null) return false; return phone.getDataEnabledSettings().setAlwaysAllowMmsData(alwaysAllow); } finally { Binder.restoreCallingIdentity(identity); } } /** * Set allowing mobile data during voice call. * Loading tests/telephonytests/src/com/android/internal/telephony/SubscriptionControllerTest.java +0 −13 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.atLeast; import static org.mockito.Mockito.clearInvocations; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.eq; import static org.mockito.Mockito.times; Loading Loading @@ -1069,18 +1068,6 @@ public class SubscriptionControllerTest extends TelephonyTest { UiccSlotInfo.CARD_STATE_INFO_PRESENT, logicalSlotIndex, true, true); } // TODO: Move this test once SubscriptionManager.setAlwaysAllowMmsData is moved to telephony // manager. @Test @SmallTest public void testSetAlwaysAllowMmsData() throws Exception { mSubscriptionControllerUT.setAlwaysAllowMmsData(0, true); verify(mDataEnabledSettings).setAlwaysAllowMmsData(eq(true)); clearInvocations(mDataEnabledSettings); mSubscriptionControllerUT.setAlwaysAllowMmsData(0, false); verify(mDataEnabledSettings).setAlwaysAllowMmsData(eq(false)); } @Test @SmallTest public void testNameSourcePriority() throws Exception { Loading Loading
src/java/com/android/internal/telephony/SubscriptionController.java +0 −20 Original line number Diff line number Diff line Loading @@ -3755,26 +3755,6 @@ public class SubscriptionController extends ISub.Stub { return true; } // TODO: This method should belong to Telephony manager like other data enabled settings and // override APIs. Remove this once TelephonyManager API is added. @Override public boolean setAlwaysAllowMmsData(int subId, boolean alwaysAllow) { if (DBG) logd("[setAlwaysAllowMmsData]+ alwaysAllow:" + alwaysAllow + " subId:" + subId); enforceModifyPhoneState("setAlwaysAllowMmsData"); // Now that all security checks passes, perform the operation as ourselves. final long identity = Binder.clearCallingIdentity(); try { validateSubId(subId); Phone phone = PhoneFactory.getPhone(getPhoneId(subId)); if (phone == null) return false; return phone.getDataEnabledSettings().setAlwaysAllowMmsData(alwaysAllow); } finally { Binder.restoreCallingIdentity(identity); } } /** * Set allowing mobile data during voice call. * Loading
tests/telephonytests/src/com/android/internal/telephony/SubscriptionControllerTest.java +0 −13 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.atLeast; import static org.mockito.Mockito.clearInvocations; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.eq; import static org.mockito.Mockito.times; Loading Loading @@ -1069,18 +1068,6 @@ public class SubscriptionControllerTest extends TelephonyTest { UiccSlotInfo.CARD_STATE_INFO_PRESENT, logicalSlotIndex, true, true); } // TODO: Move this test once SubscriptionManager.setAlwaysAllowMmsData is moved to telephony // manager. @Test @SmallTest public void testSetAlwaysAllowMmsData() throws Exception { mSubscriptionControllerUT.setAlwaysAllowMmsData(0, true); verify(mDataEnabledSettings).setAlwaysAllowMmsData(eq(true)); clearInvocations(mDataEnabledSettings); mSubscriptionControllerUT.setAlwaysAllowMmsData(0, false); verify(mDataEnabledSettings).setAlwaysAllowMmsData(eq(false)); } @Test @SmallTest public void testNameSourcePriority() throws Exception { Loading