MCPcopy Create free account
hub / github.com/Tencent/Hardcoder / registerAnrCallback

Method registerAnrCallback

libapp2sys/src/main/cpp/server.cpp:114–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112 }
113
114 int registerAnrCallback(int uid, int callertid, int64_t timestamp) {
115 std::list<int>& cbL = this->anrCallbackUidList;
116 pdbg("ManufacturerCoder registerAnrCallback anrCallbackList size:%d callertid:%d timestamp:%d", TOINT(cbL.size()), callertid, TOINT(timestamp/1000000L));
117
118 if (!(cbL.empty()) && (std::find(cbL.begin(), cbL.end(), uid) != cbL.end())) {
119 pdbg("ManufacturerCoder has registered anr before uid:%d", uid)
120 } else {
121 this->anrCallbackUidList.push_back(uid);
122 pdbg("ManufacturerCoder registerAnrCallback uid:%d", uid);
123 }
124
125 // for test
126// pthread_t tid;
127// pthread_create(&tid, NULL, testANR, this);
128
129 return RET_OK;
130 }
131
132 int registerSystemEventCallback(int uid, int callertid, int64_t timestamp) {
133 std::list<int>& cbL = this->systemEventCallbackList;

Callers

nothing calls this directly

Calls 4

sizeMethod · 0.45
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected