config: block system-controller if ivi-resource-manager is found.
authorKrisztian Litkey <kli@iki.fi>
Tue, 17 Dec 2013 16:29:23 +0000 (18:29 +0200)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Thu, 8 Jan 2015 16:37:12 +0000 (18:37 +0200)
If ivi-resource-manager is found load it and prevent
system-controller from being loaded. Otherwise load
system-controller if it is found.

Change-Id: Icac35836c96f1d98f1631fe70e5f067d3f57521e

packaging.in/murphy.lua

index a64df72..2b130dc 100644 (file)
@@ -1,4 +1,4 @@
-with_system_controller = false
+with_system_controller = true
 
 m = murphy.get()
 
@@ -60,8 +60,9 @@ else
     m:info("No audio session manager plugin found...")
 end
 
-if m:plugin_exists('ivi-resource-manager') and not with_system_controller then
+if m:plugin_exists('ivi-resource-manager') then
     m:load_plugin('ivi-resource-manager')
+    with_system_controller = false
 end
 
 -- define application classes
@@ -167,9 +168,7 @@ zone {
 
 
 -- define resource classes
-if not m:plugin_exists('ivi-resource-manager') and
-   not with_system_controller
-then
+if not m:plugin_exists('ivi-resource-manager') then
    resource.class {
         name = "audio_playback",
         shareable = true,
@@ -453,10 +452,13 @@ m:try_load_plugin('telephony')
 
 -- system controller test setup
 
-if not with_system_controller then
+if not with_system_controller or
+   not m:plugin_exists('system-controller') then
    return
 end
 
+m:load_plugin('system-controller')
+
 window_operation_names = {
     [1] = "create",
     [2] = "destroy",