From f700214ebddcf694bc39267b8302f1b33923aea5 Mon Sep 17 00:00:00 2001 From: Arne Coucheron Date: Tue, 8 Mar 2011 16:00:01 +0100 Subject: [PATCH] click: Make sure custom screen calibration is run after initial calibration Change-Id: I0d11bb7daac80b9d3cff563b465aa821a244fd90 --- click.mk | 1 + custom/calibrate_screen | 14 ++++++++++++++ init.bahamas.rc | 5 +++++ 3 files changed, 20 insertions(+) create mode 100644 custom/calibrate_screen diff --git a/click.mk b/click.mk index e98674e..aa8a862 100644 --- a/click.mk +++ b/click.mk @@ -85,6 +85,7 @@ PRODUCT_COPY_FILES += \ # precompiled files for /system/bin PRODUCT_COPY_FILES += \ device/htc/click/custom/compcache:system/bin/compcache \ + device/htc/click/custom/calibrate_screen:system/bin/calibrate_screen \ device/htc/click/custom/handle_compcache:system/bin/handle_compcache \ device/htc/click/custom/rzscontrol:system/bin/rzscontrol diff --git a/custom/calibrate_screen b/custom/calibrate_screen new file mode 100644 index 0000000..692d007 --- /dev/null +++ b/custom/calibrate_screen @@ -0,0 +1,14 @@ +#!/system/bin/sh + +SETTINGSDB=/data/data/com.android.providers.settings/databases/settings.db +if [ ! -f $SETTINGSDB ] ; +then + exit +fi + +CALIBRATION=`sqlite3 $SETTINGSDB "select value from system where name='calibration_points';"` +if [ ! -z $CALIBRATION ] ; +then + echo $CALIBRATION > /sys/class/input/input1/calibration_points +fi + diff --git a/init.bahamas.rc b/init.bahamas.rc index 3219b0b..4144a0f 100644 --- a/init.bahamas.rc +++ b/init.bahamas.rc @@ -60,6 +60,11 @@ service akm8973 /system/bin/akm8973 user compass group compass misc input +service calibrate_screen /system/bin/calibrate_screen + user root + group root + oneshot + service wlan_loader /system/bin/wlan_loader \ -f /system/etc/wifi/Fw1251r1c.bin -e /proc/calibration \ -i /system/etc/wifi/tiwlan.ini