Loading src/java/com/android/ims/ImsManager.java +21 −4 Original line number Diff line number Diff line Loading @@ -340,11 +340,20 @@ public class ImsManager { private void notifyReady() throws ImsException { ImsManager manager; synchronized (mLock) { mRetryCount = 0; manager = mImsManager; } try { mListener.connectionReady(manager); } catch (ImsException e) { Log.w(TAG, "Connector: notifyReady exception: " + e.getMessage()); throw e; } // Only reset retry count if connectionReady does not generate an ImsException/ synchronized (mLock) { mRetryCount = 0; } } private void notifyNotReady() { mListener.connectionUnavailable(); Loading Loading @@ -1422,10 +1431,18 @@ public class ImsManager { } /* * Returns a flag indicating whether the IMS service is available. If it is not available, * it will try to connect before reporting failure. * Returns a flag indicating whether the IMS service is available. If it is not available or * busy, it will try to connect before reporting failure. */ public boolean isServiceAvailable() { // If we are busy resolving dynamic IMS bindings, we are not available yet. TelephonyManager tm = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); if (tm.isResolvingImsBinding()) { Log.d(TAG, "isServiceAvailable: resolving IMS binding, returning false"); return false; } connectIfServiceIsAvailable(); // mImsServiceProxy will always create an ImsServiceProxy. return mMmTelFeatureConnection.isBinderAlive(); Loading Loading
src/java/com/android/ims/ImsManager.java +21 −4 Original line number Diff line number Diff line Loading @@ -340,11 +340,20 @@ public class ImsManager { private void notifyReady() throws ImsException { ImsManager manager; synchronized (mLock) { mRetryCount = 0; manager = mImsManager; } try { mListener.connectionReady(manager); } catch (ImsException e) { Log.w(TAG, "Connector: notifyReady exception: " + e.getMessage()); throw e; } // Only reset retry count if connectionReady does not generate an ImsException/ synchronized (mLock) { mRetryCount = 0; } } private void notifyNotReady() { mListener.connectionUnavailable(); Loading Loading @@ -1422,10 +1431,18 @@ public class ImsManager { } /* * Returns a flag indicating whether the IMS service is available. If it is not available, * it will try to connect before reporting failure. * Returns a flag indicating whether the IMS service is available. If it is not available or * busy, it will try to connect before reporting failure. */ public boolean isServiceAvailable() { // If we are busy resolving dynamic IMS bindings, we are not available yet. TelephonyManager tm = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); if (tm.isResolvingImsBinding()) { Log.d(TAG, "isServiceAvailable: resolving IMS binding, returning false"); return false; } connectIfServiceIsAvailable(); // mImsServiceProxy will always create an ImsServiceProxy. return mMmTelFeatureConnection.isBinderAlive(); Loading