Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86f01ba2 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou Committed by Android (Google) Code Review
Browse files

Merge "Use sysprop flags on host"

parents db8c56a4 9faa4467
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ cc_defaults {
        "libcutils",
        "libjsoncpp",
        "liblog",
        "libPlatformProperties",
        "libstatslog",
        "libutils",
    ],
@@ -90,7 +91,6 @@ cc_defaults {
    target: {
        android: {
            shared_libs: [
                "libPlatformProperties",
                "libinput",
            ],
        },
+0 −6
Original line number Diff line number Diff line
@@ -20,9 +20,7 @@

#include <algorithm>

#if defined(__ANDROID__)
#include <android/sysprop/InputProperties.sysprop.h>
#endif
#include <ftl/flags.h>

#include "CursorInputMapper.h"
@@ -213,11 +211,7 @@ void InputDevice::addEventHubDevice(int32_t eventHubId, bool populateMappers) {

    // Touchscreens and touchpad devices.
    static const bool ENABLE_TOUCHPAD_GESTURES_LIBRARY =
#if defined(__ANDROID__)
            sysprop::InputProperties::enable_touchpad_gestures_library().value_or(false);
#else
            false;
#endif
    if (ENABLE_TOUCHPAD_GESTURES_LIBRARY && classes.test(InputDeviceClass::TOUCHPAD) &&
        classes.test(InputDeviceClass::TOUCH_MT)) {
        mappers.push_back(std::make_unique<TouchpadInputMapper>(*contextPtr));
+1 −8
Original line number Diff line number Diff line
@@ -16,10 +16,8 @@

#include "../Macros.h"

#include "MultiTouchInputMapper.h"
#if defined(__ANDROID__)
#include <android/sysprop/InputProperties.sysprop.h>
#endif
#include "MultiTouchInputMapper.h"

namespace android {

@@ -218,12 +216,7 @@ bool MultiTouchInputMapper::hasStylus() const {

bool MultiTouchInputMapper::shouldSimulateStylusWithTouch() const {
    static const bool SIMULATE_STYLUS_WITH_TOUCH =
#if defined(__ANDROID__)
            sysprop::InputProperties::simulate_stylus_with_touch().value_or(false);
#else
            // Disable this developer feature where sysproperties are not available
            false;
#endif
    return SIMULATE_STYLUS_WITH_TOUCH &&
            mParameters.deviceType == Parameters::DeviceType::TOUCH_SCREEN;
}