diff options
Diffstat (limited to 'java/com/android/incallui/InCallServiceImpl.java')
-rw-r--r-- | java/com/android/incallui/InCallServiceImpl.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/java/com/android/incallui/InCallServiceImpl.java b/java/com/android/incallui/InCallServiceImpl.java index 539dba8dd..1cb6c478e 100644 --- a/java/com/android/incallui/InCallServiceImpl.java +++ b/java/com/android/incallui/InCallServiceImpl.java @@ -24,6 +24,7 @@ import android.telecom.Call; import android.telecom.CallAudioState; import android.telecom.InCallService; import com.android.dialer.blocking.FilteredNumberAsyncQueryHandler; +import com.android.dialer.feedback.FeedbackComponent; import com.android.incallui.audiomode.AudioModeProvider; import com.android.incallui.call.CallList; import com.android.incallui.call.ExternalCallList; @@ -39,6 +40,7 @@ public class InCallServiceImpl extends InCallService { private ReturnToCallController returnToCallController; private NewReturnToCallController newReturnToCallController; + private CallList.Listener feedbackListener; @Override public void onCallAudioStateChanged(CallAudioState audioState) { @@ -102,6 +104,8 @@ public class InCallServiceImpl extends InCallService { newReturnToCallController = new NewReturnToCallController(this, ContactInfoCache.getInstance(context)); } + feedbackListener = FeedbackComponent.get(context).getCallFeedbackListener(); + CallList.getInstance().addListener(feedbackListener); IBinder iBinder = super.onBind(intent); Trace.endSection(); @@ -134,6 +138,10 @@ public class InCallServiceImpl extends InCallService { newReturnToCallController.tearDown(); newReturnToCallController = null; } + if (feedbackListener != null) { + CallList.getInstance().removeListener(feedbackListener); + feedbackListener = null; + } Trace.endSection(); } } |