Fix, DeviceCapabilityListener does not try to register IMS registration callback.
When IImsFeatureStatusCallback#notifyImsFeatureStatus() calls with unavailable and ready within short time, the PublishControllerImpl's handler calls DeviceCapabilityListener#onRcsConnected and #onRcsDisconnected consecutively.
During this time the DeviceCapabilityListener keeps EVENT_UNREGISTER_IMS_CHANGE and EVENT_REGISTER_IMS_CONTENT_CHANGE messages in Q. When the DeviceCapabilityListener handles EVENT_UNREGISTER_IMS_CHANGE message, it removes EVENT_REGISTER_IMS_CONTENT_CHANGE from Q.
By deleting EVENT_REGISTER_IMS_CONTENT_CHANGE, the DeviceCapabilityListener does not try to register the IMS registration callback.
Bug: 287833083
Test: atest DeviceCapabilityListenerTest, RcsUceAdapterTest
Test: AT&T and TMO live network
Change-Id: I5010adfb3e1ce2880cb8f816f021c44257d9c521
diff --git a/src/java/com/android/ims/rcs/uce/presence/publish/DeviceCapabilityListener.java b/src/java/com/android/ims/rcs/uce/presence/publish/DeviceCapabilityListener.java
index b58f7ec..bc37205 100644
--- a/src/java/com/android/ims/rcs/uce/presence/publish/DeviceCapabilityListener.java
+++ b/src/java/com/android/ims/rcs/uce/presence/publish/DeviceCapabilityListener.java
@@ -343,9 +343,6 @@
private void unregisterImsProvisionCallback() {
logd("unregisterImsProvisionCallback");
- // Clear the registering IMS callback message from the handler thread
- mHandler.removeRegisterImsContentChangedMessage();
-
// Unregister mmtel callback
if (mImsMmTelManager != null) {
try {