• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

device/generic/common


Commit MetaInfo

修訂2eed4e42cd62987eda80be5d5fed7605084534c3 (tree)
時間2015-07-17 03:56:50
作者Chih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

init.sh: add support of iio sensors

Change Summary

差異

--- a/device.mk
+++ b/device.mk
@@ -54,11 +54,12 @@ PRODUCT_COPY_FILES += \
5454 frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml \
5555 frameworks/native/data/etc/android.hardware.location.xml:system/etc/permissions/android.hardware.location.xml \
5656 frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \
57- frameworks/native/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \
58- frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \
59- frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \
60- frameworks/native/data/etc/android.hardware.sensor.barometer.xml:system/etc/permissions/android.hardware.sensor.barometer.xml \
6157 frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:system/etc/permissions/android.hardware.sensor.accelerometer.xml \
58+ frameworks/native/data/etc/android.hardware.sensor.barometer.xml:system/etc/permissions/android.hardware.sensor.barometer.xml \
59+ frameworks/native/data/etc/android.hardware.sensor.compass.xml:system/etc/permissions/android.hardware.sensor.compass.xml \
60+ frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \
61+ frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \
62+ frameworks/native/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \
6263 frameworks/native/data/etc/android.hardware.touchscreen.multitouch.distinct.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.distinct.xml \
6364 frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
6465 frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \
--- a/init.sh
+++ b/init.sh
@@ -20,6 +20,7 @@ function init_misc()
2020
2121 case "$PRODUCT" in
2222 T10*TA)
23+ modprobe ak8975
2324 ;;
2425 *)
2526 ;;
@@ -206,11 +207,9 @@ function init_hal_sensors()
206207
207208 # has sensor-hub?
208209 for i in /sys/bus/iio/devices/iio:device?; do
209- if [ -e $i/in_accel_scale ]; then
210- busybox chown -R 1000.1000 /sys/bus/iio/devices/iio:device?/
211- hal_sensors=hsb
212- break
213- fi
210+ busybox chown -R 1000.1000 /sys/bus/iio/devices/iio:device?/
211+ lsmod | grep -q hid_sensor_accel_3d && hal_sensors=hsb || hal_sensors=iio
212+ break
214213 done
215214
216215 set_property ro.hardware.sensors $hal_sensors