Fixed
Status Update
Comments
se...@google.com <se...@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.
au...@google.com <au...@google.com> #3
Also not reproducible on Galaxy Nexus running 4.0.1 (v14), 4.0.4 (v15) and 4.2.2 (v17)
jn...@google.com <jn...@google.com>
al...@google.com <al...@google.com> #4
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 0dc04546607a19d39b3d547b1e008c3020a36c3d
Author: Alex Clarke <alexclarke@google.com>
Date: Tue Nov 24 10:24:13 2020
Make ObservableWatchData's constructor internal
Bug: 173802666
Test: Presubmit
Relnote: ObservableWatchData's constructor is now internal.
Change-Id: I301215475e08c10a8cb97095638b235d664bcfcb
M wear/wear-watchface/api/current.txt
M wear/wear-watchface/api/public_plus_experimental_current.txt
M wear/wear-watchface/api/restricted_current.txt
M wear/wear-watchface/src/main/java/androidx/wear/watchface/ObservableWatchData.kt
https://android-review.googlesource.com/1508337
Branch: androidx-master-dev
commit 0dc04546607a19d39b3d547b1e008c3020a36c3d
Author: Alex Clarke <alexclarke@google.com>
Date: Tue Nov 24 10:24:13 2020
Make ObservableWatchData's constructor internal
Bug: 173802666
Test: Presubmit
Relnote: ObservableWatchData's constructor is now internal.
Change-Id: I301215475e08c10a8cb97095638b235d664bcfcb
M wear/wear-watchface/api/current.txt
M wear/wear-watchface/api/public_plus_experimental_current.txt
M wear/wear-watchface/api/restricted_current.txt
M wear/wear-watchface/src/main/java/androidx/wear/watchface/ObservableWatchData.kt
Description
ObservableWatchData has a protected constructor, that is anti-pattern (s.android.com/api-guidelines##public-fields), additionally, it has internal property, that leaks through the protected constructor. Please address this.