setKeepScreenOn
设置当前游戏窗口是否保持常亮。
方法声明
java
void setKeepScreenOn(SUDOPCommonStateHandle handle, SUDOPSetKeepScreenOnParams params);这是 SUDOPWrappedClient 的宿主回调,通过 registerWrappedClient 注册实现。宿主执行实际操作后,通过 SDK 传入的 handle 返回结果;一次请求只返回一次成功或失败。涉及视图和窗口的操作应在 Android 主线程执行。
SUDOPSetKeepScreenOnParams
| 字段 | 类型 | 说明 |
|---|---|---|
keepScreenOn | boolean | 是否保持屏幕常亮 |
返回结果
成功后调用 handle.success(dataJson);失败时调用 handle.failure(retCode, retMsg),其中 retCode 为非 0 错误码。
成功无需附加数据,可调用 handle.success(null)。
句柄类型:global.sud.op.runtime.client.SUDOPCommonStateHandle。
参数类型位于 global.sud.op.runtime.core.model。
