Incoming call support for multiuser phones
Change-Id: I18554f230398e17df7de3eb6fce2b38eae34c1a6
diff --git a/src/com/android/telecomm/InCallController.java b/src/com/android/telecomm/InCallController.java
index 395e92e..e5b8256 100644
--- a/src/com/android/telecomm/InCallController.java
+++ b/src/com/android/telecomm/InCallController.java
@@ -23,6 +23,7 @@
import android.net.Uri;
import android.os.IBinder;
import android.os.RemoteException;
+import android.os.UserHandle;
import android.telecomm.CallAudioState;
import android.telecomm.CallCapabilities;
import android.telecomm.CallServiceDescriptor;
@@ -169,7 +170,8 @@
serviceIntent.setComponent(component);
Context context = TelecommApp.getInstance();
- if (!context.bindService(serviceIntent, mConnection, Context.BIND_AUTO_CREATE)) {
+ if (!context.bindServiceAsUser(serviceIntent, mConnection, Context.BIND_AUTO_CREATE,
+ UserHandle.CURRENT)) {
Log.w(this, "Could not connect to the in-call app (%s)", component);
// TODO(santoscordon): Implement retry or fall-back-to-default logic.