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:
@@ -30,9 +30,6 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
@@ -243,7 +240,7 @@ public class NotificationChannelSlice implements CustomSliceable {
|
||||
return null;
|
||||
}
|
||||
|
||||
return IconCompat.createWithBitmap(Utils.drawableToBitmap(drawable));
|
||||
return Utils.createIconWithDrawable(drawable);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
|
Reference in New Issue
Block a user