Implement Connection.startActivityFromInCall in Telecomm
This CL adds plumbing to send the startActivityFromInCall
request from Connection to InCallUI.
Change-Id: I65119a89c925a93467d1b27304ffec9b088b172f
diff --git a/src/com/android/telecomm/InCallController.java b/src/com/android/telecomm/InCallController.java
index 7081dc9..08025a9 100644
--- a/src/com/android/telecomm/InCallController.java
+++ b/src/com/android/telecomm/InCallController.java
@@ -16,6 +16,7 @@
package com.android.telecomm;
+import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -95,6 +96,17 @@
public void onVideoStateChanged(Call call) {
updateCall(call);
}
+
+ @Override
+ public void onStartActivityFromInCall(Call call, PendingIntent intent) {
+ if (mInCallService != null) {
+ Log.i(this, "Calling startActivity, intent: %s", intent);
+ try {
+ mInCallService.startActivity(mCallIdMapper.getCallId(call), intent);
+ } catch (RemoteException ignored) {
+ }
+ }
+ }
};
/** Maintains a binding connection to the in-call app. */