Even after sending EXIT command to the currently selected IME,
the IME may not get destroyed right away due to its termination
logic, meaning the client repository still holds the IME info
until the socket connection is completely closed.
This would cause an unexpected result if the user first selects
IME A and then IME B, and IME A again.
After the last "IME A selected" event, if the socket connection to
previous IME A gets closed, panel would think the current IME
(that was launched due to the last selection for IME A) needs to be
restarted, so it tries launching new IME A instance.
To prevent this, we will going to remove IME info from client
repository right after we send the EXIT request command.
Change-Id: I28cdcf7796028d59cc6929c182abd64868309053
Socket client_socket(client);
m_send_trans.write_to_socket(client_socket);
+
+ m_info_manager->del_client(client_socket.get_id());
}
bool process_input_device_event(int client, uint32 context, const String& uuid, uint32 type, const char *data, size_t len, _OUT_ uint32& result) {
}
void del_client (int client_id) {
+ ClientRepository::iterator iter = m_client_repository.find(client_id);
+ if (iter == m_client_repository.end()) {
+ LOGW("The client with id %d does not exist in our client repository, returning", client_id);
+ return;
+ }
lock ();
m_signal_close_connection (client_id);
ClientInfo client_info = socket_get_client_info (client_id);