自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
DeviceStateMonitor
public
class
DeviceStateMonitor
extends NativeDeviceStateMonitor
用于监控 IDevice
状态的辅助类。
摘要
公共构造函数
DeviceStateMonitor
public DeviceStateMonitor (IDeviceManager mgr,
IDevice device,
boolean fastbootEnabled)
参数 |
mgr |
IDeviceManager |
device |
IDevice |
fastbootEnabled |
boolean |
受保护的方法
postOnlineCheck
protected boolean postOnlineCheck (long waitTime)
对在线设备执行的其他检查
参数 |
waitTime |
long :放弃之前等待的时间(以毫秒为单位) |
返回 |
boolean |
如果在 waitTime 过期之前检查成功,则返回 true 。否则返回 false
|
waitForPmResponsive
protected boolean waitForPmResponsive (long waitTime)
等待设备软件包管理器响应。
参数 |
waitTime |
long :放弃之前等待的时间(以毫秒为单位) |
返回 |
boolean |
如果软件包管理在 waitTime 到期之前响应,则返回 true 。
否则返回 false |
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-26。
[null,null,["最后更新时间 (UTC):2025-03-26。"],[],[]]