diff options
author | Brandon Maxwell <maxwelb@google.com> | 2015-12-11 16:47:26 -0800 |
---|---|---|
committer | Brandon Maxwell <maxwelb@google.com> | 2015-12-16 13:11:33 -0800 |
commit | 7a4d2c05103bbf9aa693be1ee7de1286bf7a8256 (patch) | |
tree | fdaa246e41562c1622a864e0400453e72feb1a38 /InCallUI/src/com/android/incallui/TelecomAdapter.java | |
parent | 41c304dae70a534f0e9b345e905f30ec76b9ea73 (diff) |
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
Diffstat (limited to 'InCallUI/src/com/android/incallui/TelecomAdapter.java')
-rw-r--r-- | InCallUI/src/com/android/incallui/TelecomAdapter.java | 14 |
1 files changed, 7 insertions, 7 deletions
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); } } |