/** * Handles when the speech controller finished speaking an instruction. * * @param status The speech item status code from the speech controller. */ private void onUtteranceComplete(int status) { setTouchGuardActive(false); mFeedbackController.playSound(R.raw.ready, 1.0f, 1.0f); unlockOrientation(); if (sTutorialIsActive && (mResourceIdToRepeat > 0)) { mRepeatHandler.sendEmptyMessageDelayed(RepeatHandler.MSG_REPEAT, REPEAT_DELAY); } }
@Override protected void onPause() { super.onPause(); sTutorialIsActive = false; final TalkBackService service = TalkBackService.getInstance(); if (service != null) { service.removeServiceStateListener(mServiceStateListener); } getCurrentModule().onPause(); interrupt(); // This is different than stopRepeating because we want the current // instruction text to continue repeating if the activity resumes. mRepeatHandler.removeMessages(RepeatHandler.MSG_REPEAT); unlockOrientation(); }