Fixed
Status Update
Comments
vi...@google.com <vi...@google.com>
ra...@google.com <ra...@google.com>
il...@google.com <il...@google.com> #2
Jeremy, is this still an issue? I think the problem was that you had two transitions targeting the same View for the same action (e.g. two Slide() transitions).
ap...@google.com <ap...@google.com> #3
I have a similar issue with plain AnimatorSet:
set.start()
set.pause()
set.setCurrentPlayTime(100)
set.setCurrentPlayTime(0)
set.setCurrentPlayTime(100)
set.resume()
doesn't play animation in resume().
jb...@google.com <jb...@google.com> #4
Should clarify that if I filter out setCurrentPlayTime(0)
(or replace it with setCurrentPlayTime(1)
) it works well.
Also even with setCurrentPlayTime(0)
, onAnimationEnd
is notified with correct delay (as if the animation has played).
Description
1. Create a boilerplate app project
2. Add a dynamic feature module to the project
3. Add a FragmentContainerView to the XML layout for an Activity in the dynamic feature module
4. Ensure the FragmentContainerView has an android:id attribute specified
5. Have the base app module use SplitInstallManager to request the dynamic feature module
6. Once the dynamic feature is installed, launch the dynamic feature module's Activity containing a FragmentContainerView
7. Generate an app bundle from the above configuration and use bundletool to perform a local test installation of the apk set per
8. Once the user launches the base app and performs any action necessary to start the dynamic feature installation and launch of the dynamic feature module's Activity, the app will crash with "java.lang.IllegalStateException: FragmentContainerView must have an android:id to add Fragment ..."
-- Minimal reproduce project:
- What happened.
-- FragmentContainerView causes an IllegalStateException on inflation from a dynamic feature module because its android:id generated by AAPT is too large to fit in a signed 32 bit integer. This causes View.getId() to return a negative value that overflows past the signed integer max of 2^31 - 1, which FragmentContainerView's construcotr considers invalid. FragmentContainerView's constructor then throws the IllegalStateException claiming its XML source didn't have an android:id attribute.
-- Presumably dynamic feature modules bump up the resource IDs significantly, as I'm seeing starting values in R.txt at 0x80000000 which is already beyond the 32 bit signed integer max of 2^31 - 1. The R.txt values in the base module seem to start around 0x7f000000, which leaves much more room before overflow. Given that, the dynamic feature module aspect of this issue is likely incidental and the FragmentContainerView constructor logic is the root cause.
-- Full discussion is detailed in
- What you think the correct behavior should be.
-- The View ID validity check should allow negative values; it should simply be 'id != 0'.
- Context Details:
-- Android Version: 11
-- Test Device: Samsung Galaxy S20 Ultra 5G (SM-G988U)
-- ADB Bugreport Output: