From 061b6eb8dac57aa9d28dfdd1f8853879a2274b17 Mon Sep 17 00:00:00 2001 From: sail Date: Wed, 5 Jul 2017 18:01:29 -0700 Subject: Update REASON_IMS_ACCESS_BLOCKED definition to match framework change. This is changed in ag/2484808 to be defined by a constant telecom string. It will be available to public in O MR. We have to hard code it until then. (This is a take over of cl/161020406 from wangqi@) Test: VideoCallNotAvailablePromptTest PiperOrigin-RevId: 161030078 Change-Id: I0e1d8d98cb1f64b035d9063b28f8ba039c7378e4 --- .../incallui/disconnectdialog/VideoCallNotAvailablePrompt.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'java/com/android/incallui') diff --git a/java/com/android/incallui/disconnectdialog/VideoCallNotAvailablePrompt.java b/java/com/android/incallui/disconnectdialog/VideoCallNotAvailablePrompt.java index 34db976b2..526d45ed7 100644 --- a/java/com/android/incallui/disconnectdialog/VideoCallNotAvailablePrompt.java +++ b/java/com/android/incallui/disconnectdialog/VideoCallNotAvailablePrompt.java @@ -24,6 +24,7 @@ import android.support.annotation.NonNull; import android.telecom.DisconnectCause; import android.telecom.PhoneAccountHandle; import android.util.Pair; +import com.android.contacts.common.compat.telecom.TelecomManagerCompat; import com.android.dialer.callintent.CallInitiationType; import com.android.dialer.callintent.CallIntentBuilder; import com.android.dialer.common.LogUtil; @@ -33,12 +34,10 @@ import com.android.incallui.call.DialerCall; /** Prompt user to make voice call if video call is not currently available. */ public class VideoCallNotAvailablePrompt implements DisconnectDialog { - private static final String REASON_IMS_ACCESS_BLOCKED = "IMS_ACCESS_BLOCKED"; - @Override public boolean shouldShow(DisconnectCause disconnectCause) { if (disconnectCause.getCode() == DisconnectCause.ERROR - && REASON_IMS_ACCESS_BLOCKED.equals(disconnectCause.getReason())) { + && TelecomManagerCompat.REASON_IMS_ACCESS_BLOCKED.equals(disconnectCause.getReason())) { LogUtil.i( "VideoCallNotAvailablePrompt.shouldShowPrompt", "showing prompt for disconnect cause: %s", -- cgit v1.2.3