1 /* 2 * Copyright (C) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 #include <thread> 16 namespace OHOS { 17 namespace SmartPerf { 18 class StartUpDelay { 19 public: 20 StartUpDelay(); 21 ~StartUpDelay(); 22 void GetTrace(const std::string &sessionID, const std::string &traceName); 23 std::thread ThreadGetTrace(const std::string &sessionID, const std::string &traceName); 24 void GetLayout(); 25 std::thread ThreadGetLayout(); 26 void InputEvent(const std::string &point); 27 std::thread ThreadInputEvent(const std::string &point); 28 void GetHisysIdResponse() const; 29 std::thread ThreadGetHisysIdResponse() const; 30 void GetHisysIdComplete() const; 31 std::thread ThreadGetHisysIdComplete() const; 32 void GetHisysId(); 33 std::thread ThreadGetHisysId(); 34 void ChangeToBackground(); 35 std::string GetPidByPkg(const std::string &curPkgName); 36 std::string GetDeviceType(); 37 bool GetSpTcp(); 38 void InitXY2(const std::string &curAppName, const std::string &fileName, const std::string &appPkgName); 39 void InitXY(const std::string &curAppName, const std::string &fileName); 40 std::string pointXY = "0 0"; 41 }; 42 } 43 }