Expose accessibility config on PhoneInterfaceManager.
+ Add methods to PhoneInterfaceManager, so that elsewhere in the
system applications can tell whether TTY mode or HAC are supported
by querying the TelephonyManager.
+ Updated some usages/exposure of configs in Telephony.
+ Some styling/capitalization fixes.
Bug: 19372734
Change-Id: I5e56d45156c5a89cf519e2d2dada5fc23ffdb639
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 2162c36..2f75089 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -36,6 +36,7 @@
import android.preference.PreferenceManager;
import android.provider.Settings;
import android.telecom.PhoneAccount;
+import android.telecom.TelecomManager;
import android.telephony.CellInfo;
import android.telephony.IccOpenLogicalChannelResponse;
import android.telephony.NeighboringCellInfo;
@@ -2245,6 +2246,19 @@
return mPhone.getContext().getResources().getBoolean(R.bool.world_phone);
}
+ @Override
+ public boolean isTtyModeSupported() {
+ TelecomManager telecomManager = TelecomManager.from(mPhone.getContext());
+ TelephonyManager telephonyManager =
+ (TelephonyManager) mPhone.getContext().getSystemService(Context.TELEPHONY_SERVICE);
+ return !telephonyManager.isMultiSimEnabled() && telecomManager.isTtySupported();
+ }
+
+ @Override
+ public boolean isHearingAidCompatibilitySupported() {
+ return mPhone.getContext().getResources().getBoolean(R.bool.hac_enabled);
+ }
+
/**
* 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.