aboutsummaryrefslogtreecommitdiffstats
path: root/ui.cpp
diff options
context:
space:
mode:
authorTom Marshall <tdm.code@gmail.com>2017-09-08 19:48:46 +0000
committerMichael Bestas <mkbestas@lineageos.org>2019-04-04 20:08:37 +0300
commitcfcafa14542565a96ca9ddc54a65a2e3d9cd28d0 (patch)
treef22bfa524961f7922ec48f83e82026b2d40b5d11 /ui.cpp
parenta08c6f189260667dcafc4b65505c0829c2295404 (diff)
downloadandroid_bootable_recovery-cfcafa14542565a96ca9ddc54a65a2e3d9cd28d0.tar.gz
android_bootable_recovery-cfcafa14542565a96ca9ddc54a65a2e3d9cd28d0.tar.bz2
android_bootable_recovery-cfcafa14542565a96ca9ddc54a65a2e3d9cd28d0.zip
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
Diffstat (limited to 'ui.cpp')
-rw-r--r--ui.cpp6
1 files changed, 6 insertions, 0 deletions
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;