Esempio n. 1
0
 @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();
 }
Esempio n. 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();
 }