Merge "Fix permission check for TelephonyManager#isTtyModeSupported." am: 2052fba20a am: f8f559fcd8
am: a648cac07f
Change-Id: Ifdfbe42e72732b58eb65cb41b2a239652ffe777d
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user