已合并
新增updateDesktopShortcutInfo接口 #33544
kael-zhang创建于 6月6日
新增updateDesktopShortcutInfo接口 #33544
已合并
共 1 个文件变更+23-0
| @@ -77,6 +77,29 @@ declare namespace shortcutManager { | |||
| 77 | */ | 77 | */ |
| 78 | function deleteDesktopShortcutInfo(shortcutInfo: ShortcutInfo, userId: int): Promise<void>; | 78 | function deleteDesktopShortcutInfo(shortcutInfo: ShortcutInfo, userId: int): Promise<void>; |
| 79 | 79 | ||
| 80 | + /** | ||
| 81 | + * Updates a shortcut for the given user. This API uses a promise to return the result. | ||
| 82 | + * | ||
| 83 | + * ohos.permission.MANAGE_SHORTCUTS or | ||
| 84 | + * (ohos.permission.MANAGE_SHORTCUTS and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS) | ||
| 85 | + * { ShortcutInfo } shortcutInfo - Shortcut information. | ||
| 86 | + * { int } userId - User ID, which can be obtained by calling | ||
| 87 | + * [getOsAccountLocalId]{ .account.osAccount:osAccount.AccountManager.getOsAccountLocalId(callback: AsyncCallback<int>)}. | ||
| 88 | + * { Promise<void> } Promise that returns no value. | ||
| 89 | + * { BusinessError } 201 - Verify permission denied. | ||
| 90 | + * { BusinessError } 202 - Permission denied, non-system app called system api. | ||
| 91 | + * { BusinessError } 17700001 - The specified bundle name is not found. | ||
| 92 | + * { BusinessError } 17700004 - The specified user ID is not found. | ||
| 93 | + * { BusinessError } 17700026 - The specified bundle is disabled. | ||
| 94 | + * { BusinessError } 17700061 - The specified app index is invalid. | ||
| 95 | + * { BusinessError } 18100002 - The specified shortcut to be updated is not found. | ||
| 96 | + * SystemCapability.BundleManager.BundleFramework.Launcher | ||
| 97 | + * | ||
H | |||
| 98 | + * | ||
| 99 | + * 26.1.0 dynamic&static | ||
| 100 | + */ | ||
| 101 | + function updateDesktopShortcutInfo(shortcutInfo: ShortcutInfo, userId: int): Promise<void>; | ||
| 102 | + | ||
| 80 | /** | 103 | /** |
| 81 | * Obtains the information about all shortcuts of the given user. | 104 | * Obtains the information about all shortcuts of the given user. |
| 82 | * | 105 | * |
stagemodelonly