/** 释放资源 */ @Override protected void onDestroy() { // TODO Auto-generated method stub JMessageClient.unRegisterEventReceiver(this); unregisterReceiver(mReceiver); mChatController.releaseMediaPlayer(); mChatView.releaseRecorder(); super.onDestroy(); }
@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(); }