Loading telephony/java/android/telephony/ims/feature/MmTelFeature.java +42 −37 Original line number Diff line number Diff line Loading @@ -430,7 +430,6 @@ public class MmTelFeature extends ImsFeature { /** * @param listener A {@link Listener} used when the MmTelFeature receives an incoming call and * notifies the framework. * @hide */ private void setListener(IImsMmTelListener listener) { synchronized (mLock) { Loading @@ -441,6 +440,16 @@ public class MmTelFeature extends ImsFeature { } } /** * @return the listener associated with this MmTelFeature. May be null if it has not been set * by the framework yet. */ private IImsMmTelListener getListener() { synchronized (mLock) { return mListener; } } /** * The current capability status that this MmTelFeature has defined is available. This * configuration will be used by the platform to figure out which capabilities are CURRENTLY Loading Loading @@ -489,17 +498,16 @@ public class MmTelFeature extends ImsFeature { throw new IllegalArgumentException("ImsCallSessionImplBase and Bundle can not be " + "null."); } synchronized (mLock) { if (mListener == null) { IImsMmTelListener listener = getListener(); if (listener == null) { throw new IllegalStateException("Session is not available."); } try { mListener.onIncomingCall(c.getServiceImpl(), extras); listener.onIncomingCall(c.getServiceImpl(), extras); } catch (RemoteException e) { throw new RuntimeException(e); } } } /** * Notify the framework that a call has been implicitly rejected by this MmTelFeature Loading @@ -516,34 +524,32 @@ public class MmTelFeature extends ImsFeature { throw new IllegalArgumentException("ImsCallProfile and ImsReasonInfo must not be " + "null."); } synchronized (mLock) { if (mListener == null) { IImsMmTelListener listener = getListener(); if (listener == null) { throw new IllegalStateException("Session is not available."); } try { mListener.onRejectedCall(callProfile, reason); listener.onRejectedCall(callProfile, reason); } catch (RemoteException e) { throw new RuntimeException(e); } } } /** * * @hide */ public final void notifyIncomingCallSession(IImsCallSession c, Bundle extras) { synchronized (mLock) { if (mListener == null) { IImsMmTelListener listener = getListener(); if (listener == null) { throw new IllegalStateException("Session is not available."); } try { mListener.onIncomingCall(c, extras); listener.onIncomingCall(c, extras); } catch (RemoteException e) { throw new RuntimeException(e); } } } /** * Notify the framework of a change in the Voice Message count. Loading @@ -552,17 +558,16 @@ public class MmTelFeature extends ImsFeature { */ @SystemApi @TestApi public final void notifyVoiceMessageCountUpdate(int count) { synchronized (mLock) { if (mListener == null) { IImsMmTelListener listener = getListener(); if (listener == null) { throw new IllegalStateException("Session is not available."); } try { mListener.onVoiceMessageCountUpdate(count); listener.onVoiceMessageCountUpdate(count); } catch (RemoteException e) { throw new RuntimeException(e); } } } /** * Provides the MmTelFeature with the ability to return the framework Capability Configuration Loading Loading
telephony/java/android/telephony/ims/feature/MmTelFeature.java +42 −37 Original line number Diff line number Diff line Loading @@ -430,7 +430,6 @@ public class MmTelFeature extends ImsFeature { /** * @param listener A {@link Listener} used when the MmTelFeature receives an incoming call and * notifies the framework. * @hide */ private void setListener(IImsMmTelListener listener) { synchronized (mLock) { Loading @@ -441,6 +440,16 @@ public class MmTelFeature extends ImsFeature { } } /** * @return the listener associated with this MmTelFeature. May be null if it has not been set * by the framework yet. */ private IImsMmTelListener getListener() { synchronized (mLock) { return mListener; } } /** * The current capability status that this MmTelFeature has defined is available. This * configuration will be used by the platform to figure out which capabilities are CURRENTLY Loading Loading @@ -489,17 +498,16 @@ public class MmTelFeature extends ImsFeature { throw new IllegalArgumentException("ImsCallSessionImplBase and Bundle can not be " + "null."); } synchronized (mLock) { if (mListener == null) { IImsMmTelListener listener = getListener(); if (listener == null) { throw new IllegalStateException("Session is not available."); } try { mListener.onIncomingCall(c.getServiceImpl(), extras); listener.onIncomingCall(c.getServiceImpl(), extras); } catch (RemoteException e) { throw new RuntimeException(e); } } } /** * Notify the framework that a call has been implicitly rejected by this MmTelFeature Loading @@ -516,34 +524,32 @@ public class MmTelFeature extends ImsFeature { throw new IllegalArgumentException("ImsCallProfile and ImsReasonInfo must not be " + "null."); } synchronized (mLock) { if (mListener == null) { IImsMmTelListener listener = getListener(); if (listener == null) { throw new IllegalStateException("Session is not available."); } try { mListener.onRejectedCall(callProfile, reason); listener.onRejectedCall(callProfile, reason); } catch (RemoteException e) { throw new RuntimeException(e); } } } /** * * @hide */ public final void notifyIncomingCallSession(IImsCallSession c, Bundle extras) { synchronized (mLock) { if (mListener == null) { IImsMmTelListener listener = getListener(); if (listener == null) { throw new IllegalStateException("Session is not available."); } try { mListener.onIncomingCall(c, extras); listener.onIncomingCall(c, extras); } catch (RemoteException e) { throw new RuntimeException(e); } } } /** * Notify the framework of a change in the Voice Message count. Loading @@ -552,17 +558,16 @@ public class MmTelFeature extends ImsFeature { */ @SystemApi @TestApi public final void notifyVoiceMessageCountUpdate(int count) { synchronized (mLock) { if (mListener == null) { IImsMmTelListener listener = getListener(); if (listener == null) { throw new IllegalStateException("Session is not available."); } try { mListener.onVoiceMessageCountUpdate(count); listener.onVoiceMessageCountUpdate(count); } catch (RemoteException e) { throw new RuntimeException(e); } } } /** * Provides the MmTelFeature with the ability to return the framework Capability Configuration Loading