@Override
 public void onBackPressed() {
   if (chatActivityEnterView.isEmojiPopupShowing()) {
     chatActivityEnterView.hideEmojiPopup();
     return;
   }
   super.onBackPressed();
 }
 @Override
 protected void onPause() {
   super.onPause();
   overridePendingTransition(0, 0);
   if (chatActivityEnterView != null) {
     chatActivityEnterView.hideEmojiPopup();
     chatActivityEnterView.setFieldFocused(false);
   }
   ConnectionsManager.getInstance().setAppPaused(true, false);
 }