1 /* 2 * Copyright (c) 2022 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 16 #include "wukong_ability_control.h" 17 18 19 namespace OHOS { 20 namespace AppExecFwk { 21 // cold start AllowAbilityStart(const Want & want,const std::string & bundleName)22 WuKongAbilityController::AllowAbilityStart(const Want &want, const std::string &bundleName) 23 { 24 return true; 25 } 26 27 // turn to background AllowAbilityBackground(const std::string & bundleName)28 WuKongAbilityController::AllowAbilityBackground(const std::string &bundleName) 29 { 30 return false; 31 } 32 SetAbilityList(const std::vector<std::string> & bundleList)33 WuKongAbilityController::SetAbilityList(const std::vector<std::string> &bundleList) 34 { 35 if (AbilityList.size == 0) { 36 return false; 37 } 38 std::copy(std::begin(bundleList), std::end(bundleList), std::begin(AllowBundleList)); 39 return true; 40 } 41 } 42 }