Added APIs to control device sleep

These APIs can be used to prevent device into sleep when sending supper big files.

PiperOrigin-RevId: 556809236
This commit is contained in:
Guogang Li
2023-08-14 09:05:11 -07:00
committed by Copybara-Service
parent 06942caeb3
commit fabeff0d57
12 changed files with 74 additions and 1 deletions
+6
View File
@@ -108,4 +108,10 @@ void DeviceInfoImpl::UnregisterScreenLockedListener(
device_info_impl_->UnregisterScreenLockedListener(listener_name);
}
bool DeviceInfoImpl::PreventSleep() {
return device_info_impl_->PreventSleep();
}
bool DeviceInfoImpl::AllowSleep() { return device_info_impl_->AllowSleep(); }
} // namespace nearby