Fixed
Status Update
Comments
al...@google.com <al...@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.
kf...@gmail.com <kf...@gmail.com> #3
Also not reproducible on Galaxy Nexus running 4.0.1 (v14), 4.0.4 (v15) and 4.2.2 (v17)
su...@google.com <su...@google.com> #4
su...@google.com <su...@google.com>
al...@google.com <al...@google.com>
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-main
commit 7ba12fe5c61b9b925bb45fddf73cc86d4de6a379
Author: Kamal Faraj <kfaraj.dev@gmail.com>
Date: Tue Jan 16 20:44:03 2024
Add AlarmManagerCompat.canScheduleExactAlarms API
Relnote: Added AlarmManagerCompat.canScheduleExactAlarms API
Fixes: 315440583
Test: ./gradlew core:core:assemble
Change-Id: I62e957be392889a944d0c575f26fff12abd590a6
M core/core/api/current.txt
M core/core/api/restricted_current.txt
M core/core/src/main/java/androidx/core/app/AlarmManagerCompat.java
https://android-review.googlesource.com/2911585
Branch: androidx-main
commit 7ba12fe5c61b9b925bb45fddf73cc86d4de6a379
Author: Kamal Faraj <kfaraj.dev@gmail.com>
Date: Tue Jan 16 20:44:03 2024
Add AlarmManagerCompat.canScheduleExactAlarms API
Relnote: Added AlarmManagerCompat.canScheduleExactAlarms API
Fixes: 315440583
Test: ./gradlew core:core:assemble
Change-Id: I62e957be392889a944d0c575f26fff12abd590a6
M core/core/api/current.txt
M core/core/api/restricted_current.txt
M core/core/src/main/java/androidx/core/app/AlarmManagerCompat.java
na...@google.com <na...@google.com> #7
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.core:core:1.13.0-alpha04
Description
Version used: 1.12.0
Devices/Android versions reproduced on: N/A
As described below:
"To check whether the permission is granted to your app, call canScheduleExactAlarms() before trying to set an exact alarm."
However, the API canScheduleExactAlarms() was added to AlarmManager in API level 31 so it would be very useful to add it to AlarmManagerCompat for backward compatibility.