| 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; |