Commit f101532
[Predictive Back][Search] Fixed
When navigation icon animation is disabled after the predictive back navigation icon animators are initialized, a strange crash happens in `SearchViewAnimatorSet#updateBackProgress` from the call to `AnimatorSet#setCurrentPlayTime()`, in which the button progress `AnimatorSet` duration is 250 but the total duration is 0. This triggers an [`UnsupportedOperationException`](https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/animation/AnimatorSet.java#928) with the message: `"Error: Play time should always be in between 0 and duration."`.
Adding an early return from `SearchViewAnimatorSet#updateBackProgress` when navigation animation is disabled appears to fix the crash.
PiperOrigin-RevId: 550885523UnsupportedOperationException AnimatorSet crash in SearchView.1 parent 4c89301 commit f101532
File tree
1 file changed
+5
-0
lines changed- lib/java/com/google/android/material/search
1 file changed
+5
-0
lines changedLines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
632 | 637 | | |
633 | 638 | | |
634 | 639 | | |
| |||
0 commit comments