mirror of
https://github.com/openharmony/miscservices_inputmethod.git
synced 2026-07-19 12:08:05 -04:00
@@ -13,14 +13,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "unistd.h"
|
||||
#include "platform.h"
|
||||
#include "parcel.h"
|
||||
#include "message_parcel.h"
|
||||
#include "utils.h"
|
||||
#include "want.h"
|
||||
#include "input_method_ability_connection_stub.h"
|
||||
#include <vector>
|
||||
#include "peruser_session.h"
|
||||
#include "ability_connect_callback_proxy.h"
|
||||
#include "ability_manager_interface.h"
|
||||
@@ -45,6 +43,7 @@ namespace MiscServices {
|
||||
{
|
||||
userId_ = userId;
|
||||
msgId_ = msgId;
|
||||
imsChannel = nullptr;
|
||||
}
|
||||
|
||||
RemoteObjectDeathRecipient::~RemoteObjectDeathRecipient()
|
||||
@@ -713,7 +712,7 @@ namespace MiscServices {
|
||||
parcel->WriteInt32(index);
|
||||
parcel->WriteString16(currentIme[index]->mImeId);
|
||||
Message *msg = new Message(MSG_ID_RESTART_IMS, parcel);
|
||||
usleep(1600*1000); // wait that PACKAGE_REMOVED message is received if this ime has been removed
|
||||
usleep(SLEEP_TIME_MORE); // wait that PACKAGE_REMOVED message is received if this ime has been removed
|
||||
MessageHandler::Instance()->SendMessage(msg);
|
||||
}
|
||||
IMSA_HILOGI("End...[%{public}d]\n", userId_);
|
||||
@@ -995,7 +994,7 @@ namespace MiscServices {
|
||||
time_t now = time(0);
|
||||
double diffSeconds = difftime(now, past[imeIndex]);
|
||||
|
||||
//time difference is more than 5 minutes, reset time and error num;
|
||||
// time difference is more than 5 minutes, reset time and error num;
|
||||
if (diffSeconds > COMMON_COUNT_THREE_HUNDRED) {
|
||||
past[imeIndex] = now;
|
||||
errorNum[imeIndex] = 1;
|
||||
|
||||
Reference in New Issue
Block a user