@Test public void testDataIconCompat() { byte[] data = new byte[4]; data[0] = data[1] = data[2] = data[3] = (byte) 255; verifyIconCompatValidity(IconCompat.createWithData(data, 0, 4)); }
public static IconCompat createWithData(byte[] data, int offset, int length) { if (data == null) { throw new IllegalArgumentException("Data must not be null."); } final IconCompat rep = new IconCompat(TYPE_DATA); rep.mObj1 = data; rep.mInt1 = offset; rep.mInt2 = length; return rep; }
IconCompat { public static IconCompat createWithData(byte[] data, int offset, int length) { if (data == null) { throw new IllegalArgumentException("Data must not be null."); } final IconCompat rep = new IconCompat(TYPE_DATA); rep.mObj1 = data; rep.mInt1 = offset; rep.mInt2 = length; return rep; } }
IconCompat { public static IconCompat createWithData(byte[] data, int offset, int length) { if (data == null) { throw new IllegalArgumentException("Data must not be null."); } final IconCompat rep = new IconCompat(TYPE_DATA); rep.mObj1 = data; rep.mInt1 = offset; rep.mInt2 = length; return rep; } private  IconCompat(int mType); }
IconCompat { public static IconCompat createWithData(byte[] data, int offset, int length) { if (data == null) { throw new IllegalArgumentException("Data must not be null."); } final IconCompat rep = new IconCompat(TYPE_DATA); rep.mObj1 = data; rep.mInt1 = offset; rep.mInt2 = length; return rep; } private  IconCompat(int mType); static IconCompat createWithResource(Context context, @DrawableRes int resId); static IconCompat createWithBitmap(Bitmap bits); static IconCompat createWithAdaptiveBitmap(Bitmap bits); static IconCompat createWithData(byte[] data, int offset, int length); static IconCompat createWithContentUri(String uri); static IconCompat createWithContentUri(Uri uri); @IconType int getType(); @NonNull String getResPackage(); @IdRes int getResId(); @NonNull Uri getUri(); IconCompat setTint(@ColorInt int tint); IconCompat setTintList(ColorStateList tintList); IconCompat setTintMode(PorterDuff.Mode mode); @RequiresApi(23) Icon toIcon(); Drawable loadDrawable(Context context); @RestrictTo(LIBRARY_GROUP) @SuppressWarnings("deprecation") void addToShortcutIntent(@NonNull Intent outIntent, @Nullable Drawable badge,
            @NonNull Context c); Bundle toBundle(); @Override String toString(); static @Nullable IconCompat createFromBundle(@NonNull Bundle bundle); @RequiresApi(23) @Nullable static IconCompat createFromIcon(@NonNull Icon icon); @IconType @RequiresApi(23) static int getType(@NonNull Icon icon); @Nullable @RequiresApi(23) static String getResPackage(@NonNull Icon icon); @IdRes @RequiresApi(23) static int getResId(@NonNull Icon icon); @Nullable @RequiresApi(23) Uri getUri(@NonNull Icon icon); }
IconCompat { public static IconCompat createWithData(byte[] data, int offset, int length) { if (data == null) { throw new IllegalArgumentException("Data must not be null."); } final IconCompat rep = new IconCompat(TYPE_DATA); rep.mObj1 = data; rep.mInt1 = offset; rep.mInt2 = length; return rep; } private  IconCompat(int mType); static IconCompat createWithResource(Context context, @DrawableRes int resId); static IconCompat createWithBitmap(Bitmap bits); static IconCompat createWithAdaptiveBitmap(Bitmap bits); static IconCompat createWithData(byte[] data, int offset, int length); static IconCompat createWithContentUri(String uri); static IconCompat createWithContentUri(Uri uri); @IconType int getType(); @NonNull String getResPackage(); @IdRes int getResId(); @NonNull Uri getUri(); IconCompat setTint(@ColorInt int tint); IconCompat setTintList(ColorStateList tintList); IconCompat setTintMode(PorterDuff.Mode mode); @RequiresApi(23) Icon toIcon(); Drawable loadDrawable(Context context); @RestrictTo(LIBRARY_GROUP) @SuppressWarnings("deprecation") void addToShortcutIntent(@NonNull Intent outIntent, @Nullable Drawable badge,
            @NonNull Context c); Bundle toBundle(); @Override String toString(); static @Nullable IconCompat createFromBundle(@NonNull Bundle bundle); @RequiresApi(23) @Nullable static IconCompat createFromIcon(@NonNull Icon icon); @IconType @RequiresApi(23) static int getType(@NonNull Icon icon); @Nullable @RequiresApi(23) static String getResPackage(@NonNull Icon icon); @IdRes @RequiresApi(23) static int getResId(@NonNull Icon icon); @Nullable @RequiresApi(23) Uri getUri(@NonNull Icon icon); static final int TYPE_UNKOWN; }