예제 #1
0
 /** 释放资源 */
 @Override
 protected void onDestroy() {
   // TODO Auto-generated method stub
   JMessageClient.unRegisterEventReceiver(this);
   unregisterReceiver(mReceiver);
   mChatController.releaseMediaPlayer();
   mChatView.releaseRecorder();
   super.onDestroy();
 }
예제 #2
0
 @Override
 public void onBackPressed() {
   Log.d(TAG, "onBackPressed!");
   if (RecordVoiceBtnController.mIsPressed) {
     mChatView.dismissRecordDialog();
     mChatView.releaseRecorder();
     RecordVoiceBtnController.mIsPressed = false;
   }
   if (mChatView.getMoreMenu().getVisibility() == View.VISIBLE) {
     mChatView.dismissMoreMenu();
   } else {
     mChatController.resetUnreadMsg();
   }
   super.onBackPressed();
 }