예제 #1
0
 @Override
 protected int afterExecute() {
   int retval = ICommand.RESULT_OK;
   final boolean isRecording = PhoneRecorder.isRecording();
   if (mIsRecording == isRecording) {
     log("!!!afterExecute record failed!!!");
     retval = ICommand.RESULT_FAIL;
   }
   log("PhoneRecorder.isRecording() = " + isRecording);
   return retval;
 }
예제 #2
0
  @Override
  protected int beforeExecute() {
    super.beforeExecute();
    int retval = ICommand.RESULT_OK;
    mCallManager = PhoneGlobals.getInstance().mCM;
    if (mCallManager.getState() != PhoneConstants.State.OFFHOOK
        || !PhoneUtils.okToRecordVoice(mCallManager)) {
      retval = ICommand.RESULT_ABORT;
      log("!!!beforeExecute call state is not offhook or can not record!!!");
    } else {
      mIsRecording = PhoneRecorder.isRecording();
    }

    return retval;
  }