private void stopSensors() { Logger.d(this, "stopSensors"); // Store data. saveSessionData(); // Clear state. Preferences.clearStoredValues(this); mSessionStartTimeMillis = Integer.MIN_VALUE; mSessionInitialSteps = Integer.MIN_VALUE; mSensorInfo = null; // Sensors. unregisterSensors(); if (mListener != null) { mListener.onSensorStop(); } }
@Override public void onDestroy() { Logger.d(this, "onDestroy"); Preferences.clearStoredValues(this); }