diff options
| author | TheStrix <parthbhatia98@gmail.com> | 2016-11-08 14:06:49 +0530 |
|---|---|---|
| committer | TheStrix <parthbhatia98@gmail.com> | 2016-11-28 00:33:43 +0530 |
| commit | 148484a83e9bcf814407b85d6ed4863d0243d068 (patch) | |
| tree | 19511962eb09bbb9dd01955ad225114b4a1f4873 | |
| parent | bfc9b9dbafb09ec624da0fed1eb8b84d793c8286 (diff) | |
hydrogen: Add tap to wake option
Change-Id: Iec777ff7ef393ab1ef528f5f45ab3611eab4840b
| -rw-r--r-- | BoardConfig.mk | 4 | ||||
| -rw-r--r-- | overlay/frameworks/base/core/res/res/values/config.xml | 22 | ||||
| -rw-r--r-- | rootdir/etc/init.target.rc | 4 |
3 files changed, 30 insertions, 0 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk index 0ecefcb..fae2af2 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -34,5 +34,9 @@ TARGET_KERNEL_CONFIG := cyanogenmod_hydrogen_defconfig # Properties TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop +# Tap-to-Wake +TARGET_TAP_TO_WAKE_NODE := "/sys/bus/i2c/devices/i2c-4/4-0038/wakeup_mode" + + # inherit from the proprietary version -include vendor/xiaomi/hydrogen/BoardConfigVendor.mk diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml new file mode 100644 index 0000000..da4d14e --- /dev/null +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2016 The CyanogenMod Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + + <!-- Whether device supports double tap to wake --> + <bool name="config_supportDoubleTapWake">true</bool> + +</resources> diff --git a/rootdir/etc/init.target.rc b/rootdir/etc/init.target.rc index 017c0a8..6dc3202 100644 --- a/rootdir/etc/init.target.rc +++ b/rootdir/etc/init.target.rc @@ -27,6 +27,10 @@ # # +on early-boot + chown system radio /sys/bus/i2c/devices/i2c-4/4-0038/wakeup_mode + chmod 0664 /sys/bus/i2c/devices/i2c-4/4-0038/wakeup_mode + service mmbn-daemon /system/bin/mmbn-daemon class main oneshot |
