Merge "Fix permission check for TelephonyManager#isTtyModeSupported." am: 2052fba20a

am: f8f559fcd8

Change-Id: Ia612212ae54e5ca0e3f56b3d48f5d66a829f0b2c
This commit is contained in:
Youming Ye
2018-08-10 14:35:01 -07:00
committed by android-build-merger

View File

@@ -6679,14 +6679,12 @@ public class TelephonyManager {
@Deprecated
public boolean isTtyModeSupported() {
try {
ITelephony telephony = getITelephony();
if (telephony != null) {
return telephony.isTtyModeSupported();
TelecomManager telecomManager = TelecomManager.from(mContext);
if (telecomManager != null) {
return telecomManager.isTtySupported();
}
} catch (RemoteException e) {
Log.e(TAG, "Error calling ITelephony#isTtyModeSupported", e);
} catch (SecurityException e) {
Log.e(TAG, "Permission error calling ITelephony#isTtyModeSupported", e);
Log.e(TAG, "Permission error calling TelecomManager#isTtySupported", e);
}
return false;
}