From 64294cd2d2301637dcc01114bf6c60ed3759f8ad Mon Sep 17 00:00:00 2001 From: etkmao Date: Wed, 29 May 2024 17:08:08 +0800 Subject: [PATCH 1/4] fix(ios): animation nullptr crash --- dom/src/dom/animation/animation_manager.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dom/src/dom/animation/animation_manager.cc b/dom/src/dom/animation/animation_manager.cc index 66356b9979b..566c0379155 100644 --- a/dom/src/dom/animation/animation_manager.cc +++ b/dom/src/dom/animation/animation_manager.cc @@ -69,7 +69,9 @@ void AnimationManager::EmplaceNodeProp(const std::shared_ptr& node, con animation_nodes_map_.insert({animation_id, nodeIds}); } auto animation = GetAnimation(animation_id); - node->EmplaceStyleMap(prop, HippyValue(animation->GetStartValue())); + if (animation) { + node->EmplaceStyleMap(prop, HippyValue(animation->GetStartValue())); + } } void AnimationManager::ParseAnimation(const std::shared_ptr& node) { From dadf81a8ed64ffafe9df629e2dff3d86d055db8c Mon Sep 17 00:00:00 2001 From: siguangli Date: Mon, 3 Jun 2024 16:05:56 +0800 Subject: [PATCH 2/4] fix(android): should updateExtra after create host view (#3879) Co-authored-by: siguangli --- .../src/main/java/com/tencent/renderer/node/RenderNode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderer/native/android/src/main/java/com/tencent/renderer/node/RenderNode.java b/renderer/native/android/src/main/java/com/tencent/renderer/node/RenderNode.java index 903eeaacb7a..67c0894cbce 100644 --- a/renderer/native/android/src/main/java/com/tencent/renderer/node/RenderNode.java +++ b/renderer/native/android/src/main/java/com/tencent/renderer/node/RenderNode.java @@ -611,7 +611,7 @@ public int compare(Pair o1, Pair o2) { mControllerManager.updateLayout(mClassName, mRootId, mId, mX, mY, mWidth, mHeight); resetNodeFlag(FLAG_UPDATE_LAYOUT); } - if (checkNodeFlag(FLAG_UPDATE_EXTRA)) { + if (checkNodeFlag(FLAG_UPDATE_EXTRA) && getHostView() != null) { mControllerManager.updateExtra(mRootId, mId, mClassName, mExtra); resetNodeFlag(FLAG_UPDATE_EXTRA); } From 124cf3b168aec614bea265d02d58dd9820622a59 Mon Sep 17 00:00:00 2001 From: wwwcg Date: Fri, 31 May 2024 19:44:28 +0800 Subject: [PATCH 3/4] docs(privacy): add privacy guide for developer --- docs/development/_sidebar.md | 1 + docs/development/privacy-developer-guide.md | 29 +++++++++++++++++++++ docs/development/privacy.md | 14 +++++----- 3 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 docs/development/privacy-developer-guide.md diff --git a/docs/development/_sidebar.md b/docs/development/_sidebar.md index 27ff7b6d514..fe7159d8d76 100644 --- a/docs/development/_sidebar.md +++ b/docs/development/_sidebar.md @@ -19,3 +19,4 @@ - [调试](development/debug.md) - [技术支持](development/support.md) - [隐私政策](development/privacy.md) +- [开发者合规指南](development/privacy-developer-guide.md) diff --git a/docs/development/privacy-developer-guide.md b/docs/development/privacy-developer-guide.md new file mode 100644 index 00000000000..19af7447f14 --- /dev/null +++ b/docs/development/privacy-developer-guide.md @@ -0,0 +1,29 @@ +# Hippy SDK 开发者合规指南 + +合规三步走: + +## 第一步:确保集成Hippy SDK的App有《隐私政策》并合规展示 + +1. APP首次运行时应通过弹窗等明显方式提示用户阅读App的隐私政策 + +2. 请务必在APP隐私政策中增加以下内容,请参考[Hippy SDK个人信息保护规则](development/privacy.md): + +* 在APP《已收集个人信息清单》中展示SDK收集的用户个人信息基本情况,包括信息种类、使用目的、使用场景 + +* 在APP《与第三方共享个人信息清单》中展示提供SDK的法人主体名称、产品/类型、向SDK提供的个人信息种类、使用目的、使用场景、共享方式及SDK隐私政策链接 + +* 在APP的《第三方SDK目录》中展示接入的SDK名称、提供SDK的法人主体名称、SDK的使用目的、处理方式、采集的个人信息类型、联系方式以及隐私政策链接 + +## 第二步:APP合规接入Hippy SDK + +1. 由用户自主选择是否启用Hippy SDK + +2. Hippy SDK的使用需取得用户的有效同意 + +3. APP在非服务所必须或无合理应用场景下,不得启动Hippy SDK + +4. APP提供给SDK的个人信息,请务必保证已依法获得用户同意 + +## 第三步:延迟初始化Hippy SDK + +请务必在用户同意《隐私政策》后再初始化Hippy SDK。 diff --git a/docs/development/privacy.md b/docs/development/privacy.md index 566c839293a..597f9ef9c2c 100644 --- a/docs/development/privacy.md +++ b/docs/development/privacy.md @@ -36,25 +36,27 @@ Hippy SDK(以下简称“SDK产品”)由深圳市腾讯计算机系统有限公 ## 一、我们收集的信息及我们如何使用信息 -(一) 为实现SDK产品功能所需收集的个人信息 +### (一) 为实现SDK产品功能所需收集的个人信息 为实现SDK产品的相应功能所必须,我们将向终端用户或开发者收集终端用户在使用与SDK产品相关的功能时产生的如下个人信息: -1. Hippy SDK iOS版 +#### 1. Hippy SDK iOS版 | 个人信息类型 | 使用目的及功能场景 | 处理方式 | | --- | --- | --- | -|手机型号【必选】|提供调试服务时显示设备的基本信息,作为基础环境信息提供给开发框架的使用者|仅读取,不保存到本地,也不上传服务器| +|手机型号【必选】|提供调试服务时显示设备的基本信息,作为环境信息提供给开发框架的使用者|仅读取,不保存到本地,也不上传服务器| -1. Hippy SDK Android版 +Hippy SDK iOS版当前不存在拓展功能,无可选个人信息。 + +#### 2. Hippy SDK Android版 Android版SDK不会为实现SDK产品功能而收集个人信息。 -(二) 为实现SDK产品功能所需的权限 +### (二) 为实现SDK产品功能所需的权限 SDK不会为实现SDK产品功能而申请敏感权限。 -(三) 根据法律法规的规定,以下是征得用户同意的例外情形: +### (三) 根据法律法规的规定,以下是征得用户同意的例外情形 1. 为订立、履行与终端用户的合同所必需; From eb54a0550c98cd40a2992f56b50658c36e4bb5d4 Mon Sep 17 00:00:00 2001 From: wwwcg Date: Fri, 31 May 2024 21:33:31 +0800 Subject: [PATCH 4/4] refactor(ios): revert hippyShadowView to shadowView for compatibility Important changes: Since Hippy3 changed the name of the method used to get shadowView early on, To maintain compatibility with hippy2, modify it here back to shadowView --- renderer/native/ios/renderer/HippyComponentData.mm | 2 +- .../component/listview/HippyNextBaseListItemViewManager.mm | 2 +- .../renderer/component/listview/HippyNextBaseListViewManager.mm | 2 +- .../ios/renderer/component/modal/HippyModalHostViewManager.mm | 2 +- renderer/native/ios/renderer/component/text/HippyTextManager.mm | 2 +- .../ios/renderer/component/textinput/HippyTextViewManager.mm | 2 +- renderer/native/ios/renderer/component/view/HippyViewManager.h | 2 +- renderer/native/ios/renderer/component/view/HippyViewManager.mm | 2 +- .../component/waterfalllist/HippyWaterfallItemViewManager.m | 2 +- .../component/waterfalllist/HippyWaterfallViewManager.m | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/renderer/native/ios/renderer/HippyComponentData.mm b/renderer/native/ios/renderer/HippyComponentData.mm index 46bb1e329dc..30f376fd65d 100644 --- a/renderer/native/ios/renderer/HippyComponentData.mm +++ b/renderer/native/ios/renderer/HippyComponentData.mm @@ -118,7 +118,7 @@ - (UIView *)createViewWithTag:(NSNumber *)tag initProps:(NSDictionary *)props { } - (HippyShadowView *)createShadowViewWithTag:(NSNumber *)tag { - HippyShadowView *renderObject = [self.manager hippyShadowView]; + HippyShadowView *renderObject = [self.manager shadowView]; renderObject.hippyTag = tag; renderObject.viewName = _name; return renderObject; diff --git a/renderer/native/ios/renderer/component/listview/HippyNextBaseListItemViewManager.mm b/renderer/native/ios/renderer/component/listview/HippyNextBaseListItemViewManager.mm index 0f1e7187826..02dd55cb986 100644 --- a/renderer/native/ios/renderer/component/listview/HippyNextBaseListItemViewManager.mm +++ b/renderer/native/ios/renderer/component/listview/HippyNextBaseListItemViewManager.mm @@ -39,7 +39,7 @@ - (UIView *)view { return [[HippyNextBaseListItemView alloc] init]; } -- (HippyShadowView *)hippyShadowView { +- (HippyShadowView *)shadowView { return [[HippyShadowWaterfallItem alloc] init]; } diff --git a/renderer/native/ios/renderer/component/listview/HippyNextBaseListViewManager.mm b/renderer/native/ios/renderer/component/listview/HippyNextBaseListViewManager.mm index ee65c6afb3c..48d57088841 100644 --- a/renderer/native/ios/renderer/component/listview/HippyNextBaseListViewManager.mm +++ b/renderer/native/ios/renderer/component/listview/HippyNextBaseListViewManager.mm @@ -51,7 +51,7 @@ - (UIView *)view { return [[HippyNextBaseListView alloc] init]; } -- (HippyShadowView *)hippyShadowView { +- (HippyShadowView *)shadowView { return [[HippyShadowListView alloc] init]; } diff --git a/renderer/native/ios/renderer/component/modal/HippyModalHostViewManager.mm b/renderer/native/ios/renderer/component/modal/HippyModalHostViewManager.mm index 8842d547518..cffa11da924 100644 --- a/renderer/native/ios/renderer/component/modal/HippyModalHostViewManager.mm +++ b/renderer/native/ios/renderer/component/modal/HippyModalHostViewManager.mm @@ -83,7 +83,7 @@ - (UIView *)view { return _transitioningDelegate; } -- (HippyShadowView *)hippyShadowView { +- (HippyShadowView *)shadowView { return [HippyModalHostShadowView new]; } diff --git a/renderer/native/ios/renderer/component/text/HippyTextManager.mm b/renderer/native/ios/renderer/component/text/HippyTextManager.mm index e0fc959a344..b8f539b4300 100644 --- a/renderer/native/ios/renderer/component/text/HippyTextManager.mm +++ b/renderer/native/ios/renderer/component/text/HippyTextManager.mm @@ -50,7 +50,7 @@ - (UIView *)view { return [HippyText new]; } -- (HippyShadowView *)hippyShadowView { +- (HippyShadowView *)shadowView { return [HippyShadowText new]; } diff --git a/renderer/native/ios/renderer/component/textinput/HippyTextViewManager.mm b/renderer/native/ios/renderer/component/textinput/HippyTextViewManager.mm index 6dce3fdd917..98299687dcc 100644 --- a/renderer/native/ios/renderer/component/textinput/HippyTextViewManager.mm +++ b/renderer/native/ios/renderer/component/textinput/HippyTextViewManager.mm @@ -62,7 +62,7 @@ - (UIView *)view { return theView; } -- (HippyShadowView *)hippyShadowView { +- (HippyShadowView *)shadowView { return [HippyShadowTextView new]; } diff --git a/renderer/native/ios/renderer/component/view/HippyViewManager.h b/renderer/native/ios/renderer/component/view/HippyViewManager.h index 3143e0798e6..57051853f1c 100644 --- a/renderer/native/ios/renderer/component/view/HippyViewManager.h +++ b/renderer/native/ios/renderer/component/view/HippyViewManager.h @@ -57,7 +57,7 @@ typedef void (^HippyViewManagerUIBlock)(HippyUIManager *uiManager, * most view types. As with the -view method, the -renderObject method should return * a fresh instance each time it is called. */ -- (HippyShadowView *)hippyShadowView; +- (HippyShadowView *)shadowView; /** * Called to notify manager that layout has finished, in case any calculated diff --git a/renderer/native/ios/renderer/component/view/HippyViewManager.mm b/renderer/native/ios/renderer/component/view/HippyViewManager.mm index 9d5c38ee6bd..4b797611b9c 100644 --- a/renderer/native/ios/renderer/component/view/HippyViewManager.mm +++ b/renderer/native/ios/renderer/component/view/HippyViewManager.mm @@ -50,7 +50,7 @@ - (UIView *)view { return [[HippyView alloc] init]; } -- (HippyShadowView *)hippyShadowView { +- (HippyShadowView *)shadowView { return [[HippyShadowView alloc] init]; } diff --git a/renderer/native/ios/renderer/component/waterfalllist/HippyWaterfallItemViewManager.m b/renderer/native/ios/renderer/component/waterfalllist/HippyWaterfallItemViewManager.m index 719c6422dd8..0e49d4e0016 100644 --- a/renderer/native/ios/renderer/component/waterfalllist/HippyWaterfallItemViewManager.m +++ b/renderer/native/ios/renderer/component/waterfalllist/HippyWaterfallItemViewManager.m @@ -32,7 +32,7 @@ - (UIView *)view { return [HippyWaterfallItemView new]; } -- (HippyShadowView *)hippyShadowView { +- (HippyShadowView *)shadowView { return [[HippyShadowWaterfallItem alloc] init]; } diff --git a/renderer/native/ios/renderer/component/waterfalllist/HippyWaterfallViewManager.m b/renderer/native/ios/renderer/component/waterfalllist/HippyWaterfallViewManager.m index 7655d4019db..5e3e33f1521 100644 --- a/renderer/native/ios/renderer/component/waterfalllist/HippyWaterfallViewManager.m +++ b/renderer/native/ios/renderer/component/waterfalllist/HippyWaterfallViewManager.m @@ -49,7 +49,7 @@ - (UIView *)view { return [[HippyWaterfallView alloc] init]; } -- (HippyShadowView *)hippyShadowView { +- (HippyShadowView *)shadowView { return [[HippyShadowListView alloc] init]; }