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

Commit f7c3903c authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Update SensorManagerPlugin to have vendorType

Bug: 111414690
Test: Builds
Change-Id: Ice50275160b23bcb60aca1653b570ec9b4565c4e
parent 8a98b40c
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -67,9 +67,25 @@ public interface SensorManagerPlugin extends Plugin {

    class TriggerEvent {
        Sensor mSensor;
        int mVendorType;

        public TriggerEvent(Sensor sensor) {
        /**
         * Creates a trigger event
         * @param sensor The type of sensor, e.g. TYPE_WAKE_LOCK_SCREEN
         * @param vendorType The vendor type, which should be unique for each type of sensor,
         *                   e.g. SINGLE_TAP = 1, DOUBLE_TAP = 2, etc.
         */
        public TriggerEvent(Sensor sensor, int vendorType) {
            mSensor = sensor;
            mVendorType = vendorType;
        }

        public Sensor getSensor() {
            return mSensor;
        }

        public int getVendorType() {
            return mVendorType;
        }
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -423,7 +423,7 @@ public class DozeSensors {
    }

    /**
     * A Sensor that is injected via plugin, for better ContextHub interface.
     * A Sensor that is injected via plugin.
     */
    private class PluginTriggerSensor extends TriggerSensor {