1/* 2 * Copyright (c) 2024 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 16import EnterpriseAdminExtensionAbility from '@ohos.enterprise.EnterpriseAdminExtensionAbility' 17import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index" 18import type systemManager from './@ohos.enterprise.systemManager'; 19 20export default class EnterpriseAdminAbility extends EnterpriseAdminExtensionAbility { 21 onAdminEnabled() { 22 console.log('EnterpriseAdminExtensionAbility onAdminEnabled'); 23 } 24 onAdminDisabled(){ 25 console.log('EnterpriseAdminExtensionAbility onAdminDisabled'); 26 } 27 onBundleAdded(bundleName: string){ 28 console.log('EnterpriseAdminExtensionAbility onBundleAdded: ' + bundleName); 29 } 30 onBundleRemoved(bundleName: string){ 31 console.log('EnterpriseAdminExtensionAbility onBundleRemoved: ' + bundleName); 32 } 33 onAppStart(bundleName: string){ 34 console.log('EnterpriseAdminExtensionAbility onAppStart: ' + bundleName); 35 } 36 onAppStop(bundleName: string){ 37 console.log('EnterpriseAdminExtensionAbility onAppStop: ' + bundleName); 38 } 39 onSystemUpdate(systemUpdateInfo: systemManager.SystemUpdateInfo){ 40 console.log(`EnterpriseAdminExtensionAbility onSystemUpdate: versionName: ${systemUpdateInfo.versionName}, 41 firstReceivedTime: ${systemUpdateInfo.firstReceivedTime}, packageType: ${systemUpdateInfo.packageType}`); 42 } 43 onStart(){ 44 console.log('EnterpriseAdminExtensionAbility onStart'); 45 } 46}