rjaros87/pm-home-station

[Android] Percentage values go Integer.MAX when changing orientation

pskowronek opened this issue · 3 comments

Percentage values go Integer.MAX_VALUE when changing orientation.

To reproduce:

  • open app
  • flip the device to horizontal position
  • flip the device back to vertical - for a second or two you can see the percentage values to be set to Integer.MAX_VALUE

👍 confirm.

Yeah, I know, my brother even called me with that (first Github issue I received by a phone ;D)

I'll look into that during the weekend, although it seems weird since the values get updated with read, and after the rotation they should be initialized with null / empty / zeros, same as when the app launches. What weird mathematical operation can result in MAX_VALUE? As in - division by zero (nah, exception), etc?

fixed