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

Method resetScreenResolution

libapp2sys/src/main/cpp/protocol.h:961–986  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

cJSON_CreateObjectFunction · 0.85
cJSON_AddNumberToObjectFunction · 0.85
cJSON_PrintFunction · 0.85
cJSON_DeleteFunction · 0.85
sendReqMethod · 0.45

Tested by

no test coverage detected