1# Customization Subsystem ChangeLog
2
3Compared with OpenHarmony 3.2.8.1, OpenHarmony 3.2.8.3 has the following API changes in the customization subsystem:
4
5## cl.Customization.1 Change of the Enterprise Device Management Module Name
6
7Beginning from OpenHarmony 3.2.8.3, **@ohos.enterpriseDeviceManager.d.ts** is changed to **@ohos.enterprise.adminManager.d.ts**. You need to adapt your applications according to the following information.
8
9**Change Impacts**
10
11The application developed based on OpenHarmony earlier than 3.2.8.3 must be adapted so that it can be properly compiled in the SDK environment of the new version.
12
13**Key API/Component Changes**
14
15| Original API                            | New API                             |
16| ---------------------------------  | ---------------------------------- |
17| @ohos.enterpriseDeviceManager.d.ts  | @ohos.enterprise.adminManager.d.ts |
18
19**Adaptation Guide**
20
21The original APIs are only migrated to the new namespace. Therefore, you can modify **import** to solve the adaptation problem.
22
23If the original API uses **@ohos.enterpriseDeviceManager**:
24
25```js
26import enterpriseDeviceManager from '@ohos.enterpriseDeviceManager';
27```
28
29You can directly modify **import** to switch to the new namespace:
30
31```js
32import enterpriseDeviceManager from '@ohos.enterprise.adminManager';
33```
34
35## cl.Customization.2 enterpriseDeviceManager/DeviceSettingsManager.d.ts Module Change
36
37Beginning from OpenHarmony 3.2.8.3, **enterpriseDeviceManager/DeviceSettingsManager.d.ts** is changed to **ohos.enterprise.dateTimeManager.d.ts**.
38
39**Change Impacts**
40
41The application developed based on OpenHarmony earlier than 3.2.8.3 must be adapted so that it can be properly compiled in the SDK environment of the new version.
42
43**Key API/Component Changes**
44
45| Original API               | Original API Type            | New API             | New API Type               |
46| ---------------------------------  | --------- |  ---------------------------------- | ----- |
47| enterpriseDeviceManager/DeviceSettingsManager.d.ts | interface | @ohos.enterprise.dateTimeManager.d.ts | namespace |
48
49**Adaptation Guide**
50
51If the **setDateTime** API of **enterpriseDeviceManager/DeviceSettingsManager.d.ts** is used:
52
53```js
54import enterpriseDeviceManager from '@ohos.enterpriseDeviceManager'
55
56let wantTemp = {
57    bundleName: "bundleName",
58    abilityName: "abilityName",
59};
60enterpriseDeviceManager.getDeviceSettingsManager((error, mgr) => {
61    if (error) {
62        console.log("error code:" + error.code + " error message:" + error.message);
63        return;
64    }
65    mgr.setDateTime(wantTemp, 1526003846000, (error) => {
66        if (error) {
67            console.log("error code:" + error.code + " error message:" + error.message);
68        }
69    });
70});
71```
72
73You need to import the new namespace for adaptation:
74
75```js
76import dateTimeManager from '@ohos.enterprise.dateTimeManager'
77
78let wantTemp = {
79    bundleName: "bundleName",
80    abilityName: "abilityName",
81};
82dateTimeManager.setDateTime(wantTemp, 1526003846000, (error) => {
83    if (error) {
84        console.log("error code:" + error.code + " error message:" + error.message);
85    }
86})
87```
88
89## cl.Customization.3 System API Change
90
91Beginning from OpenHarmony 3.2.8.3, all enterprise device management APIs are changed to system APIs.
92
93**Change Impacts**
94
95All APIs can be called only by system applications.
96
97**Key API/Component Changes**
98
99| Module                   | Class               | Method/Attribute/Enumeration/Constant                                         | Change Type|
100| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- |
101| @ohos.enterprise.adminManager        | adminManager        | **function** enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, callback: AsyncCallback<**void**>): void; | Changed to a system API    |
102| @ohos.enterprise.adminManager        | adminManager        | **function** enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId: number, callback: AsyncCallback<**void**>): void; | Changed to a system API    |
103| @ohos.enterprise.adminManager        | adminManager        | **function** enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId?: number): Promise<**void**>; | Changed to a system API    |
104| @ohos.enterprise.adminManager        | adminManager        | **function** disableAdmin(admin: Want, callback: AsyncCallback<**void**>): void; | Changed to a system API    |
105| @ohos.enterprise.adminManager        | adminManager        | **function** disableAdmin(admin: Want, userId: number, callback: AsyncCallback<**void**>): void; | Changed to a system API    |
106| @ohos.enterprise.adminManager        | adminManager        | **function** disableAdmin(admin: Want, userId?: number): Promise<**void**>; | Changed to a system API    |
107| @ohos.enterprise.adminManager        | adminManager        | **function** disableSuperAdmin(bundleName: String, callback: AsyncCallback<**void**>): void; | Changed to a system API    |
108| @ohos.enterprise.adminManager        | adminManager        | **function** disableSuperAdmin(bundleName: String): Promise<**void**>; | Changed to a system API    |
109| @ohos.enterprise.adminManager        | adminManager        | **function** isAdminEnabled(admin: Want, callback: AsyncCallback<**boolean**>): void; | Changed to a system API    |
110| @ohos.enterprise.adminManager        | adminManager        | **function** isAdminEnabled(admin: Want, userId: number, callback: AsyncCallback<**boolean**>): void; | Changed to a system API    |
111| @ohos.enterprise.adminManager        | adminManager        | **function** isAdminEnabled(admin: Want, userId?: number): Promise<**boolean**>; | Changed to a system API    |
112| @ohos.enterprise.adminManager        | adminManager        | **function** getEnterpriseInfo(admin: Want, callback: AsyncCallback<**EnterpriseInfo**>): void; | Changed to a system API    |
113| @ohos.enterprise.adminManager        | adminManager        | **function** getEnterpriseInfo(admin: Want): Promise<**EnterpriseInfo**>; | Changed to a system API    |
114| @ohos.enterprise.adminManager        | adminManager        | **function** setEnterpriseInfo(admin: Want, enterpriseInfo: EnterpriseInfo, callback: AsyncCallback<**void**>): void; | Changed to a system API    |
115| @ohos.enterprise.adminManager        | adminManager        | **function** setEnterpriseInfo(admin: Want, enterpriseInfo: EnterpriseInfo): Promise<**void**>; | Changed to a system API    |
116| @ohos.enterprise.adminManager        | adminManager        | **function** isSuperAdmin(bundleName: String, callback: AsyncCallback<**boolean**>): void; | Changed to a system API    |
117| @ohos.enterprise.adminManager        | adminManager        | **function** isSuperAdmin(bundleName: String): Promise<**boolean**>; | Changed to a system API    |
118| @ohos.enterprise.adminManager        | adminManager        | **function** subscribeManagedEvent(admin: Want, managedEvents: Array<**ManagedEvent**>, callback: AsyncCallback<**void**>): void; | Changed to a system API    |
119| @ohos.enterprise.adminManager        | adminManager        | **function** subscribeManagedEvent(admin: Want, managedEvents: Array<**ManagedEvent**>): Promise<**void**>; | Changed to a system API    |
120| @ohos.enterprise.adminManager        | adminManager        | **function** unsubscribeManagedEvent(admin: Want, managedEvents: Array<**ManagedEvent**>, callback: AsyncCallback<**void**>): void; | Changed to a system API    |
121| @ohos.enterprise.adminManager        | adminManager        | **function** unsubscribeManagedEvent(admin: Want, managedEvents: Array<**ManagedEvent**>): Promise<**void**>; | Changed to a system API    |
122| @ohos.enterprise.adminManager        | adminManager        | **interface** EnterpriseInfo | Changed to a system API    |
123| @ohos.enterprise.adminManager        | adminManager        | **enum** AdminType | Changed to a system API    |
124| @ohos.enterprise.adminManager        | adminManager        | **enum** ManagedEvent | Changed to a system API    |
125| @ohos.enterprise.dataTimeManager        | dateTimeManager        | **function** setDateTime(admin: Want, time: number, callback: AsyncCallback<**void**>): void; | Changed to a system API    |
126| @ohos.enterprise.dataTimeManager        | dateTimeManager        | **function** setDateTime(admin: Want, time: number): Promise<**void**>; | Changed to a system API    |
127
128## cl.Customization.4 API Permission Change
129
130Beginning from OpenHarmony 3.2.8.3, permission verification is required for some APIs.
131
132**Change Impacts**
133
134The application developed based on OpenHarmony earlier than 3.2.8.3 must have the corresponding permission so that it can properly call these APIs.
135
136**Key API/Component Changes**
137
138| Module                   | Class               | Method/Attribute/Enumeration/Constant                                         | New Permission|
139| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- |
140| @ohos.enterprise.adminManager        | adminManager        | **function** enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, callback: AsyncCallback<**void**>): void; | ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN     |
141| @ohos.enterprise.adminManager        | adminManager        | **function** enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId: number, callback: AsyncCallback<**void**>): void; | ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN     |
142| @ohos.enterprise.adminManager        | adminManager        | **function** enableAdmin(admin: Want, enterpriseInfo: EnterpriseInfo, type: AdminType, userId?: number): Promise<**void**>; | ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN     |
143| @ohos.enterprise.adminManager        | adminManager        | **function** disableAdmin(admin: Want, callback: AsyncCallback<**void**>): void; | ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN     |
144| @ohos.enterprise.adminManager        | adminManager        | **function** disableAdmin(admin: Want, userId: number, callback: AsyncCallback<**void**>): void; | ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN     |
145| @ohos.enterprise.adminManager        | adminManager        | **function** disableAdmin(admin: Want, userId?: number): Promise<**void**>; | ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN     |
146| @ohos.enterprise.adminManager        | adminManager        | **function** disableSuperAdmin(bundleName: String, callback: AsyncCallback<**void**>): void; | ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN     |
147| @ohos.enterprise.adminManager        | adminManager        | **function** disableSuperAdmin(bundleName: String): Promise<**void**>; | ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN     |
148| @ohos.enterprise.adminManager        | adminManager        | **function** setEnterpriseInfo(admin: Want, enterpriseInfo: EnterpriseInfo, callback: AsyncCallback<**void**>): void; | ohos.permission.SET_ENTERPRISE_INFO     |
149| @ohos.enterprise.adminManager        | adminManager        | **function** setEnterpriseInfo(admin: Want, enterpriseInfo: EnterpriseInfo): Promise<**void**>; | ohos.permission.SET_ENTERPRISE_INFO     |
150| @ohos.enterprise.adminManager        | adminManager        | **function** subscribeManagedEvent(admin: Want, managedEvents: Array<**ManagedEvent**>, callback: AsyncCallback<**void**>): void; | ohos.permission.ENTERPRISE_SUBSCRIBE_MANAGED_EVENT     |
151| @ohos.enterprise.adminManager        | adminManager        | **function** subscribeManagedEvent(admin: Want, managedEvents: Array<**ManagedEvent**>): Promise<**void**>; | ohos.permission.ENTERPRISE_SUBSCRIBE_MANAGED_EVENT     |
152| @ohos.enterprise.adminManager        | adminManager        | **function** unsubscribeManagedEvent(admin: Want, managedEvents: Array<**ManagedEvent**>, callback: AsyncCallback<**void**>): void; | ohos.permission.ENTERPRISE_SUBSCRIBE_MANAGED_EVENT     |
153| @ohos.enterprise.adminManager        | adminManager        | **function** unsubscribeManagedEvent(admin: Want, managedEvents: Array<**ManagedEvent**>): Promise<**void**>; | ohos.permission.ENTERPRISE_SUBSCRIBE_MANAGED_EVENT     |
154| @ohos.enterprise.dataTimeManager        | dateTimeManager        | **function** setDateTime(admin: Want, time: number, callback: AsyncCallback<**void**>): void; | ohos.permission.ENTERPRISE_SET_DATETIME     |
155| @ohos.enterprise.dataTimeManager        | dateTimeManager        | **function** setDateTime(admin: Want, time: number): Promise<**void**>; | ohos.permission.ENTERPRISE_SET_DATETIME     |
156
157**Adaptation Guide**
158
159Apply for the corresponding permission to call these APIs properly.
160