/** * Called when the activity will start interacting with the user. At this point your activity is * at the top of the activity stack, with user input going to it. */ void onResume() { Log.v(TAG, "onResume"); mRotationSensor.onResume(); }
/** The final call you receive before your activity is destroyed. */ void onDestroy() { Log.v(TAG, "onDestroy"); mRotationSensor.onDestroy(); mInputManager.close(); }
/** * Called when the system is about to start resuming a previous activity. This is typically used * to commit unsaved changes to persistent data, stop animations and other things that may be * consuming CPU, etc. Implementations of this method must be very quick because the next activity * will not be resumed until this method returns. */ void onPause() { Log.v(TAG, "onPause"); mRotationSensor.onPause(); }