Merge "Fix permission check for TelephonyManager#isTtyModeSupported."
am: 2052fba20a
Change-Id: I665d1e03f4e0232565282028238e6bfe723754ad
This commit is contained in:
@@ -6680,14 +6680,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