| 959 | } |
| 960 | |
| 961 | int64_t resetScreenResolution(int tid, int64_t timestamp) { |
| 962 | IClientEngine *pEngine = engine(); |
| 963 | if (!pEngine) { |
| 964 | return -3; |
| 965 | } |
| 966 | |
| 967 | int64_t requestid = 0L; |
| 968 | if (HEADER_VERSION >= HEADER_JSON_VERSION) {//json |
| 969 | cJSON *jsonRequest; |
| 970 | jsonRequest = cJSON_CreateObject(); |
| 971 | cJSON_AddNumberToObject(jsonRequest, "jsonVersion", JSON_VERSION); |
| 972 | cJSON_AddNumberToObject(jsonRequest, "funcid", FUNC_RESET_SCREEN_RESOLUTION); |
| 973 | cJSON_AddNumberToObject(jsonRequest, "status", STATUS_RESET); |
| 974 | |
| 975 | char *body = cJSON_Print(jsonRequest); |
| 976 | std::string str(body); |
| 977 | uint32_t len = str.length(); |
| 978 | cJSON_Delete(jsonRequest); |
| 979 | requestid = pEngine ->sendReq(FUNC_RESET_SCREEN_RESOLUTION, (uint8_t *)body, len, tid, timestamp); |
| 980 | free(body); |
| 981 | } else { |
| 982 | requestid = pEngine->sendReq(FUNC_RESET_SCREEN_RESOLUTION, NULL, 0, tid, timestamp); |
| 983 | } |
| 984 | pdbg("resetScreenResolution requestid:%lld ", requestid); |
| 985 | return requestid; |
| 986 | } |
| 987 | |
| 988 | int64_t registerANRCallback(int tid, int64_t timestamp) { |
| 989 | IClientEngine *pEngine = engine(); |
nothing calls this directly
no test coverage detected