Skip to content

feat(core.runtime): 支持Content Provider设置multiprocess="true"#1426

Merged
shifujun merged 1 commit intoTencent:masterfrom
yanglw:dev
Mar 16, 2026
Merged

feat(core.runtime): 支持Content Provider设置multiprocess="true"#1426
shifujun merged 1 commit intoTencent:masterfrom
yanglw:dev

Conversation

@yanglw
Copy link
Contributor

@yanglw yanglw commented Mar 15, 2026

当 multiprocess="true" 时,PluginContainerContentProvider 不会在 Application.onCreate 之前创建,而是在真正被调用时才会创建。

当 PluginContainerContentProvider.onCreate 被调用时,DelegateProviderHolderPrepareListener.onPrepare() 方法已经调用(在 DynamicPluginLoader. 方法中),导致 PluginContainerContentProvider.hostContentProviderDelegate 没有被赋值。

@tencent-adm
Copy link
Member

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@shifujun
Copy link
Collaborator

提交日志检查出错了,原因是标题过长。这个提交日志建议改为:

feat(core.runtime): 支持Content Provider设置multiprocess="true"

当 multiprocess="true" 时,PluginContainerContentProvider 不会在 Application.onCreate 之前创建,而是在真正被调用时才会创建。

当 PluginContainerContentProvider.onCreate 被调用时,DelegateProviderHolderPrepareListener.onPrepare() 方法已经调用(在 DynamicPluginLoader. 方法中),导致 PluginContainerContentProvider.hostContentProviderDelegate 没有被赋值。

当 multiprocess="true" 时,PluginContainerContentProvider 不会在 Application.onCreate 之前创建,而是在真正被调用时才会创建。
当 PluginContainerContentProvider.onCreate 方法被调用时,DelegateProviderHolderPrepareListener.onPrepare 方法已经被调用(在 DynamicPluginLoader.<init> 方法中),导致 PluginContainerContentProvider.hostContentProviderDelegate 没有被赋值。
@yanglw yanglw changed the title feat(core.runtime): 修复当容器 Content Provider multiprocess="true" 时 hostContentProviderDelegate 为 null 的问题 feat(core.runtime): 支持Content Provider设置multiprocess="true" Mar 15, 2026
@shifujun shifujun merged commit adafe8e into Tencent:master Mar 16, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants