Fixed
Status Update
Comments
al...@google.com <al...@google.com>
ap...@google.com <ap...@google.com> #2
Trying to reproduce this on my 4.2.2 (v17) Nexus 4. Added this drawable:
<transition xmlns:android="http://schemas.android.com/apk/res/android " >
<item android:drawable="@drawable/test_drawable_blue"/>
<item android:drawable="@drawable/test_drawable_green"/>
</transition>
where blue/green drawables look like this:
<shape
xmlns:android="http://schemas.android.com/apk/res/android "
android:shape="rectangle">
<size
android:width="@dimen/drawable_large_size"
android:height="@dimen/drawable_small_size" />
<solid
android:color="@color/test_blue" />
</shape>
Then added this test:
@Test
public void testMutateTransitionDrawable() {
Drawable drawable = ResourcesCompat.getDrawable(mResources,
R.drawable.test_transition_drawable, null);
assertTrue(drawable instanceof TransitionDrawable);
Drawable mutated = drawable.mutate();
assertTrue(drawable instanceof TransitionDrawable);
assertTrue(mutated instanceof TransitionDrawable);
}
It passes on the device. Going to also try on other earlier devices a bit later in the day once they are charged.
<transition xmlns:android="
<item android:drawable="@drawable/test_drawable_blue"/>
<item android:drawable="@drawable/test_drawable_green"/>
</transition>
where blue/green drawables look like this:
<shape
xmlns:android="
android:shape="rectangle">
<size
android:width="@dimen/drawable_large_size"
android:height="@dimen/drawable_small_size" />
<solid
android:color="@color/test_blue" />
</shape>
Then added this test:
@Test
public void testMutateTransitionDrawable() {
Drawable drawable = ResourcesCompat.getDrawable(mResources,
R.drawable.test_transition_drawable, null);
assertTrue(drawable instanceof TransitionDrawable);
Drawable mutated = drawable.mutate();
assertTrue(drawable instanceof TransitionDrawable);
assertTrue(mutated instanceof TransitionDrawable);
}
It passes on the device. Going to also try on other earlier devices a bit later in the day once they are charged.
Description
The following lint check is baseline suppressed in your project. Please remove all instances of this suppression from
core/core/lint-baseline.xml
and address the associated issues before your next stable release.5 instance(s) of
PrivateConstructorForUtilityClass
Utility class is missing private constructor
Found in
src/main/java/androidx/core/app/AppLaunchChecker.java
at line 36:public class AppLaunchChecker { ~~~~~~~~~~~~~~~~ ```
Utility class is missing private constructor
Found in
src/main/java/androidx/core/content/ContextCompat.java
at line 156:public class ContextCompat { ~~~~~~~~~~~~~ ```
Utility class is missing private constructor
Found in
src/main/java/androidx/core/view/inputmethod/EditorInfoCompat.java
at line 49:public final class EditorInfoCompat { ~~~~~~~~~~~~~~~~ ```
Utility class is missing private constructor
Found in
src/main/java/androidx/core/view/inputmethod/InputConnectionCompat.java
at line 37:public final class InputConnectionCompat { ~~~~~~~~~~~~~~~~~~~~~ ```
Utility class is missing private constructor
Found in
src/main/java/androidx/core/app/NotificationCompat.java
at line 82:public class NotificationCompat { ~~~~~~~~~~~~~~~~~~ ```