UIManager: Don't lose track of the original rotation on reboot/poweroff (#9606)

And, actually, stop enforcing Portrait; Screensaver already handles
rotation as necessary depending on the exact screensaver mode.

Fix https://www.mobileread.com/forums/showthread.php?t=349522
reviewable/pr9609/r1
NiLuJe 2 years ago committed by GitHub
parent c0dffe2012
commit 93ae341823
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -61,9 +61,7 @@ function UIManager:init()
self.poweroff_action = function()
self._entered_poweroff_stage = true
logger.info("Powering off the device...")
Device.orig_rotation_mode = Device.screen:getRotationMode()
self:broadcastEvent(Event:new("Close"))
Screen:setRotationMode(Screen.ORIENTATION_PORTRAIT)
local Screensaver = require("ui/screensaver")
Screensaver:setup("poweroff", _("Powered off"))
Screensaver:show()
@ -76,9 +74,7 @@ function UIManager:init()
self.reboot_action = function()
self._entered_poweroff_stage = true
logger.info("Rebooting the device...")
Device.orig_rotation_mode = Device.screen:getRotationMode()
self:broadcastEvent(Event:new("Close"))
Screen:setRotationMode(Screen.ORIENTATION_PORTRAIT)
local Screensaver = require("ui/screensaver")
Screensaver:setup("reboot", _("Rebooting…"))
Screensaver:show()

Loading…
Cancel
Save