From 3a96d214d3a918f7d2675e2bcd10e6d66b9be5d4 Mon Sep 17 00:00:00 2001 From: Bonian Chen Date: Fri, 13 Dec 2019 14:24:32 +0800 Subject: [PATCH] [Settings] Remove access of TelecomManager.from() Replace TelecomManager.from() into public API access. Bug: 146187127 Test: build pass Change-Id: Id9fa32063a9a7ea5b9107315e50330fa5eca41b7 --- .../android/settings/network/telephony/MobileNetworkUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/network/telephony/MobileNetworkUtils.java b/src/com/android/settings/network/telephony/MobileNetworkUtils.java index cd4489daa93..a08b0c24373 100644 --- a/src/com/android/settings/network/telephony/MobileNetworkUtils.java +++ b/src/com/android/settings/network/telephony/MobileNetworkUtils.java @@ -133,7 +133,8 @@ public class MobileNetworkUtils { */ public static boolean isWifiCallingEnabled(Context context, int subId) { final PhoneAccountHandle simCallManager = - TelecomManager.from(context).getSimCallManagerForSubscription(subId); + context.getSystemService(TelecomManager.class) + .getSimCallManagerForSubscription(subId); final int phoneId = SubscriptionManager.getSlotIndex(subId); boolean isWifiCallingEnabled;