Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Implement PowerManager::OnSleep/OnWake #17187

Merged
merged 1 commit into from
Jan 15, 2020
Merged

Conversation

peak3d
Copy link
Contributor

@peak3d peak3d commented Jan 13, 2020

Description

Call CPoweManager OnWake / OnSleep (through IPowerSyscall) when Android activity lifecycle calls onResume / onPause.

Motivation and Context

There are services inside kodi (e.g. PVR EPG poll) which should be deactivated when kodi is suspended.

How Has This Been Tested?

  • Launch kodi
  • Hide kodi (using Android TV home button) -> OnSleep
  • Bring back kodi into foreground ->OnWake

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

@peak3d peak3d added this to the Matrix 19.0-alpha 1 milestone Jan 13, 2020
@peak3d peak3d requested a review from ksooo January 13, 2020 15:09
Copy link
Member

@ksooo ksooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Runtime-tested. Works as expected. Code lgtm as well.

@peak3d peak3d merged commit a824c01 into xbmc:master Jan 15, 2020
@peak3d peak3d deleted the powercall branch January 15, 2020 11:08
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Jan 21, 2020
[Android] Implement PowerManager::OnSleep/OnWake
@CiNcH83
Copy link

CiNcH83 commented Jan 26, 2020

Looks like new suspend handling fixes this issue. Unfortunately, it brings back this issue. When opening the ACTION MENU on BRAVIA, playback is suspended and resumend when closing it.

@FernetMenta
Copy link
Contributor

@peak3d @ksooo having the OS screensaver as the default is not a good idea on this platform. If TV is paused in timeshift mode and OS screensaver kicks in, state is lost.

@peak3d
Copy link
Contributor Author

peak3d commented Jun 18, 2020

thx @FernetMenta, I'll try to reproduce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants