1 /* 2 * Copyright (c) 2020 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 "gallery_ability.h" 17 18 namespace OHOS { REGISTER_AA(GalleryAbility)19REGISTER_AA(GalleryAbility) 20 21 void GalleryAbility::OnStart(const Want &want) 22 { 23 printf("GalleryAbility::OnStart\n"); 24 SetMainRoute("GalleryAbilitySlice"); 25 26 Ability::OnStart(want); 27 } 28 OnInactive()29void GalleryAbility::OnInactive() 30 { 31 printf("GalleryAbility::OnInactive\n"); 32 Ability::OnInactive(); 33 } 34 OnActive(const Want & want)35void GalleryAbility::OnActive(const Want &want) 36 { 37 printf("GalleryAbility::OnActive\n"); 38 Ability::OnActive(want); 39 } 40 OnBackground()41void GalleryAbility::OnBackground() 42 { 43 printf("GalleryAbility::OnBackground\n"); 44 Ability::OnBackground(); 45 } 46 OnStop()47void GalleryAbility::OnStop() 48 { 49 printf("GalleryAbility::OnStop\n"); 50 Ability::OnStop(); 51 } 52 }