[QNS] fix crash at registerSipDialogStateCallback
Bug: 333832154
Test: atest QualifiedNetworksServiceTests
Change-Id: I955a49b843159ea7b70371580cd8b193b971d1d2
diff --git a/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsImsManager.java b/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsImsManager.java
index cefcd5c..6a7c0c6 100644
--- a/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsImsManager.java
+++ b/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsImsManager.java
@@ -246,7 +246,7 @@
log("startTrackingImsRegistration: registered MMTEL registration callback");
mMmtelImsRegistrationCallback = imsRegistrationCallback;
} catch (ImsException e) {
- loge("startTrackingImsRegistration: couldn't register MMTEL callback, " + e);
+ loge("registerImsRegistrationCallback: couldn't register MMTEL callback, " + e);
}
}
@@ -281,6 +281,8 @@
mRcsSipDialogSessionStateCallback = rcsSipDialogStateCallback;
} catch (ImsException e) {
loge("startTrackingSipDialogSessionState: couldn't register callback, " + e);
+ } catch (UnsupportedOperationException e) {
+ loge("registerSipDialogStateCallback: couldn't register callback, " + e);
}
}
}
@@ -598,7 +600,9 @@
if (imsAvailable) {
startTrackingImsRegistration(imsFeature);
- startTrackingSipDialogSessionState(imsFeature);
+ if (imsFeature == ImsFeature.FEATURE_RCS) {
+ startTrackingSipDialogSessionState(imsFeature);
+ }
}
ImsState imsState = new ImsState(imsAvailable);