自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
设备调度
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
设备调度模块包含一种逻辑,用于检测设备是否处于空闲状态并且可以重新启动而不会造成用户中断。
此模块可通过向安装程序提供可靠的重新启动就绪信号来提高软件更新的采用率。借助可靠的重新启动就绪信号,安装程序能够重新启动设备以应用更新,同时确保用户不会受到更新干扰。
相较于等待设备自然重新启动,在设备空闲时重新启动设备可实现更快的更新。通过缩短应用更新所需的时间,用户可以更快地接收重要修复,从而改善设备的整体运行状况。更快的更新采用速度也能促使更快地发现性能下降的问题。
此逻辑可以更新,因为确定设备的重新启动就绪状态涉及对多个条件的考量。这些条件可能会随着时间推移而变化,因此能够更新此逻辑可确保重新启动就绪信号保持有效。
模块边界
在 Android 12 中,此模块包含以下新目录中的代码:
packages/modules/Scheduling
设备调度模块 (com.android.scheduling
) 以 APEX 软件包的形式提供。
该模块包含两个 JAR 文件:
依赖项
此模块不包含任何外部依赖项。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-26。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-03-26。"],[],[],null,["# Device Scheduling\n\nThe Device Scheduling module contains logic that detects whether or not the\ndevice is in an idle state, and may be rebooted without user disruption.\n\nThis module improves the uptake rate of software updates by\nproviding a reliable signal of reboot readiness to installers. A reliable reboot\nreadiness signal enables installers to reboot the device to apply an update,\nwith the knowledge that the user hasn't been disrupted by the update.\n\nAutomatically rebooting devices in an unused state allows for faster updates,\ncompared to waiting for the device to be organically rebooted. By reducing the\ntime taken for an update to be applied, users receive critical fixes quicker\nwhich improves the overall health of their device. A quicker uptake rate\nalso enables regressions to be found sooner.\n\nThis logic is updatable since determining the reboot readiness of a device\ninvolves the consideration of multiple criteria. These criteria may evolve over\ntime, so being able to update this logic ensures that the reboot readiness\nsignal remains valid.\n\nModule boundary\n---------------\n\nIn Android 12, this module contains code in the\nfollowing new directory:\n\n- `packages/modules/Scheduling`\n\nPackage format\n--------------\n\nThe Device Scheduling module (`com.android.scheduling`) ships as an APEX\npackage.\n\nThe module contains two JAR files:\n\n- `framework-scheduling.jar:` Contains the API surface that an installer\n interacts with. This is a part of the `bootclasspath`.\n\n- `service-scheduling.jar`: Contains a new system service,\n `RebootReadinessManagerService`. Loaded by the system server process.\n\nDependencies\n------------\n\nThis module has no external dependencies."]]