From 7a4d2c05103bbf9aa693be1ee7de1286bf7a8256 Mon Sep 17 00:00:00 2001 From: Brandon Maxwell Date: Fri, 11 Dec 2015 16:47:26 -0800 Subject: Backporting InCallServiceImpl In L, InCallService callbacks were implemented through the listener from android.telecom.Phone. To backport, this Listener calls through to the InCallService methods that are overridden in the implementing class Also includes miscellaneous backporting fixes that were missed previously. Change-Id: If8896c72454496459b0e6ea575574161184fba40 --- InCallUI/src/com/android/incallui/TelecomAdapter.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'InCallUI/src/com/android/incallui/TelecomAdapter.java') diff --git a/InCallUI/src/com/android/incallui/TelecomAdapter.java b/InCallUI/src/com/android/incallui/TelecomAdapter.java index 99fcbed55..0fc2e280a 100644 --- a/InCallUI/src/com/android/incallui/TelecomAdapter.java +++ b/InCallUI/src/com/android/incallui/TelecomAdapter.java @@ -16,15 +16,16 @@ package com.android.incallui; +import com.google.common.base.Preconditions; + import android.content.ActivityNotFoundException; import android.content.Intent; import android.os.Looper; import android.telecom.InCallService; import android.telecom.PhoneAccountHandle; -import com.google.common.base.Preconditions; - import com.android.incallui.compat.telecom.DetailsCompat; +import com.android.incallui.compat.telecom.InCallServiceCompat; import java.util.List; @@ -107,7 +108,7 @@ final class TelecomAdapter implements InCallServiceListener { void mute(boolean shouldMute) { if (mInCallService != null) { - mInCallService.setMuted(shouldMute); + InCallServiceCompat.setMuted(mInCallService, shouldMute); } else { Log.e(this, "error mute, mInCallService is null"); } @@ -115,7 +116,7 @@ final class TelecomAdapter implements InCallServiceListener { void setAudioRoute(int route) { if (mInCallService != null) { - mInCallService.setAudioRoute(route); + InCallServiceCompat.setAudioRoute(mInCallService, route); } else { Log.e(this, "error setAudioRoute, mInCallService is null"); } @@ -221,8 +222,7 @@ final class TelecomAdapter implements InCallServiceListener { } } - boolean canAddCall() { - // Default to true if we are not connected to telecom. - return mInCallService == null ? true : mInCallService.canAddCall(); + boolean canAddCall(Call call) { + return InCallServiceCompat.canAddCall(mInCallService, call); } } -- cgit v1.2.3