IMS: Check for binderstate before calling endSession

ImsRegistrationListenerProxy listener, which is registered
as part of ImsManager.open, is not cleared even after moving
feature state to NOT_AVAILABLE because end session
is never called.

Check for binder state instead of feature state READY before
calling end session. End session will be triggered after
moving feature state to NOT_AVAILABLE.

Notify Ims state change only for the supported feature state
change to clients.

Test: Manual
Bug: 62816014
Merged-In: Idfb6dfad51cca574c2ae25e2029ef7bdfe9d725b
Change-Id: Idfb6dfad51cca574c2ae25e2029ef7bdfe9d725b
(cherry picked from commit 913e11fcdf)
This commit is contained in:
Brad Ebinger
2017-06-27 17:08:55 +00:00
parent bf15050a0c
commit ce07d61ce7

View File

@@ -90,11 +90,11 @@ public class ImsServiceProxy extends ImsServiceProxyCompat implements IRcsFeatur
" status: " + status);
if (mSlotId == slotId && feature == mSupportedFeature) {
mFeatureStatusCached = status;
if (mStatusCallback != null) {
mStatusCallback.notifyStatusChanged();
}
}
}
if (mStatusCallback != null) {
mStatusCallback.notifyStatusChanged();
}
}
};
@@ -129,7 +129,9 @@ public class ImsServiceProxy extends ImsServiceProxyCompat implements IRcsFeatur
@Override
public void endSession(int sessionId) throws RemoteException {
synchronized (mLock) {
checkServiceIsReady();
// Only check to make sure the binder connection still exists. This method should
// still be able to be called when the state is STATE_NOT_AVAILABLE.
checkBinderConnection();
getServiceInterface(mBinder).endSession(mSlotId, mSupportedFeature, sessionId);
}
}