Loading src/java/com/android/ims/ImsManager.java +23 −1 Original line number Diff line number Diff line Loading @@ -2213,6 +2213,28 @@ public class ImsManager { } } /** * Determines whether or not a call with the specified numbers should be placed over IMS or over * CSFB. * @param isEmergency is at least one call an emergency number. * @param numbers A {@link String} array containing the numbers in the call being placed. Can * be multiple numbers in the case of dialing out a conference. * @return The result of the query, one of the following values: * - {@link MmTelFeature#PROCESS_CALL_IMS} * - {@link MmTelFeature#PROCESS_CALL_CSFB} * @throws ImsException if the ImsService is not available. In this case, we should fall back * to CSFB anyway. */ public @MmTelFeature.ProcessCallResult int shouldProcessCall(boolean isEmergency, String[] numbers) throws ImsException { try { return mMmTelFeatureConnection.shouldProcessCall(isEmergency, numbers); } catch (RemoteException e) { throw new ImsException("shouldProcessCall()", e, ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN); } } /** * Gets the Multi-Endpoint interface to subscribe to multi-enpoint notifications.. * Loading src/java/com/android/ims/MmTelFeatureConnection.java +18 −0 Original line number Diff line number Diff line Loading @@ -351,6 +351,11 @@ public class MmTelFeatureConnection { return tm != null ? tm.getImsConfig(mSlotId, ImsFeature.FEATURE_MMTEL) : null; } public boolean isEmergencyMmTelAvailable() { TelephonyManager tm = getTelephonyManager(mContext); return tm != null ? tm.isEmergencyMmTelAvailable(mSlotId) : false; } public IImsServiceFeatureCallback getListener() { return mListenerBinder; } Loading Loading @@ -540,6 +545,19 @@ public class MmTelFeatureConnection { } } public @MmTelFeature.ProcessCallResult int shouldProcessCall(boolean isEmergency, String[] numbers) throws RemoteException { if (isEmergency && !isEmergencyMmTelAvailable()) { // Don't query the ImsService if emergency calling is not available on the ImsService. Log.i(TAG, "MmTel does not support emergency over IMS, fallback to CS."); return MmTelFeature.PROCESS_CALL_CSFB; } synchronized (mLock) { checkServiceIsReady(); return getServiceInterface(mBinder).shouldProcessCall(numbers); } } /** * @return an integer describing the current Feature Status, defined in * {@link ImsFeature.ImsState}. Loading Loading
src/java/com/android/ims/ImsManager.java +23 −1 Original line number Diff line number Diff line Loading @@ -2213,6 +2213,28 @@ public class ImsManager { } } /** * Determines whether or not a call with the specified numbers should be placed over IMS or over * CSFB. * @param isEmergency is at least one call an emergency number. * @param numbers A {@link String} array containing the numbers in the call being placed. Can * be multiple numbers in the case of dialing out a conference. * @return The result of the query, one of the following values: * - {@link MmTelFeature#PROCESS_CALL_IMS} * - {@link MmTelFeature#PROCESS_CALL_CSFB} * @throws ImsException if the ImsService is not available. In this case, we should fall back * to CSFB anyway. */ public @MmTelFeature.ProcessCallResult int shouldProcessCall(boolean isEmergency, String[] numbers) throws ImsException { try { return mMmTelFeatureConnection.shouldProcessCall(isEmergency, numbers); } catch (RemoteException e) { throw new ImsException("shouldProcessCall()", e, ImsReasonInfo.CODE_LOCAL_IMS_SERVICE_DOWN); } } /** * Gets the Multi-Endpoint interface to subscribe to multi-enpoint notifications.. * Loading
src/java/com/android/ims/MmTelFeatureConnection.java +18 −0 Original line number Diff line number Diff line Loading @@ -351,6 +351,11 @@ public class MmTelFeatureConnection { return tm != null ? tm.getImsConfig(mSlotId, ImsFeature.FEATURE_MMTEL) : null; } public boolean isEmergencyMmTelAvailable() { TelephonyManager tm = getTelephonyManager(mContext); return tm != null ? tm.isEmergencyMmTelAvailable(mSlotId) : false; } public IImsServiceFeatureCallback getListener() { return mListenerBinder; } Loading Loading @@ -540,6 +545,19 @@ public class MmTelFeatureConnection { } } public @MmTelFeature.ProcessCallResult int shouldProcessCall(boolean isEmergency, String[] numbers) throws RemoteException { if (isEmergency && !isEmergencyMmTelAvailable()) { // Don't query the ImsService if emergency calling is not available on the ImsService. Log.i(TAG, "MmTel does not support emergency over IMS, fallback to CS."); return MmTelFeature.PROCESS_CALL_CSFB; } synchronized (mLock) { checkServiceIsReady(); return getServiceInterface(mBinder).shouldProcessCall(numbers); } } /** * @return an integer describing the current Feature Status, defined in * {@link ImsFeature.ImsState}. Loading