Add a util method of creating Icon with Drawable
- Add a util method to help create Icon with Drawable so that users don't need to handle bitmaps - Add support for creating with ColorDrawable Test: robotest Fixes: 124407373 Change-Id: I1897256821cc804a5e599d967feb84a3bcd689a9
This commit is contained in:
@@ -220,7 +220,7 @@ public class BluetoothDevicesSlice implements CustomSliceable {
|
||||
.getBtClassDrawableWithDescription(mContext, device);
|
||||
|
||||
if (pair.first != null) {
|
||||
return IconCompat.createWithBitmap(Utils.drawableToBitmap(pair.first));
|
||||
return Utils.createIconWithDrawable(pair.first);
|
||||
} else {
|
||||
return IconCompat.createWithResource(mContext,
|
||||
com.android.internal.R.drawable.ic_settings_bluetooth);
|
||||
|
||||
Reference in New Issue
Block a user