diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 88e90ae..9a8d0cc 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -17,6 +17,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
         xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
         package="com.android.server.telecom"
+        android:debuggable="true"
         coreApp="true"
         android:sharedUserId="android.uid.phone">
 
diff --git a/src/com/android/server/telecom/CallsManager.java b/src/com/android/server/telecom/CallsManager.java
index 57b9e8e..e3327c3 100644
--- a/src/com/android/server/telecom/CallsManager.java
+++ b/src/com/android/server/telecom/CallsManager.java
@@ -451,6 +451,8 @@
         List<PhoneAccountHandle> accounts =
                 mPhoneAccountRegistrar.getCallCapablePhoneAccounts(handle.getScheme());
 
+        Log.v(this, "startOutgoingCall found accounts = " + accounts);
+
         // Only dial with the requested phoneAccount if it is still valid. Otherwise treat this call
         // as if a phoneAccount was not specified (does the default behavior instead).
         // Note: We will not attempt to dial with a requested phoneAccount if it is disabled.
diff --git a/src/com/android/server/telecom/PhoneAccountRegistrar.java b/src/com/android/server/telecom/PhoneAccountRegistrar.java
index a156f6a..1d7993d 100644
--- a/src/com/android/server/telecom/PhoneAccountRegistrar.java
+++ b/src/com/android/server/telecom/PhoneAccountRegistrar.java
@@ -84,7 +84,7 @@
 
     private static final String FILE_NAME = "phone-account-registrar-state.xml";
     @VisibleForTesting
-    public static final int EXPECTED_STATE_VERSION = 4;
+    public static final int EXPECTED_STATE_VERSION = 5;
 
     /** Keep in sync with the same in SipSettings.java */
     private static final String SIP_SHARED_PREFERENCES = "SIP_PREFERENCES";
@@ -394,6 +394,9 @@
      * @param account The {@code PhoneAccount} to add or replace.
      */
     private void addOrReplacePhoneAccount(PhoneAccount account) {
+        Log.d(this, "addOrReplacePhoneAccount(%s -> %s)",
+                account.getAccountHandle(), account);
+
         mState.accounts.add(account);
         // Search for duplicates and remove any that are found.
         for (int i = 0; i < mState.accounts.size() - 1; i++) {
@@ -857,7 +860,8 @@
         private static final String ICON_RES_ID = "icon_res_id";
         private static final String ICON_PACKAGE_NAME = "icon_package_name";
         private static final String ICON_BITMAP = "icon_bitmap";
-        private static final String COLOR = "color";
+        private static final String ICON_TINT = "icon_tint";
+        private static final String HIGHLIGHT_COLOR = "highlight_color";
         private static final String LABEL = "label";
         private static final String SHORT_DESCRIPTION = "short_description";
         private static final String SUPPORTED_URI_SCHEMES = "supported_uri_schemes";
@@ -880,7 +884,9 @@
                 writeTextIfNonNull(ICON_RES_ID, Integer.toString(o.getIconResId()), serializer);
                 writeTextIfNonNull(ICON_PACKAGE_NAME, o.getIconPackageName(), serializer);
                 writeBitmapIfNonNull(ICON_BITMAP, o.getIconBitmap(), serializer);
-                writeTextIfNonNull(COLOR, Integer.toString(o.getColor()), serializer);
+                writeTextIfNonNull(ICON_TINT, Integer.toString(o.getIconTint()), serializer);
+                writeTextIfNonNull(HIGHLIGHT_COLOR,
+                        Integer.toString(o.getHighlightColor()), serializer);
                 writeTextIfNonNull(LABEL, o.getLabel(), serializer);
                 writeTextIfNonNull(SHORT_DESCRIPTION, o.getShortDescription(), serializer);
                 writeStringList(SUPPORTED_URI_SCHEMES, o.getSupportedUriSchemes(), serializer);
@@ -897,10 +903,11 @@
                 Uri address = null;
                 Uri subscriptionAddress = null;
                 int capabilities = 0;
-                int iconResId = 0;
+                int iconResId = PhoneAccount.NO_RESOURCE_ID;
                 String iconPackageName = null;
-                Bitmap icon = null;
-                int color = 0;
+                Bitmap iconBitmap = null;
+                int iconTint = PhoneAccount.NO_COLOR;
+                int highlightColor = PhoneAccount.NO_COLOR;
                 String label = null;
                 String shortDescription = null;
                 List<String> supportedUriSchemes = null;
@@ -928,10 +935,13 @@
                         iconPackageName = parser.getText();
                     } else if (parser.getName().equals(ICON_BITMAP)) {
                         parser.next();
-                        icon = readBitmap(parser);
-                    } else if (parser.getName().equals(COLOR)) {
+                        iconBitmap = readBitmap(parser);
+                    } else if (parser.getName().equals(ICON_TINT)) {
                         parser.next();
-                        color = Integer.parseInt(parser.getText());
+                        iconTint = Integer.parseInt(parser.getText());
+                    } else if (parser.getName().equals(HIGHLIGHT_COLOR)) {
+                        parser.next();
+                        highlightColor = Integer.parseInt(parser.getText());
                     } else if (parser.getName().equals(LABEL)) {
                         parser.next();
                         label = parser.getText();
@@ -964,17 +974,28 @@
                     }
                 }
 
