Status Update
Comments
an...@google.com <an...@google.com> #2
<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.
an...@google.com <an...@google.com> #3
ja...@google.com <ja...@google.com>
an...@google.com <an...@google.com> #4
ja...@google.com <ja...@google.com>
ni...@google.com <ni...@google.com>
ni...@google.com <ni...@google.com> #5
Tagging with a review tag so that Jetpad picks it up
[LIBRARY_API_REVIEW_TAG:core/core/api/1.4.0-alpha01.txt]
al...@google.com <al...@google.com> #7
Oh, okay -- it's a feature request to add that method.
ki...@google.com <ki...@google.com> #8
Handler.hasCallbacks was added in JB timeframe in
It was marked as @hide, so technically we can use reflection on pre-29 versions to get to it. But what would we do ICS? Nothing?
ki...@google.com <ki...@google.com> #9
And on ICS there is no underlying MessageQueue API to check for runnable callbacks. That was added as part of the same original CL at
Note that we didn't see a single internal or external request to actually expose this API in AndroidX in a backwards compatible way.
al...@google.com <al...@google.com> #10
It would have to be RequiresApi(JELLY_BEAN)
, but if the @hide
method was on the non-SDK-usage blacklist in P then we're out of luck.
ki...@google.com <ki...@google.com> #11
Where do I find that blacklist?
al...@google.com <al...@google.com> #12
You could either check the status manually by searching in a CSV (SDK 29) and TXT (SDK 28):
Or go ahead and write it and then pass the library through veridex
:
ki...@google.com <ki...@google.com>
al...@google.com <al...@google.com> #13
It's light-greylist on SDK 28, so we should be able to reflect on SDK 16+.
al...@google.com <al...@google.com> #14
Though if an OEM changed the implementation, we're going to have to throw an exception. It's unlikely, but it's there.
al...@google.com <al...@google.com> #15
Still waiting on core
to go back to alpha... This is waiting in aosp/1580773.
ap...@google.com <ap...@google.com> #16
Branch: androidx-main
commit 7e9c4bfcbd0a3bebc25ec4747922bcf80cd278fe
Author: Alan Viverette <alanv@google.com>
Date: Mon Feb 08 17:41:41 2021
Add compat method for Handler.hasCallbacks()
Fixes UnsafeNewApiCall errors, fixes APIs that were incorrectly targeting
API 16, improves exception logging. Cleans up test formatting.
Relnote: "Adds Handler.hasCallbacks() method for parity with platform SDK"
Fixes: 113855676
Test: HandlerCompatTest#testHasCallbacks, HandlerCompatTest
Change-Id: Idce1c9fbe0d93bd9ebcb26716a63834bb1c4c12d
M core/core/api/current.txt
M core/core/api/public_plus_experimental_current.txt
M core/core/api/restricted_current.txt
M core/core/src/androidTest/java/androidx/core/os/HandlerCompatTest.java
M core/core/src/main/java/androidx/core/os/HandlerCompat.java
Description
--
Please add.