Status Update
Comments
su...@google.com <su...@google.com> #2
Branch: androidx-main
commit 06035833f0e98b6116774b743c75c2cc7c334326
Author: Ember Rose <emberrose@google.com>
Date: Mon May 17 15:52:36 2021
Create @AppCompatShadowedAttributes
This annotation is restricted to intra-androidx library usage. When
applied to a View in AppCompat, it will direct the annotation processor
to infer shadowed attributes for the View based on what interfaces from
Core it implements, e.g.: TintableBackgroundView.
Test: N/A
Relnote: Improved AppCompat support
Bug: 188446121
Change-Id: I2d7387a017585bcea14a8d8a857b9b60930bc1c5
M resourceinspection/resourceinspection-annotation/api/restricted_current.txt
A resourceinspection/resourceinspection-annotation/src/main/java/androidx/resourceinspection/annotation/AppCompatShadowedAttributes.java
su...@google.com <su...@google.com> #3
Branch: androidx-main
commit 42f9ba7d4ccd46960123b403df5ca28803643059
Author: Ember Rose <emberrose@google.com>
Date: Mon May 17 17:41:24 2021
Refactor resource inspection processor model
Extract an Attribute interface to generate code for either shadowed or
annotated regular attributes.
Test: ResourceInspectionProcessorTest
Bug: 188446121
Change-Id: I131f017c433ec9e44a6fb364c903467894735377
M resourceinspection/resourceinspection-processor/src/main/kotlin/androidx/resourceinspection/processor/InspectionCompanionGeneration.kt
M resourceinspection/resourceinspection-processor/src/main/kotlin/androidx/resourceinspection/processor/LayoutInspectionStep.kt
M resourceinspection/resourceinspection-processor/src/main/kotlin/androidx/resourceinspection/processor/Models.kt
pu...@gmail.com <pu...@gmail.com> #4
Branch: androidx-main
commit 49d18d3f7b42f7a5675357bd51fa4ff22ac0b5d5
Author: Ember Rose <emberrose@google.com>
Date: Mon May 17 18:51:33 2021
Shadowed attributes annotation processing
Test: ResourceInspectionProcessorTest
Bug: 188446121
Change-Id: Icf4eb2cab92ccde42daf583566f0ce7aca6d6d34
M resourceinspection/resourceinspection-processor/src/main/kotlin/androidx/resourceinspection/processor/LayoutInspectionStep.kt
M resourceinspection/resourceinspection-processor/src/main/kotlin/androidx/resourceinspection/processor/Models.kt
M resourceinspection/resourceinspection-processor/src/test/kotlin/androidx/resourceinspection/processor/ResourceInspectionProcessorTest.kt
fe...@tv2.no <fe...@tv2.no> #5
Branch: androidx-main
commit 6b505f5fbaa249d03647cfa5f236bea9a2967a12
Author: Ember Rose <emberrose@google.com>
Date: Tue May 18 12:31:44 2021
Document shadowed attribute interfaces
Test: N/A (docs)
Bug: 188446121
Change-Id: I025fe8f50202c9a30a0bcfcd24cd63047f9b4c75
M core/core/src/main/java/androidx/core/view/TintableBackgroundView.java
M core/core/src/main/java/androidx/core/widget/AutoSizeableTextView.java
M core/core/src/main/java/androidx/core/widget/TintableCheckedTextView.java
M core/core/src/main/java/androidx/core/widget/TintableCompoundButton.java
M core/core/src/main/java/androidx/core/widget/TintableCompoundDrawablesView.java
M core/core/src/main/java/androidx/core/widget/TintableImageSourceView.java
M resourceinspection/resourceinspection-annotation/src/main/java/androidx/resourceinspection/annotation/AppCompatShadowedAttributes.java
pu...@gmail.com <pu...@gmail.com> #6
Branch: androidx-main
commit 575674b572525f2ae8626306eab2a2cd264a7246
Author: Ember Rose <emberrose@google.com>
Date: Tue May 18 17:53:29 2021
Covert test dependencies to runtime only
Compile testing needs these dependencies to be on the runtime
classpath, but they're not needed on the implementation classpath.
(All use is in source strings or code generated in the test itself.)
This keeps the implementation classpath clean.
Test: ResourceInspectionProcessorTest
Bug: 188446121
Change-Id: I0332d8049a3fb0e22b7565d9f98cc56a8dbe3783
M resourceinspection/resourceinspection-processor/build.gradle
pu...@gmail.com <pu...@gmail.com> #7
This should be available in appcompat:1.4.0-alpha02 and resourceinpsection:1.0.0-alpha02
sz...@gmail.com <sz...@gmail.com> #8
Branch: androidx-main
commit 1bc6fdbb39da2551ddbf94e3d96ff3cd35c8779d
Author: Ember Rose <emberrose@google.com>
Date: Thu May 20 16:36:24 2021
Resourece Inspection 1.0.0-alpha02
Test: N/A
Bug: 188446121
Change-Id: I76330dac3210b000842ad8151d8cd2ddf9f2227a
M buildSrc/src/main/kotlin/androidx/build/LibraryVersions.kt
da...@bt.com <da...@bt.com> #9
It'd be great if it could be caught, but ultimately this looks like a Samsung bug.
ba...@google.com <ba...@google.com>
ma...@persgroep.net <ma...@persgroep.net> #10
- 100% Samsung, of which most are of the type Galaxy A52s 5G and Galaxy A51
- 100% Android 12
- 98% App in background
Unfortunately we don't seem to be the ones initiating some sort of action so we can't catch the exception in our application code.
pu...@gmail.com <pu...@gmail.com> #11
This is happening more and more... Apparently, there does not seem to be an incentive from Google to workaround it in this library probably because "not our problem" (it is a Samsung bug). The only thing we can do is to decompile mediarouter and catch the IllegalArguementException ourselves...
sz...@gmail.com <sz...@gmail.com> #12
Any chance to fix this in somehow? 200+ users in my app has this error. 100% Samsung 99% - android 12 1% - android 11
pu...@gmail.com <pu...@gmail.com> #13
I finally patched androidx.mediarouter:mediarouter:1.3.0
with IllegalArgumentException
:
in androidx.mediarouter.media.MediaRouterJellybean
, I changed:
public static void removeUserRoute(Object routerObj, Object routeObj) {
((MediaRouter)routerObj).removeUserRoute((MediaRouter.UserRouteInfo)routeObj);
}
to:
public static void removeUserRoute(Object routerObj, Object routeObj) {
try {
((MediaRouter)routerObj).removeUserRoute((MediaRouter.UserRouteInfo)routeObj);
}
catch (IllegalArgumentException ex) {
Log.w(TAG, "android.media.MediaRouter.removeUserRoute() failed with IllegalArgumentException (Samsung Android 12 bug work-around)", ex);
}
}
To use it:
- download
https://bubblesoftapps.com/mediarouter-samsung-fix/mediarouter-samsung-fix-1.3.0.zip - unzip in your .m2/repository folder so you end up having /path/to/.m2/repository/androidx/mediarouter/mediarouter-samsung-fix/
- update your build.gradle to use it: replace
implementation 'androidx.mediarouter:mediarouter:1.3.0'
withimplementation 'androidx.mediarouter:mediarouter-samsung-fix:1.3.0'
- if you have an AndroidX dependency pulling 'androidx.mediarouter:mediarouter', you will have to exclude it so it does not get in the way (duplicate classes). For example, the cast sdk needs it:
implementation('com.google.android.gms:play-services-cast:21.0.1') {
// replaced by mediarouter-samsung-fix
exclude group: 'androidx.mediarouter'
}
ol...@google.com <ol...@google.com> #14
We have made Samsung aware of this issue. It makes sense for us to catch the exception in the AndroidX MediaRouter library, as per #13, as well.
ap...@google.com <ap...@google.com> #15
Branch: androidx-main
commit c3805953951058b509f629980ffad858c7a531ee
Author: Oliver Woodman <olly@google.com>
Date: Fri May 20 13:35:47 2022
Workaround for crash removing user routes.
Test: N/A
Bug: 202931542
Change-Id: Ia25cd716cf2cd48ec298aff04e13751cbcb27d45
M mediarouter/mediarouter/src/main/java/androidx/mediarouter/media/MediaRouterJellybean.java
pu...@gmail.com <pu...@gmail.com> #16
Thanks for the fix (or rather, work-around) !
ol...@google.com <ol...@google.com> #17
Samsung have a fix for the underlying issue, and will roll it out to their devices in future maintenance releases.
pu...@gmail.com <pu...@gmail.com> #18
Glad to hear that ! Thanks for your report to Samsung, and for Samsung devs to fix it.
bl...@moshikids.com <bl...@moshikids.com> #19
Thanks!
ol...@google.com <ol...@google.com> #20
AndroidX MediaRouter 1.3.1 will pick up the fix, and is scheduled for release on July 27th.
bu...@google.com <bu...@google.com> #21
na...@google.com <na...@google.com> #22
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.mediarouter:mediarouter:1.4.0-alpha01
Description
Component used: androidx.mediarouter:mediarouter Version used: 1.2.5 Devices/Android versions reproduced on: Samsung / Android 11
I've seen crash below happening on Samsung Android 11 devices (various models). It is fairly rare, as it happened only for 5 users 1 or twice, in an app with lots of users. Maybe it can be worked-around catching IllegalArgumentException.