diff options
author | Daniel d'Andrada <daniel.dandrada@canonical.com> | 2015-06-15 11:03:09 -0300 |
---|---|---|
committer | Daniel d'Andrada <daniel.dandrada@canonical.com> | 2015-06-15 11:03:09 -0300 |
commit | f62174f1f0902d2653f63bd95199ff1ad8d65bee (patch) | |
tree | 1aae4b2313df8e0eb32c28e96699ade51c633d90 /src | |
parent | 57c6214a0da670cf767cc44b8c74296f20a083db (diff) |
s/RunningWithoutWakelock/RunningInBackground
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/Unity/Application/application.cpp | 16 | ||||
-rw-r--r-- | src/modules/Unity/Application/application.h | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/modules/Unity/Application/application.cpp b/src/modules/Unity/Application/application.cpp index 27b6c85..7b109c8 100644 --- a/src/modules/Unity/Application/application.cpp +++ b/src/modules/Unity/Application/application.cpp @@ -195,8 +195,8 @@ const char* Application::internalStateToStr(InternalState state) return "Starting"; case InternalState::Running: return "Running"; - case InternalState::RunningWithoutWakelock: - return "RunningWithoutWakelock"; + case InternalState::RunningInBackground: + return "RunningInBackground"; case InternalState::SuspendingWaitSession: return "SuspendingWaitSession"; case InternalState::SuspendingWaitProcess: @@ -263,7 +263,7 @@ Application::State Application::state() const case InternalState::Starting: return Starting; case InternalState::Running: - case InternalState::RunningWithoutWakelock: + case InternalState::RunningInBackground: case InternalState::SuspendingWaitSession: case InternalState::SuspendingWaitProcess: return Running; @@ -302,7 +302,7 @@ void Application::applyRequestedState() suspend(); } else if ((m_state == InternalState::Suspended || m_state == InternalState::SuspendingWaitSession - || m_state == InternalState::RunningWithoutWakelock) + || m_state == InternalState::RunningInBackground) && m_requestedState == RequestedRunning) { resume(); } else if (m_state == InternalState::DiedUnexpectedly && m_requestedState == RequestedRunning) { @@ -363,7 +363,7 @@ void Application::setSession(SessionInterface *newSession) switch (m_state) { case InternalState::Starting: case InternalState::Running: - case InternalState::RunningWithoutWakelock: + case InternalState::RunningInBackground: m_session->resume(); break; case InternalState::SuspendingWaitSession: @@ -418,7 +418,7 @@ void Application::setState(Application::InternalState state) case InternalState::Running: acquireWakelock(); break; - case InternalState::RunningWithoutWakelock: + case InternalState::RunningInBackground: releaseWakelock(); break; case InternalState::Suspended: @@ -497,7 +497,7 @@ void Application::suspend() // There's no need to keep the wakelock as the process is never suspended // and thus has no cleanup to perform when (for example) the display is // blanked. - setState(InternalState::RunningWithoutWakelock); + setState(InternalState::RunningInBackground); } else { setState(InternalState::SuspendingWaitSession); m_session->suspend(); @@ -516,7 +516,7 @@ void Application::resume() } else if (m_state == InternalState::SuspendingWaitSession) { setState(InternalState::Running); m_session->resume(); - } else if (m_state == InternalState::RunningWithoutWakelock) { + } else if (m_state == InternalState::RunningInBackground) { setState(InternalState::Running); } } diff --git a/src/modules/Unity/Application/application.h b/src/modules/Unity/Application/application.h index 7c0c465..4dad703 100644 --- a/src/modules/Unity/Application/application.h +++ b/src/modules/Unity/Application/application.h @@ -79,7 +79,7 @@ public: enum class InternalState { Starting, Running, - RunningWithoutWakelock, + RunningInBackground, SuspendingWaitSession, SuspendingWaitProcess, Suspended, |