-                return PhoneAccount.builder(accountHandle, label)
+                // Upgrade older phone accounts with explicit package name
+                if (version < 5) {
+                    if (iconBitmap == null) {
+                        iconPackageName = accountHandle.getComponentName().getPackageName();
+                    }
+                }
+
+                PhoneAccount.Builder builder = PhoneAccount.builder(accountHandle, label)
                         .setAddress(address)
                         .setSubscriptionAddress(subscriptionAddress)
                         .setCapabilities(capabilities)
-                        .setIconResId(iconResId)
-                        .setIconPackageName(iconPackageName)
-                        .setIconBitmap(icon)
-                        .setColor(color)
                         .setShortDescription(shortDescription)
                         .setSupportedUriSchemes(supportedUriSchemes)
-                        .build();
+                        .setHighlightColor(highlightColor);
+
+                if (iconBitmap == null) {
+                    builder.setIcon(iconPackageName, iconResId, iconTint);
+                } else {
+                    builder.setIcon(iconBitmap);
+                }
+
+                return builder.build();
             }
             return null;
         }
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index df7e93e..e987dee 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -19,7 +19,6 @@
           package="com.android.server.telecom.tests"
           android:debuggable="true">
 
-    <!-- Test connection service outgoing video preview. -->
     <uses-permission android:name="android.permission.CAMERA" />
     <uses-permission android:name="android.permission.CONTROL_INCALL_EXPERIENCE" />
     <uses-permission android:name="android.permission.REGISTER_CALL_PROVIDER" />
diff --git a/tests/src/com/android/server/telecom/testapps/CallServiceNotifier.java b/tests/src/com/android/server/telecom/testapps/CallServiceNotifier.java
index a0959fa..835863f 100644
--- a/tests/src/com/android/server/telecom/testapps/CallServiceNotifier.java
+++ b/tests/src/com/android/server/telecom/testapps/CallServiceNotifier.java
@@ -26,6 +26,7 @@
 import android.content.Intent;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
+import android.graphics.Color;
 import android.net.Uri;
 import android.telecom.PhoneAccount;
 import android.telecom.PhoneAccountHandle;
@@ -99,35 +100,31 @@
         TelecomManager telecomManager =
                 (TelecomManager) context.getSystemService(Context.TELECOM_SERVICE);
 
-        Bitmap icon = BitmapFactory.decodeResource(
-                context.getResources(),
-                R.drawable.stat_sys_phone_call);
-
         telecomManager.clearAccounts();
 
         telecomManager.registerPhoneAccount(PhoneAccount.builder(
-                        new PhoneAccountHandle(
-                                new ComponentName(context, TestConnectionService.class),
-                                CALL_PROVIDER_ID),
-                        "TelecomTestApp Call Provider")
+                new PhoneAccountHandle(
+                        new ComponentName(context, TestConnectionService.class),
+                        CALL_PROVIDER_ID),
+                "TelecomTestApp Call Provider")
                 .setAddress(Uri.parse("tel:555-TEST"))
                 .setSubscriptionAddress(Uri.parse("tel:555-TEST"))
                 .setCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER)
