Fix permission check for TelephonyManager#isTtyModeSupported.
TelephonyManager now calls TelecomManager#isTtySupported directly, instead of calling from its implementation PhoneInterfaceManager. Bug: 79502396 Test: Manual Change-Id: I686b93d31850103f1cfb7003fe0506d08a424f27
This commit is contained in:
@@ -6594,14 +6594,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