Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix narrowing conversion lint (#47740)
Internally we have a lint that surfaces this as a warning. Googlers, please refer to go/al-rule/NarrowingConversion. Related: b/309552840 When we do: ``` coords.toolMajor = (float) (double) coordsList.get(3) * density; ``` `coordsList.get(3)` is casted to a `double`, then a `float`, before the multiplication happens. I don't think this is intentional. The intention of the code here seems to be: - Cast to a `double`: `coordsList` is a `List<Object>` so the cast narrows the value - Cast to a `float`: To fit the resulting value into [`coords.toolMajor`](https://developer.android.com/reference/android/view/MotionEvent.PointerCoords#toolMajor), which is a `float`. As such, add parenthesis to address this. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
- Loading branch information