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

Commit 61e12f70 authored by Prabir Pradhan's avatar Prabir Pradhan Committed by Automerger Merge Worker
Browse files

Merge "Notify MetricsCollector of device interaction from Dispatcher" into...

Merge "Notify MetricsCollector of device interaction from Dispatcher" into udc-qpr-dev am: aae87b94 am: be0d1562

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23306626



Change-Id: I3eb6c2dd7859a16f4cdc8c0487083763f724218f
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents fea25ac1 be0d1562
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -352,6 +352,8 @@ public:
    void onPointerDownOutsideFocus(const sp<IBinder>& touchedToken) override;
    void setPointerCapture(const PointerCaptureRequest& request) override;
    void notifyDropWindow(const sp<IBinder>& token, float x, float y) override;
    void notifyDeviceInteraction(int32_t deviceId, nsecs_t timestamp,
                                 const std::set<int32_t>& uids) override;

    /* --- PointerControllerPolicyInterface implementation --- */

@@ -963,6 +965,15 @@ void NativeInputManager::notifyDropWindow(const sp<IBinder>& token, float x, flo
    checkAndClearExceptionFromCallback(env, "notifyDropWindow");
}

void NativeInputManager::notifyDeviceInteraction(int32_t deviceId, nsecs_t timestamp,
                                                 const std::set<int32_t>& uids) {
    static const bool ENABLE_INPUT_DEVICE_USAGE_METRICS =
            sysprop::InputProperties::enable_input_device_usage_metrics().value_or(false);
    if (!ENABLE_INPUT_DEVICE_USAGE_METRICS) return;

    mInputManager->getMetricsCollector().notifyDeviceInteraction(deviceId, timestamp, uids);
}

void NativeInputManager::notifySensorEvent(int32_t deviceId, InputDeviceSensorType sensorType,
                                           InputDeviceSensorAccuracy accuracy, nsecs_t timestamp,
                                           const std::vector<float>& values) {