From 60f83e842ccce57931cbed5ffcebb28515f6f5d7 Mon Sep 17 00:00:00 2001 From: chrox Date: Thu, 13 Jun 2013 16:42:19 +0800 Subject: [PATCH] bugfix: check if kpvbooklet was launched for more than once, if not we will disable pillow And it will fix the blank screen bug and the first-time-launch-mess-up bug introduced by kpvbooklet. Users who use KUAL exclusively will not be affected and pillow is disabled each time koreader is launched. For those who have installed both kpvbooklet and KUAL and use both launchers alternatively, it's better to reset the booklet counter with the command `lipc-set-prop -i com.github.koreader.kpvbooklet.timer reset 0` before launching koreader with KUAL. Otherwise, pillow might not be disabled. --- koreader.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/koreader.sh b/koreader.sh index 8525fc67a..320252c6d 100755 --- a/koreader.sh +++ b/koreader.sh @@ -26,10 +26,11 @@ if test "$1" == "--framework_stop"; then /etc/init.d/framework stop fi -# dismiss chrome bar -lipc-set-prop com.lab126.pillow disableEnablePillow disable -# notify kpvbooklet that pillow is disabled -lipc-send-event com.github.koreader.kpvbooklet disablePillow +# check if kpvbooklet was launched for more than once, if not we will disable pillow +count=`lipc-get-prop -eiq com.github.koreader.kpvbooklet.timer count` +if [ "$count" == "" -o "$count" == "0" ]; then + lipc-set-prop com.lab126.pillow disableEnablePillow disable +fi # stop cvm #killall -stop cvm