From fb7ff8268c1c03837a0f2bf2f2cb51326ebfeeb6 Mon Sep 17 00:00:00 2001 From: Brandon Maxwell Date: Wed, 16 Mar 2016 16:51:56 -0700 Subject: Fixing securityException issue + This CL ensures that when we're checking if a number is voicemail, we first check if we have the phone state permission. This is required to avoid Telecom throwing a SecurityException. Bug: 27062147 Change-Id: Iee88e01ca8c116e779134dba63d7f8dd6094ac4a --- InCallUI/src/com/android/incallui/CallerInfoUtils.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'InCallUI/src') diff --git a/InCallUI/src/com/android/incallui/CallerInfoUtils.java b/InCallUI/src/com/android/incallui/CallerInfoUtils.java index aff39566d..289b652fc 100644 --- a/InCallUI/src/com/android/incallui/CallerInfoUtils.java +++ b/InCallUI/src/com/android/incallui/CallerInfoUtils.java @@ -9,13 +9,13 @@ import android.telecom.TelecomManager; import android.text.TextUtils; import android.util.Log; -import com.android.contacts.common.compat.telecom.TelecomManagerCompat; import com.android.contacts.common.model.Contact; import com.android.contacts.common.model.ContactLoader; import com.android.dialer.R; import com.android.dialer.calllog.ContactInfo; import com.android.dialer.service.CachedNumberLookupService; import com.android.dialer.service.CachedNumberLookupService.CachedContactInfo; +import com.android.dialer.util.TelecomUtil; import java.util.Arrays; @@ -118,8 +118,7 @@ public class CallerInfoUtils { } public static boolean isVoiceMailNumber(Context context, Call call) { - return TelecomManagerCompat.isVoiceMailNumber( - (TelecomManager) context.getSystemService(Context.TELECOM_SERVICE), + return TelecomUtil.isVoicemailNumber(context, call.getTelecomCall().getDetails().getAccountHandle(), call.getNumber()); } -- cgit v1.2.3