Move isServiceReady to ImsServiceProxyCompat

-- Move isServiceReady from ImsServiceProxy to its base class
   ImsServiceProxyCompat to use in ImsManager.

Test: Manual
Bug: 63920021
Change-Id: I0e136ffe8490a3ba985bfb5992c1ff2176e610fe
This commit is contained in:
Suresh Koleti
2017-11-03 18:29:25 +05:30
parent 01c9c0e4ba
commit 17898168a6
2 changed files with 13 additions and 13 deletions

View File

@@ -305,19 +305,6 @@ public class ImsServiceProxy extends ImsServiceProxyCompat implements IRcsFeatur
mStatusCallback = c;
}
/**
* @return Returns true if the ImsService is ready to take commands, false otherwise. If this
* method returns false, it doesn't mean that the Binder connection is not available (use
* {@link #isBinderReady()} to check that), but that the ImsService is not accepting commands
* at this time.
*
* For example, for DSDS devices, only one slot can be {@link ImsFeature#STATE_READY} to take
* commands at a time, so the other slot must stay at {@link ImsFeature#STATE_NOT_AVAILABLE}.
*/
public boolean isBinderReady() {
return isBinderAlive() && getFeatureStatus() == ImsFeature.STATE_READY;
}
@Override
public boolean isBinderAlive() {
return mIsAvailable && mBinder != null && mBinder.isBinderAlive();

View File

@@ -171,6 +171,19 @@ public class ImsServiceProxyCompat implements IMMTelFeature {
return mBinder != null && mBinder.isBinderAlive();
}
/**
* @return Returns true if the ImsService is ready to take commands, false otherwise. If this
* method returns false, it doesn't mean that the Binder connection is not available (use
* {@link #isBinderReady()} to check that), but that the ImsService is not accepting commands
* at this time.
*
* For example, for DSDS devices, only one slot can be {@link ImsFeature#STATE_READY} to take
* commands at a time, so the other slot must stay at {@link ImsFeature#STATE_NOT_AVAILABLE}.
*/
public boolean isBinderReady() {
return isBinderAlive() && getFeatureStatus() == ImsFeature.STATE_READY;
}
private IImsService getServiceInterface(IBinder b) {
return IImsService.Stub.asInterface(b);
}