android - 为什么我在 Android 开发者中找不到“ACTION_REQUEST_SHUTDOWN”?
问题描述
上个月在Android Developers Doc中发现了这个问题,但是今天找不到了。
有什么想法可以帮助我吗?谢谢!
解决方案
它可能会从 Docs 中删除,因为这是一个隐藏常量,至少在 Android 9 上是这样:
http://androidxref.com/9.0.0_r3/xref/frameworks/base/core/java/android/content/Intent.java#2638
/**
* Activity Action: Start this activity to request system shutdown.
* The optional boolean extra field {@link #EXTRA_KEY_CONFIRM} can be set to true
* to request confirmation from the user before shutting down. The optional boolean
* extra field {@link #EXTRA_USER_REQUESTED_SHUTDOWN} can be set to true to
* indicate that the shutdown is requested by the user.
*
* <p class="note">This is a protected intent that can only be sent
* by the system.
*
* {@hide}
*/
public static final String ACTION_REQUEST_SHUTDOWN
= "com.android.internal.intent.action.REQUEST_SHUTDOWN";
推荐阅读
- qt - QT 的 Netbeans 调试器不会在断点处停止
- react-native - 单击按钮时反应本机不显示循环迭代次数
- javascript - 反应子状态没有得到更新
- node.js - 在 NestJs 中将服务注入管道
- javascript - 如何在赛普拉斯中将元素属性值保存为别名?
- ruamel.yaml - Python Ruamel YAML - 如何获取合并部分的评论
- angular - Abp.io Commercial - 身份模块本地化
- json - 从不同文件中获取所有 JSON 标头
- r - 如何使用 Purr 或 Tidyverse 中的其他功能来重构此脚本?
- python - 如何打破 Python 上的 while 循环?