Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fec4d718 authored by Youming Ye's avatar Youming Ye Committed by android-build-merger
Browse files

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

Merge "Fix permission check for TelephonyManager#isTtyModeSupported." am: 2052fba2 am: f8f559fc am: a648cac0
am: b18b1217

Change-Id: I2781eefd417f6b7f49e09061fbd6c9ce66d96b2b
parents f70fd62e b18b1217
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -6648,14 +6648,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;
    }