From 879b59345511b7bcea8b5118cf97f865c042961d Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Tue, 12 Apr 2016 16:01:16 +0200 Subject: [PATCH] Refresh the UI properly on exit on more Kindle FW This broadens the fix applied to FW >= 5.6.5 to the whole range of FW 5.x, because it appears to be needed on some FW 5.3.7.x versions... Fix #1924 --- platform/kindle/koreader.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/platform/kindle/koreader.sh b/platform/kindle/koreader.sh index 6f0290fec..518a471c2 100755 --- a/platform/kindle/koreader.sh +++ b/platform/kindle/koreader.sh @@ -197,11 +197,11 @@ fi if [ "${STOP_FRAMEWORK}" == "no" -a "${INIT_TYPE}" == "upstart" ] ; then count=$(lipc-get-prop -eiq com.github.koreader.kpvbooklet.timer count) if [ "$count" == "" -o "$count" == "0" ] ; then + # NOTE: Dump the fb so we can restore something useful on exit... + cat /dev/fb0 > /var/tmp/koreader-fb.dump # NOTE: We want to disable the status bar (at the very least). Unfortunately, the soft hide/unhide method doesn't work properly anymore since FW 5.6.5... if [ "$(printf "%.3s" $(grep '^Kindle 5' /etc/prettyversion.txt 2>&1 | sed -n -r 's/^(Kindle)([[:blank:]]*)([[:digit:].]*)(.*?)$/\3/p' | tr -d '.'))" -ge "565" ] ; then PILLOW_HARD_DISABLED="yes" - # NOTE: Dump the fb so we can restore something useful on exit... - cat /dev/fb0 > /var/tmp/koreader-fb.dump # FIXME: So we resort to killing pillow completely on FW >= 5.6.5... logmsg "Disabling pillow . . ." lipc-set-prop com.lab126.pillow disableEnablePillow disable @@ -313,6 +313,10 @@ if [ "${STOP_FRAMEWORK}" == "no" -a "${INIT_TYPE}" == "upstart" ] ; then if [ "${PILLOW_SOFT_DISABLED}" == "yes" ] ; then logmsg "Restoring the status bar . . ." lipc-set-prop com.lab126.pillow interrogatePillow '{"pillowId": "default_status_bar", "function": "nativeBridge.showMe();"}' + # NOTE: Try to leave the user with a slightly more useful FB content than our own last screen... + cat /var/tmp/koreader-fb.dump > /dev/fb0 + rm -f /var/tmp/koreader-fb.dump + lipc-set-prop com.lab126.appmgrd start app://com.lab126.booklet.home fi fi