Merge "common: init: update sensor settings file related entries"
This commit is contained in:
commit
ede5e50834
|
@ -38,20 +38,13 @@ fi
|
|||
start_sensors()
|
||||
{
|
||||
if [ -c /dev/msm_dsps -o -c /dev/sensors ]; then
|
||||
mkdir -p /data/system/sensors
|
||||
touch /data/system/sensors/settings
|
||||
chmod -h 775 /data/system/sensors
|
||||
chmod -h 664 /data/system/sensors/settings
|
||||
chown -h system /data/system/sensors/settings
|
||||
chmod -h 775 /persist/sensors
|
||||
chmod -h 664 /persist/sensors/sensors_settings
|
||||
chown -h system.root /persist/sensors/sensors_settings
|
||||
|
||||
mkdir -p /data/misc/sensors
|
||||
chmod -h 775 /data/misc/sensors
|
||||
|
||||
if [ ! -s /data/system/sensors/settings ]; then
|
||||
# If the settings file is empty, enable sensors HAL
|
||||
# Otherwise leave the file with it's current contents
|
||||
echo 1 > /data/system/sensors/settings
|
||||
fi
|
||||
start sensors
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue