CHERRY-PICK: Candy: Add wipe option support per factory_wipe_option

1. battery_cut_off: add discharge battery to ensure battery capacity is
in desired range before battery cut-off
2. shutdown: directly shutdown after wiping
3. rma_battery_cut_off: skip checking battery capacity for rma battery
cut-off

BUG=chrome-os-partner:35369
TEST=Factory wipe and check the different wipe option behavior

Change-Id: I53be31f6a2be72d59820f2e69d73c172771ff08a
Reviewed-on: https://chromium-review.googlesource.com/240883
Reviewed-by: Bowgo Tsai <bowgotsai@chromium.org>
Commit-Queue: JAMES C Chen <james.c.chen@intel.com>
Tested-by: JAMES C Chen <james.c.chen@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/244283
Commit-Queue: Huki Huang <huki.huang@intel.com>
Tested-by: Nicole Li <nicole.li@intel.com>
(cherry picked from commit c63cae23c21629bae3ed8ac8030a9c842bcbc261)
Reviewed-on: https://chromium-review.googlesource.com/246113
Commit-Queue: Bowgo Tsai <bowgotsai@chromium.org>
Tested-by: Bowgo Tsai <bowgotsai@chromium.org>
6 files changed
tree: df9844a5e07358d6e277ff6664c40bd7db0387bf
  1. chipset-bdw/
  2. chipset-skl/
  3. helloworld/
  4. overlay-amd64-generic/
  5. overlay-amd64-host/
  6. overlay-anglar/
  7. overlay-arm-generic/
  8. overlay-arm64-generic/
  9. overlay-auron/
  10. overlay-beaglebone/
  11. overlay-butterfly/
  12. overlay-candy/
  13. overlay-clapper/
  14. overlay-cranky/
  15. overlay-daisy/
  16. overlay-enguarde/
  17. overlay-expresso/
  18. overlay-falco/
  19. overlay-gizmo/
  20. overlay-glimmer/
  21. overlay-gnawty/
  22. overlay-kip/
  23. overlay-leon/
  24. overlay-link/
  25. overlay-lumpy/
  26. overlay-mappy/
  27. overlay-mccloud/
  28. overlay-mipseb-n32-generic/
  29. overlay-mipseb-n64-generic/
  30. overlay-mipseb-o32-generic/
  31. overlay-mipsel-n32-generic/
  32. overlay-mipsel-n64-generic/
  33. overlay-mipsel-o32-generic/
  34. overlay-moose/
  35. overlay-nyan/
  36. overlay-panther/
  37. overlay-parrot/
  38. overlay-parry/
  39. overlay-peach/
  40. overlay-peppy/
  41. overlay-ppcbe-32-generic/
  42. overlay-ppcbe-64-generic/
  43. overlay-ppcle-32-generic/
  44. overlay-ppcle-64-generic/
  45. overlay-puppy/
  46. overlay-quawks/
  47. overlay-rambi/
  48. overlay-raspberrypi/
  49. overlay-squawks/
  50. overlay-stout/
  51. overlay-stumpy/
  52. overlay-swanky/
  53. overlay-tricky/
  54. overlay-variant-amd64-generic-embedded/
  55. overlay-variant-amd64-generic-freon/
  56. overlay-variant-amd64-generic-mobbuild/
  57. overlay-variant-arm-generic-freon/
  58. overlay-variant-auron-paine/
  59. overlay-variant-auron-yuna/
  60. overlay-variant-beaglebone-servo/
  61. overlay-variant-daisy-embedded/
  62. overlay-variant-daisy-freon/
  63. overlay-variant-daisy-spring/
  64. overlay-variant-falco-freon/
  65. overlay-variant-link-freon/
  66. overlay-variant-nyan-freon/
  67. overlay-variant-panther-embedded/
  68. overlay-variant-panther-freon/
  69. overlay-variant-panther-goofy/
  70. overlay-variant-panther-moblab/
  71. overlay-variant-parrot-ivb/
  72. overlay-variant-peach-pi/
  73. overlay-variant-peach-pit/
  74. overlay-variant-peppy-freon/
  75. overlay-variant-stumpy-moblab/
  76. overlay-variant-x86-alex-he/
  77. overlay-variant-x86-generic-embedded/
  78. overlay-variant-x86-zgb-he/
  79. overlay-veyron/
  80. overlay-winky/
  81. overlay-wolf/
  82. overlay-x32-generic/
  83. overlay-x86-alex/
  84. overlay-x86-generic/
  85. overlay-x86-mario/
  86. overlay-x86-zgb/
  87. overlay-zako/
  88. project-app-shell/
  89. project-freon/
  90. project-mobbase/
  91. project-mobbuild/
  92. project-moblab/
  93. .gitignore
  94. inherit-review-settings-ok
  95. README
  96. WATCHLISTS