Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8c6d596 authored by Brad Ebinger's avatar Brad Ebinger
Browse files

Remove Session ID from ImsService APIs that are not used

1) Remove session ID from ImsService APIs that do not need them.
2) Change logging in ImsResolver to be less verbose.

Test: Manual
Change-Id: Ifaa3daf6d78ef5dae873b3c5e48be60a5cf79836
parent 43dd2bb7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -373,7 +373,7 @@ public class ImsResolver implements ImsServiceController.ImsServiceControllerCal
    // supported IMS features if they have changed.
    // Called from the handler ONLY
    private void maybeAddedImsService(String packageName) {
        Log.i(TAG, "maybeAddedImsService, packageName: " + packageName);
        Log.d(TAG, "maybeAddedImsService, packageName: " + packageName);
        List<ImsServiceInfo> infos = getImsServiceInfo(packageName);
        List<ImsServiceInfo> newlyAddedInfos = new ArrayList<>();
        for (ImsServiceInfo info : infos) {
+3 −3
Original line number Diff line number Diff line
@@ -402,7 +402,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
            mPhone.getContext().getContentResolver(),
            Settings.Secure.PREFERRED_TTY_MODE,
            Phone.TTY_MODE_OFF);
        mImsManager.setUiTTYMode(mPhone.getContext(), mServiceId, mPreferredTtyMode, null);
        mImsManager.setUiTTYMode(mPhone.getContext(), mPreferredTtyMode, null);

        ImsMultiEndpoint multiEndpoint = getMultiEndpointInterface();
        if (multiEndpoint != null) {
@@ -1035,7 +1035,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
        }

        try {
            mImsManager.setUiTTYMode(mPhone.getContext(), mServiceId, uiTtyMode, onComplete);
            mImsManager.setUiTTYMode(mPhone.getContext(), uiTtyMode, onComplete);
        } catch (ImsException e) {
            loge("setTTYMode : " + e);
            mPhone.sendErrorResponse(onComplete, e);
@@ -2291,7 +2291,7 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
            throw getImsManagerIsNullException();
        }

        ImsUtInterface ut = mImsManager.getSupplementaryServiceConfiguration(mServiceId);
        ImsUtInterface ut = mImsManager.getSupplementaryServiceConfiguration();
        return ut;
    }

+6 −7
Original line number Diff line number Diff line
@@ -106,10 +106,10 @@ public class ImsServiceTest {
    public void testCallMethodOnCreatedFeature() throws RemoteException {
        mTestImsServiceBinder.createImsFeature(TEST_SLOT_0, ImsFeature.MMTEL, mTestCallback);

        mTestImsServiceBinder.isConnected(TEST_SLOT_0, ImsFeature.MMTEL, 0 /*session id*/,
                0 /*callSessionType*/, 0 /*callType*/);
        mTestImsServiceBinder.isConnected(TEST_SLOT_0, ImsFeature.MMTEL, 0 /*callSessionType*/,
                0 /*callType*/);

        verify(mTestImsService.mMockMMTelFeature).isConnected(anyInt(), anyInt(), anyInt());
        verify(mTestImsService.mMockMMTelFeature).isConnected(anyInt(), anyInt());
    }

    @Test
@@ -117,10 +117,9 @@ public class ImsServiceTest {
    public void testCallMethodWithNoCreatedFeature() throws RemoteException {
        mTestImsServiceBinder.createImsFeature(TEST_SLOT_0, ImsFeature.MMTEL, mTestCallback);

        mTestImsServiceBinder.isConnected(TEST_SLOT_1, ImsFeature.MMTEL, 0 /*session id*/,
                0 /*callSessionType*/, 0 /*callType*/);
        mTestImsServiceBinder.isConnected(TEST_SLOT_1, ImsFeature.MMTEL, 0 /*callSessionType*/,
                0 /*callType*/);

        verify(mTestImsService.mMockMMTelFeature, never()).isConnected(anyInt(), anyInt(),
                anyInt());
        verify(mTestImsService.mMockMMTelFeature, never()).isConnected(anyInt(), anyInt());
    }
}
+14 −14
Original line number Diff line number Diff line
@@ -68,13 +68,13 @@ public class TestImsServiceControllerAdapter {
        }

        @Override
        public boolean isConnected(int slotId, int featureType, int sessionId, int callSessionType,
                int callType) throws RemoteException {
        public boolean isConnected(int slotId, int featureType, int callSessionType, int callType)
                throws RemoteException {
            return false;
        }

        @Override
        public boolean isOpened(int slotId, int featureType, int sessionId) throws RemoteException {
        public boolean isOpened(int slotId, int featureType) throws RemoteException {
            return false;
        }

@@ -84,13 +84,13 @@ public class TestImsServiceControllerAdapter {
        }

        @Override
        public void addRegistrationListener(int slotId, int featureType, int sessionId,
        public void addRegistrationListener(int slotId, int featureType,
                IImsRegistrationListener listener) throws RemoteException {

        }

        @Override
        public void removeRegistrationListener(int slotId, int featureType, int sessionId,
        public void removeRegistrationListener(int slotId, int featureType,
                IImsRegistrationListener listener) throws RemoteException {

        }
@@ -114,43 +114,43 @@ public class TestImsServiceControllerAdapter {
        }

        @Override
        public IImsUt getUtInterface(int slotId, int featureType, int sessionId)
        public IImsUt getUtInterface(int slotId, int featureType)
                throws RemoteException {
            return null;
        }

        @Override
        public IImsConfig getConfigInterface(int slotId, int featureType, int sessionId)
        public IImsConfig getConfigInterface(int slotId, int featureType)
                throws RemoteException {
            return null;
        }

        @Override
        public void turnOnIms(int slotId, int featureType, int sessionId)
        public void turnOnIms(int slotId, int featureType)
                throws RemoteException {

        }

        @Override
        public void turnOffIms(int slotId, int featureType, int sessionId) throws RemoteException {
        public void turnOffIms(int slotId, int featureType) throws RemoteException {

        }

        @Override
        public IImsEcbm getEcbmInterface(int slotId, int featureType, int sessionId)
        public IImsEcbm getEcbmInterface(int slotId, int featureType)
                throws RemoteException {
            return null;
        }

        @Override
        public void setUiTTYMode(int slotId, int featureType, int sessionId, int uiTtyMode,
                Message onComplete) throws RemoteException {
        public void setUiTTYMode(int slotId, int featureType, int uiTtyMode, Message onComplete)
                throws RemoteException {

        }

        @Override
        public IImsMultiEndpoint getMultiEndpointInterface(int slotId, int featureType,
                int sessionId) throws RemoteException {
        public IImsMultiEndpoint getMultiEndpointInterface(int slotId, int featureType)
                throws RemoteException {
            return null;
        }
    }