Revert submission
Reason for revert: Behavior incompatible with Pixels 3 and 3a on VZW
Change-Id: Icbd3edf4dc3e7d934776973d724e8a6da410462a
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 552c490..4a13f7b 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -5699,7 +5699,12 @@
public boolean isRttEnabled(int subscriptionId) {
final long identity = Binder.clearCallingIdentity();
try {
- return isRttSupported(subscriptionId);
+ boolean isRttSupported = isRttSupported(subscriptionId);
+ boolean isUserRttSettingOn = Settings.Secure.getInt(
+ mApp.getContentResolver(), Settings.Secure.RTT_CALLING_MODE, 0) != 0;
+ boolean shouldIgnoreUserRttSetting = mApp.getCarrierConfigForSubId(subscriptionId)
+ .getBoolean(CarrierConfigManager.KEY_IGNORE_RTT_MODE_SETTING_BOOL);
+ return isRttSupported && (isUserRttSettingOn || shouldIgnoreUserRttSetting);
} finally {
Binder.restoreCallingIdentity(identity);
}