Change initial start of polling battery poling to a resume.

This causes the daemon to poll the state of battery on start and signal the
browser that there is information about the battery state to pull. This also
schedules the next poll in 5 seconds since the time values from the first poll
might be bogus and need to be ignored. This is the same behaviour that is used
when the device transitions power state.

BUG=chromium:136885
TEST=Started device and watch the status tray on the login screen. The battery
     icon should appear in about of second, instead of taking upto 30 seconds,
     with the Calculating estimate and then after 5 seconds should transition to
     the correct time estimate.

Change-Id: I8e662b048deacc97059d0d63ccb55e75995118e3
Reviewed-on: https://gerrit.chromium.org/gerrit/31140
Tested-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Daniel Erat <derat@chromium.org>
Commit-Ready: Ryan Harrison <rharrison@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31348
Reviewed-by: Puneet Kumar <puneetster@chromium.org>
1 file changed
tree: d00659516b355443897796ca173fff6c809674de
  1. config/
  2. .gitignore
  3. 99-usb-hid-wake.rules
  4. activity_detector_interface.h
  5. ambient_light_sensor.cc
  6. ambient_light_sensor.h
  7. async_file_reader.cc
  8. async_file_reader.h
  9. async_file_reader_unittest.cc
  10. audio_detector.cc
  11. audio_detector.h
  12. backlight.cc
  13. backlight.h
  14. backlight_controller.h
  15. backlight_dbus_tool.cc
  16. backlight_interface.h
  17. backlight_tool.cc
  18. backlight_unittest.cc
  19. common.mk
  20. debug_sleep_quickly
  21. external_backlight.cc
  22. external_backlight.h
  23. external_backlight_client.cc
  24. external_backlight_client.h
  25. external_backlight_controller.cc
  26. external_backlight_controller.h
  27. external_backlight_controller_unittest.cc
  28. file_tagger.cc
  29. file_tagger.h
  30. file_tagger_unittest.cc
  31. idle_detector.cc
  32. idle_detector.h
  33. idle_dimmer_unittest.cc
  34. inherit-review-settings-ok
  35. inotify.cc
  36. inotify.h
  37. input.cc
  38. input.h
  39. internal_backlight_controller.cc
  40. internal_backlight_controller.h
  41. internal_backlight_controller_unittest.cc
  42. LICENSE
  43. Makefile
  44. metrics_constants.cc
  45. metrics_constants.h
  46. metrics_store.cc
  47. metrics_store.h
  48. metrics_store_unittest.cc
  49. mock_activity_detector.h
  50. mock_backlight.h
  51. mock_backlight_controller_observer.h
  52. mock_metrics_store.h
  53. mock_rolling_average.h
  54. monitor_reconfigure.cc
  55. monitor_reconfigure.h
  56. org.chromium.PowerManager.conf
  57. OWNERS
  58. plug_dimmer_unittest.cc
  59. power_constants.cc
  60. power_constants.h
  61. power_prefs.cc
  62. power_prefs.h
  63. power_prefs_interface.h
  64. power_state_tool.cc
  65. power_supply.cc
  66. power_supply.h
  67. power_supply_info.cc
  68. power_supply_unittest.cc
  69. powerd.cc
  70. powerd.h
  71. powerd_main.cc
  72. powerd_metrics.cc
  73. powerd_suspend
  74. powerd_unittest.cc
  75. powerman.cc
  76. powerman.h
  77. powerman_main.cc
  78. powerman_metrics.cc
  79. powerman_unittest.cc
  80. README
  81. rolling_average.cc
  82. rolling_average.h
  83. rolling_average_unittest.cc
  84. RootPowerManager.conf
  85. screen_locker.cc
  86. screen_locker.h
  87. send_metrics_on_resume
  88. signal_callback.h
  89. state_control.cc
  90. state_control.h
  91. state_control_unittest.cc
  92. suspend_delay_sample.cc
  93. suspender.cc
  94. suspender.h
  95. testrunner.cc
  96. usb-hid-wake.sh
  97. util.cc
  98. util.h
  99. util_dbus.cc
  100. util_dbus.h
  101. util_unittest.cc
  102. video_detector.cc
  103. video_detector.h
  104. WATCHLISTS