-                .setIconBitmap(icon)
+                .setIcon(context, R.drawable.stat_sys_phone_call, Color.RED)
                 .setShortDescription("a short description for the call provider")
                 .setSupportedUriSchemes(Arrays.asList("tel"))
                 .build());
 
         telecomManager.registerPhoneAccount(PhoneAccount.builder(
-                        new PhoneAccountHandle(
-                                new ComponentName(context, TestConnectionService.class),
-                                SIM_SUBSCRIPTION_ID),
-                        "TelecomTestApp SIM Subscription")
+                new PhoneAccountHandle(
+                        new ComponentName(context, TestConnectionService.class),
+                        SIM_SUBSCRIPTION_ID),
+                "TelecomTestApp SIM Subscription")
                 .setAddress(Uri.parse("tel:555-TSIM"))
                 .setSubscriptionAddress(Uri.parse("tel:555-TSIM"))
                 .setCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER |
-                    PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION)
-                .setIconBitmap(icon)
+                        PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION)
+                .setIcon(context, R.drawable.stat_sys_phone_call, Color.GREEN)
                 .setShortDescription("a short description for the sim subscription")
                 .build());
 
@@ -139,7 +136,7 @@
                 .setAddress(Uri.parse("tel:555-CMGR"))
                 .setSubscriptionAddress(Uri.parse("tel:555-CMGR"))
                 .setCapabilities(PhoneAccount.CAPABILITY_CONNECTION_MANAGER)
-                .setIconBitmap(icon)
+                .setIcon(context, R.drawable.stat_sys_phone_call, Color.BLUE)
                 .setShortDescription("a short description for the connection manager")
                 .build());
     }
diff --git a/tests/src/com/android/server/telecom/tests/unit/PhoneAccountRegistrarTest.java b/tests/src/com/android/server/telecom/tests/unit/PhoneAccountRegistrarTest.java
index c2beb0b..2610720 100644
--- a/tests/src/com/android/server/telecom/tests/unit/PhoneAccountRegistrarTest.java
+++ b/tests/src/com/android/server/telecom/tests/unit/PhoneAccountRegistrarTest.java
@@ -204,12 +204,7 @@
                 .setAddress(Uri.parse("http://foo.com/" + idx))
                 .setSubscriptionAddress(Uri.parse("tel:555-000" + idx))
                 .setCapabilities(idx)
-                .setIconResId(R.drawable.stat_sys_phone_call)
-                .setIconPackageName("com.android.server.telecom.tests")
-                .setIconBitmap(
-                        BitmapFactory.decodeResource(
-                                getContext().getResources(),
-                                R.drawable.stat_sys_phone_call))
+                .setIcon("com.android.server.telecom.tests", R.drawable.stat_sys_phone_call)
                 .setShortDescription("desc" + idx)
                 .build();
     }
@@ -268,7 +263,8 @@
             assertEquals(a.getIconResId(), b.getIconResId());
             assertEquals(a.getIconPackageName(), b.getIconPackageName());
             assertBitmapEquals(a.getIconBitmap(), b.getIconBitmap());
-            assertEquals(a.getColor(), b.getColor());
+            assertEquals(a.getIconTint(), b.getIconTint());
+            assertEquals(a.getHighlightColor(), b.getHighlightColor());
             assertEquals(a.getLabel(), b.getLabel());
             assertEquals(a.getShortDescription(), b.getShortDescription());
             assertEquals(a.getSupportedUriSchemes(), b.getSupportedUriSchemes());
@@ -276,11 +272,16 @@
     }
 
     private static void assertBitmapEquals(Bitmap a, Bitmap b) {
-        assertEquals(a.getWidth(), b.getWidth());
-        assertEquals(a.getHeight(), b.getHeight());
-        for (int x = 0; x < a.getWidth(); x++) {
-            for (int y = 0; y < a.getHeight(); y++) {
-                assertEquals(a.getPixel(x, y), b.getPixel(x, y));
+        if (a == null || b == null) {
+            assertEquals(null, a);
+            assertEquals(null, b);
+        } else {
+            assertEquals(a.getWidth(), b.getWidth());
+            assertEquals(a.getHeight(), b.getHeight());
+            for (int x = 0; x < a.getWidth(); x++) {
+                for (int y = 0; y < a.getHeight(); y++) {
+                    assertEquals(a.getPixel(x, y), b.getPixel(x, y));
+                }
             }
         }
     }
