Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

显示/隐藏桌面图标会导致微件刷新 #4

Open
DawningW opened this issue Oct 11, 2021 · 0 comments
Open

显示/隐藏桌面图标会导致微件刷新 #4

DawningW opened this issue Oct 11, 2021 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@DawningW
Copy link
Contributor

DawningW commented Oct 11, 2021

这是个feature不是bug
系统会接收一些与包相关的广播并且更新微件
例如ACTION_PACKAGE_CHANGED
显示/隐藏桌面图标实际上是启用/禁用了MainActivity的别名这个组件
当启用/禁用时系统就会收到ACTION_PACKAGE_CHANGED广播
并在接收器里面向AppWidgetProvider发送ACTION_APPWIDGET_UPDATE广播
由于只带有要更新的微件的ID, 没有任何额外信息, 所以无法判断
所以如果遇到微件被重置没法刷新的情况就点一下隐藏桌面图标吧😂

@DawningW DawningW added the documentation Improvements or additions to documentation label Oct 11, 2021
@DawningW DawningW self-assigned this Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant