~thomas-voss/platform-api/add-package-config

« back to all changes in this revision

Viewing changes to android/hybris/lifecycle_helpers.h

  • Committer: Thomas Voß
  • Date: 2013-06-20 12:26:40 UTC
  • mfrom: (67.1.1 fix-cmake-setup)
  • Revision ID: thomas.voss@canonical.com-20130620122640-ytzwepxb9qiijzgq
[ Gerry Boland ]
* Add mir suport.
[ Robert Carr ]
* Add mir suport.
[ Ubuntu daily release ]
* Automatic snapshot from revision 69
[ Ricardo Mendoza ]
* Allow remote App Manager to take care of signalling processes.
[ Ubuntu daily release ]
* Automatic snapshot from revision 67

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
{
29
29
struct ProcessKiller : public android::Thread
30
30
{
31
 
    ProcessKiller(const android::sp<ubuntu::detail::ApplicationSession>& as) : as(as)
 
31
    ProcessKiller(const android::sp<ubuntu::detail::ApplicationSession>& as,
 
32
                  const android::sp<android::IAMTaskController>& controller) : as(as),
 
33
                                                                               task_controller(controller)
32
34
    {
33
35
    }
34
36
 
40
42
        if (as->running_state == ubuntu::application::ui::process_suspended)
41
43
        {
42
44
            ALOGI("%s() Suspending process", __PRETTY_FUNCTION__);
43
 
            kill(as->pid, SIGSTOP); // delegate timer elapsed
 
45
            if (task_controller == NULL)
 
46
                kill(as->pid, SIGSTOP); // delegate timer elapsed
 
47
            else
 
48
                task_controller->suspend_task(as->remote_pid);
44
49
        }
45
50
 
46
51
        return false;
47
52
    }
48
53
 
 
54
    android::sp<android::IAMTaskController> task_controller;
49
55
    android::sp<ubuntu::detail::ApplicationSession> as;
50
56
    android::Mutex state_lock;
51
57
    android::Condition state_cond;