am 09d22d71: Merge "PhoneAccounts include literal icon bitmap (4/4)" into lmp-mr1-dev automerge: 12ab630
* commit '09d22d712676818d8c51a5209e992aede69d226d':
PhoneAccounts include literal icon bitmap (4/4)
diff --git a/sip/src/com/android/services/telephony/sip/SipUtil.java b/sip/src/com/android/services/telephony/sip/SipUtil.java
index f93f02d..df1a03a 100644
--- a/sip/src/com/android/services/telephony/sip/SipUtil.java
+++ b/sip/src/com/android/services/telephony/sip/SipUtil.java
@@ -22,6 +22,7 @@
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
+import android.graphics.BitmapFactory;
import android.net.Uri;
import android.net.sip.SipManager;
import android.net.sip.SipProfile;
@@ -118,7 +119,9 @@
.setCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER)
.setAddress(Uri.parse(profile.getUriString()))
.setShortDescription(profile.getDisplayName())
- .setIconResId(R.drawable.ic_dialer_sip_black_24dp)
+ .setIconBitmap(BitmapFactory.decodeResource(
+ context.getResources(),
+ R.drawable.ic_dialer_sip_black_24dp))
.setSupportedUriSchemes(supportedUriSchemes);
return builder.build();
diff --git a/src/com/android/services/telephony/TelecomAccountRegistry.java b/src/com/android/services/telephony/TelecomAccountRegistry.java
index c5e5a41..f50db0c 100644
--- a/src/com/android/services/telephony/TelecomAccountRegistry.java
+++ b/src/com/android/services/telephony/TelecomAccountRegistry.java
@@ -21,6 +21,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
+import android.graphics.BitmapFactory;
import android.net.Uri;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
@@ -35,7 +36,6 @@
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneFactory;
import com.android.internal.telephony.PhoneProxy;
-import com.android.internal.telephony.SubscriptionController;
import com.android.internal.telephony.TelephonyIntents;
import com.android.phone.R;
@@ -160,7 +160,9 @@
.setSubscriptionAddress(
Uri.fromParts(PhoneAccount.SCHEME_TEL, subNumber, null))
.setCapabilities(capabilities)
- .setIconResId(getPhoneAccountIcon(slotId))
+ .setIconBitmap(BitmapFactory.decodeResource(
+ mContext.getResources(),
+ getPhoneAccountIcon(slotId)))
.setColor(color)
.setShortDescription(description)
.setSupportedUriSchemes(Arrays.asList(