diff --git a/src/com/android/telecomm/Call.java b/src/com/android/telecomm/Call.java
index 66f9366..2c54e82 100644
--- a/src/com/android/telecomm/Call.java
+++ b/src/com/android/telecomm/Call.java
@@ -258,7 +258,7 @@
         if ((mHandle == null && handle != null) || (mHandle != null && !mHandle.equals(handle))) {
             mHandle = handle;
             mIsEmergencyCall = mHandle != null && PhoneNumberUtils.isLocalEmergencyNumber(
-                    TelecommApp.getInstance(), mHandle.getSchemeSpecificPart());
+                    mHandle.getSchemeSpecificPart(), TelecommApp.getInstance());
             startCallerInfoLookup();
         }
     }
diff --git a/src/com/android/telecomm/CallLogManager.java b/src/com/android/telecomm/CallLogManager.java
index 2dd6214..e7cdab4 100644
--- a/src/com/android/telecomm/CallLogManager.java
+++ b/src/com/android/telecomm/CallLogManager.java
@@ -132,7 +132,7 @@
             int callType,
             long start,
             long duration) {
-        boolean isEmergencyNumber = PhoneNumberUtils.isLocalEmergencyNumber(mContext, number);
+        boolean isEmergencyNumber = PhoneNumberUtils.isLocalEmergencyNumber(number, mContext);
 
         // On some devices, to avoid accidental redialing of emergency numbers, we *never* log
         // emergency calls to the Call Log.  (This behavior is set on a per-product basis, based
diff --git a/src/com/android/telecomm/CallsManager.java b/src/com/android/telecomm/CallsManager.java
index 7429d36..1d881a5 100644
--- a/src/com/android/telecomm/CallsManager.java
+++ b/src/com/android/telecomm/CallsManager.java
@@ -688,8 +688,9 @@
         handoffCall.removeListener(this);
 
         if (wasSuccessful) {
-            // Disconnect.
-            originalCall.disconnect();
+            if (TelephonyUtil.isCurrentlyPSTNCall(originalCall)) {
+                originalCall.disconnect();
+            }
 
             // Synchronize.
             originalCall.setCallService(handoffCall.getCallService(), handoffCall);
diff --git a/src/com/android/telecomm/EmergencyCallServiceSelector.java b/src/com/android/telecomm/EmergencyCallServiceSelector.java
index 40ff11e..18a5b15 100644
--- a/src/com/android/telecomm/EmergencyCallServiceSelector.java
+++ b/src/com/android/telecomm/EmergencyCallServiceSelector.java
@@ -42,7 +42,7 @@
      */
     static boolean shouldUseSelector(Uri handle) {
         return PhoneNumberUtils.isPotentialLocalEmergencyNumber(
-                TelecommApp.getInstance(), handle.getSchemeSpecificPart());
+                handle.getSchemeSpecificPart(), TelecommApp.getInstance());
     }
 
     /** {@inheritDoc} */
diff --git a/src/com/android/telecomm/InCallController.java b/src/com/android/telecomm/InCallController.java
index c3aa950..bf2deb1 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;
@@ -190,7 +191,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.
diff --git a/src/com/android/telecomm/NewOutgoingCallIntentBroadcaster.java b/src/com/android/telecomm/NewOutgoingCallIntentBroadcaster.java
index a0a7c00..41d568f 100644
--- a/src/com/android/telecomm/NewOutgoingCallIntentBroadcaster.java
+++ b/src/com/android/telecomm/NewOutgoingCallIntentBroadcaster.java
@@ -110,7 +110,7 @@
             if (resultHandle == null) {
                 Log.v(this, "Call cancelled (null number), returning...");
                 return;
-            } else if (PhoneNumberUtils.isPotentialLocalEmergencyNumber(context, resultHandle)) {
+            } else if (PhoneNumberUtils.isPotentialLocalEmergencyNumber(resultHandle, context)) {
                 Log.w(this, "Cannot modify outgoing call to emergency number %s.", resultHandle);
                 return;
             }
@@ -341,7 +341,7 @@
      */
     private boolean isPotentialEmergencyNumber(Context context, String handle) {
         Log.v(this, "Checking restrictions for number : %s", Log.pii(handle));
-        return (handle != null) && PhoneNumberUtils.isPotentialLocalEmergencyNumber(context,handle);
+        return (handle != null) && PhoneNumberUtils.isPotentialLocalEmergencyNumber(handle,context);
     }
 
     /**
diff --git a/src/com/android/telecomm/TelecommApp.java b/src/com/android/telecomm/TelecommApp.java
index 48f6ba5..7f477f9 100644
--- a/src/com/android/telecomm/TelecommApp.java
+++ b/src/com/android/telecomm/TelecommApp.java
@@ -17,6 +17,7 @@
 package com.android.telecomm;
 
 import android.app.Application;
+import android.os.UserHandle;
 
 /**
  * Top-level Application class for Telecomm.
@@ -38,7 +39,9 @@
         sInstance = this;
 
         mMissedCallNotifier = new MissedCallNotifier(this);
-        TelecommServiceImpl.init();
+        if (UserHandle.myUserId() == UserHandle.USER_OWNER) {
+            TelecommServiceImpl.init();
+        }
     }
 
     public static TelecommApp getInstance() {
