Set VT relies on presence cap issue for devices supporting new UCE stack
If the device supports VT presence using the
KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL carrier config, enable
the CAPABILITY_VIDEO_CALLING_RELIES_ON_PRESENCE capability and do
not require the user to have enabled contact discovery setting.
Bug: 196251472
Test: inspect PhoneAccount Caps and place VT call
Change-Id: I2b0e76e20dddab5fdec3218ec2794c69d5ff3767
diff --git a/src/com/android/services/telephony/TelecomAccountRegistry.java b/src/com/android/services/telephony/TelecomAccountRegistry.java
index 7252f94..1d749f4 100644
--- a/src/com/android/services/telephony/TelecomAccountRegistry.java
+++ b/src/com/android/services/telephony/TelecomAccountRegistry.java
@@ -588,11 +588,15 @@
private boolean isCarrierVideoPresenceSupported() {
PersistableBundle b =
PhoneGlobals.getInstance().getCarrierConfigForSubId(mPhone.getSubId());
- boolean carrierConfigEnabled = b != null
- && (b.getBoolean(CarrierConfigManager.KEY_USE_RCS_PRESENCE_BOOL)
- || b.getBoolean(
- CarrierConfigManager.Ims.KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL));
- return carrierConfigEnabled && isUserContactDiscoverySettingEnabled();
+ if (b == null) return false;
+
+ // If using the new RcsUceAdapter API, this should be true if
+ // KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL is set. If using the old
+ // KEY_USE_RCS_PRESENCE_BOOL key, we have to also check the user setting.
+ return b.getBoolean(
+ CarrierConfigManager.Ims.KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL)
+ || (b.getBoolean(CarrierConfigManager.KEY_USE_RCS_PRESENCE_BOOL)
+ && isUserContactDiscoverySettingEnabled());
}
/**