sm6375-common: Remove unused code

This commit is contained in:
Andy | アンディ
2023-09-06 10:44:04 +08:00
parent ba7b4bbe64
commit 607a67ad90
5 changed files with 0 additions and 67 deletions

View File

@@ -1,55 +0,0 @@
/*
* Copyright (C) 2021 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <aidl/android/hardware/power/BnPower.h>
#include <android-base/file.h>
#include <android-base/logging.h>
#include <sys/ioctl.h>
#define SET_CUR_VALUE 0
#define TOUCH_DOUBLETAP_MODE 14
#define TOUCH_MAGIC 't'
#define TOUCH_IOC_SETMODE _IO(TOUCH_MAGIC, SET_CUR_VALUE)
#define TOUCH_DEV_PATH "/dev/xiaomi-touch"
#define TOUCH_ID 0
namespace aidl {
namespace android {
namespace hardware {
namespace power {
namespace impl {
using ::aidl::android::hardware::power::Mode;
bool isDeviceSpecificModeSupported(Mode type, bool* _aidl_return) {
switch (type) {
case Mode::DOUBLE_TAP_TO_WAKE:
*_aidl_return = true;
return true;
default:
return false;
}
}
bool setDeviceSpecificMode(Mode type, bool enabled) {
switch (type) {
case Mode::DOUBLE_TAP_TO_WAKE: {
int fd = open(TOUCH_DEV_PATH, O_RDWR);
int arg[3] = {TOUCH_ID, TOUCH_DOUBLETAP_MODE, enabled ? 1 : 0};
ioctl(fd, TOUCH_IOC_SETMODE, &arg);
close(fd);
return true;
}
default:
return false;
}
}
} // namespace impl
} // namespace power
} // namespace hardware
} // namespace android
} // namespace aidl

View File

@@ -160,10 +160,6 @@ on boot
chmod 0666 /mnt/vendor/persist/camera/rear_dc_cal_wd.bin
chmod 0666 /data/vendor/camera/com.xiaomi.dcal.wu.data
# Touch feature
chown system system /dev/xiaomi-touch
chmod 0660 /dev/xiaomi-touch
on property:vendor.display.lcd_density=560
setprop dalvik.vm.heapgrowthlimit 256m

View File

@@ -6,6 +6,3 @@ type fingerprint_device, dev_type;
# IR device
type ir_spi_device, dev_type;
# Touch
type touchfeature_device, dev_type;

View File

@@ -167,9 +167,6 @@
/data/vendor/thermal(/.*)? u:object_r:thermal_data_file:s0
/vendor/bin/mi_thermald u:object_r:mi_thermald_exec:s0
# Touch
/dev/xiaomi-touch u:object_r:touchfeature_device:s0
# Xiaomi MAC
/data/vendor/mac_addr(/.*)? u:object_r:vendor_wifi_vendor_data_file:s0
/data/vendor/wlan_logs(/.*)? u:object_r:vendor_wifi_vendor_data_file:s0

View File

@@ -1,2 +0,0 @@
# Allow hal_power_default to write to dt2w node
allow hal_power_default touchfeature_device:chr_file rw_file_perms;