PowerManagementService.kt 636 B

1234567891011121314151617181920212223242526
  1. package com.nextcloud.client.device
  2. /**
  3. * This service provides all device power management
  4. * functions.
  5. */
  6. interface PowerManagementService {
  7. /**
  8. * Checks if power saving mode is enabled on this device.
  9. * On platforms that do not support power saving mode it
  10. * evaluates to false.
  11. *
  12. * @see android.os.PowerManager.isPowerSaveMode
  13. */
  14. val isPowerSavingEnabled: Boolean
  15. /**
  16. * Checks if the device vendor requires power saving
  17. * exclusion workaround.
  18. *
  19. * @return true if workaround is required, false otherwise
  20. */
  21. val isPowerSavingExclusionAvailable: Boolean
  22. }