/*
* Copyright (c) 2015 The CyanogenMod Project
- * Copyright (c) 2017 The LineageOS Project
+ * Copyright (c) 2017-2020 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
public void registerListener(Sensor sensor, SensorEventListener listener) {
if (!mSensorManager.registerListener(listener, sensor,
- SensorManager.SENSOR_DELAY_NORMAL, BATCH_LATENCY_IN_MS * 1000)) {
- throw new RuntimeException("Failed to registerListener for sensor " + sensor);
+ SensorManager.SENSOR_DELAY_NORMAL, BATCH_LATENCY_IN_MS * 1000)) {
+ Log.e(TAG, "Failed to registerListener for sensor " + sensor);
}
}
/* TriggerSensor */
public void requestTriggerSensor(Sensor sensor, TriggerEventListener listener) {
if (!mSensorManager.requestTriggerSensor(listener, sensor)) {
- throw new RuntimeException("Failed to requestTriggerSensor for sensor " + sensor);
+ Log.e(TAG, "Failed to requestTriggerSensor for sensor " + sensor);
}
}