Fix CTS failed because the device state cannot be reset and it cuase the following test case fail

Bug: 191064593
Test: atest ImsServiceTest; RcsUceAdapterTest
Change-Id: I9ea631f335532de8364c2f4955c6f65da8b52695
diff --git a/src/com/android/phone/ImsRcsController.java b/src/com/android/phone/ImsRcsController.java
index 64e93a5..1a495de 100644
--- a/src/com/android/phone/ImsRcsController.java
+++ b/src/com/android/phone/ImsRcsController.java
@@ -435,7 +435,7 @@
     // Used for SHELL command only right now.
     public boolean removeUceRequestDisallowedStatus(int subId) throws ImsException {
         try {
-            UceControllerManager uceCtrlManager = getRcsFeatureController(subId).getFeature(
+            UceControllerManager uceCtrlManager = getRcsFeatureController(subId, true).getFeature(
                     UceControllerManager.class);
             if (uceCtrlManager == null) {
                 return false;
@@ -452,7 +452,7 @@
     // Used for SHELL command only right now.
     public boolean setCapabilitiesRequestTimeout(int subId, long timeoutAfter) throws ImsException {
         try {
-            UceControllerManager uceCtrlManager = getRcsFeatureController(subId).getFeature(
+            UceControllerManager uceCtrlManager = getRcsFeatureController(subId, true).getFeature(
                     UceControllerManager.class);
             if (uceCtrlManager == null) {
                 return false;
@@ -730,6 +730,18 @@
      * @throws ServiceSpecificException if getting RcsFeatureManager instance failed.
      */
     private RcsFeatureController getRcsFeatureController(int subId) {
+        return getRcsFeatureController(subId, false /* skipVerifyingConfig */);
+    }
+
+    /**
+     * Retrieve RcsFeatureManager instance.
+     *
+     * @param subId the subscription ID
+     * @param skipVerifyingConfig If the RCS configuration can be skip.
+     * @return The RcsFeatureManager instance
+     * @throws ServiceSpecificException if getting RcsFeatureManager instance failed.
+     */
+    private RcsFeatureController getRcsFeatureController(int subId, boolean skipVerifyingConfig) {
         if (!ImsManager.isImsSupportedOnDevice(mApp)) {
             throw new ServiceSpecificException(ImsException.CODE_ERROR_UNSUPPORTED_OPERATION,
                     "IMS is not available on device.");
@@ -744,7 +756,9 @@
                     "Invalid subscription Id: " + subId);
         }
         int slotId = phone.getPhoneId();
-        verifyImsRcsConfiguredOrThrow(slotId);
+        if (!skipVerifyingConfig) {
+            verifyImsRcsConfiguredOrThrow(slotId);
+        }
         RcsFeatureController c = mRcsService.getFeatureController(slotId);
         if (c == null) {
             throw new ServiceSpecificException(ImsException.CODE_ERROR_UNSUPPORTED_OPERATION,