From cfcafa14542565a96ca9ddc54a65a2e3d9cd28d0 Mon Sep 17 00:00:00 2001 From: Tom Marshall Date: Fri, 8 Sep 2017 19:48:46 +0000 Subject: recovery: Blank screen during shutdown and reboot Some hardware doesn't like having the panel on and still active during power cycles, so just turn it off. (based on Ied1f0802f5a2d45980ee33abf2456a291ba64beb) Change-Id: Ied6bbc3a32fd1c7cf6ea3ec1b2bee298520651c3 --- ui.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ui.cpp') diff --git a/ui.cpp b/ui.cpp index 3930cb78..792e22b4 100644 --- a/ui.cpp +++ b/ui.cpp @@ -220,6 +220,12 @@ bool RecoveryUI::Init(const std::string& /* locale */) { return true; } +void RecoveryUI::Stop() { + if (!android::base::WriteStringToFile("0", BRIGHTNESS_FILE)) { + PLOG(WARNING) << "Failed to write brightness file"; + } +} + void RecoveryUI::OnTouchEvent() { Point delta = touch_pos_ - touch_start_; enum SwipeDirection { UP, DOWN, RIGHT, LEFT } direction; -- cgit v1.2.3