修复告警问题

Signed-off-by: zhouyongfei <zhouyongfei@huawei.com>
This commit is contained in:
zhouyongfei
2021-12-16 20:00:42 +08:00
parent eafade8741
commit ee7232a16c
23 changed files with 38 additions and 35 deletions
+3 -4
View File
@@ -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;