When the initial battery level is less than 30%, the migration will start automatically after the battery reaches 30%.
There is a corner case here: when the initial battery is 29.9999%, the migration can start immediately and the user loses the chance to skip the migration.
The request from UX is that we should show the low-battery screen at least 5
seconds.
https://bugs.chromium.org/p/chromium/issues/detail?id=723103#c5
We get the power status update every 30 seconds. If the user see low-battery
screen, the user will likely to see the the screen more than 5 seconds.
https://cs.corp.google.com/chromeos_public/src/platform2/power_manager/powerd...
However, as we explicitly request power status update on initializing the
screen, there is a unlucky case where:
1) 29.9999% is received on the initial request for power status update.
2) Just after 1), 30.0000% is received on the regular 30s polling.
In this case, the user will see a flash of low-storage screen and then migration
starts automatically.
A possible solution is using the normal flow if the initial
value was >=29.5%, if UX/PM are ok with it. (suggested by kinaba@)
Comment 1 by mitsuji@chromium.org
, May 30 2017