diff options
author | Andrew Lee <anwlee@google.com> | 2015-03-17 22:56:05 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-03-17 22:56:06 +0000 |
commit | 5540908059e3d746d915cc5d7e00618dc43df585 (patch) | |
tree | 207241ef576cb51b67a471b092e65316f391fc76 /telephony/java/android | |
parent | c55b9954b260e310ae7bc2e298c51919d4214cf9 (diff) | |
parent | f3c10020e2b76f20adb90d250ab4ed4e20e348d2 (diff) | |
download | frameworks_base-5540908059e3d746d915cc5d7e00618dc43df585.zip frameworks_base-5540908059e3d746d915cc5d7e00618dc43df585.tar.gz frameworks_base-5540908059e3d746d915cc5d7e00618dc43df585.tar.bz2 |
Merge "Add methods to indicate accessibility support."
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 eef91e1..89978b7 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -3754,12 +3754,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; } /** |