cheeseburger: use ITouchscreenGesture from hardware/oneplus
* Removed from msm8998-common. Change-Id: Id7921b1298749a8d74493426202f43e30146fa6f
This commit is contained in:
3
Android.bp
Normal file
3
Android.bp
Normal file
@@ -0,0 +1,3 @@
|
||||
soong_namespace {
|
||||
imports: ["hardware/oneplus"],
|
||||
}
|
||||
@@ -34,5 +34,8 @@ TARGET_OTA_ASSERT_DEVICE := cheeseburger,OnePlus5,oneplus5
|
||||
# SELinux
|
||||
BOARD_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor
|
||||
|
||||
# Soong
|
||||
PRODUCT_SOONG_NAMESPACES += $(DEVICE_PATH)
|
||||
|
||||
# inherit from the proprietary version
|
||||
-include vendor/oneplus/cheeseburger/BoardConfigVendor.mk
|
||||
|
||||
@@ -20,6 +20,7 @@ cc_binary {
|
||||
relative_install_path: "hw",
|
||||
vendor: true,
|
||||
srcs: [
|
||||
":vendor.lineage.touch@1.0-oneplus-touchgesture",
|
||||
"KeyDisabler.cpp",
|
||||
"KeySwapper.cpp",
|
||||
"service.cpp"
|
||||
@@ -31,4 +32,7 @@ cc_binary {
|
||||
"libutils",
|
||||
"vendor.lineage.touch@1.0",
|
||||
],
|
||||
header_libs: [
|
||||
"vendor.lineage.touch@1.0-oneplus-headers",
|
||||
],
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <android-base/logging.h>
|
||||
#include <hidl/HidlTransportSupport.h>
|
||||
#include <touch/oneplus/TouchscreenGesture.h>
|
||||
|
||||
#include "KeyDisabler.h"
|
||||
#include "KeySwapper.h"
|
||||
@@ -29,12 +30,15 @@ using android::hardware::joinRpcThreadpool;
|
||||
|
||||
using ::vendor::lineage::touch::V1_0::IKeyDisabler;
|
||||
using ::vendor::lineage::touch::V1_0::IKeySwapper;
|
||||
using ::vendor::lineage::touch::V1_0::ITouchscreenGesture;
|
||||
using ::vendor::lineage::touch::V1_0::implementation::KeyDisabler;
|
||||
using ::vendor::lineage::touch::V1_0::implementation::KeySwapper;
|
||||
using ::vendor::lineage::touch::V1_0::implementation::TouchscreenGesture;
|
||||
|
||||
int main() {
|
||||
sp<IKeyDisabler> key_disabler = new KeyDisabler();
|
||||
sp<IKeySwapper> key_swapper = new KeySwapper();
|
||||
sp<ITouchscreenGesture> gestureService = new TouchscreenGesture();
|
||||
|
||||
configureRpcThreadpool(1, true /*callerWillJoin*/);
|
||||
|
||||
@@ -48,6 +52,11 @@ int main() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (gestureService->registerAsService() != android::OK) {
|
||||
LOG(ERROR) << "Cannot register touchscreen gesture HAL service.";
|
||||
return 1;
|
||||
}
|
||||
|
||||
LOG(INFO) << "Touch HAL service is ready.";
|
||||
joinRpcThreadpool();
|
||||
// Should not pass this line
|
||||
|
||||
Reference in New Issue
Block a user