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

Commit 45c1d0c1 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Move input definitions into separate HAL

The types added for input in InputClassifier HAL are not specific to
that HAL. These are common input definitions.

To allow for future reuse in this and other HALs, move these definitions
into a separate, type-only HAL android::hardware::input::common.

This will be similar to such existing HALs as:
hardware/interfaces/graphics/common
hardware/interfaces/camera/common
hardware/interfaces/audio/common

Test: make only
Bug: 111480215
Change-Id: I16d76d6bdb48b24487b232fda45c6146e1003fe9
parent 56ac36d3
Loading
Loading
Loading
Loading
+1 −18
Original line number Diff line number Diff line
@@ -7,29 +7,12 @@ hidl_interface {
        enabled: true,
    },
    srcs: [
        "types.hal",
        "IInputClassifier.hal",
    ],
    interfaces: [
        "android.hardware.input.common@1.0",
        "android.hidl.base@1.0",
    ],
    types: [
        "Action",
        "Axis",
        "Button",
        "Classification",
        "EdgeFlag",
        "Flag",
        "Meta",
        "MotionEvent",
        "PointerCoords",
        "PointerProperties",
        "PolicyFlag",
        "Source",
        "SourceClass",
        "ToolType",
        "VideoFrame",
    ],
    gen_java: true,
}
+3 −0
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@

package android.hardware.input.classifier@1.0;

import android.hardware.input.common@1.0::Classification;
import android.hardware.input.common@1.0::MotionEvent;

interface IInputClassifier {

  /**
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
#include <log/log.h>
#include <utils/Timers.h>

using namespace android::hardware::input::classifier::V1_0;
using namespace android::hardware::input::common::V1_0;

namespace android {
namespace hardware {
+3 −2
Original line number Diff line number Diff line
@@ -31,8 +31,9 @@ using ::android::hardware::Return;

struct InputClassifier : public IInputClassifier {
    // Methods from ::android::hardware::input::classifier::V1_0::IInputClassifier follow.
    Return<Classification> classify(
        const ::android::hardware::input::classifier::V1_0::MotionEvent& event) override;

    Return<android::hardware::input::common::V1_0::Classification> classify(
            const android::hardware::input::common::V1_0::MotionEvent& event) override;
};

}  // namespace implementation
+34 −0
Original line number Diff line number Diff line
// This file is autogenerated by hidl-gen -Landroidbp.

hidl_interface {
    name: "android.hardware.input.common@1.0",
    root: "android.hardware",
    vndk: {
        enabled: true,
    },
    srcs: [
        "types.hal",
    ],
    interfaces: [
        "android.hidl.base@1.0",
    ],
    types: [
        "Action",
        "Axis",
        "Button",
        "Classification",
        "EdgeFlag",
        "Flag",
        "Meta",
        "MotionEvent",
        "PointerCoords",
        "PointerProperties",
        "PolicyFlag",
        "Source",
        "SourceClass",
        "ToolType",
        "VideoFrame",
    ],
    gen_java: true,
}
Loading