@Override protected void onStop() { mChatController.getAdapter().stopMediaPlayer(); if (mChatView.getMoreMenu().getVisibility() == View.VISIBLE) { mChatView.dismissMoreMenu(); } if (mChatController.getConversation() != null) mChatController.getConversation().resetUnreadCount(); Log.i(TAG, "[Life cycle] - onStop"); super.onStop(); }
@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(); }