@Override public void startListening() { if (isListening) return; isListening = sensorManager.registerListener( this, accelorometerSensor, SensorManager.SENSOR_DELAY_NORMAL); if (isListening) binder.onArmed(); }
public void updateBinder() { if (hasBeenTripped) binder.onTripped(); else if (isListening) binder.onArmed(); else binder.onDisarmed(); }