@Override public void exitFromChatMode(String number) { Logger.d(TAG, "exitFromChatMode() entry, number " + number); if (PluginUtils.getMessagingMode() == 0) { if (number.startsWith(IpMessageConsts.JOYN_START)) { number = number.substring(4); } } Message controllerMessage = PluginController.obtainMessage( ChatController.EVENT_HIDE_WINDOW, PhoneUtils.formatNumberToInternational(number)); controllerMessage.sendToTarget(); super.exitFromChatMode(number); }
@Override public void enterChatMode(String number) { Logger.d(TAG, "enterChatMode() entry, number " + number); if (PluginUtils.getMessagingMode() == 0) { if (number.startsWith(IpMessageConsts.JOYN_START)) { number = number.substring(4); } } Message controllerMessage = PluginController.obtainMessage( ChatController.EVENT_SHOW_WINDOW, PhoneUtils.formatNumberToInternational(number)); controllerMessage.sendToTarget(); if ((PluginUtils.getMessagingMode() == 1) && (PluginUtils.translateThreadId(number) == 1)) { Logger.v(TAG, "enterChatMode(), open Window = " + number); Intent intent = new Intent(InvitationDialog.ACTION); intent.putExtra(RcsNotification.CONTACT, number); intent.putExtra(InvitationDialog.KEY_STRATEGY, InvitationDialog.STRATEGY_IPMES_SEND_BY_SMS); intent.putExtra("showDialog", true); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); AndroidFactory.getApplicationContext().startActivity(intent); } super.enterChatMode(number); }