compat/src/androidTest/java/androidx/core/graphics/drawable/IconCompatTest.java
private void verifyIconCompatValidity(IconCompat icon) {
        assertNotNull(icon);

        // tint properties.
        icon.setTint(Color.BLUE);
        icon.setTintList(ColorStateList.valueOf(Color.RED));
        icon.setTintMode(PorterDuff.Mode.XOR);

        // Parcelable methods.
        Bundle b = icon.toBundle();

        assertNotNull(IconCompat.createFromBundle(b));

        // loading drawable synchronously.
        assertNotNull(icon.loadDrawable(mContext));
    }
// Check if the created icon is valid and doesn't cause crashes for the public methods.
Check if the created icon is valid and doesn't cause crashes for the public methods.
Check if the created icon is valid and doesn ' t cause crashes for the public methods .
private void verifyIconCompatValidity(IconCompat icon) {
        assertNotNull(icon);
        icon.setTint(Color.BLUE);
        icon.setTintList(ColorStateList.valueOf(Color.RED));
        icon.setTintMode(PorterDuff.Mode.XOR);
        Bundle b = icon.toBundle();
        assertNotNull(IconCompat.createFromBundle(b));
        assertNotNull(icon.loadDrawable(mContext));
    }
private void verifyIconCompatValidity ( IconCompat icon ) { assertNotNull ( icon ) ; icon . setTint ( Color . BLUE ) ; icon . setTintList ( ColorStateList . valueOf ( Color . RED ) ) ; icon . setTintMode ( PorterDuff . Mode . XOR ) ; Bundle b = icon . toBundle ( ) ; assertNotNull ( IconCompat . createFromBundle ( b ) ) ; assertNotNull ( icon . loadDrawable ( mContext ) ) ; }
Check if the created icon is valid and doesn't cause crashes for the public methods.
Check if the created icon is valid and doesn ' t cause crashes for the public methods .
// tint properties. // Parcelable methods. // loading drawable synchronously.