diff options
| author | Andrew Lee <anwlee@google.com> | 2015-03-09 18:46:22 -0700 |
|---|---|---|
| committer | Andrew Lee <anwlee@google.com> | 2015-03-11 10:27:34 -0700 |
| commit | f3c10020e2b76f20adb90d250ab4ed4e20e348d2 (patch) | |
| tree | a847941df9d6c81292cfbd04c89a2f435b10b85f /telephony/java/android | |
| parent | 216f3edcb9fb0089b1bd621f88a682d7a2ebf115 (diff) | |
| download | frameworks_base-f3c10020e2b76f20adb90d250ab4ed4e20e348d2.zip frameworks_base-f3c10020e2b76f20adb90d250ab4ed4e20e348d2.tar.gz frameworks_base-f3c10020e2b76f20adb90d250ab4ed4e20e348d2.tar.bz2 | |
Add methods to indicate accessibility support.
Namely, indicates whether Telephony supports TTY mode or hearing
aid compatibility.
Bug: 19372734
Change-Id: I08d8cc64169b170c1dc6fb0c713e888eeba30099
Diffstat (limited to 'telephony/java/android')
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index f3b2d2e..ddb9183 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -3744,12 +3744,32 @@ public class TelephonyManager { } /** - * This function retrieves value for setting "name+subId", and if that is not found - * retrieves value for setting "name", and if that is not found uses def as default + * Whether the phone supports TTY mode. * - * @hide */ - public static int getIntWithSubId(ContentResolver cr, String name, int subId, int def) { - return Settings.Global.getInt(cr, name + subId, Settings.Global.getInt(cr, name, def)); + * @return {@code true} if the device supports TTY mode, and {@code false} otherwise. + */ + public boolean isTtyModeSupported() { + try { + return getITelephony().isTtyModeSupported(); + } catch (RemoteException e) { + Log.e(TAG, "Error calling ITelephony#isTtyModeSupported", e); + } + return false; + } + + /** + * Whether the phone supports hearing aid compatibility. + * + * @return {@code true} if the device supports hearing aid compatibility, and {@code false} + * otherwise. + */ + public boolean isHearingAidCompatibilitySupported() { + try { + return getITelephony().isHearingAidCompatibilitySupported(); + } catch (RemoteException e) { + Log.e(TAG, "Error calling ITelephony#isHearingAidCompatibilitySupported", e); + } + return false; } /** |
