Associate PhoneAccount RTT capability to UI toggle
Register a ContentObserver in the phone and toggle Telephony's
PhoneAccount's RTT capability when the user switches off RTT in the
settings.
Change-Id: Iff6e3bbb4d971cc3524ae00c109ea936a1af95ff
Fixes: 77547929
Test: manual
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 5cbb6f6..2d7ef74 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -3364,6 +3364,11 @@
return isCarrierSupported && isDeviceSupported;
}
+ public boolean isRttEnabled() {
+ return isRttSupported() && Settings.Secure.getInt(mPhone.getContext().getContentResolver(),
+ Settings.Secure.RTT_CALLING_MODE, 0) != 0;
+ }
+
/**
* Returns the unique device ID of phone, for example, the IMEI for
* GSM and the MEID for CDMA phones. Return null if device ID is not available.