Merge "Remove usage of TelecomManager.from() hidden API"
This commit is contained in:
committed by
Gerrit Code Review
commit
07235288eb
@@ -8832,7 +8832,10 @@ public class TelephonyManager {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public boolean isTtyModeSupported() {
|
public boolean isTtyModeSupported() {
|
||||||
try {
|
try {
|
||||||
TelecomManager telecomManager = TelecomManager.from(mContext);
|
TelecomManager telecomManager = null;
|
||||||
|
if (mContext != null) {
|
||||||
|
telecomManager = mContext.getSystemService(TelecomManager.class);
|
||||||
|
}
|
||||||
if (telecomManager != null) {
|
if (telecomManager != null) {
|
||||||
return telecomManager.isTtySupported();
|
return telecomManager.isTtySupported();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user