summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Benergy Meenan Ravuri <bravuri@codeaurora.org> 2017-06-20 17:00:42 +0530
committer Brad Ebinger <breadley@google.com> 2017-06-26 23:29:22 +0000
commitbed4d19db5b774609e61ef550d5655b9e3a607fe (patch)
tree6678c3a94d49e14940140b9825a6a726f4f8a885
parent51ee00785c070edb4609ec5496e690a9f4ebc871 (diff)
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 Change-Id: I1bb588ce2be9c181355ff744f43dad4e784e4ec5
-rw-r--r--telephony/java/android/telephony/ims/ImsServiceProxy.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/telephony/java/android/telephony/ims/ImsServiceProxy.java b/telephony/java/android/telephony/ims/ImsServiceProxy.java
index a75cd86dcf07..038e295d8822 100644
--- a/telephony/java/android/telephony/ims/ImsServiceProxy.java
+++ b/telephony/java/android/telephony/ims/ImsServiceProxy.java
@@ -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);
}
}