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
|
@Deprecated
|
||||||
public boolean isTtyModeSupported() {
|
public boolean isTtyModeSupported() {
|
||||||
try {
|
try {
|
||||||
ITelephony telephony = getITelephony();
|
TelecomManager telecomManager = TelecomManager.from(mContext);
|
||||||
if (telephony != null) {
|
if (telecomManager != null) {
|
||||||
return telephony.isTtyModeSupported();
|
return telecomManager.isTtySupported();
|
||||||
}
|
}
|
||||||
} catch (RemoteException e) {
|
|
||||||
Log.e(TAG, "Error calling ITelephony#isTtyModeSupported", e);
|
|
||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
Log.e(TAG, "Permission error calling ITelephony#isTtyModeSupported", e);
|
Log.e(TAG, "Permission error calling TelecomManager#isTtySupported", e);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user