diff --git a/AppPrivacyProtection/entry/src/main/ets/pages/ApproximatelyLocationDemo.ets b/AppPrivacyProtection/entry/src/main/ets/pages/ApproximatelyLocationDemo.ets index d24fcb14e743a9723dceb0125ca771ae600759f3..7f1dfba6e35e32f79f071855802f511c04ff66b2 100644 --- a/AppPrivacyProtection/entry/src/main/ets/pages/ApproximatelyLocationDemo.ets +++ b/AppPrivacyProtection/entry/src/main/ets/pages/ApproximatelyLocationDemo.ets @@ -35,7 +35,8 @@ struct ApproximatelyLocationDemo { return new Promise((resolve, reject) => { if (grantStatus === abilityAccessCtrl.GrantStatus.PERMISSION_DENIED) { // [Start request_permission] - accessManager.requestPermissionsFromUser(this.getUIContext().getHostContext(), ['ohos.permission.APPROXIMATELY_LOCATION']) + accessManager.requestPermissionsFromUser(this.getUIContext().getHostContext(), + ['ohos.permission.APPROXIMATELY_LOCATION']) .then((data) => { let grantStatus: Array = data.authResults; if (grantStatus.length > 0 && grantStatus[0] === 0) { @@ -56,7 +57,7 @@ struct ApproximatelyLocationDemo { } Logger.info(`request permissions result: ${JSON.stringify(data)}`); }) - // [End request_permission] + // [End request_permission] .catch((error: BusinessError) => { Logger.error(`request permissions exception, Catch error:${JSON.stringify(error)}`); reject(error); @@ -67,7 +68,6 @@ struct ApproximatelyLocationDemo { }); } - getLocation() { this.requestPermissions().then(data => { diff --git a/AppPrivacyProtection/entry/src/main/ets/pages/Index.ets b/AppPrivacyProtection/entry/src/main/ets/pages/Index.ets index f190b3ea84857682f733a7f4a3636082a07dca37..67fa3242c09ca2b0f17a55f9d6f43079ca366415 100644 --- a/AppPrivacyProtection/entry/src/main/ets/pages/Index.ets +++ b/AppPrivacyProtection/entry/src/main/ets/pages/Index.ets @@ -42,7 +42,7 @@ struct Index { // [EndExclude permission_camera] } }) - // [End permission_camera] + // [End permission_camera] .catch((error: BusinessError) => { Logger.error(`request permissions exception, Catch error:${JSON.stringify(error)}`); }) diff --git a/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment.ets b/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment.ets index 039bda5ceed91007f03d34807fecdee17c185526..3e263d73edaad32850685dcd4a366c7d37302313 100644 --- a/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment.ets +++ b/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment.ets @@ -25,7 +25,6 @@ export struct VideoCard { // Create a complex object task, if the task takes 1s to execute, the component will be rendered again after 1s this.createComplexVideoPlayer(); } - // ... } @Component @@ -42,4 +41,5 @@ export struct CardList { } } } + // [End Counter_example1] \ No newline at end of file diff --git a/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment2.ets b/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment2.ets index 7a121f36751fee30196f6d12c7cf13716a515886..9cc79e19a5f19e257db26b53a101d87e38e792b0 100644 --- a/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment2.ets +++ b/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment2.ets @@ -33,7 +33,6 @@ export struct VideoCard { } }) } - // ... } @Component @@ -50,4 +49,5 @@ export struct CardList { } } } + // [End Case1] \ No newline at end of file diff --git a/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment6.ets b/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment6.ets index b29dfa1b1e6ee326c642420700a3e8aaef63edb7..b947502b09629bd9ad6465d2e236c63c30b5baca 100644 --- a/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment6.ets +++ b/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment6.ets @@ -63,7 +63,6 @@ class RowModifier implements AttributeModifier { } } - @Component struct Avatar { @ObjectLink user: User; diff --git a/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment7.ets b/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment7.ets index 188c5301f45f60f4ff4ac316cc821383e3038cc1..ed0fad37ec14bd01ca270109535c42375cc717f2 100644 --- a/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment7.ets +++ b/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment7.ets @@ -67,6 +67,7 @@ struct UserCard { Text(this.name) .fontSize(30) } + Text(`age:${this.age.toString()}`) .fontSize(20) } @@ -78,4 +79,5 @@ struct UserCard { .width('80%') } } + // [End Case5] \ No newline at end of file diff --git a/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment8.ets b/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment8.ets index 1cf9b3d0248a19d4e864686f2037c80c395b3654..0338e320e3be60d559b887a4a26843d03f033d89 100644 --- a/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment8.ets +++ b/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment8.ets @@ -22,6 +22,7 @@ function UserCardBuilder(name: string, age?: number, avatarImage?: ResourceStr) Text(name) .fontSize(30) } + Text(`age:${age?.toString()}`) .fontSize(20) } @@ -49,4 +50,5 @@ export struct UserCardList { .alignListItem(ListItemAlign.Center) } } + // [End Case6] \ No newline at end of file diff --git a/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment9.ets b/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment9.ets index 28a75b39e42d9b54800d3c0254433a9783c0cc93..860a3bb477c33b1d975b95685cdc91d440661eb7 100644 --- a/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment9.ets +++ b/ArkUI/UI_Component_Performance_Optimization/entry/src/main/ets/segment/segment9.ets @@ -1,9 +1,11 @@ -function convertColorSegmentsToString(name:string){ +function convertColorSegmentsToString(name: string) { return name } -function convertMatrixArrayToMatrix4(name:string){ + +function convertMatrixArrayToMatrix4(name: string) { return undefined } + @Component export struct UserCardList1 { @Builder @@ -12,22 +14,29 @@ export struct UserCardList1 { .fontSize(30) .fontWeight(FontWeight.Bold) } - private descriptor:ESObject - getBorderStyle():BorderStyle | EdgeStyles{ - return BorderStyle.Dashed - } - getOpacity():number | Resource{ + + private descriptor: ESObject + + getBorderStyle(): BorderStyle | EdgeStyles { + return BorderStyle.Dashed + } + + getOpacity(): number | Resource { return 1 } - getClip():boolean{ + + getClip(): boolean { return true } - getHitTestMode(){ + + getHitTestMode() { return 1 } - getShadow():ShadowOptions | ShadowStyle{ + + getShadow(): ShadowOptions | ShadowStyle { return ShadowStyle.OUTER_DEFAULT_XS } + // [Start usercard_list1] build() { Stack() { @@ -47,10 +56,12 @@ export struct UserCardList1 { .borderRadius(this.descriptor.props.borderRadius) .borderStyle(this.getBorderStyle()) .opacity(this.getOpacity()) - .transform(this.descriptor.props.transform != undefined ? convertMatrixArrayToMatrix4(this.descriptor.props.transform) : undefined) + .transform(this.descriptor.props.transform != undefined ? + convertMatrixArrayToMatrix4(this.descriptor.props.transform) : undefined) .clip(this.getClip()) .hitTestBehavior(this.getHitTestMode()) .shadow(this.getShadow()) } + // [Start usercard_list1] } diff --git a/FoldableGuilde/entry/src/main/ets/entryability/EntryAbility.ets b/FoldableGuilde/entry/src/main/ets/entryability/EntryAbility.ets index f27981373afdc96d4b5031e87c7c19adbe4fc163..e2a3c8196f1183f15a7ada7e9fe31b8f955c8252 100644 --- a/FoldableGuilde/entry/src/main/ets/entryability/EntryAbility.ets +++ b/FoldableGuilde/entry/src/main/ets/entryability/EntryAbility.ets @@ -13,6 +13,7 @@ export default class EntryAbility extends UIAbility { onDestroy(): void { hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); } + onWindowStageCreate(windowStage: window.WindowStage): void { let windowUtil = WindowUtil.getInstance(); if (windowUtil !== undefined) { @@ -45,6 +46,7 @@ export default class EntryAbility extends UIAbility { hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? ''); }); } + onWindowStageDestroy(): void { // Main window is destroyed, release UI related resources hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); diff --git a/FoldableGuilde/entry/src/main/ets/modules/AsideColum.ets b/FoldableGuilde/entry/src/main/ets/modules/AsideColum.ets index 1b9587e3a3d24be72e78af0b7c2651689e048afa..d6acb9a7d26985578407b96721a6168889c6e19e 100644 --- a/FoldableGuilde/entry/src/main/ets/modules/AsideColum.ets +++ b/FoldableGuilde/entry/src/main/ets/modules/AsideColum.ets @@ -14,6 +14,7 @@ export struct AsideColumn { }) .height('100%') .width(this.l_width) + Column() { Text('1') }.backgroundColor(Color.Gray) diff --git a/FoldableGuilde/entry/src/main/ets/modules/Crease.ets b/FoldableGuilde/entry/src/main/ets/modules/Crease.ets index fec47eb803399d66f39cdd5f54f6188d42d2c646..31cd68bcfc11feda02cf85930e2865481fedde70 100644 --- a/FoldableGuilde/entry/src/main/ets/modules/Crease.ets +++ b/FoldableGuilde/entry/src/main/ets/modules/Crease.ets @@ -1,6 +1,7 @@ // [Start crease] import display from '@ohos.display'; import { Callback } from '@ohos.base'; + @Entry @Component export struct Crease { @@ -11,8 +12,10 @@ export struct Crease { let callback: Callback = (data: display.FoldStatus) => { console.info('Listening enabled. Data: ' + JSON.stringify(data)); // Get the folding crease area, the left and top attributes are the left and upper boundaries of the rectangular area, and the width and height attributes are the width and height of the rectangular area。 - this.status = data.toString() + " " + display.getCurrentFoldCreaseRegion().creaseRects[0].left + " " + display.getCurrentFoldCreaseRegion().creaseRects[0].top - + " " + display.getCurrentFoldCreaseRegion().creaseRects[0].width + " " + display.getCurrentFoldCreaseRegion().creaseRects[0].height; + this.status = data.toString() + " " + display.getCurrentFoldCreaseRegion().creaseRects[0].left + " " + + display.getCurrentFoldCreaseRegion().creaseRects[0].top + + " " + display.getCurrentFoldCreaseRegion().creaseRects[0].width + " " + + display.getCurrentFoldCreaseRegion().creaseRects[0].height; }; try { display.on('foldStatusChange', callback); @@ -20,9 +23,15 @@ export struct Crease { console.error('Failed to register callback. Code: ' + JSON.stringify(exception)); } } + build() { Column() { - Text(this.status).height(50).width("100%").textAlign(TextAlign.Center).fontSize(25).backgroundColor(Color.Red) + Text(this.status) + .height(50) + .width("100%") + .textAlign(TextAlign.Center) + .fontSize(25) + .backgroundColor(Color.Red) } .height("100%") .width("100%") @@ -31,4 +40,5 @@ export struct Crease { .justifyContent(FlexAlign.Start) } } + // [End crease] \ No newline at end of file diff --git a/FoldableGuilde/entry/src/main/ets/modules/Folder.ets b/FoldableGuilde/entry/src/main/ets/modules/Folder.ets index e92c284c0d4bcdcbfc42c9b6932598b6d7531f95..3e7e9b2a0db4ceda54abc5038cab9d1ebd88e868 100644 --- a/FoldableGuilde/entry/src/main/ets/modules/Folder.ets +++ b/FoldableGuilde/entry/src/main/ets/modules/Folder.ets @@ -4,6 +4,7 @@ export struct Folder { @State len_wid: number = 480 @State w: string = "40%" + build() { Column() { // UpperItems puts the required id hovering to the upper half of the screen into upperItems, and the other components will be stacked in the lower half of the screen @@ -62,4 +63,5 @@ export struct Folder { .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) } } + // [End Folder] \ No newline at end of file diff --git a/FoldableGuilde/entry/src/main/ets/modules/NavigationComponent.ets b/FoldableGuilde/entry/src/main/ets/modules/NavigationComponent.ets index 0639dbde739858db1ad2b8eb211e5a6116554f3b..d56e02653875a9b31cadfa742163043be98d70ab 100644 --- a/FoldableGuilde/entry/src/main/ets/modules/NavigationComponent.ets +++ b/FoldableGuilde/entry/src/main/ets/modules/NavigationComponent.ets @@ -2,7 +2,10 @@ @Entry @Component export struct NavigationComponent { - @State TooTmp: ToolbarItem = {'value': "func", 'action': ()=> {}} + @State TooTmp: ToolbarItem = { + 'value': "func", 'action': () => { + } + } private arr: number[] = [1, 2, 3]; build() { @@ -10,7 +13,7 @@ export struct NavigationComponent { // Root view container for routing navigation Navigation() { List({ space: 12 }) { - ForEach(this.arr, (item:string) => { + ForEach(this.arr, (item: string) => { ListItem() { // Navigation component, which provides click response processing by default, does not require developers to customize click event logic。 Navigation() { @@ -29,7 +32,7 @@ export struct NavigationComponent { .title("NavDestinationTitle" + item) } } - }, (item:string):string => item) + }, (item: string): string => item) } .width("90%") .margin({ top: 12 }) @@ -42,4 +45,5 @@ export struct NavigationComponent { .backgroundColor('#F1F3F5') } } + // [End NavigationComponent] \ No newline at end of file diff --git a/FoldableGuilde/entry/src/main/ets/modules/PinchImage.ets b/FoldableGuilde/entry/src/main/ets/modules/PinchImage.ets index 1740b683aed804e4c2db30015f14c804a68f9f4d..3e14723a256f3a734f6f4e22d93e5543df3b8337 100644 --- a/FoldableGuilde/entry/src/main/ets/modules/PinchImage.ets +++ b/FoldableGuilde/entry/src/main/ets/modules/PinchImage.ets @@ -2,12 +2,12 @@ @Entry @Component export struct PinchImage { - list: string[] = ['image1','image2','image3','image4','image5','image6'] + list: string[] = ['image1', 'image2', 'image3', 'image4', 'image5', 'image6'] @State GridColumn: string = '1fr 1fr 1fr' @State GridRow: string = '1fr 1fr' build() { - Column(){ + Column() { Grid() { ForEach(this.list, (item: string) => { GridItem() { @@ -21,8 +21,8 @@ export struct PinchImage { .columnsGap(12) } // Change the layout of the Grid when two-finger scaling is triggered - .gesture(PinchGesture({fingers:2}).onActionUpdate((event:GestureEvent)=>{ - if (event.scale>1) { + .gesture(PinchGesture({ fingers: 2 }).onActionUpdate((event: GestureEvent) => { + if (event.scale > 1) { // Increase animation effect this.getUIContext().animateTo({ duration: 500 @@ -30,7 +30,7 @@ export struct PinchImage { // When the two-finger scaling ratio is > 1, the number of Grid columns becomes 2 this.GridColumn = '1fr 1fr'; }) - }else { + } else { this.getUIContext().animateTo({ duration: 500 }, () => { @@ -41,4 +41,5 @@ export struct PinchImage { })) } } + // [End PinchImage] \ No newline at end of file diff --git a/FoldableGuilde/entry/src/main/ets/modules/PopupComponent.ets b/FoldableGuilde/entry/src/main/ets/modules/PopupComponent.ets index cafecb89785edc4ef023baa35fe4198df0a9e736..4bca3b0638421db29a80131767057b816ff079f2 100644 --- a/FoldableGuilde/entry/src/main/ets/modules/PopupComponent.ets +++ b/FoldableGuilde/entry/src/main/ets/modules/PopupComponent.ets @@ -4,10 +4,11 @@ export struct PopupExample { @State customPopup1: boolean = false @State customPopup2: boolean = false + build() { Row() { Button("popup1") - .onClick(()=>{ + .onClick(() => { this.customPopup1 = !this.customPopup1 }) // Bind the Popup window to the component and align it near the edge @@ -17,7 +18,7 @@ export struct PopupExample { }) Blank() Button("popup2") - .onClick(()=>{ + .onClick(() => { this.customPopup2 = !this.customPopup2 }) // Bind the Popup window to the component and align it near the edge @@ -30,4 +31,5 @@ export struct PopupExample { .height('100%') } } + // [End PopupExample] \ No newline at end of file diff --git a/FoldableGuilde/entry/src/main/ets/modules/ScrollParent.ets b/FoldableGuilde/entry/src/main/ets/modules/ScrollParent.ets index 636aa91429f3473a9333abe59c66d7f088f4a16c..922a94401dc26bf5be6e06a3745662cca3aad661 100644 --- a/FoldableGuilde/entry/src/main/ets/modules/ScrollParent.ets +++ b/FoldableGuilde/entry/src/main/ets/modules/ScrollParent.ets @@ -9,7 +9,8 @@ export struct NestedScroll { @State ScrollDirection: ScrollDirection = ScrollDirection.Vertical title = '2023落下帷幕,一起迎接2024年*****************************************' review = '评论' - context = '一起迎接2024年,************************,************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************' + context = + '一起迎接2024年,************************,************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************' list = [0, 0, 0, 0] build() { diff --git a/FoldableGuilde/entry/src/main/ets/pages/Index.ets b/FoldableGuilde/entry/src/main/ets/pages/Index.ets index e85cfc24d15260e31e9c6a5572664a910507cd15..b7b8842b83aafeaf5a5092f4a6cdf4fbbbd9bf77 100644 --- a/FoldableGuilde/entry/src/main/ets/pages/Index.ets +++ b/FoldableGuilde/entry/src/main/ets/pages/Index.ets @@ -37,9 +37,11 @@ struct Index { judgeDevice() { // [Start judgeDevice] // 1. The device type is phone, and it supports folding - if (deviceInfo.deviceType === 'phone' && display.isFoldable()) {} + if (deviceInfo.deviceType === 'phone' && display.isFoldable()) { + } // 2. Judging whether the current folding state is an expanded state/folded state/semi-folded state - if (display.getFoldStatus() === display.FoldStatus.FOLD_STATUS_EXPANDED) {} + if (display.getFoldStatus() === display.FoldStatus.FOLD_STATUS_EXPANDED) { + } // [End judgeDevice] } diff --git a/FoldableGuilde/entry/src/main/ets/utils/source_add1.ets b/FoldableGuilde/entry/src/main/ets/utils/source_add1.ets index 5f0cbd9db2f18627f1e7af90394b30cca90cfda1..4d6024874ba93954bb8ca3c2489b429b84d07d0f 100644 --- a/FoldableGuilde/entry/src/main/ets/utils/source_add1.ets +++ b/FoldableGuilde/entry/src/main/ets/utils/source_add1.ets @@ -1,6 +1,6 @@ @Entry @Component -// [Start ScrollTest] + // [Start ScrollTest] export struct ScrollTest { // Height of fixed area @State barHeight: number = 56; @@ -50,4 +50,5 @@ export struct ScrollTest { }) } } + // [End ScrollTest] \ No newline at end of file diff --git a/FoldableGuilde/entry/src/main/ets/utils/source_add2.ets b/FoldableGuilde/entry/src/main/ets/utils/source_add2.ets index b8118c42b367dbcbea2eb24513182e98d09d06a2..957933d16ff3823ae399a5353a4456c94ee26933 100644 --- a/FoldableGuilde/entry/src/main/ets/utils/source_add2.ets +++ b/FoldableGuilde/entry/src/main/ets/utils/source_add2.ets @@ -1,5 +1,6 @@ import { window, display } from '@kit.ArkUI' import { BusinessError } from '@kit.BasicServicesKit'; + export class Breakpoint { // [Start source_add2] // Update horizontal breakpoints according to window width @@ -26,6 +27,7 @@ export class Breakpoint { console.error(`Failed to obtain the top window. Cause code: ${err.code}, message: ${err.message}`); }); } + // Update the vertical breakpoint according to the window width-height ratio updateHeightBreakpoint(): void { const uiContext: UIContext | undefined = AppStorage.get('uiContext'); @@ -48,5 +50,6 @@ export class Breakpoint { console.error(`Failed to obtain the top window. Cause code: ${err.code}, message: ${err.message}`); }); } + // [End source_add2] } \ No newline at end of file diff --git a/FoldableGuilde/entry/src/main/ets/utils/source_add3.ets b/FoldableGuilde/entry/src/main/ets/utils/source_add3.ets index 598188a876e49c668a6b91515b482af6e55823ea..396030b5f7ad55d53e541764d1e52b46b470e990 100644 --- a/FoldableGuilde/entry/src/main/ets/utils/source_add3.ets +++ b/FoldableGuilde/entry/src/main/ets/utils/source_add3.ets @@ -1,5 +1,6 @@ import { window } from '@kit.ArkUI'; import { BusinessError } from '@kit.BasicServicesKit'; + export class BreakpointHeight { updateHeightBreakpoint(): void { const uiContext: UIContext | undefined = AppStorage.get('uiContext'); diff --git a/LiteWearable/entry/src/main/js/MainAbility/cryptoFramework/cryptoFramework.js b/LiteWearable/entry/src/main/js/MainAbility/cryptoFramework/cryptoFramework.js index a15bc8599dcf52fc8e6fa527d9e1455e2df25335..7023409f5385ddbd3e1281fb59dde4cf2de1fa55 100644 --- a/LiteWearable/entry/src/main/js/MainAbility/cryptoFramework/cryptoFramework.js +++ b/LiteWearable/entry/src/main/js/MainAbility/cryptoFramework/cryptoFramework.js @@ -1,5 +1,6 @@ // [Start do_md] import cryptoFramework from '@ohos.security.cryptoFramework'; + // [StartExclude do_md] export default { data: { @@ -9,6 +10,7 @@ export default { this.title = "Hello World"; } }; + // [EndExclude do_md] function stringToUint8Array(str) { let arr = []; @@ -52,6 +54,7 @@ function doMd() { } console.info(`md len: ${mdLen}`); } + // [End do_md] // [Start do_rand] function doRand() { @@ -89,4 +92,5 @@ function doRand() { return 'doRand error'; } } + // [End do_rand] \ No newline at end of file diff --git a/LiteWearable/entry/src/main/js/MainAbility/detail/detail.hml b/LiteWearable/entry/src/main/js/MainAbility/detail/detail.hml index f3a9eb9f0584f43620bce0bd9beb081227905991..416d749bffb8c5f8f27fc494ddbccfcdbad22b81 100644 --- a/LiteWearable/entry/src/main/js/MainAbility/detail/detail.hml +++ b/LiteWearable/entry/src/main/js/MainAbility/detail/detail.hml @@ -6,4 +6,5 @@ + \ No newline at end of file diff --git a/LiteWearable/entry/src/main/js/MainAbility/details/details.hml b/LiteWearable/entry/src/main/js/MainAbility/details/details.hml index 43daa6f9bf359f5a6a6f676e74a292cd71aac92d..99fd95323df13d428fec67dacfce71aa3f121856 100644 --- a/LiteWearable/entry/src/main/js/MainAbility/details/details.hml +++ b/LiteWearable/entry/src/main/js/MainAbility/details/details.hml @@ -6,4 +6,5 @@ + \ No newline at end of file diff --git a/LiteWearable/entry/src/main/js/MainAbility/event/event.hml b/LiteWearable/entry/src/main/js/MainAbility/event/event.hml index 2d1641b081ce0babd84043357ea1411c8216316a..907b461186f92a28948df93d1e9ea42f1cf34b86 100644 --- a/LiteWearable/entry/src/main/js/MainAbility/event/event.hml +++ b/LiteWearable/entry/src/main/js/MainAbility/event/event.hml @@ -1,9 +1,10 @@
- + Hello World
+ \ No newline at end of file diff --git a/LiteWearable/entry/src/main/js/MainAbility/exit/exit.hml b/LiteWearable/entry/src/main/js/MainAbility/exit/exit.hml index 9b0a820d11f8cb72f2dfa22b34e69027fc8fab19..bfcf84386f271bc812026641790ee2b536cae93d 100644 --- a/LiteWearable/entry/src/main/js/MainAbility/exit/exit.hml +++ b/LiteWearable/entry/src/main/js/MainAbility/exit/exit.hml @@ -6,4 +6,5 @@ + \ No newline at end of file diff --git a/LiteWearable/entry/src/main/js/MainAbility/pages/index/index.hml b/LiteWearable/entry/src/main/js/MainAbility/pages/index/index.hml index 4999668eeef4bf3b3bed103ae631e59555cbd9c0..a388e68ce8bc47077aa65b655548f1c0eab1fa9f 100644 --- a/LiteWearable/entry/src/main/js/MainAbility/pages/index/index.hml +++ b/LiteWearable/entry/src/main/js/MainAbility/pages/index/index.hml @@ -6,4 +6,5 @@ + \ No newline at end of file diff --git a/LiteWearable/entry/src/main/js/MainAbility/screenLock/screenLock.js b/LiteWearable/entry/src/main/js/MainAbility/screenLock/screenLock.js index 119a8bb9fa579e0e51e51e284d7ab6450db5fb20..a0558a0b225f95e5f80c6f01c5b06d46beff4db0 100644 --- a/LiteWearable/entry/src/main/js/MainAbility/screenLock/screenLock.js +++ b/LiteWearable/entry/src/main/js/MainAbility/screenLock/screenLock.js @@ -25,6 +25,7 @@ function unlockScreen() { return result; } + // [End unlock_screen] // [Start is_screen_locked] function isScreenLocked() { @@ -40,6 +41,7 @@ function isScreenLocked() { }); return result; } + // [End is_screen_locked] // [Start is_secure_mode] function isSecureMode() { @@ -55,4 +57,5 @@ function isSecureMode() { }); return result; } + // [End is_secure_mode] \ No newline at end of file diff --git a/LiteWearable/entry/src/main/js/MainAbility/security/DES.js b/LiteWearable/entry/src/main/js/MainAbility/security/DES.js index efa05f9af4c6be0efd0340185ee73b9d40f38da8..042dc8895e7af93241ad0699711ef79e1aa4851d 100644 --- a/LiteWearable/entry/src/main/js/MainAbility/security/DES.js +++ b/LiteWearable/entry/src/main/js/MainAbility/security/DES.js @@ -13,6 +13,7 @@ let IV = '12345678'; let plainText = 'DESAAAdffssghCBC5612345612345L64'; // 密文,存放加密后数据 let cipherText = ''; + // [EndExclude des_generate] // [StartExclude des_encrypt] @@ -53,6 +54,7 @@ function generateDESKey() { }); return huksInfo; } + // [EndExclude des_encrypt] // [End des_generate] function getDesCBCEncryptProperties() { @@ -171,6 +173,7 @@ function encryptDES() { return huksInfo; } + // [EndExclude des_decrypt] function stringToUint8Array(str) { let arr = []; @@ -189,6 +192,7 @@ function uint8ArrayToString(fileData) { return dataString; } + // [End des_encrypt] function GetDesCBCDecryptProperties() { diff --git a/LiteWearable/entry/src/main/js/MainAbility/security/DesCBC64.js b/LiteWearable/entry/src/main/js/MainAbility/security/DesCBC64.js index 39f36e765943a5b5da1e3bb59729ea84bf28b509..590ab8c4d7ffec034053d63bf272c8069d6c4339 100644 --- a/LiteWearable/entry/src/main/js/MainAbility/security/DesCBC64.js +++ b/LiteWearable/entry/src/main/js/MainAbility/security/DesCBC64.js @@ -3,6 +3,7 @@ import huks from '@ohos.security.huks'; const KEY_ALIAS = 'DesCBC64KeyAlias'; + // [StartExclude delete_key_process] function isKeyItemExist() { let huksInfo; @@ -20,6 +21,7 @@ function isKeyItemExist() { return huksInfo; } + // [End is_key_item_exist] // [EndExclude delete_key_process] function deleteKeyProcess() { @@ -36,4 +38,5 @@ function deleteKeyProcess() { }) return huksInfo; } + // [End delete_key_process] \ No newline at end of file diff --git a/LiteWearable/entry/src/main/js/MainAbility/security/HMAC.js b/LiteWearable/entry/src/main/js/MainAbility/security/HMAC.js index c3048f3cf141a0733ac714f956ba137d2ed27a00..b5532bd2663fff575740f1400c94b30de6da934a 100644 --- a/LiteWearable/entry/src/main/js/MainAbility/security/HMAC.js +++ b/LiteWearable/entry/src/main/js/MainAbility/security/HMAC.js @@ -11,6 +11,7 @@ let plainText = 'HMACSAdffssghABC5612345612345192'; let cipherText = ''; // 操作句柄 let handle; + // [EndExclude hmac_generate] // [StartExclude hmac_process] function getHMACGenProperties() { @@ -48,6 +49,7 @@ function generateHMACKey() { }); return huksInfo; } + // [End hmac_generate] // [EndExclude hmac_process] function uint8ArrayToString(fileData) { @@ -163,4 +165,5 @@ function HMACProcess() { } return huksInfo; } + // [End hmac_process] \ No newline at end of file diff --git a/LiteWearable/entry/src/main/js/MainAbility/security/KeyAlias.js b/LiteWearable/entry/src/main/js/MainAbility/security/KeyAlias.js index 2bf669097719b0037752f788cfc25662954772b7..234dc5bfbe23179a648ec4aa782133baa5d0060a 100644 --- a/LiteWearable/entry/src/main/js/MainAbility/security/KeyAlias.js +++ b/LiteWearable/entry/src/main/js/MainAbility/security/KeyAlias.js @@ -71,6 +71,7 @@ function uint8ArrayToString(fileData) { return dataString; } + // [End import_key] // [EndExclude export_key] function exportKeyProcess() { @@ -89,4 +90,5 @@ function exportKeyProcess() { return huksInfo; } + // [End export_key] \ No newline at end of file diff --git a/LiteWearable/entry/src/main/js/MainAbility/style1/style1.hml b/LiteWearable/entry/src/main/js/MainAbility/style1/style1.hml index bc53d37ea47559a2b108ca0f9aee9faa8a588a6e..5a6e0d3dff16a7d16d0b68a670a7a26d520b4551 100644 --- a/LiteWearable/entry/src/main/js/MainAbility/style1/style1.hml +++ b/LiteWearable/entry/src/main/js/MainAbility/style1/style1.hml @@ -2,8 +2,10 @@
+ Hello World
+
+ Hello World
+
+ Hello World
+
- + Hello World
+